def test_reshape_torch_value(self): self.assertEqual( reshape(self.test_torch, shape=(2, 3)).numpy().shape, (2, 3))
def test_reshape_np_value(self): self.assertEqual(reshape(self.test_np, shape=(4, )).shape, (4, ))
def test_reshape_torch_type(self): self.assertIsInstance(reshape(self.test_torch, shape=(2, 3)), torch.Tensor, 'Output type must be torch.Tensor')
def test_reshape_np_type(self): self.assertIsInstance(reshape(self.test_np, shape=(4, )), (np.ndarray, np.ScalarType), 'Output type must be NumPy')