diff --git a/OMPython/ModelicaSystem.py b/OMPython/ModelicaSystem.py index d6a3d654..cbd7fbd9 100644 --- a/OMPython/ModelicaSystem.py +++ b/OMPython/ModelicaSystem.py @@ -291,8 +291,10 @@ def parse_simflags(simflags: str) -> dict[str, Optional[str | dict[str, Any] | n The return data can be used as input for self.args_set(). """ - warnings.warn("The argument 'simflags' is depreciated and will be removed in future versions; " - "please use 'simargs' instead", DeprecationWarning, stacklevel=2) + warnings.warn(message="The argument 'simflags' is depreciated and will be removed in future versions; " + "please use 'simargs' instead", + category=DeprecationWarning, + stacklevel=2) simargs: dict[str, Optional[str | dict[str, Any] | numbers.Number]] = {} @@ -585,7 +587,7 @@ def buildModel(self, variableFilter: Optional[str] = None): def sendExpression(self, expr: str, parsed: bool = True) -> Any: try: - retval = self._session.sendExpression(expr, parsed) + retval = self._session.sendExpression(command=expr, parsed=parsed) except OMCSessionException as ex: raise ModelicaSystemError(f"Error executing {repr(expr)}: {ex}") from ex @@ -1612,9 +1614,9 @@ def _createCSVData(self, csvfile: Optional[OMCPath] = None) -> OMCPath: for signal_name, signal_values in inputs.items(): signal = np.array(signal_values) interpolated_inputs[signal_name] = np.interp( - all_times, - signal[:, 0], # times - signal[:, 1], # values + x=all_times, + xp=signal[:, 0], # times + fp=signal[:, 1], # values ) # Write CSV file diff --git a/OMPython/OMCSession.py b/OMPython/OMCSession.py index ee92ce9f..2295eb06 100644 --- a/OMPython/OMCSession.py +++ b/OMPython/OMCSession.py @@ -848,8 +848,10 @@ def run_model_executable(cmd_run_data: OMCSessionRunData) -> int: return returncode def execute(self, command: str): - warnings.warn("This function is depreciated and will be removed in future versions; " - "please use sendExpression() instead", DeprecationWarning, stacklevel=2) + warnings.warn(message="This function is depreciated and will be removed in future versions; " + "please use sendExpression() instead", + category=DeprecationWarning, + stacklevel=2) return self.sendExpression(command, parsed=False)