home / github

Menu
  • GraphQL API
  • Search all tables

issues

Table actions
  • GraphQL API for issues

3 rows where repo = 13221727 and user = 397386 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 2

  • issue 2
  • pull 1

state 1

  • closed 3

repo 1

  • xarray · 3 ✖
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
448082431 MDU6SXNzdWU0NDgwODI0MzE= 2986 How to add a custom indexer. fbriol 397386 closed 0     4 2019-05-24T09:56:25Z 2023-08-23T12:24:21Z 2023-08-23T12:24:20Z CONTRIBUTOR      

Hello,

I have written a set of indexers for 1D, 2D and 3D geodetic and Cartesian data (up to 5 dimensions for Cartesian data).

I used the Boost/C++ library to write the multidimensional data search algorithm. This tree (R*Tree) is impressive for its performance. It can be built in a few seconds with several million points and made requests for a few seconds with several million points.

```python import numpy as np

Install it with conda, if you want, only for python3.7: conda install pyindex -c fbriol

import pyindex.core as core

lon = np.random.uniform(-180.0, 180.0, 20484096) lat = np.random.uniform(-90.0, 90.0, 20484096)

You can not set an altitude if it is not necessary.

alt = np.random.uniform(-10000, 100000, 2048*4096)

WGS system used

system = core.geodetic.System()

RTree

tree = core.geodetic.RTree(system) %timeit tree.packing(np.asarray((lon, lat, alt)).T)

3.84 s ± 129 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

coordinates = np.asarray(( np.random.uniform(-180.0, 180.0, 10000), np.random.uniform(-90.0, 90.0, 10000), np.random.uniform(-10000, 100000, 10000))).T %timeit tree.query(coordinates)

18 ms ± 377 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)

``` I'm trying to use these indexes with Xarray, but I didn't quite understand how to interface with xarray.

Is there anyone who could explain to me how to write my own indexer to test these indexers with xarray? Thank you in advance.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/2986/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
646038170 MDU6SXNzdWU2NDYwMzgxNzA= 4183 Unable to decode a date in nanoseconds fbriol 397386 closed 0     6 2020-06-26T06:22:27Z 2022-04-28T10:34:20Z 2022-04-28T10:34:20Z CONTRIBUTOR      

What happened:

If the unit of a date, is a number of nanoseconds elapsed since a reference date, xarray cannot read this dataset and throws the exception KeyError: nanoseconds.

What you expected to happen:

As this unit is valid in CF model, it must be decoded. Today the units that are recognized go from day to microseconds in the module coding/time.py.

Minimal Complete Verifiable Example:

```python import numpy as np import array as xr

xr.DataArray( np.arange(0, 1e10, 1e9).astype("int64"), attrs=dict(units="nanoseconds since 1970-01-01")).to_netcdf("/tmp/test.nc") xr.open_dataset("/tmp/test.nc") ``` Environment:

Output of <tt>xr.show_versions()</tt> INSTALLED VERSIONS ------------------ commit: None python: 3.8.3 | packaged by conda-forge | (default, Jun 1 2020, 17:43:00) [GCC 7.5.0] python-bits: 64 OS: Linux OS-release: 3.10.0-957.12.2.el7.x86_64 machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 libhdf5: 1.10.5 libnetcdf: 4.7.4 xarray: 0.15.1 pandas: 1.0.4 numpy: 1.17.5 scipy: 1.4.1 netCDF4: 1.5.3 pydap: None h5netcdf: 0.8.0 h5py: 2.10.0 Nio: None zarr: 2.4.0 cftime: 1.1.3 nc_time_axis: None PseudoNetCDF: None rasterio: None cfgrib: None iris: None bottleneck: None dask: 2.18.1 distributed: 2.18.0 matplotlib: 3.2.1 cartopy: None seaborn: None numbagg: None setuptools: 47.3.1.post20200616 pip: 20.1.1 conda: 4.8.3 pytest: 5.4.3 IPython: 7.15.0 sphinx: None
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4183/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
543338100 MDExOlB1bGxSZXF1ZXN0MzU3NjI2Mzg3 3655 added pyinterp to related projects fbriol 397386 closed 0     1 2019-12-29T08:33:46Z 2019-12-29T14:53:10Z 2019-12-29T14:52:46Z CONTRIBUTOR   0 pydata/xarray/pulls/3655

I added my project on the list of projects using Xarray. The library allows you to perform fast interpolations on unstructured, Cartesian grids and to fill indefinite values in grids.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/3655/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 26.94ms · About: xarray-datasette