Throw RuntimeError when numpy() is called on a tensor with conjugate or negative bit set (#61925)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/61925
Resolves https://github.com/pytorch/pytorch/issues/59945 and https://github.com/pytorch/pytorch/issues/59946
bc breaking note: Unlike before, complex_tensor.conj().numpy(), complex_float_tensor.conj().view(torch.float64), complex_float_tensor.conj().imag.view(torch.int32) now doesn't return a view but instead errors out
Test Plan: Imported from OSS
Reviewed By: albanD
Differential Revision: D29819288
Pulled By: anjali411
fbshipit-source-id: 4bebec721eb535f44ef4b728bdc75fa444e05d16