Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
devel:languages:python:numeric
python-xarray
xarray-pr9356-dasktests.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File xarray-pr9356-dasktests.patch of Package python-xarray
From 70e3f30d5a636f6d847acb2dd0d12cffeb601d41 Mon Sep 17 00:00:00 2001 From: Deepak Cherian <deepak@cherian.net> Date: Tue, 13 Aug 2024 19:47:10 -0600 Subject: [PATCH 1/2] xfail np.cross tests xref #9327 --- xarray/core/computation.py | 6 +++--- xarray/tests/test_computation.py | 12 ++++++++---- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/xarray/core/computation.py b/xarray/core/computation.py index 5d21d0836b9..bb7122e82de 100644 --- a/xarray/core/computation.py +++ b/xarray/core/computation.py @@ -23,7 +23,7 @@ from xarray.core.merge import merge_attrs, merge_coordinates_without_align from xarray.core.options import OPTIONS, _get_keep_attrs from xarray.core.types import Dims, T_DataArray -from xarray.core.utils import is_dict_like, is_duck_dask_array, is_scalar, parse_dims +from xarray.core.utils import is_dict_like, is_scalar, parse_dims from xarray.core.variable import Variable from xarray.namedarray.parallelcompat import get_chunked_array_type from xarray.namedarray.pycompat import is_chunked_array @@ -1693,11 +1693,11 @@ def cross( if a.sizes[dim] < b.sizes[dim]: a = a.pad({dim: (0, 1)}, constant_values=0) # TODO: Should pad or apply_ufunc handle correct chunking? - a = a.chunk({dim: -1}) if is_duck_dask_array(a.data) else a + a = a.chunk({dim: -1}) if is_chunked_array(a.data) else a else: b = b.pad({dim: (0, 1)}, constant_values=0) # TODO: Should pad or apply_ufunc handle correct chunking? - b = b.chunk({dim: -1}) if is_duck_dask_array(b.data) else b + b = b.chunk({dim: -1}) if is_chunked_array(b.data) else b else: raise ValueError( f"{dim!r} on {'a' if a.sizes[dim] == 1 else 'b'} is incompatible:" diff --git a/xarray/tests/test_computation.py b/xarray/tests/test_computation.py index 8b480b02472..e974b8b1ac8 100644 --- a/xarray/tests/test_computation.py +++ b/xarray/tests/test_computation.py @@ -2547,7 +2547,8 @@ def test_polyfit_polyval_integration( "cartesian", 1, ], - [ # Test 1 sized arrays with coords: + # Test 1 sized arrays with coords: + pytest.param( xr.DataArray( np.array([1]), dims=["cartesian"], @@ -2562,8 +2563,10 @@ def test_polyfit_polyval_integration( np.array([4, 5, 6]), "cartesian", -1, - ], - [ # Test filling in between with coords: + marks=(pytest.mark.xfail(),), + ), + # Test filling in between with coords: + pytest.param( xr.DataArray( [1, 2], dims=["cartesian"], @@ -2578,7 +2581,8 @@ def test_polyfit_polyval_integration( np.array([4, 5, 6]), "cartesian", -1, - ], + marks=(pytest.mark.xfail(),), + ), ], ) def test_cross(a, b, ae, be, dim: str, axis: int, use_dask: bool) -> None: From deb9e3266ca163575b200960c14c87fc999dcfc6 Mon Sep 17 00:00:00 2001 From: Deepak Cherian <deepak@cherian.net> Date: Tue, 13 Aug 2024 19:49:56 -0600 Subject: [PATCH 2/2] Force numpy>=2 --- ci/requirements/environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/requirements/environment.yml b/ci/requirements/environment.yml index ef02a3e7f23..40ef4a7fc74 100644 --- a/ci/requirements/environment.yml +++ b/ci/requirements/environment.yml @@ -26,7 +26,7 @@ dependencies: - numba - numbagg - numexpr - - numpy + - numpy>=2 - opt_einsum - packaging - pandas
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor