diff --git a/metobs/data/__init__.py b/metobs/data/__init__.py index 0b76ebd12c8775db532e10be08d09e9112c9f7d6..6b93d1e0cc88825bfdb06291ba1c591818e60752 100644 --- a/metobs/data/__init__.py +++ b/metobs/data/__init__.py @@ -313,7 +313,7 @@ def array_convert(arr, sunits, cunits): :type cunits: string """ if sunits == cunits: return arr - if type(arr) != ndarray: raise ValueError("Array must be of type numpy.ndarray") + if not isinstance(arr, ndarray):: raise ValueError("Array must be of type numpy.ndarray, not %r" % (type(arr),)) shape = arr.shape a = arr.flatten() if sunits == 'c':