Commit cf73400c authored by myron's avatar myron

using np.iterable and np.isscalar instead of isinstance(....

parent 680293bf
Pipeline #37018 passed with stages
in 5 minutes and 19 seconds
......@@ -1142,7 +1142,7 @@ class CenterOfRotationAdaptiveSearch(CenterOfRotation):
messagge_template = (
"The guess parameter can be None, a sequence of one or two scalars, or a scalar. It was instead %s\n"
)
if isinstance(guess, (list, tuple, np.ndarray)):
if np.iterable(guess):
if len(guess) == 2:
guess_x = guess[0]
guess_r = guess[1]
......@@ -1153,7 +1153,7 @@ class CenterOfRotationAdaptiveSearch(CenterOfRotation):
message = message_template % (guess)
raise ValueError(message)
elif isinstance(guess, (float, int)):
elif np.isscalar(guess):
guess_x = guess
guess_r = None
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment