Wainberg opened a new issue, #40906:
URL: https://github.com/apache/arrow/issues/40906

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   Arrow disallows mixtures of `int` and `bool`:
   
   ```python
   >>> pa.array([True, 1])
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
     File "pyarrow/array.pxi", line 344, in pyarrow.lib.array
     File "pyarrow/array.pxi", line 42, in pyarrow.lib._sequence_to_array
     File "pyarrow/error.pxi", line 154, in 
pyarrow.lib.pyarrow_internal_check_status
     File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
   pyarrow.lib.ArrowInvalid: Could not convert 1 with type int: tried to 
convert to boolean
   >>> pa.array([1, True])
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
     File "pyarrow/array.pxi", line 344, in pyarrow.lib.array
     File "pyarrow/array.pxi", line 42, in pyarrow.lib._sequence_to_array
     File "pyarrow/error.pxi", line 154, in 
pyarrow.lib.pyarrow_internal_check_status
     File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
   pyarrow.lib.ArrowTypeError: Expected integer, got bool
   ```
   
   but allows mixtures of `int` and `np.bool_`:
   
   ```python
   >>> pa.array([np.bool_(True), 1])
   <pyarrow.lib.Int64Array object at 0x7f0b4968c0a0>
   [
     1,
     1
   ]
   >>> pa.array([1, np.bool_(True)])
   <pyarrow.lib.Int64Array object at 0x7f0b4968c220>
   [
     1,
     1
   ]
   ```
   
   ### 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]

Reply via email to