-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Description
This is a bit of a tracking issue: numpy is introducing __array_function__, with which one can override functionality of numpy functions for one's classes. To implement for:
-
Quantity- finally,concatenateand friends will work! See Use __array_function__ to make most numpy functions work on Quantity #8808 andQuantityspecific follow-up in Quantity.__array_function__ follow up for Quantity #8825. -
ShapedLikeNDArray- to cover shape-changing functions things likenp.atleast_1d(Allow numpy shape functions on ShapedNDArray subclasses #10337) - Extend
ShapedLikeNDArraytonp.where,np.concatenateand friends (likenp.hstack,np.r_, etc.) - For
Time, make actual implementations for functions that currently work by creating time object array (e.g.,np.sumonTimeDelta, which is used in gammay [TimeDelta does not support np.sum anymore #10501]; alsonp.diffonTime, andnp.median[requested in AddColumn.valueas an alias forColumn.datafor consistency withQuantityandTime#10962]). - Extend
Timewith other functions that logically can work, such asnp.linspace(which would fix Make it possible to easily generate time series #8596) andnp.isclose(relevant for Time equality comparisons are possibly too precise #8742) - And use it in
NDData, where probably many more functions make sense.
pllim, bsipocz, astrojuanlu, Cadair, jehturner and 1 moreastrojuanlu and eteq