def test_frexp_with_out(self): X = dparray.array([0.5, 4.7]) mant = dparray.empty((2, ), dtype="d") exp = dparray.empty((2, ), dtype="i4") res = numpy.frexp(X, out=(mant, exp)) self.assertTrue(res[0] is mant) self.assertTrue(res[1] is exp)
def numba_usmarray_empty(): return usmarray.empty((10, 10))
def test_numpy_sum_with_dparray_out(self): res = dparray.empty((self.X.shape[1], ), dtype=self.X.dtype) res2 = numpy.sum(self.X, axis=0, out=res) self.assertTrue(res is res2) self.assertIsInstance(res2, dparray.ndarray)
def test_numpy_sum_with_dparray_out(): X = get_arg() res = dparray.empty((X.shape[1], ), dtype=X.dtype) res2 = numpy.sum(X, axis=0, out=res) assert res is res2 assert isinstance(res2, dparray.ndarray)