jorisvandenbossche opened a new issue, #42013:
URL: https://github.com/apache/arrow/issues/42013
The `filter` method on array is strict about the mask argument to pass. It
needs to be an actual pyarrow array:
```python
>>> arr = pa.array([1, 2, 3])
>>> arr.filter(np.array([True, False, True]))
...
TypeError: Argument 'mask' has incorrect type (expected pyarrow.lib.Array,
got numpy.ndarray)
```
while in many other places we will coerce input to a pyarrow array, for
example in the equivalent `take`:
```python
>>> arr.take(np.array([0, 2]))
<pyarrow.lib.Int64Array object at 0x7f488e2e3820>
[
1,
3
]
```
--
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]