SIGN IN SIGN UP

Mark several fields of PyArray as const.

* Make py_client, thread_id_bucket, dtype, shape, and sharding const fields in
PyArray::Storage.
* Update ReplaceWithAlias to return an error if the replacement array has a
different client, dtype, shape, or sharding.
* Reorder the fields to put sub word fields together for better packing.

This change is in preparation for fixing data races in free-threaded Python.

PiperOrigin-RevId: 972132314
P
Peter Hawkins committed
23dbabf90a9cc033cae4b74a53f552e6f5965033
Parent: 70dde66
Committed by jax authors <google-ml-automation@google.com> on 8/27/2026, 8:42:11 PM