mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
When detecting numpy, assign relavant variables outside the try block (#20739)
Summary: When detecting the presence of NumPy using import, move numpy-related variable assignments outside the try block (i.e., to an else block) to improve readability. Pull Request resolved: https://github.com/pytorch/pytorch/pull/20739 Differential Revision: D15453916 Pulled By: ezyang fbshipit-source-id: d3c37f2b290846be3c6a1462251cbb3e95d493be
This commit is contained in:
committed by
Facebook Github Bot
parent
fd95947e68
commit
795a1a6ffa
Reference in New Issue
Block a user