Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NumPy] Replace numpy.asscalar(x) with x.item() in preparation for up…
…grading NumPy to 1.23. NumPy 1.23 removes numpy.asscalar() (https://numpy.org/doc/stable/release/1.23.0-notes.html#expired-deprecations), which has been deprecated since NumPy 1.16 (https://numpy.org/doc/stable/release/1.16.0-notes.html#new-deprecations). x.item() should be identical to the previous implementation of numpy.asscalar(x) in every way. PiperOrigin-RevId: 466151898
- Loading branch information