Skip to content

Commit

Permalink
Ensure iris interface only returns scalar when indexed
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Jun 6, 2016
1 parent 3e3cb45 commit 5c1b5c7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion holoviews/core/data/iris.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,9 @@ def select(cls, dataset, selection_mask=None, **selection):
"""
constraint = cls.select_to_constraint(selection)
pre_dim_coords = [c.name() for c in dataset.data.dim_coords]
indexed = cls.indexed(dataset, selection)
extracted = dataset.data.extract(constraint)
if not extracted.dim_coords:
if indexed and not extracted.dim_coords:
return extracted.data.item()
post_dim_coords = [c.name() for c in extracted.dim_coords]
dropped = [c for c in pre_dim_coords if c not in post_dim_coords]
Expand Down

0 comments on commit 5c1b5c7

Please sign in to comment.