Skip to content

Commit 7c3ab6f

Browse files
AlexboiboiCopilot
andauthored
Update src/magpylib_material_response/demag.py
Co-authored-by: Copilot <[email protected]>
1 parent 0d57cac commit 7c3ab6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/magpylib_material_response/demag.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def _convert_to_array(susceptibility, n):
6666
if (
6767
hasattr(susceptibility, "__len__")
6868
and len(susceptibility) == 3
69-
and not isinstance(susceptibility[0], list | tuple | np.ndarray)
69+
and all(not isinstance(x, (list, tuple, np.ndarray)) for x in susceptibility)
7070
):
7171
# This is a 3-vector, not a list of 3 items
7272
susis = np.tile(susceptibility, (n, 1))

0 commit comments

Comments
 (0)