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
# Your code hereds_gamma.reset_coords('month', drop=True, inplace=True)
~/miniconda3/envs/spi_multi/lib/python3.8/site-packages/xarray/core/utils.pyin_check_inplace(inplace)
38def_check_inplace(inplace: Optional[bool]) ->None:
39ifinplaceisnotNone:
--->40raiseTypeError(
41"The `inplace` argument has been removed from xarray. "42"You can achieve an identical effect with python's standard assignment."TypeError: The`inplace`argumenthasbeenremovedfromxarray. Youcanachieveanidenticaleffectwithpython'sstandardassignment.
Expected Output
Coordinates reset in-place, or documentation that does not list inplace as a valid argument.
Problem Description
The documentation for Dataset.reset_coords and Dataset.reset_coords lists an inplace argument that is no longer supported. My assumption is that this should be removed from the documentation but I'm not sure how this documentation is generated -- it may come from the docstring and/or function signature and the argument is still present in the function signature so it shows up in the documentation as a result?
This appears to have been addressed before in issue #858 but maybe the inplace argument slipped back into the documentation somehow? I see that there is a function to check for an inplace argument and raise an error if present -- why is this being used rather than removing the inplace argument altogether? Is this mechanism in place to facilitate backward compatibility, etc.?
Output of xr.show_versions()
# Paste the output here xr.show_versions() here
INSTALLED VERSIONS
------------------
commit: None
python: 3.8.0 | packaged by conda-forge | (default, Nov 22 2019, 19:11:38)
[GCC 7.3.0]
python-bits: 64
OS: Linux
OS-release: 4.15.0-70-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
libhdf5: 1.10.5
libnetcdf: 4.7.1
We left the kwarg for a couple versions so that existing users had an informative error message and clear instructions for . We removed it from the docstring.
That said, it's been a couple versions, so would welcome a PR to remove these for v0.15.0
MCVE Code Sample
Expected Output
Coordinates reset in-place, or documentation that does not list
inplace
as a valid argument.Problem Description
The documentation for
Dataset.reset_coords
andDataset.reset_coords
lists an inplace argument that is no longer supported. My assumption is that this should be removed from the documentation but I'm not sure how this documentation is generated -- it may come from the docstring and/or function signature and the argument is still present in the function signature so it shows up in the documentation as a result?This appears to have been addressed before in issue #858 but maybe the inplace argument slipped back into the documentation somehow? I see that there is a function to check for an inplace argument and raise an error if present -- why is this being used rather than removing the inplace argument altogether? Is this mechanism in place to facilitate backward compatibility, etc.?
Output of
xr.show_versions()
xarray: 0.14.1
pandas: 0.25.3
numpy: 1.17.3
scipy: 1.3.2
netCDF4: 1.5.3
pydap: None
h5netcdf: None
h5py: None
Nio: None
zarr: None
cftime: 1.0.4.2
nc_time_axis: None
PseudoNetCDF: None
rasterio: None
cfgrib: None
iris: None
bottleneck: None
dask: 2.8.1
distributed: 2.8.1
matplotlib: 3.1.2
cartopy: None
seaborn: None
numbagg: None
setuptools: 42.0.1.post20191125
pip: 19.3.1
conda: None
pytest: None
IPython: 7.10.0
sphinx: None
The text was updated successfully, but these errors were encountered: