home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where author_association = "CONTRIBUTOR" and user = 630936 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

issue 3

  • operation on complex number data 2
  • Sparse arrays 1
  • Cannot replace xr.ufuncs.angle with np.angle 1

user 1

  • rth · 4 ✖

author_association 1

  • CONTRIBUTOR · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
447835252 https://github.com/pydata/xarray/issues/2609#issuecomment-447835252 https://api.github.com/repos/pydata/xarray/issues/2609 MDEyOklzc3VlQ29tbWVudDQ0NzgzNTI1Mg== rth 630936 2018-12-17T12:51:29Z 2018-12-17T12:51:29Z CONTRIBUTOR

Thanks for the confirmation @shoyer !

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Cannot replace xr.ufuncs.angle with np.angle 391398977
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
326803603 https://github.com/pydata/xarray/issues/1375#issuecomment-326803603 https://api.github.com/repos/pydata/xarray/issues/1375 MDEyOklzc3VlQ29tbWVudDMyNjgwMzYwMw== rth 630936 2017-09-03T13:01:44Z 2017-09-03T13:01:44Z CONTRIBUTOR

do you have an application that we could use to drive this?

Other examples where labeled sparse arrays would be useful are, * one-hot encoding that are widely used in machine learning. * tokenizing textual data produces large sparse matrices where the column labels correspond to the vocabulary, while row labels correspond to document ids. Here is a minimal example using scikit-learn, ```py import os.path from sklearn.datasets import fetch_20newsgroups from sklearn.feature_extraction.text import CountVectorizer

 ds = fetch_20newsgroups()
 vect = CountVectorizer()
 X = vect.fit_transform(ds.data)
 print(X)  # Extracted tokens
 # Returns:
 # <11314x130107 sparse matrix of type '<class 'numpy.int64'>'
 #  with 1787565 stored elements in Compressed Sparse Row format>

 column_labels = vect.get_feature_names()
 print(np.asarray(column_labels))
 # Returns:
 # array(['00', '000', '0000', ..., 'íålittin', 'ñaustin', 'ýé'],   dtype='<U180')

 row_labels = [int(os.path.split(el)[1]) for el in ds.filenames]
 print(np.asarray(row_labels))
 # Returns:
 # array([102994,  51861,  51879, ...,  60695,  38319, 104440])
 ```
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Sparse arrays 221858543

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 13.275ms · About: xarray-datasette