Peter Hawkins
|
857fe8f482
|
[NumPy] Replace numpy.asscalar(x) with x.item() in preparation for upgrading 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: 466743223
|
2022-08-10 11:27:07 -07:00 |
|