fix: Resolve all array.pyi errors#209
Closed
dangotbanned wants to merge 15 commits intozen-xu:mainfrom
Closed
Conversation
`from_buffers` is closers, but still needs the incompatible override
The overload is accurate, `pyarrow` just doesn't play by the rules - https://arrow.apache.org/docs/python/generated/pyarrow.ListArray.html#pyarrow.ListArray.from_arrays - https://arrow.apache.org/docs/python/generated/pyarrow.MapArray.html#pyarrow.MapArray.from_arrays
33 tasks
This was referenced Apr 20, 2025
dangotbanned
added a commit
to narwhals-dev/narwhals
that referenced
this pull request
Apr 30, 2025
`pa.array` fix is in (zen-xu/pyarrow-stubs#209) ``` narwhals/_arrow/series.py:442: error: No overload variant matches argument types "Int64Array", "UInt64Array" [call-overload] indices_native = pc.take(indices_native, sorting_indices) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ narwhals/_arrow/series.py:442: note: Possible overload variants: narwhals/_arrow/series.py:442: note: def [_ArrayT: Array[Any] | ChunkedArray[Any]] array_take(_ArrayT, list[int] | list[int | None] | Int16Array | Int32Array | Int64Array | ChunkedArray[Int16Scalar] | ChunkedArray[Int32Scalar] | ChunkedArray[Int64Scalar], /, *, boundscheck: bool = ..., options: TakeOptions | None = ..., memory_pool: MemoryPool | None = ...) -> _ArrayT narwhals/_arrow/series.py:442: note: def array_take(Expression, list[int] | list[int | None] | Int16Array | Int32Array | Int64Array | ChunkedArray[Int16Scalar] | ChunkedArray[Int32Scalar] | ChunkedArray[Int64Scalar], /, *, boundscheck: bool = ..., options: TakeOptions | None = ..., memory_pool: MemoryPool | None = ...) -> Expression narwhals/_arrow/series.py:443: error: No overload variant matches argument types "Any", "UInt64Array" [call-overload] values_native = pc.take(values_native, sorting_indices) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ narwhals/_arrow/series.py:443: note: Possible overload variants: narwhals/_arrow/series.py:443: note: def [_ArrayT: Array[Any] | ChunkedArray[Any]] array_take(_ArrayT, list[int] | list[int | None] | Int16Array | Int32Array | Int64Array | ChunkedArray[Int16Scalar] | ChunkedArray[Int32Scalar] | ChunkedArray[Int64Scalar], /, *, boundscheck: bool = ..., options: TakeOptions | None = ..., memory_pool: MemoryPool | None = ...) -> _ArrayT narwhals/_arrow/series.py:443: note: def array_take(Expression, list[int] | list[int | None] | Int16Array | Int32Array | Int64Array | ChunkedArray[Int16Scalar] | ChunkedArray[Int32Scalar] | ChunkedArray[Int64Scalar], /, *, boundscheck: bool = ..., options: TakeOptions | None = ..., memory_pool: MemoryPool | None = ...) -> Expression ```
Owner
|
I think #233 has resolved this problem |
10 tasks
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pyrightwarnings resolved