(self, other, new)
Do the pow operator.
        with new, the user can choose between ipow or just pow
Do the pow operator.
        with new, the user can choose between ipow or just pow
Do the pow operator . with new the user can choose between ipow or just pow
def _pow(self, other, new):
        """
        Do the pow operator.
        with new, the user can choose between ipow or just pow
        """

        if isinstance(other, GPUArray):
            if not self.flags.forc or not other.flags.forc:
                raise RuntimeError(
                    "only contiguous arrays may "
                    "be used as arguments to this operation"
                )

            assert self.shape == other.shape

            if new:
                result = self._new_like_me(_get_common_dtype(self, other))
            else:
                result = self

            func = elementwise.get_pow_array_kernel(
                self.dtype, other.dtype, result.dtype
            )

            func.prepared_async_call(
                self._grid,
                self._block,
                None,
                self.gpudata,
                other.gpudata,
                result.gpudata,
                self.mem_size,
            )

            return result
        else:
            if not self.flags.forc:
                raise RuntimeError(
                    "only contiguous arrays may "
                    "be used as arguments to this operation"
                )

            if new:
                result = self._new_like_me()
            else:
                result = self
            func = elementwise.get_pow_kernel(self.dtype)
            func.prepared_async_call(
                self._grid,
                self._block,
                None,
                other,
                self.gpudata,
                result.gpudata,
                self.mem_size,
            )

            return result
def _pow ( self , other , new ) : if isinstance ( other , GPUArray ) : if not self . flags . forc or not other . flags . forc : raise RuntimeError ( "only contiguous arrays may " "be used as arguments to this operation" ) assert self . shape == other . shape if new : result = self . _new_like_me ( _get_common_dtype ( self , other ) ) else : result = self func = elementwise . get_pow_array_kernel ( self . dtype , other . dtype , result . dtype ) func . prepared_async_call ( self . _grid , self . _block , None , self . gpudata , other . gpudata , result . gpudata , self . mem_size , ) return result else : if not self . flags . forc : raise RuntimeError ( "only contiguous arrays may " "be used as arguments to this operation" ) if new : result = self . _new_like_me ( ) else : result = self func = elementwise . get_pow_kernel ( self . dtype ) func . prepared_async_call ( self . _grid , self . _block , None , other , self . gpudata , result . gpudata , self . mem_size , ) return result