diff --git a/pde/tools/misc.py b/pde/tools/misc.py index 1dbf8e7b..d8a988ce 100644 --- a/pde/tools/misc.py +++ b/pde/tools/misc.py @@ -389,15 +389,15 @@ def number_array( # dtype needs to be determined automatically try: # convert the result to a numpy array with the given dtype - result = np.array(data, dtype=get_common_dtype(data), copy=copy) + result = np.array(data, dtype=get_common_dtype(data), copy=copy) # type: ignore except TypeError: # Conversion can fail when `data` contains a complex sympy number, i.e., # sympy.I. In this case, we simply try to convert the expression using a # complex dtype - result = np.array(data, dtype=np.cdouble, copy=copy) + result = np.array(data, dtype=np.cdouble, copy=copy) # type: ignore else: # a specific dtype is requested - result = np.array(data, dtype=np.dtype(dtype), copy=copy) + result = np.array(data, dtype=np.dtype(dtype), copy=copy) # type: ignore return result