jamesdow21 commented on issue #37192:
URL: https://github.com/apache/arrow/issues/37192#issuecomment-1680954816
Setup:
```
import numpy as np
import pyarrow as pa
import pyarrow.compute as pc
arr = pa.array(np.random.randint(0, 3_600_000_000, 10000, dtype="int64"),
type=pa.duration("us"))
scalar = pa.scalar(1, type=pa.duration("s"))
```
As a more narrow example, what I'm currently doing (including what I believe
pandas is doing under the hood) essentially works out to
```
pc.divide(
pc.cast(pc.cast(arr, pa.int64()), pa.float64()),
pc.cast(pc.cast(pc.cast(scalar, arr.type), pa.int64()), pa.float64())
)
```
but it would be nice if this worked to give the same result
`pc.divide(arr, scalar)`
--
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]