-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Implement shape argument in *_like functions #4875
Copy link
Copy link
Closed
Labels
Description
The shape argument in empty_like (and counterparts: full_like, ones_like and zeros_like) is important to guarantee functions that depend on creation of such arrays (without _like) to work correctly with the introduction of NEP-18 and _meta in Dask arrays. The argument was introduced by numpy/numpy#13046.
An example where we need such functionality is the moment function, creating both ones and zeros, also with non-default chunks:
Line 472 in fb407f5
| return ones(reduced.shape, chunks=reduced.chunks, dtype='f8') |
Reactions are currently unavailable