You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Implement shape argument in *_like functions #4875
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:
I don't have answers to your questions. Solving this problem probably also involves coming up with those answers. However, you might want to look at dask.array.core.normalize_chunks, which may have some useful functionality here.
Activity
pentschev commentedon Feb 19, 2020
cc @daxiongshu
andersy005 commentedon Mar 5, 2020
I took a stab at addressing this issue, but quickly realized that the shape and chunks of a dask array are intertwined.
shapeis specified and thechunksargument is not?chunkswhen theshapeargument is specified?mrocklin commentedon Mar 8, 2020
I don't have answers to your questions. Solving this problem probably also involves coming up with those answers. However, you might want to look at
dask.array.core.normalize_chunks, which may have some useful functionality here.pentschev commentedon Feb 15, 2021
This has been solved quite a while ago in #6064, thanks @andersy005 !