Skip to content

Commit 0a99f84

Browse files
committed
fix pytest
1 parent 1410e3b commit 0a99f84

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

femmt/functions_reluctance.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,6 @@ def max_value_from_value_vec(*args):
536536

537537
return tuple(peak_list)
538538

539-
540539
def phases_deg_from_time_current(time_vec: list, *args):
541540
"""
542541
Return the phases_deg of the peaks. To rebuild the signal, use cosine instead of sine.
@@ -1145,7 +1144,7 @@ def resistance_litz_wire(core_inner_diameter: float, window_w: float, window_h:
11451144
# return R = rho * l / A
11461145
return total_turn_length / litz_wire_effective_area / sigma_copper
11471146

1148-
def i_rms(time_current_matrix: np.array) -> float:
1147+
def i_rms(time_current_matrix: np.ndarray) -> float:
11491148
"""
11501149
RMS calculation from a time-current-vector.
11511150
@@ -1154,6 +1153,9 @@ def i_rms(time_current_matrix: np.array) -> float:
11541153
:return: rms current
11551154
:rtype: float
11561155
"""
1156+
if not isinstance(time_current_matrix, np.ndarray):
1157+
time_current_matrix = np.array(time_current_matrix)
1158+
11571159
time = time_current_matrix[0]
11581160
current = time_current_matrix[1]
11591161

0 commit comments

Comments
 (0)