Using __array_function__ beyond Quantity?
See original GitHub issueThis 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,concatenate
and friends will work! See #8808 andQuantity
specific follow-up in #8825. -
ShapedLikeNDArray
- to cover shape-changing functions things likenp.atleast_1d
(#10337) - Extend
ShapedLikeNDArray
tonp.where
,np.concatenate
and friends (likenp.hstack
,np.r_
, etc.) - For
Time
, make actual implementations for functions that currently work by creating time object array (e.g.,np.sum
onTimeDelta
, which is used in gammay [#10501]; alsonp.diff
onTime
, andnp.median
[requested in #10962]). - Extend
Time
with other functions that logically can work, such asnp.linspace
(which would fix #8596) andnp.isclose
(relevant for #8742) - And use it in
NDData
, where probably many more functions make sense.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:8
- Comments:16 (16 by maintainers)
Top Results From Across the Web
Array formulas and functions in Excel - examples and guidelines
The tutorial explains what is an array formula in Excel and provides examples of using Excel array functions and constants.
Read more >Array methods - The Modern JavaScript Tutorial
Arrays provide a lot of methods. To make things easier, in this chapter they are split into groups. Add/remove items.
Read more >Description of the limitations for working with arrays in Excel
In Excel, arrays in worksheets are limited by available random access memory, by the total number of array formulas, and by the "entire ......
Read more >Array Functions - Manual - PHP
Compares values only. Ignores indexes of array. Example: array_diff, array_intersect. [prefix] u - will do comparison with user defined function. Letter u can ......
Read more >5. Working with Arrays and Loops - JavaScript Cookbook [Book]
An array is an ordered collection of elements. In JavaScript, an array can be created using formal object notation, or it can be...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Actually, it turns out one of them brought an error in my tests to light, so it was OK. The other, with
block
is less clear, but we had discussion. Anyway, fix is on the way…@mhvk, maybe Numpy should have a job to test against astropy-dev before merging. 😏