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

module 'xarray.core' has no attribute 'rolling' #6844

Closed
4 tasks done
davidbrochart opened this issue Jul 28, 2022 · 2 comments
Closed
4 tasks done

module 'xarray.core' has no attribute 'rolling' #6844

davidbrochart opened this issue Jul 28, 2022 · 2 comments

Comments

@davidbrochart
Copy link
Contributor

davidbrochart commented Jul 28, 2022

What happened?

There used to be a xarray.core.rolling, and the documentation suggests it still exists, but with xarray-2022.6.0 I get: module xarray.core has no attribute rolling.
It works with xarray-2022.3.0.

What did you expect to happen?

Shouldn't we be able to access xarray.core.rolling?

Minimal Complete Verifiable Example

import xarray as xr

xr.core.rolling
# Traceback (most recent call last):
#   File "<stdin>", line 1, in <module>
# AttributeError: module 'xarray.core' has no attribute 'rolling'

MVCE confirmation

  • Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue in xarray.
  • Complete example — the example is self-contained, including all data and the text of any traceback.
  • Verifiable example — the example copy & pastes into an IPython prompt or Binder notebook, returning the result.
  • New issue — a search of GitHub Issues suggests this is not a duplicate.

Relevant log output

No response

Anything else we need to know?

No response

Environment

/home/david/mambaforge/envs/xarray_leaflet/lib/python3.10/site-packages/_distutils_hack/__init__.py:33: UserWarning: Setuptools is replacing distutils. warnings.warn("Setuptools is replacing distutils.")

INSTALLED VERSIONS

commit: None
python: 3.10.5 | packaged by conda-forge | (main, Jun 14 2022, 07:06:46) [GCC 10.3.0]
python-bits: 64
OS: Linux
OS-release: 5.15.0-41-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: ('en_US', 'UTF-8')
libhdf5: None
libnetcdf: None

xarray: 2022.6.0
pandas: 1.4.3
numpy: 1.23.1
scipy: None
netCDF4: None
pydap: None
h5netcdf: None
h5py: None
Nio: None
zarr: None
cftime: None
nc_time_axis: None
PseudoNetCDF: None
rasterio: 1.3.0
cfgrib: None
iris: None
bottleneck: None
dask: 2022.7.1
distributed: None
matplotlib: 3.5.2
cartopy: None
seaborn: None
numbagg: None
fsspec: 2022.7.0
cupy: None
pint: None
sparse: None
flox: None
numpy_groupies: None
setuptools: 63.2.0
pip: 22.2.1
conda: None
pytest: None
IPython: 8.4.0
sphinx: None

@davidbrochart davidbrochart added bug needs triage Issue that has not been reviewed by xarray team member labels Jul 28, 2022
@keewis
Copy link
Collaborator

keewis commented Jul 28, 2022

see also #6741

Those modules are no longer imported by default, so you will have to explicitly import them yourself to access them:

import xarray as xr
import xarray.core.rolling

xr.core.rolling

(the changelog lists this under "Internal changes")

@keewis keewis removed bug needs triage Issue that has not been reviewed by xarray team member labels Jul 28, 2022
@davidbrochart
Copy link
Contributor Author

Thanks @keewis !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants