You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Python][Annotations] Use numpy.typing.Array1D where only 1-D arrays are accepted #55889
Type annotations currently use NDArray[Any] for NumPy inputs, also where 1-D arrays are accepted like with pa.array(...), mask= parameters, and the array-like inputs of pyarrow.compute.
numpy.typing exposes Array1D, which is like NDArray but with the shape fixed to one dimension. Use it where type checkers should reject 2-D inputs (and keep NDArray elsewhere, for example with tensors).
Activity