We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d57cac commit 7c3ab6fCopy full SHA for 7c3ab6f
src/magpylib_material_response/demag.py
@@ -66,7 +66,7 @@ def _convert_to_array(susceptibility, n):
66
if (
67
hasattr(susceptibility, "__len__")
68
and len(susceptibility) == 3
69
- and not isinstance(susceptibility[0], list | tuple | np.ndarray)
+ and all(not isinstance(x, (list, tuple, np.ndarray)) for x in susceptibility)
70
):
71
# This is a 3-vector, not a list of 3 items
72
susis = np.tile(susceptibility, (n, 1))
0 commit comments