def test_tensor_sqrt_torch_value(self): self.assertTrue( torch.allclose(tensor_sqrt(self.test_torch), self.test_output_torch))
def test_tensor_sqrt_torch_type(self): self.assertIsInstance(tensor_sqrt(self.test_torch), torch.Tensor, 'Output type must be torch.Tensor')
def test_tensor_sqrt_tf_value(self): self.assertTrue( np.allclose( tensor_sqrt(self.test_tf).numpy(), self.test_output_tf.numpy()))
def test_tensor_sqrt_tf_type(self): self.assertIsInstance(tensor_sqrt(self.test_tf), tf.Tensor, 'Output type must be tf.Tensor')
def test_tensor_sqrt_np_value(self): self.assertTrue( np.allclose(tensor_sqrt(self.test_np), self.test_output_np))
def test_tensor_sqrt_np_type(self): self.assertIsInstance(tensor_sqrt(self.test_np), np.ndarray, 'Output type must be NumPy array')