Skip to content

Commit 2363eb8

Browse files
authored
Merge branch 'main' into pre-commit-ci-update-config
2 parents 99c719d + 0eac740 commit 2363eb8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1013
-464
lines changed

.github/release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
changelog:
2+
exclude:
3+
authors:
4+
- dependabot
5+
- pre-commit-ci

ci/install-upstream-wheels.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ $conda remove -y numba numbagg sparse
1313
# temporarily remove numexpr
1414
$conda remove -y numexpr
1515
# temporarily remove backends
16-
$conda remove -y cf_units hdf5 h5py netcdf4 pydap
16+
$conda remove -y pydap
1717
# forcibly remove packages to avoid artifacts
1818
$conda remove -y --force \
1919
numpy \
@@ -37,8 +37,7 @@ python -m pip install \
3737
numpy \
3838
scipy \
3939
matplotlib \
40-
pandas \
41-
h5py
40+
pandas
4241
# for some reason pandas depends on pyarrow already.
4342
# Remove once a `pyarrow` version compiled with `numpy>=2.0` is on `conda-forge`
4443
python -m pip install \

ci/requirements/all-but-dask.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ dependencies:
2222
- netcdf4
2323
- numba
2424
- numbagg
25-
- numpy<2
25+
- numpy
2626
- packaging
2727
- pandas
2828
- pint>=0.22

ci/requirements/doc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ dependencies:
2121
- nbsphinx
2222
- netcdf4>=1.5
2323
- numba
24-
- numpy>=1.21,<2
24+
- numpy>=2
2525
- packaging>=21.3
2626
- pandas>=1.4,!=2.1.0
2727
- pooch

ci/requirements/environment-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ dependencies:
2323
- netcdf4
2424
- numba
2525
- numbagg
26-
- numpy<2
26+
- numpy
2727
- packaging
2828
- pandas
2929
# - pint>=0.22

ci/requirements/environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ dependencies:
2626
- numba
2727
- numbagg
2828
- numexpr
29-
- numpy<2
29+
- numpy
3030
- opt_einsum
3131
- packaging
3232
- pandas

doc/api.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ Dataset contents
111111
Dataset.drop_duplicates
112112
Dataset.drop_dims
113113
Dataset.drop_encoding
114+
Dataset.drop_attrs
114115
Dataset.set_coords
115116
Dataset.reset_coords
116117
Dataset.convert_calendar
@@ -306,6 +307,7 @@ DataArray contents
306307
DataArray.drop_indexes
307308
DataArray.drop_duplicates
308309
DataArray.drop_encoding
310+
DataArray.drop_attrs
309311
DataArray.reset_coords
310312
DataArray.copy
311313
DataArray.convert_calendar

doc/getting-started-guide/faq.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,9 +352,9 @@ Some packages may have additional functionality beyond what is shown here. You c
352352
How does xarray handle missing values?
353353
--------------------------------------
354354

355-
**xarray can handle missing values using ``np.NaN``**
355+
**xarray can handle missing values using ``np.nan``**
356356

357-
- ``np.NaN`` is used to represent missing values in labeled arrays and datasets. It is a commonly used standard for representing missing or undefined numerical data in scientific computing. ``np.NaN`` is a constant value in NumPy that represents "Not a Number" or missing values.
357+
- ``np.nan`` is used to represent missing values in labeled arrays and datasets. It is a commonly used standard for representing missing or undefined numerical data in scientific computing. ``np.nan`` is a constant value in NumPy that represents "Not a Number" or missing values.
358358

359359
- Most of xarray's computation methods are designed to automatically handle missing values appropriately.
360360

doc/user-guide/computation.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ However, the functions also take missing values in the data into account:
426426

427427
.. ipython:: python
428428
429-
data = xr.DataArray([np.NaN, 2, 4])
429+
data = xr.DataArray([np.nan, 2, 4])
430430
weights = xr.DataArray([8, 1, 1])
431431
432432
data.weighted(weights).mean()
@@ -444,7 +444,7 @@ If the weights add up to to 0, ``sum`` returns 0:
444444
445445
data.weighted(weights).sum()
446446
447-
and ``mean``, ``std`` and ``var`` return ``NaN``:
447+
and ``mean``, ``std`` and ``var`` return ``nan``:
448448

449449
.. ipython:: python
450450

doc/user-guide/interpolation.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,8 @@ Let's see how :py:meth:`~xarray.DataArray.interp` works on real data.
292292
axes[0].set_title("Raw data")
293293
294294
# Interpolated data
295-
new_lon = np.linspace(ds.lon[0], ds.lon[-1], ds.sizes["lon"] * 4)
296-
new_lat = np.linspace(ds.lat[0], ds.lat[-1], ds.sizes["lat"] * 4)
295+
new_lon = np.linspace(ds.lon[0].item(), ds.lon[-1].item(), ds.sizes["lon"] * 4)
296+
new_lat = np.linspace(ds.lat[0].item(), ds.lat[-1].item(), ds.sizes["lat"] * 4)
297297
dsi = ds.interp(lat=new_lat, lon=new_lon)
298298
dsi.air.plot(ax=axes[1])
299299
@savefig interpolation_sample3.png width=8in

0 commit comments

Comments
 (0)