def test_copy(): b = numpy.random.random((2, 3)) a = afnumpy.array(b) c = afnumpy.copy(a) d = numpy.copy(b) a[:] = 0 b[:] = 0 iassert(c, d)
def conj(self): if not numpy.issubdtype(self.dtype, numpy.complex): return afnumpy.copy(self) if(self.d_array is not None): s = arrayfire.conjg(self.d_array) return ndarray(self.shape, dtype=pu.typemap(s.dtype()), af_array=s) else: return self.h_array.conj()
def test_copy(): b = numpy.random.random((2,3)) a = afnumpy.array(b) c = afnumpy.copy(a) d = numpy.copy(b) a[:] = 0 b[:] = 0 iassert(c,d)
def conj(self): if not numpy.issubdtype(self.dtype, numpy.complex): return afnumpy.copy(self) s = arrayfire.conjg(self.d_array) return ndarray(self.shape, dtype=pu.typemap(s.dtype()), af_array=s)