def test_dparray_as_ndarray(self): Y = dparray.as_ndarray(self.X) self.assertEqual(type(Y), numpy.ndarray)
def test_dparray_from_ndarray(self): Y = dparray.as_ndarray(self.X) dp1 = dparray.from_ndarray(Y) self.assertIsInstance(dp1, dparray.ndarray)
def test_usmarray_from_ndarray(self): """Testing usmarray.from_ndarray""" nd2 = usmarray.as_ndarray(self.usmarray()) dp1 = usmarray.from_ndarray(nd2) self.assertIsInstance(dp1, usmarray.ndarray, type(dp1)) self.assertTrue(usmarray.has_array_interface(dp1))
def numba_usmarray_as_ndarray(a): return usmarray.as_ndarray(a)
def test_usmarray_as_ndarray(self): """Testing usmarray.as_ndarray""" nd2 = usmarray.as_ndarray(self.usmarray()) self.assertEqual(type(nd2), numpy.ndarray, nd2)
def test_dparray_from_ndarray(): X = get_arg() Y = dparray.as_ndarray(X) dp1 = dparray.from_ndarray(Y) assert isinstance(dp1, dparray.ndarray)
def test_dparray_as_ndarray(): X = get_arg() Y = dparray.as_ndarray(X) assert type(Y) == numpy.ndarray
def test_usmarray_from_ndarray(self): """Testing usmarray.from_ndarray""" nd2 = usmarray.as_ndarray(self.usmarray()) dp1 = usmarray.from_ndarray(nd2) assert isinstance(dp1, usmarray.ndarray), type(dp1) assert usmarray.has_array_interface(dp1)
def test_usmarray_as_ndarray(self): """Testing usmarray.as_ndarray""" nd2 = usmarray.as_ndarray(self.usmarray()) assert type(nd2) == numpy.ndarray, nd2