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):
: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':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment