Пример #1
0
 def test_getitem(self):
     orig = NumpyArrayAdapter(np.arange(4))
     r = ArrayContainer(orig)[:2]
     assert_array_equal(r.ndarray(), orig[:2])
Пример #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))
Пример #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))
Пример #4
0
 def test_getitem(self):
     orig = NumpyArrayAdapter(np.arange(4))
     r = ArrayContainer(orig)[:2]
     assert_array_equal(r.ndarray(), orig[:2])
Пример #5
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))
Пример #6
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))