Skip to content

Commit

Permalink
fixes #600
Browse files Browse the repository at this point in the history
  • Loading branch information
robertmartin8 committed Dec 1, 2024
1 parent d508869 commit e12417a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pypfopt/base_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def save_weights_to_file(self, filename="weights.csv"):
"""
clean_weights = self.clean_weights()

ext = filename.split(".")[1]
ext = filename.split(".")[-1].lower()
if ext == "csv":
pd.Series(clean_weights).to_csv(filename, header=False)
elif ext == "json":
Expand Down

0 comments on commit e12417a

Please sign in to comment.