issues: 1244833334
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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1244833334 | I_kwDOAMm_X85KMqY2 | 6628 | `{full,zeros,ones}_like` should return objects with the same type as the input object | 22245117 | closed | 0 | 1 | 2022-05-23T09:09:55Z | 2022-05-24T04:41:22Z | 2022-05-24T04:41:22Z | CONTRIBUTOR | What happened?I'm getting issues using mypy with the changes to the typing of cc: @headtr1ck What did you expect to happen?I think the object returned should be of the same type as the input object rather than Minimal Complete Verifiable Example```Python import xarray as xr def test_zeros_like(da: xr.DataArray) -> xr.DataArray: return xr.zeros_like(da) ``` MVCE confirmation
Relevant log output
Anything else we need to know?
Environment
INSTALLED VERSIONS
------------------
commit: None
python: 3.10.4 | packaged by conda-forge | (main, Mar 24 2022, 17:43:32) [Clang 12.0.1 ]
python-bits: 64
OS: Darwin
OS-release: 21.5.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: None
LOCALE: (None, 'UTF-8')
libhdf5: None
libnetcdf: None
xarray: 2022.3.1.dev111+g4da7fdbd
pandas: 1.4.2
numpy: 1.22.3
scipy: 1.8.1
netCDF4: None
pydap: None
h5netcdf: None
h5py: None
Nio: None
zarr: 2.11.3
cftime: None
nc_time_axis: None
PseudoNetCDF: None
rasterio: 1.2.10
cfgrib: None
iris: None
bottleneck: None
dask: 2022.05.0
distributed: 2022.5.0
matplotlib: None
cartopy: None
seaborn: None
numbagg: None
fsspec: 2022.5.0
cupy: None
pint: None
sparse: None
flox: None
numpy_groupies: None
setuptools: 62.3.2
pip: 22.1.1
conda: None
pytest: 7.1.2
IPython: None
sphinx: None
|
{
"url": "https://api.github.com/repos/pydata/xarray/issues/6628/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
completed | 13221727 | issue |