Skip to content

Commit

Permalink
update in the data_preprocessing method
Browse files Browse the repository at this point in the history
  • Loading branch information
klounis committed Dec 19, 2023
1 parent 603182e commit 2e1d213
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions rocketpy/mathutils/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def set_source(self, source):
source = np.loadtxt(file, delimiter=",", dtype=float)
except ValueError:
# If an error occurs, headers are present
source = np.loadtxt(source, delimiter=",", dtype=float, skiprows=1)
source = self.data_preprocessing(source)
except Exception as e:
raise ValueError(
"The source file is not a valid csv or txt file."
Expand Down Expand Up @@ -1153,11 +1153,7 @@ def data_preprocessing(self, source):
writer = csv.writer(output_file, delimiter=',')
writer.writerows(data_no_headers)

return Function(
source=output_path,
interpolation=self.__interpolation__,
extrapolation=self.__extrapolation__,
)
return output_path



Expand Down

0 comments on commit 2e1d213

Please sign in to comment.