diff --git a/src/MNHPy/misc_functions.py b/src/MNHPy/misc_functions.py index a5d8ec7..d8530de 100644 --- a/src/MNHPy/misc_functions.py +++ b/src/MNHPy/misc_functions.py @@ -125,11 +125,13 @@ def oblique_proj(var, ni, nj, lvl, i_beg, j_beg, i_end, j_end): a = RectBivariateSpline(nj, ni, var[k, :, :], kx=1, ky=1) for m in range(int(dist_seg) + 1): # La fonction ev de RectBivariate retourne la valeur la plus proche du point considéré - out_var[k, m] = a.ev(axe_m_coord[m][1], axe_m_coord[m][0]) + result = a.ev(axe_m_coord[m][1], axe_m_coord[m][0]) + out_var[k, m] = result.item() else: # 2D variables to project a = RectBivariateSpline(nj, ni, var[:, :], kx=1, ky=1) for m in range(int(dist_seg) + 1): - out_var[m] = a.ev(axe_m_coord[m][1], axe_m_coord[m][0]) + result = a.ev(axe_m_coord[m][1], axe_m_coord[m][0]) + out_var[m] = result.item() angle_proj = math.acos((ni[i_end] - ni[i_beg]) / axe_m[-1]) return angle_proj, out_var, axe_m