Wainberg opened a new issue, #40580:
URL: https://github.com/apache/arrow/issues/40580
### Describe the bug, including details regarding any error messages,
version, and platform.
```python
>>> pa.array(np.array([np.datetime64('2024-01-01')])) # works
<pyarrow.lib.Date32Array object at 0x7f60596d2140>
[
2024-01-01
]
>>> pa.array(np.array([np.timedelta64(1, 'ns')], dtype=object)) # works
<pyarrow.lib.DurationArray object at 0x7f60596d2500>
[
1
]
>>> pa.array(np.array([np.datetime64('2024-01-01')], dtype=object)) # fails
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "pyarrow/array.pxi", line 340, in pyarrow.lib.array
File "pyarrow/array.pxi", line 86, in pyarrow.lib._ndarray_to_array
File "pyarrow/types.pxi", line 88, in pyarrow.lib._datatype_to_pep3118
TypeError: int() argument must be a string, a bytes-like object or a real
number, not 'datetime.date'
```
### 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]