home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

7 rows where author_association = "CONTRIBUTOR" and issue = 103703011 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 3

  • davidtrem 3
  • rth 2
  • NotSqrt 2

issue 1

  • operation on complex number data · 7 ✖

author_association 1

  • CONTRIBUTOR · 7 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
394597043 https://github.com/pydata/xarray/issues/553#issuecomment-394597043 https://api.github.com/repos/pydata/xarray/issues/553 MDEyOklzc3VlQ29tbWVudDM5NDU5NzA0Mw== NotSqrt 1997005 2018-06-05T06:32:26Z 2018-06-05T06:32:26Z CONTRIBUTOR

Thanks !

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  operation on complex number data 103703011
394431344 https://github.com/pydata/xarray/issues/553#issuecomment-394431344 https://api.github.com/repos/pydata/xarray/issues/553 MDEyOklzc3VlQ29tbWVudDM5NDQzMTM0NA== NotSqrt 1997005 2018-06-04T17:17:41Z 2018-06-04T17:17:51Z CONTRIBUTOR

@shoyer xarray.ufuncs.angle now triggers the DeprecationWarning added in #1962, and numpy/numpy#6266 is still open.

What is the recommended way to keep an DataArray when computing angles ?

Thanks !

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  operation on complex number data 103703011
334799819 https://github.com/pydata/xarray/issues/553#issuecomment-334799819 https://api.github.com/repos/pydata/xarray/issues/553 MDEyOklzc3VlQ29tbWVudDMzNDc5OTgxOQ== rth 630936 2017-10-06T16:09:25Z 2017-10-06T16:09:25Z CONTRIBUTOR

@shoyer Aww, great. Thanks for pointing this out.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  operation on complex number data 103703011
334799284 https://github.com/pydata/xarray/issues/553#issuecomment-334799284 https://api.github.com/repos/pydata/xarray/issues/553 MDEyOklzc3VlQ29tbWVudDMzNDc5OTI4NA== rth 630936 2017-10-06T16:07:18Z 2017-10-06T16:08:37Z CONTRIBUTOR

There is an open issue at numpy about this in https://github.com/numpy/numpy/issues/6266

Also, for future reference, locally re-defining np.angle by removing the z = array(z) line from the official function appears to work well enough as a workaround, assuming the input is an xarray, ```py import numpy.core.numeric as _nx

def angle(z, deg=0): """Compute the angle of an xarray

Parameters
----------
z : array_like
    A complex number or sequence of complex numbers.
deg : bool, optional
    Return angle in degrees if True, radians if False (default).

Returns
-------
angle : ndarray or scalar
    The counterclockwise angle from the positive real axis on
    the complex plane, with dtype as numpy.float64.

See: https://github.com/pydata/xarray/issues/553
     https://github.com/numpy/numpy/blob/v1.13.0/numpy/lib/function_base.py#L2072-L2115
"""
if deg:
    fact = 180/pi
else:
    fact = 1.0
if (issubclass(z.dtype.type, _nx.complexfloating)):
    zimag = z.imag
    zreal = z.real
else:
    zimag = 0
    zreal = z
return np.arctan2(zimag, zreal)

```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  operation on complex number data 103703011
136084636 https://github.com/pydata/xarray/issues/553#issuecomment-136084636 https://api.github.com/repos/pydata/xarray/issues/553 MDEyOklzc3VlQ29tbWVudDEzNjA4NDYzNg== davidtrem 277579 2015-08-30T04:40:47Z 2015-08-30T04:43:16Z CONTRIBUTOR

That would be great to add .real and .imag .abs and .angle :+1:

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  operation on complex number data 103703011
135835466 https://github.com/pydata/xarray/issues/553#issuecomment-135835466 https://api.github.com/repos/pydata/xarray/issues/553 MDEyOklzc3VlQ29tbWVudDEzNTgzNTQ2Ng== davidtrem 277579 2015-08-28T17:10:50Z 2015-08-28T17:11:19Z CONTRIBUTOR

I realized this is also an issue in Pandas. So I also reported here: https://github.com/pydata/pandas/issues/10921

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  operation on complex number data 103703011
135747033 https://github.com/pydata/xarray/issues/553#issuecomment-135747033 https://api.github.com/repos/pydata/xarray/issues/553 MDEyOklzc3VlQ29tbWVudDEzNTc0NzAzMw== davidtrem 277579 2015-08-28T11:45:39Z 2015-08-28T11:45:39Z CONTRIBUTOR

A short example for convenience:

python import xray import numpy as np arr = xray.DataArray(np.random.randn(2, 3) + 1j*np.random.randn(2, 3)) np.abs(arr) # returns a xray DataArray np.angle(arr) # returns a numpy ndarray

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  operation on complex number data 103703011

Advanced export

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

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
    ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
    ON [issue_comments] ([user]);
Powered by Datasette · Queries took 800.16ms · About: xarray-datasette