Example #1
0
 def test_getitem(self):
     orig = NumpyArrayAdapter(np.arange(4))
     r = ArrayContainer(orig)[:2]
     assert_array_equal(r.ndarray(), orig[:2])
Example #2
0
 def test_numpy_array(self):
     array = ArrayContainer(np.arange(24))
     self.assertIsInstance(array.ndarray(), np.ndarray)
     assert_array_equal(array.ndarray(),
                        np.arange(24))
Example #3
0
 def test_biggus_array(self):
     array = ArrayContainer(NumpyArrayAdapter(np.arange(24)))
     self.assertIsInstance(array.ndarray(), np.ndarray)
     assert_array_equal(array.ndarray(),
                        np.arange(24))
 def test_getitem(self):
     orig = NumpyArrayAdapter(np.arange(4))
     r = ArrayContainer(orig)[:2]
     assert_array_equal(r.ndarray(), orig[:2])
 def test_numpy_array(self):
     array = ArrayContainer(np.arange(24))
     self.assertIsInstance(array.ndarray(), np.ndarray)
     assert_array_equal(array.ndarray(), np.arange(24))
 def test_biggus_array(self):
     array = ArrayContainer(NumpyArrayAdapter(np.arange(24)))
     self.assertIsInstance(array.ndarray(), np.ndarray)
     assert_array_equal(array.ndarray(), np.arange(24))