home / github

Menu
  • Search all tables
  • GraphQL API

issues

Table actions
  • GraphQL API for issues

4 rows where "created_at" is on date 2023-10-15 and user = 14371165 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

type 1

  • pull 4

state 1

  • closed 4

repo 1

  • xarray 4
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
1944068053 PR_kwDOAMm_X85c1sC5 8314 Align MemoryCachedArray and PandasIndexingAdapter more Illviljan 14371165 closed 0     1 2023-10-15T21:42:27Z 2023-10-16T20:01:21Z 2023-10-16T20:01:20Z MEMBER   0 pydata/xarray/pulls/8314

Seen in #8294.

The issue is the IndexVariable, ExplicitlyIndexedNDArrayMixin lacks .array which is required for IndexVariable, and therefore we need a new minimal class that are common between the two.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/8314/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1944059054 PR_kwDOAMm_X85c1qR0 8312 Fix typing issues in tests Illviljan 14371165 closed 0     1 2023-10-15T21:11:12Z 2023-10-16T15:09:57Z 2023-10-16T15:09:57Z MEMBER   0 pydata/xarray/pulls/8312

Seen in #8294.

These tests implicitly made sure the type was correct in a way that type checkers wont understand. Make it explicit instead.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/8312/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1944067022 PR_kwDOAMm_X85c1r1z 8313 Reverse type checks for better type inheritance Illviljan 14371165 closed 0     0 2023-10-15T21:38:59Z 2023-10-16T06:30:55Z 2023-10-16T06:30:55Z MEMBER   0 pydata/xarray/pulls/8313

Seen in #8294.

It's usually better to switch if-checks so that the wider type is defined first. Especially when relying on the implicit type casting like we do here.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/8313/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1944083743 PR_kwDOAMm_X85c1vGB 8315 Handle numpy missing the array api function astype Illviljan 14371165 closed 0     1 2023-10-15T22:32:17Z 2023-10-16T06:25:20Z 2023-10-16T06:25:19Z MEMBER   0 pydata/xarray/pulls/8315

This is how our get_array_namespace works: https://github.com/pydata/xarray/blob/dafd726c36e24ac77427513a4a149a6933353b66/xarray/core/duck_array_ops.py#L44-L48

Which usually works. But not for astype.

Using np.array_api doesn't work because you have to use np.array_api.Array instead of np.ndarray:

```python import numpy.array_api as nxp nxp.astype(np.array([1, 2,]), np.dtype(float))

Traceback (most recent call last):

File "C:\Users\J.W\AppData\Local\Temp\ipykernel_8616\23329947.py", line 1, in <cell line: 1> nxp.astype(np.array([1, 2,]), np.dtype(float))

File "C:\Users\J.W\anaconda3\envs\xarray-tests\lib\site-packages\numpy\array_api_data_type_functions.py", line 20, in astype return Array._new(x._array.astype(dtype=dtype, copy=copy))

AttributeError: 'numpy.ndarray' object has no attribute '_array' ```

I found it simpler to just change astype here.

An alternative solution would be to use: https://github.com/data-apis/array-api-compat https://github.com/tomwhite/cubed/pull/317

Seen in #8294.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/8315/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull

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