Open valerian-chen opened 2 months ago
They should return arrays the same length as their inputs (although note that it's fine to pass scalars, you get a length one array).
Do you have a simple example with this problem? From a quick look, it's not immediately obvious where this would be coming from
I've been trying to run some old simulations with the UDA_saved find_B_method. I've uncovered a nest of bugs; I think it's related to the self.B_R, self.B_T, and self.B_Z methods.
Am I correct that these methods should return floats or arrays? When UDA_saved is used, they return xarrays instead, which results in a bunch of errors downstream.
Since EFITField relies on q_R to calculate the components of B, when q_R is an xarray, the field becomes an xarray.
Should I ensure that q_R is always an ndarray, or should I always cast the components of B to ndarray?