import numpy as np
import magnethub as mh
# instantiate material-specific model
mdl = mh.loss.LossModel(material="3C92", team="paderborn")
# dummy B field data (one trajectory with 1024 samples)
b_wave = np.random.randn(1024)* 200e-3 # in T
freq = 124062 # Hz
temp = 58 # �C
# get power loss in W/m� and estimated H wave in A/m
p, h = mdl(b_wave, freq, temp)
# batch execution for 100 trajectories
b_waves = np.random.randn(100, 1024)* 200e-3 # in T
freqs = np.random.randint(100e3, 750e3, size=100)
temps = np.random.randint(20, 80, size=100)
p, h = mdl(b_waves, freqs, temps)
File "/mag-net-hub/src_py/magnethub/paderborn.py", line 423, in construct_tensor_seq2seq
full_b /= b_limit
ValueError: output array is read-only