home / github

Menu
  • Search all tables
  • GraphQL API

issues

Table actions
  • GraphQL API for issues

1 row where repo = 13221727, type = "issue" and user = 630936 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date), closed_at (date)

type 1

  • issue · 1 ✖

state 1

  • closed 1

repo 1

  • xarray · 1 ✖
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
391398977 MDU6SXNzdWUzOTEzOTg5Nzc= 2609 Cannot replace xr.ufuncs.angle with np.angle rth 630936 closed 0     2 2018-12-15T18:01:46Z 2018-12-20T18:01:38Z 2018-12-20T18:01:38Z CONTRIBUTOR      

Currently one gets a deprecation warning when using xarray.ufuncs.angle on a DataArray with xarray 0.11 and numpy 1.15, e.g. PendingDeprecationWarning: xarray.ufuncs will be deprecated when xarray no longer supports versions of numpy older than v1.13. Instead, use numpy ufuncs directly. X_tr = xr.ufuncs.angle(X)

however, np.angle still casts the input to ndarray, apparently.

Code Sample, a copy-pastable example if possible

```python

import xarray as xr import numpy as np X = xr.DataArray(np.ones(10)) X <xarray.DataArray (dim_0: 10)> array([1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]) Dimensions without coordinates: dim_0 xr.ufuncs.angle(X) # expected output <xarray.DataArray (dim_0: 10)> array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]) Dimensions without coordinates: dim_0 np.angle(X) # actual output array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]) np.version '1.15.4' xr.version '0.11.0' np.sin(X) # other ufuns work <xarray.DataArray (dim_0: 10)> array([0.841471, 0.841471, 0.841471, 0.841471, 0.841471, 0.841471, 0.841471, 0.841471, 0.841471, 0.841471]) Dimensions without coordinates: dim_0 ```

Problem description

I have not investigated yet why happens in numpy, but opening this issue to indicate that currently I can't really do much about this DeprecationWarning sort of silencing it (unless I'm missing something).

Output of xr.show_versions()

INSTALLED VERSIONS ------------------ commit: None python: 3.7.1.final.0 python-bits: 64 OS: Linux OS-release: 4.18.8-gentoo machine: x86_64 processor: Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz byteorder: little LC_ALL: None LANG: en_GB.UTF-8 LOCALE: en_GB.UTF-8 xarray: 0.11.0 pandas: 0.23.4 numpy: 1.15.4 scipy: 1.1.0 netCDF4: None h5netcdf: 0.6.2 h5py: 2.8.0 Nio: None zarr: None cftime: None PseudonetCDF: None rasterio: None iris: None bottleneck: None cyordereddict: None dask: 1.0.0 distributed: None matplotlib: 3.0.2 cartopy: None seaborn: None setuptools: 40.6.2 pip: 18.1 conda: None pytest: 4.0.1 IPython: None sphinx: None
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/2609/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issues] (
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [number] INTEGER,
   [title] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [state] TEXT,
   [locked] INTEGER,
   [assignee] INTEGER REFERENCES [users]([id]),
   [milestone] INTEGER REFERENCES [milestones]([id]),
   [comments] INTEGER,
   [created_at] TEXT,
   [updated_at] TEXT,
   [closed_at] TEXT,
   [author_association] TEXT,
   [active_lock_reason] TEXT,
   [draft] INTEGER,
   [pull_request] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [state_reason] TEXT,
   [repo] INTEGER REFERENCES [repos]([id]),
   [type] TEXT
);
CREATE INDEX [idx_issues_repo]
    ON [issues] ([repo]);
CREATE INDEX [idx_issues_milestone]
    ON [issues] ([milestone]);
CREATE INDEX [idx_issues_assignee]
    ON [issues] ([assignee]);
CREATE INDEX [idx_issues_user]
    ON [issues] ([user]);
Powered by Datasette · Queries took 71.699ms · About: xarray-datasette