tadeja opened a new issue, #55889: URL: https://github.com/apache/arrow/issues/55889
### Describe the enhancement requested 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). This was suggested by @jorisvandenbossche in https://github.com/apache/arrow/pull/55264#discussion_r4597268249 `numpy.typing.Array1D` is not yet available in numpy 2.4.6 https://github.com/apache/arrow/blob/f53adcf05eba76cf6bf41d945ffd01929f7f32f0/python/requirements-stubs.txt#L9 It's added with numpy 2.6 version: https://numpy.org/devdocs/reference/typing.html#numpy.typing.Array1D > [!NOTE] > Blocked until PyArrow drops Python 3.11 ([EOL 2027-10](https://devguide.python.org/versions/))([EOL 2027-10](https://devguide.python.org/versions/)) as NumPy 2.6 requires Python ≥3.12. ### Component(s) Python -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
