From 4508d42d05f8bb09383a1bd6fbab3d3acd66075f Mon Sep 17 00:00:00 2001 From: Pedro Bressan Date: Thu, 16 Nov 2023 21:28:53 -0300 Subject: [PATCH] MNT: post conflict solve refactors. --- rocketpy/mathutils/function.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/rocketpy/mathutils/function.py b/rocketpy/mathutils/function.py index 190d38d25..c8d6470e6 100644 --- a/rocketpy/mathutils/function.py +++ b/rocketpy/mathutils/function.py @@ -75,21 +75,22 @@ def __init__( ------- None """ + # Set input and output + if inputs is None: + inputs = ["Scalar"] + if outputs is None: + outputs = ["Scalar"] + inputs, outputs, interpolation, extrapolation = self._check_user_input( source, inputs, outputs, interpolation, extrapolation ) + # initialize variables to avoid errors when being called by other methods self.get_value_opt = None self.__polynomial_coefficients__ = None self.__akima_coefficients__ = None self.__spline_coefficients__ = None - # Set input and output - if inputs is None: - inputs = ["Scalar"] - if outputs is None: - outputs = ["Scalar"] - # store variables self.set_inputs(inputs) self.set_outputs(outputs)