Disable .numpy() and .tolist() for tensor subclasses subclasses and f… (#66642)
authoranjali411 <chourdiaanjali123@gmail.com>
Thu, 14 Oct 2021 23:00:56 +0000 (19:00 -0400)
committerGitHub <noreply@github.com>
Thu, 14 Oct 2021 23:00:56 +0000 (16:00 -0700)
* Disable .numpy() and .tolist() for tensor subclasses subclasses and fix .tolist() for conjugated and negated tensors (#66082)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/66082

Fixes https://github.com/pytorch/pytorch/issues/66024 #65779

cc ezyang anjali411 dylanbespalko mruberry Lezcano nikitaved albanD

Test Plan: Imported from OSS

Reviewed By: Gamrix, albanD

Differential Revision: D31615588

Pulled By: anjali411

fbshipit-source-id: c3e65ef0fe301630eb76732ccd7819683c09aa19

* Apply suggestions from code review

Co-authored-by: Nikita Shulga <nikita.shulga@gmail.com>
Co-authored-by: Nikita Shulga <nshulga@fb.com>

No differences found