Skip to content
Snippets Groups Projects
Commit 3618c157 authored by David Hoese's avatar David Hoese
Browse files

made array_convert do isinstance instead of type comparison

parent 5a01dccc
No related branches found
No related tags found
No related merge requests found
...@@ -313,7 +313,7 @@ def array_convert(arr, sunits, cunits): ...@@ -313,7 +313,7 @@ def array_convert(arr, sunits, cunits):
:type cunits: string :type cunits: string
""" """
if sunits == cunits: return arr 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 shape = arr.shape
a = arr.flatten() a = arr.flatten()
if sunits == 'c': if sunits == 'c':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment