From 92d9e35e7dc181c7b6243e7b8c71232269d81938 Mon Sep 17 00:00:00 2001 From: Philipp Rudiger Date: Sun, 18 Feb 2018 23:45:05 +0000 Subject: [PATCH] Fixed range handling of OSU dtypes --- holoviews/core/data/interface.py | 3 ++- holoviews/core/data/pandas.py | 10 ---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/holoviews/core/data/interface.py b/holoviews/core/data/interface.py index 9adc3a5f4e..0888623a03 100644 --- a/holoviews/core/data/interface.py +++ b/holoviews/core/data/interface.py @@ -287,8 +287,9 @@ def range(cls, dataset, dimension): return np.NaN, np.NaN else: try: + assert column.dtype.kind not in 'SUO' return (np.nanmin(column), np.nanmax(column)) - except TypeError: + except (AssertionError, TypeError): column = [v for v in util.python2sort(column) if v is not None] if not len(column): return np.NaN, np.NaN diff --git a/holoviews/core/data/pandas.py b/holoviews/core/data/pandas.py index 1b5e7ea385..65f60bf86c 100644 --- a/holoviews/core/data/pandas.py +++ b/holoviews/core/data/pandas.py @@ -294,16 +294,6 @@ def dframe(cls, columns, dimensions): return columns.data.copy() - @classmethod - def array(cls, dataset, dimensions): - if not dimensions: - dimensions = dataset.dimensions(label='name') - else: - dimensions = [dataset.get_dimensions(d).name for d in dimensions] - inds = [dataset.data.columns.index(dim.name) for dim in dimensions] - return dataset.data.values[:, inds] - - @classmethod def iloc(cls, dataset, index): rows, cols = index