Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for NumPy 1.20.0 #7084

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions dask/array/ma.py
Expand Up @@ -204,6 +204,7 @@ def getmaskarray(a):


def _masked_array(data, mask=np.ma.nomask, **kwargs):
kwargs.pop("chunks", None) # A Dask kwarg, not NumPy.
dtype = kwargs.pop("masked_dtype", None)
return np.ma.masked_array(data, mask=mask, dtype=dtype, **kwargs)

Expand Down
2 changes: 1 addition & 1 deletion dask/array/tests/test_array_core.py
Expand Up @@ -1577,7 +1577,7 @@ def test_slicing_flexible_type():

def test_slicing_with_object_dtype():
# https://github.com/dask/dask/issues/6892
d = da.from_array(np.array(["a", "b"], dtype=np.object), chunks=(1,))
d = da.from_array(np.array(["a", "b"], dtype=object), chunks=(1,))
assert d.dtype == d[(0,)].dtype


Expand Down
2 changes: 1 addition & 1 deletion dask/array/tests/test_reductions.py
Expand Up @@ -542,7 +542,7 @@ def test_array_cumreduction_axis(func, use_nan, axis, method):
da_func = getattr(da, func)

s = (10, 11, 12)
a = np.arange(np.prod(s)).reshape(s)
a = np.arange(np.prod(s), dtype=float).reshape(s)
if use_nan:
a[1] = np.nan
d = da.from_array(a, chunks=(4, 5, 6))
Expand Down