home / github / pull_requests

Menu
  • GraphQL API
  • Search all tables

pull_requests: 341037589

This data as json

id node_id number state locked title user body created_at updated_at closed_at merged_at merge_commit_sha assignee milestone draft head base author_association auto_merge repo url merged_by
341037589 MDExOlB1bGxSZXF1ZXN0MzQxMDM3NTg5 3533 closed 0 2x~5x speed up for isel() in most cases 6213168 Yet another major improvement for #2799. Achieve a 2x to 5x boost in isel performance when slicing small arrays by int, slice, list of int, scalar ndarray, or 1-dimensional ndarray. ```python import xarray da = xarray.DataArray([[1, 2], [3, 4]], dims=['x', 'y']) v = da.variable a = da.variable.values ds = da.to_dataset(name="d") ds_with_idx = xarray.Dataset({ 'x': [10, 20], 'y': [100, 200], 'd': (('x', 'y'), [[1, 2], [3, 4]]) }) da_with_idx = ds_with_idx.d # before -> after %timeit a[0] # 121 ns %timeit v[0] # 7 µs %timeit v.isel(x=0) # 10 µs %timeit da[0] # 65 µs -> 15 µs %timeit da.isel(x=0) # 63 µs -> 13 µs %timeit ds.isel(x=0) # 48 µs -> 24 µs %timeit da_with_idx[0] # 209 µs -> 82 µs %timeit da_with_idx.isel(x=0, drop=False) # 135 µs -> 34 µs %timeit da_with_idx.isel(x=0, drop=True) # 101 µs -> 34 µs %timeit ds_with_idx.isel(x=0, drop=False) # 90 µs -> 49 µs %timeit ds_with_idx.isel(x=0, drop=True) # 65 µs -> 49 µs ``` Marked as WIP because this commands running the asv suite to verify there are no regressions for large arrays. (on a separate note, we really need to add the small size cases to asv - as discussed in #3382). This profoundly alters one of the most important methods in xarray and I must confess it makes me nervous, particularly as I am unsure if the test coverage of DataArray.isel() is as through as that for Dataset.isel(). 2019-11-14T15:34:24Z 2019-12-05T16:45:40Z 2019-12-05T16:39:40Z 2019-12-05T16:39:40Z 87a25b64898c94ea1e2a2e7a06d31ef602b116bf     0 1b814e9d20557a9d80bcef290eb40df00dccad27 577d3a75ea8bb25b99f9d31af8da14210cddff78 MEMBER   13221727 https://github.com/pydata/xarray/pull/3533  

Links from other tables

  • 1 row from pull_requests_id in labels_pull_requests
Powered by Datasette · Queries took 0.645ms