Пример #1
0
 def test_one(self):
     a = core.ndarray((1, ), dtype=cupy.int32)
     self.assertEqual(core._get_strides_for_nocopy_reshape(a, (1, 1, 1)),
                      [4, 4, 4])
Пример #2
0
 def test_one(self):
     a = core.ndarray((1,), dtype=cupy.int32)
     self.assertEqual(core._get_strides_for_nocopy_reshape(a, (1, 1, 1)),
                      [4, 4, 4])
Пример #3
0
 def test_different_size(self):
     a = core.ndarray((2, 3))
     self.assertEqual(core._get_strides_for_nocopy_reshape(a, (1, 5)), [])
Пример #4
0
 def test_different_size(self):
     a = core.ndarray((2, 3))
     self.assertEqual(core._get_strides_for_nocopy_reshape(a, (1, 5)),
                      [])