Yash Katariya 06ad3528e9 Use _make_lengths_same for explicit mode too.
We add `None`'s when ndim > len(sharding.spec) and only remove `None`s when `ndim < len(sharding.spec)`. If sharded axes exist, then we error out when removing specs.

PiperOrigin-RevId: 748735303
2025-04-17 10:48:46 -07:00
..