SIGN IN SIGN UP

Improve code to convert an IFRT string arrays to numpy array.

* refactor and share code to precompute a list of useful numpy types ahead of time out of py_values.cc and into a common place, use it in py_array.cc
* remove backward compatibility code for NumPy < 2.x, since we only support NumPy 2.
* pack strings directly into NumPy arrays, without an intermediate Python string copy.

PiperOrigin-RevId: 972107999
P
Peter Hawkins committed
ccdf7b7df2b1513ed0842c617536b59e1a51866a
Parent: b6143ec
Committed by jax authors <google-ml-automation@google.com> on 8/27/2026, 7:57:01 PM