Skip to content

Commit 27cfe08

Browse files
authored
Merge pull request #283 from upb-lea/Syntax_change
The new numpy syntax is used in the code
2 parents efbbfdd + 6203955 commit 27cfe08

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,6 @@ examples/logs/
3131
.vscode/settings.json
3232
.vscode/launch.json
3333
plots/
34-
saved_plots/
34+
saved_plots/
35+
36+
*/debug.ipynb

src/gem_controllers/stages/operation_point_selection/eesm_ops.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def _calculate_luts(self):
181181
self.i_e_opt = sp_interpolate.interp1d(best_params[:, 0], best_params[:, 4], kind="cubic")
182182

183183
self.t_grid, self.psi_grid = np.mgrid[
184-
0 : self.t_max : np.complex(0, self.t_grid_count), 0 : self.psi_max : np.complex(self.psi_grid_count)
184+
0 : self.t_max : np.complex128(0, self.t_grid_count), 0 : self.psi_max : np.complex128(self.psi_grid_count)
185185
]
186186

187187
self.i_d_inter = sp_interpolate.griddata(

src/gem_controllers/stages/operation_point_selection/pmsm_ops.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,8 @@ def tune(self, env: gem.core.ElectricMotorEnvironment, env_id: str, current_safe
236236

237237
# Define the grid for the torque and fluxes
238238
self.t_grid, self.psi_grid = np.mgrid[
239-
np.amin(t) : np.amax(t) : np.complex(0, self.t_count),
240-
self.psi_min : self.psi_max : np.complex(self.psi_count),
239+
np.amin(t) : np.amax(t) : np.complex128(0, self.t_count),
240+
self.psi_min : self.psi_max : np.complex128(self.psi_count),
241241
]
242242

243243
# Interpolate the functions

0 commit comments

Comments
 (0)