Skip to content

Commit

Permalink
Fix for IrisInterface.coords
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Sep 27, 2018
1 parent f184182 commit 4d95103
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions holoviews/core/data/iris.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,10 @@ def shape(cls, dataset, gridded=False):

@classmethod
def coords(cls, dataset, dim, ordered=False, expanded=False):
dim = dataset.get_dimension(dim, strict=True)
if expanded:
return util.expand_grid_coords(dataset, dim)
data = dataset.data.coords(dim)[0].points
return util.expand_grid_coords(dataset, dim.name)
data = dataset.data.coords(dim.name)[0].points
if ordered and np.all(data[1:] < data[:-1]):
data = data[::-1]
return data
Expand Down
2 changes: 1 addition & 1 deletion holoviews/core/data/xarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def groupby(cls, dataset, dimensions, container_type, group_type, **kwargs):

@classmethod
def coords(cls, dataset, dimension, ordered=False, expanded=False, edges=False):
dim = dataset.get_dimension(dimension)
dim = dataset.get_dimension(dimension, strict=True)
dim = dimension if dim is None else dim.name
irregular = cls.irregular(dataset, dim)
if irregular or expanded:
Expand Down

0 comments on commit 4d95103

Please sign in to comment.