html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue https://github.com/pydata/xarray/issues/1097#issuecomment-342282646,https://api.github.com/repos/pydata/xarray/issues/1097,342282646,MDEyOklzc3VlQ29tbWVudDM0MjI4MjY0Ng==,15930505,2017-11-06T20:52:41Z,2017-11-06T20:52:41Z,NONE,"Initially, I have tried this: ``` class Signal(Track): # 1D wave (no coords) and 1D time-value combined (with coords) def __init__(self, data: np.ndarray, coords=None, dims=None, name: str=None, attrs: dict=None): assert data.ndim == 2 assert data.shape[1] == 1 if dims is None: dims = ('time', 'amplitude') if coords is not None: assert 'time' in coords super().__init__(data, coords=coords, dims=dims, name=name, attrs=attrs) ``` However, I just know discovered the accessors and will have a look.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,188113943 https://github.com/pydata/xarray/issues/1097#issuecomment-342271714,https://api.github.com/repos/pydata/xarray/issues/1097,342271714,MDEyOklzc3VlQ29tbWVudDM0MjI3MTcxNA==,15930505,2017-11-06T20:12:41Z,2017-11-06T20:12:41Z,NONE,"Agreed. Just purely for information, I made a very simple subclass, but then a simple print statement didn't work: Traceback (most recent call last): File """", line 1, in File ""/Users/kain/CloudStation/CSLU/sci/timeview/miniconda/envs/timeview/lib/python3.6/site-packages/xarray/core/common.py"", line 97, in __repr__ return formatting.array_repr(self) File ""/Users/kain/CloudStation/CSLU/sci/timeview/miniconda/envs/timeview/lib/python3.6/site-packages/xarray/core/formatting.py"", line 392, in array_repr summary.append(repr(arr.coords)) File ""/Users/kain/CloudStation/CSLU/sci/timeview/miniconda/envs/timeview/lib/python3.6/site-packages/xarray/core/formatting.py"", line 63, in __repr__ return ensure_valid_repr(self.__unicode__()) File ""/Users/kain/CloudStation/CSLU/sci/timeview/miniconda/envs/timeview/lib/python3.6/site-packages/xarray/core/coordinates.py"", line 46, in __unicode__ return formatting.coords_repr(self) File ""/Users/kain/CloudStation/CSLU/sci/timeview/miniconda/envs/timeview/lib/python3.6/site-packages/xarray/core/formatting.py"", line 319, in coords_repr col_width = _calculate_col_width(_get_col_items(coords)) File ""/Users/kain/CloudStation/CSLU/sci/timeview/miniconda/envs/timeview/lib/python3.6/site-packages/xarray/core/formatting.py"", line 281, in _get_col_items for k, v in mapping.items(): File ""/Users/kain/CloudStation/CSLU/sci/timeview/miniconda/envs/timeview/lib/python3.6/_collections_abc.py"", line 744, in __iter__ yield (key, self._mapping[key]) File ""/Users/kain/CloudStation/CSLU/sci/timeview/miniconda/envs/timeview/lib/python3.6/site-packages/xarray/core/coordinates.py"", line 191, in __getitem__ return self._data._getitem_coord(key) File ""/Users/kain/CloudStation/CSLU/sci/timeview/miniconda/envs/timeview/lib/python3.6/site-packages/xarray/core/dataarray.py"", line 465, in _getitem_coord return self._replace_maybe_drop_dims(var, name=key) File ""/Users/kain/CloudStation/CSLU/sci/timeview/miniconda/envs/timeview/lib/python3.6/site-packages/xarray/core/dataarray.py"", line 257, in _replace_maybe_drop_dims return self._replace(variable, coords, name) File ""/Users/kain/CloudStation/CSLU/sci/timeview/miniconda/envs/timeview/lib/python3.6/site-packages/xarray/core/dataarray.py"", line 248, in _replace return type(self)(variable, coords, name=name, fastpath=True) TypeError: __init__() got an unexpected keyword argument 'fastpath' The last statement basically called my subclass, instead of DataArray, but my subclass didn't work well with that because it restricted data to be two-dimensional, but the library code required a dimension of 1 at this point.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,188113943