home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 530777706

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
530777706 MDU6SXNzdWU1MzA3Nzc3MDY= 3586 Update documentation to reflect removal of inplace option 1328158 closed 0     1 2019-12-01T18:58:53Z 2020-12-12T23:10:11Z 2020-12-12T23:10:11Z NONE      

MCVE Code Sample

```python

Your code here

ds_gamma.reset_coords('month', drop=True, inplace=True)

~/miniconda3/envs/spi_multi/lib/python3.8/site-packages/xarray/core/utils.py in _check_inplace(inplace) 38 def _check_inplace(inplace: Optional[bool]) -> None: 39 if inplace is not None: ---> 40 raise TypeError( 41 "The inplace argument has been removed from xarray. " 42 "You can achieve an identical effect with python's standard assignment."

TypeError: The inplace argument has been removed from xarray. You can achieve an identical effect with python's standard assignment. ```

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 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
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/3586/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

  • 1 row from issues_id in issues_labels
  • 1 row from issue in issue_comments
Powered by Datasette · Queries took 0.632ms · About: xarray-datasette