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 60441490,MDU6SXNzdWU2MDQ0MTQ5MA==,367,ds['time.time'] is broken,1217238,closed,0,,1028398,4,2015-03-10T02:26:48Z,2015-12-04T20:40:30Z,2015-12-04T20:40:30Z,MEMBER,,,,"As noted in https://github.com/xray/xray/issues/364: ``` In [32]: t = pd.date_range('2000-01-01', periods=10, freq='H') In [33]: time = xray.DataArray(t, name='time', dims='time') In [34]: time['time.time'] Out[34]: array(['1999-12-31T16:00:00.000000000-0800', '1999-12-31T17:00:00.000000000-0800', '1999-12-31T18:00:00.000000000-0800', '1999-12-31T19:00:00.000000000-0800', '1999-12-31T20:00:00.000000000-0800', '1999-12-31T21:00:00.000000000-0800', '1999-12-31T22:00:00.000000000-0800', '1999-12-31T23:00:00.000000000-0800', '2000-01-01T00:00:00.000000000-0800', '2000-01-01T01:00:00.000000000-0800'], dtype='datetime64[ns]') Coordinates: * time (time) datetime64[ns] 2000-01-01 2000-01-01T01:00:00 ... ``` It should return an array of `datetime.time` objects. ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/367/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 60766919,MDU6SXNzdWU2MDc2NjkxOQ==,369,format argument in to_netcdf should be case insensitive ,1217238,closed,0,,1028398,0,2015-03-12T03:45:59Z,2015-04-23T03:41:15Z,2015-04-23T03:41:15Z,MEMBER,,,,,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/369/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 63344028,MDU6SXNzdWU2MzM0NDAyOA==,379,fillna should work with DataArrays in a dictionary,1217238,closed,0,,1028398,0,2015-03-21T01:52:25Z,2015-04-08T03:44:09Z,2015-04-08T03:44:09Z,MEMBER,,,,"Currently this raises a strange error: ``` python import xray import numpy as np ds = xray.Dataset({'a': ('x', [np.nan] * 3)}) ds.fillna({'a': xray.DataArray([1, 2, 3], dims='x')}) ``` ``` --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) /Users/shoyer/miniconda/envs/rapid/lib/python2.7/site-packages/IPython/core/formatters.pyc in __call__(self, obj) 693 type_pprinters=self.type_printers, 694 deferred_pprinters=self.deferred_printers) --> 695 printer.pretty(obj) 696 printer.flush() 697 return stream.getvalue() /Users/shoyer/miniconda/envs/rapid/lib/python2.7/site-packages/IPython/lib/pretty.pyc in pretty(self, obj) 399 if callable(meth): 400 return meth(obj, self, cycle) --> 401 return _default_pprint(obj, self, cycle) 402 finally: 403 self.end_group() /Users/shoyer/miniconda/envs/rapid/lib/python2.7/site-packages/IPython/lib/pretty.pyc in _default_pprint(obj, p, cycle) 519 if _safe_getattr(klass, '__repr__', None) not in _baseclass_reprs: 520 # A user-provided repr. Find newlines and replace them with p.break_() --> 521 _repr_pprint(obj, p, cycle) 522 return 523 p.begin_group(1, '<') /Users/shoyer/miniconda/envs/rapid/lib/python2.7/site-packages/IPython/lib/pretty.pyc in _repr_pprint(obj, p, cycle) 701 """"""A pprint that just redirects to the normal repr function."""""" 702 # Find newlines and replace them with p.break_() --> 703 output = repr(obj) 704 for idx,output_line in enumerate(output.splitlines()): 705 if idx: /Users/shoyer/dev/xray/xray/core/dataset.pyc in __repr__(self) 1043 1044 def __repr__(self): -> 1045 return formatting.dataset_repr(self) 1046 1047 def isel(self, **indexers): /Users/shoyer/dev/xray/xray/core/formatting.pyc in dataset_repr(ds) 231 232 summary.append(coords_repr(ds.coords, col_width=col_width)) --> 233 summary.append(vars_repr(ds.data_vars, col_width=col_width)) 234 if ds.attrs: 235 summary.append(attrs_repr(ds.attrs)) /Users/shoyer/dev/xray/xray/core/formatting.pyc in _mapping_repr(mapping, title, summarizer, col_width) 170 summary = ['%s:' % title] 171 if mapping: --> 172 summary += [summarizer(k, v, col_width) for k, v in mapping.items()] 173 else: 174 summary += [EMPTY_REPR] /Users/shoyer/miniconda/envs/rapid/lib/python2.7/_abcoll.pyc in items(self) 412 def items(self): 413 ""D.items() -> list of D's (key, value) pairs, as 2-tuples"" --> 414 return [(key, self[key]) for key in self] 415 416 def values(self): /Users/shoyer/dev/xray/xray/core/dataset.pyc in __getitem__(self, key) 371 def __getitem__(self, key): 372 if key not in self._dataset._coord_names: --> 373 return self._dataset[key] 374 else: 375 raise KeyError(key) /Users/shoyer/dev/xray/xray/core/dataset.pyc in __getitem__(self, key) 751 key = np.asarray(key) 752 if key.ndim == 0: --> 753 return DataArray._new_from_dataset(self, key.item()) 754 else: 755 return self._copy_listed(key) /Users/shoyer/dev/xray/xray/core/dataarray.pyc in _new_from_dataset(cls, dataset, name) 198 """""" 199 obj = object.__new__(cls) --> 200 obj._dataset = dataset._copy_listed([name], keep_attrs=False) 201 if name not in obj._dataset: 202 # handle virtual variables /Users/shoyer/dev/xray/xray/core/dataset.pyc in _copy_listed(self, names, keep_attrs) 680 needed_dims = set() 681 for v in variables.values(): --> 682 needed_dims.update(v._dims) 683 for k in self._coord_names: 684 if set(self._variables[k]._dims) <= needed_dims: AttributeError: 'NotImplementedType' object has no attribute '_dims' ``` ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/379/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 63634045,MDExOlB1bGxSZXF1ZXN0MzE3MDY4OTU=,380,ENH: Add Dataset.assign and .assign_coords,1217238,closed,0,,1028398,0,2015-03-23T06:04:13Z,2015-03-23T18:42:45Z,2015-03-23T18:42:43Z,MEMBER,,0,pydata/xarray/pulls/380,"Fixes #314 Based off the new pandas method of the same name. An example: ``` In [3]: ds = xray.Dataset({'y': ('x', [1, 2, 3])}) In [4]: ds.assign(z = lambda x: x.y ** 2) Out[4]: Dimensions: (x: 3) Coordinates: * x (x) int64 0 1 2 Data variables: y (x) int64 1 2 3 z (x) int64 1 4 9 ``` ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/380/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 62585113,MDExOlB1bGxSZXF1ZXN0MzEzOTk0OTI=,378,"ENH: fillna method for Dataset, DataArray and GroupBy objects",1217238,closed,0,,1028398,0,2015-03-18T04:16:29Z,2015-03-20T23:00:42Z,2015-03-20T23:00:41Z,MEMBER,,0,pydata/xarray/pulls/378,"This is a new method for Dataset, DataArray and GroupBy objects. For the most part, it follows standard broadcasting and alignment rules for binary operations. ## Example usage Setup: ``` In [1]: import xray In [2]: import pandas as pd In [3]: import numpy as np In [4]: array = xray.DataArray(np.arange(75.0), [('time', pd.date_range('2000-01-01', periods=75, freq='5D'))]) In [5]: array[::3] = np.nan In [6]: array Out[6]: array([ nan, 1., 2., nan, 4., 5., nan, 7., 8., nan, 10., 11., nan, 13., 14., nan, 16., 17., nan, 19., 20., nan, 22., 23., nan, 25., 26., nan, 28., 29., nan, 31., 32., nan, 34., 35., nan, 37., 38., nan, 40., 41., nan, 43., 44., nan, 46., 47., nan, 49., 50., nan, 52., 53., nan, 55., 56., nan, 58., 59., nan, 61., 62., nan, 64., 65., nan, 67., 68., nan, 70., 71., nan, 73., 74.]) Coordinates: * time (time) datetime64[ns] 2000-01-01 2000-01-06 2000-01-11 2000-01-16 ... ``` Simple example: ``` In [7]: array.fillna(0) Out[7]: array([ 0., 1., 2., 0., 4., 5., 0., 7., 8., 0., 10., 11., 0., 13., 14., 0., 16., 17., 0., 19., 20., 0., 22., 23., 0., 25., 26., 0., 28., 29., 0., 31., 32., 0., 34., 35., 0., 37., 38., 0., 40., 41., 0., 43., 44., 0., 46., 47., 0., 49., 50., 0., 52., 53., 0., 55., 56., 0., 58., 59., 0., 61., 62., 0., 64., 65., 0., 67., 68., 0., 70., 71., 0., 73., 74.]) Coordinates: * time (time) datetime64[ns] 2000-01-01 2000-01-06 2000-01-11 2000-01-16 ... ``` Fill missing values with average for that month: ``` In [8]: g = array.groupby('time.month') In [9]: g.fillna(g.mean('time')) Out[9]: array([ 17.2, 1. , 2. , 17.2, 4. , 5. , 17.2, 7. , 8. , 9. , 10. , 11. , 15. , 13. , 14. , 15. , 16. , 17. , 15. , 19. , 20. , 21. , 22. , 23. , 21. , 25. , 26. , 27. , 28. , 29. , 27. , 31. , 32. , 33. , 34. , 35. , 33. , 37. , 38. , 39. , 40. , 41. , 39. , 43. , 44. , 45. , 46. , 47. , 45. , 49. , 50. , 51. , 52. , 53. , 51. , 55. , 56. , 57. , 58. , 59. , 57. , 61. , 62. , 63. , 64. , 65. , 63. , 67. , 68. , 69.8, 70. , 71. , 69.8, 73. , 74. ]) Coordinates: * time (time) datetime64[ns] 2000-01-01 2000-01-06 2000-01-11 2000-01-16 ... month (time) int32 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 3 3 4 4 4 4 4 4 5 5 5 5 5 5 6 6 6 ... ``` CC @nicolasfauchereau ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/378/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull