Skip to content

Commit

Permalink
Remove "manual" casting to simple types
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhuppmann committed Nov 17, 2023
1 parent f1d4b43 commit 6288e3d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions pyam/ixmp4.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,5 @@ def write_to_ixmp4(df, platform: ixmp4.Platform):

run = platform.Run(model=model, scenario=scenario, version="new")
run.iamc.add(_df.data)
for key, value in dict(_df.meta.iloc[0]).items():
if isinstance(value, np.int64):
run.meta[key] = int(value)
else:
run.meta[key] = value
run.meta = dict(_df.meta.iloc[0])
run.set_as_default()

0 comments on commit 6288e3d

Please sign in to comment.