issues
4 rows where comments = 14 and user = 35968931 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: created_at (date), updated_at (date), closed_at (date)
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1940536602 | I_kwDOAMm_X85zqj0a | 8298 | cftime.DatetimeNoLeap incorrectly decoded from netCDF file | TomNicholas 35968931 | open | 0 | 14 | 2023-10-12T18:13:53Z | 2024-01-08T01:01:53Z | MEMBER | What happened?I have been given a netCDF file (I think it's netCDF3) which when I open it does not decode the time variable in the way I expected it to. The time coordinate created is a numpy object array What did you expect to happen?I expected it to automatically create a coordinate backed by a Minimal Complete Verifiable ExampleThe original problematic file is 455MB (I can share it if necessary), but I can create a small netCDF file that displays the same issue. ```python import cftime time_values = [cftime.DatetimeNoLeap(347, 2, 1, 0, 0, 0, 0, has_year_zero=True)]
time_ds = xr.Dataset(coords={'time': (['time'], time_values)})
print(time_ds)
time_ds.to_netcdf('time_mwe.nc')
MVCE confirmation
Relevant log outputNo response Anything else we need to know?No response Environment
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/8298/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
xarray 13221727 | issue | ||||||||
1372035441 | I_kwDOAMm_X85Rx5lx | 7031 | Periodic Boundary Index | TomNicholas 35968931 | open | 0 | 14 | 2022-09-13T21:39:40Z | 2022-09-16T10:50:10Z | MEMBER | What is your issue?I would like to create a I'm thinking this would be useful for: 1) Geoscientists with periodic longitudes 2) Any scientists with periodic domains 3) Road-testing the refactor + how easy the documentation is to follow. Eventually I think perhaps this index should live in xarray itself? As it's domain-agnostic, doesn't introduce extra dependencies, and could be a conceptually simple example of a custom index. I had a first go, using the @benbovy here's what I have so far: ```python import numpy as np import pandas as pd import xarray as xr from xarray.core.variable import Variable from xarray.core.indexes import PandasIndex, is_scalar from typing import Union, Mapping, Any class PeriodicBoundaryIndex(PandasIndex): """ An index representing any 1D periodic numberline.
``` ```python airtemps = xr.tutorial.open_dataset("air_temperature")['air'] da = airtemps.drop_indexes("lon") world = da.set_xindex("lon", index_cls=PeriodicBoundaryIndex) ``` Now selecting a value with isel inside the range works fine, giving the same result same as without my custom index. (The length of the example dataset along
But indexing with a
```pythonIndexError Traceback (most recent call last) Input In [35], in <cell line: 1>() ----> 1 world.isel(lon=55) File ~/Documents/Work/Code/xarray/xarray/core/dataarray.py:1297, in DataArray.isel(self, indexers, drop, missing_dims, **indexers_kwargs) 1292 return self._from_temp_dataset(ds) 1294 # Much faster algorithm for when all indexers are ints, slices, one-dimensional 1295 # lists, or zero or one-dimensional np.ndarray's -> 1297 variable = self._variable.isel(indexers, missing_dims=missing_dims) 1298 indexes, index_variables = isel_indexes(self.xindexes, indexers) 1300 coords = {} File ~/Documents/Work/Code/xarray/xarray/core/variable.py:1233, in Variable.isel(self, indexers, missing_dims, **indexers_kwargs) 1230 indexers = drop_dims_from_indexers(indexers, self.dims, missing_dims) 1232 key = tuple(indexers.get(dim, slice(None)) for dim in self.dims) -> 1233 return self[key] File ~/Documents/Work/Code/xarray/xarray/core/variable.py:793, in Variable.getitem(self, key)
780 """Return a new Variable object whose contents are consistent with
781 getting the provided key from the underlying data.
782
(...)
790 array File ~/Documents/Work/Code/xarray/xarray/core/indexing.py:657, in MemoryCachedArray.getitem(self, key) 656 def getitem(self, key): --> 657 return type(self)(_wrap_numpy_scalars(self.array[key])) File ~/Documents/Work/Code/xarray/xarray/core/indexing.py:626, in CopyOnWriteArray.getitem(self, key) 625 def getitem(self, key): --> 626 return type(self)(_wrap_numpy_scalars(self.array[key])) File ~/Documents/Work/Code/xarray/xarray/core/indexing.py:533, in LazilyIndexedArray.getitem(self, indexer) 531 array = LazilyVectorizedIndexedArray(self.array, self.key) 532 return array[indexer] --> 533 return type(self)(self.array, self._updated_key(indexer)) File ~/Documents/Work/Code/xarray/xarray/core/indexing.py:505, in LazilyIndexedArray._updated_key(self, new_key) 503 full_key.append(k) 504 else: --> 505 full_key.append(_index_indexer_1d(k, next(iter_new_key), size)) 506 full_key = tuple(full_key) 508 if all(isinstance(k, integer_types + (slice,)) for k in full_key): File ~/Documents/Work/Code/xarray/xarray/core/indexing.py:278, in _index_indexer_1d(old_indexer, applied_indexer, size) 276 indexer = slice_slice(old_indexer, applied_indexer, size) 277 else: --> 278 indexer = _expand_slice(old_indexer, size)[applied_indexer] 279 else: 280 indexer = old_indexer[applied_indexer] IndexError: index 55 is out of bounds for axis 0 with size 53 ``` |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/7031/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
xarray 13221727 | issue | ||||||||
1039833986 | PR_kwDOAMm_X84t3SlI | 5917 | Update minimum dependencies for 0.20 | TomNicholas 35968931 | closed | 0 | 14 | 2021-10-29T18:38:37Z | 2021-11-01T21:14:03Z | 2021-11-01T21:14:02Z | MEMBER | 0 | pydata/xarray/pulls/5917 | =============== ====== ==== Package Old New =============== ====== ==== cartopy 0.17 0.18 cftime 1.1 1.2 dask 2.15 2.30 distributed 2.15 2.30 hdf5 1.10 1.12 lxml 4.5 4.6 matplotlib-base 3.2 3.3 numba 0.49 0.51 numpy 1.17 1.18 pandas 1.0 1.1 pint 0.15 0.16 scipy 1.4 1.5 seaborn 0.10 0.11 sparse 0.8 0.11 toolz 0.10 0.11 zarr 2.4 2.5 =============== ====== ====
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/5917/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
xarray 13221727 | pull | |||||
404945709 | MDExOlB1bGxSZXF1ZXN0MjQ5MDE0MTc3 | 2729 | [WIP] Feature: Animated 1D plots | TomNicholas 35968931 | closed | 0 | 14 | 2019-01-30T20:15:52Z | 2021-06-24T08:46:31Z | 2021-06-23T16:14:28Z | MEMBER | 0 | pydata/xarray/pulls/2729 | This is an attempt at a proof-of-principle for making animated plots in the way I suggested in #2355. (Also relevant for #2030.) This example code: ```python import matplotlib.pyplot as plt import xarray as xr Load data as done in plotting tutorialairtemps = xr.tutorial.open_dataset('air_temperature') air = airtemps.air - 273.15 air.attrs = airtemps.air.attrs air.attrs['units'] = 'deg C' Downsample to make reasonably-sized gifdata = air.isel(lat=10, time=slice(None,None,40)) Create animated plotanim = data.plot(animate_over='time')
anim.save('line1.gif', writer='imagemagick')
plt.show()
```
now produces this gif:
I think it looks pretty good! It even animates the title properly. The actual animation creation only takes one line to do. This currently only works for a plot with a single line, which is animated over a coordinate dimension. ~~It also required some minor modifications/bugfixes to animatplot, so it probably isn't reproducible right out of the box yet.~~ If you want to try this out then use the develop branch of my forked version of animatplot. The reason I've put this up is because I wanted to
I feel like although it required only ~100 lines extra to do this then the logic is very fragmented and scattered through the (@t-makaro I expect you will be interested in this) EDIT: To-Do list:
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/2729/reactions", "total_count": 2, "+1": 2, "-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
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]);