We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 34fcefd commit a876015Copy full SHA for a876015
magpylib_material_response/demag.py
@@ -331,7 +331,10 @@ def apply_demag(
331
with timelog(demag_msg, min_log_time=min_log_time):
332
# set up mr
333
pol_magnets = [
334
- src.orientation.apply(src.polarization) for src in magnets_list
+ src.orientation.apply(
335
+ (0.0, 0.0, 0.0) if src.polarization is None else (src.polarization)
336
+ )
337
+ for src in magnets_list
338
] # ROTATION CHECK
339
pol_magnets = np.reshape(
340
pol_magnets, (3 * n, 1), order="F"
0 commit comments