mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Implement numpy(force=True) (#109636)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/109636 Approved by: https://github.com/ezyang ghstack dependencies: #109634
This commit is contained in:
committed by
PyTorch MergeBot
parent
1f6828ca99
commit
8597d37536
@ -1820,6 +1820,7 @@ class TestOldViewOps(TestCase):
|
||||
x = torch.tensor([[1, 2], [3, 4], [5, 6]], dtype=dt, device=device)
|
||||
self.assertEqual(x.view(6).shape, [6])
|
||||
|
||||
@skipIfTorchDynamo("conj bit not implemented in TensorVariable yet")
|
||||
@onlyCPU
|
||||
def test_conj_neg_view_numpy_error(self, device):
|
||||
self.assertRaisesRegex(RuntimeError, "has conjugate bit set", lambda: torch.tensor([1 + 2j]).conj().numpy())
|
||||
|
Reference in New Issue
Block a user