rok commented on issue #48003:
URL: https://github.com/apache/arrow/issues/48003#issuecomment-3469111196

   Thanks for reporting @randolf-scholz !
   
   Arrow/PyArrow should support multiplication, division, subtraction and 
addition via [compute 
functions](https://arrow.apache.org/docs/cpp/compute.html#arithmetic-functions) 
which are not mapped to the usual arithmetic symbols yet, making this a bit 
harder to find. (@raulcd @AlenkaF I think we wanted to map this at some point?)
   
   So in pyarrow you can run:
   ```python
   import pyarrow as pa
   import pyarrow.compute as pc
   import numpy as np
   x = np.array([0, 1, 2, 3, 4, 5], dtype="timedelta64[s]")
   y = pa.array(x)
   pc.divide(y, 3)
   
   <pyarrow.lib.DurationArray object at 0x76c84b059960>
   [
     0,
     0,
     0,
     1,
     1,
     1
   ]
   ```


-- 
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