Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,6 @@ examples/logs/
.vscode/settings.json
.vscode/launch.json
plots/
saved_plots/
saved_plots/

*/debug.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def _calculate_luts(self):
self.i_e_opt = sp_interpolate.interp1d(best_params[:, 0], best_params[:, 4], kind="cubic")

self.t_grid, self.psi_grid = np.mgrid[
0 : self.t_max : np.complex(0, self.t_grid_count), 0 : self.psi_max : np.complex(self.psi_grid_count)
0 : self.t_max : np.complex128(0, self.t_grid_count), 0 : self.psi_max : np.complex128(self.psi_grid_count)
]

self.i_d_inter = sp_interpolate.griddata(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@ def tune(self, env: gem.core.ElectricMotorEnvironment, env_id: str, current_safe

# Define the grid for the torque and fluxes
self.t_grid, self.psi_grid = np.mgrid[
np.amin(t) : np.amax(t) : np.complex(0, self.t_count),
self.psi_min : self.psi_max : np.complex(self.psi_count),
np.amin(t) : np.amax(t) : np.complex128(0, self.t_count),
self.psi_min : self.psi_max : np.complex128(self.psi_count),
]

# Interpolate the functions
Expand Down
Loading