randolf-scholz opened a new issue, #48003:
URL: https://github.com/apache/arrow/issues/48003

   ### Describe the enhancement requested
   
   `numpy` supports multiplying/dividing `timedelta` values with floats and 
performs automatic rounding to the current unit, e.g.
   
   ```python
   >>> import numpy as np
   >>> x = np.array([0, 1, 2, 3, 4, 5], dtype="timedelta64[s]")
   >>> x * 0.5
   array([0, 0, 1, 1, 2, 2], dtype='timedelta64[s]')
   >>> x * 1.5
   array([0, 1, 3, 4, 6, 7], dtype='timedelta64[s]')
   ```
   
   This is very useful for ML applications where one needs to transform 
timestamps first to durations and then to floats (and back after performing a 
forecast). It would be very nice if `pyarrow` supported this as well, so one 
can directly work with arrow dtypes.
   
   ### Component(s)
   
   C++


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