Skip to content

Commit

Permalink
varkey keys for json dict
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Greer authored and Alexander Greer committed Aug 4, 2021
1 parent f630d1a commit e29dbf8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gpkit/solution_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ def savejson(self, filename="solution.json"):
key.descr["necessarylineage"] = True
data = self["variables"]
for i, (k, v) in enumerate(data.items()):
key = str(k.name)
key = str(k)
if isinstance(v, np.ndarray):
val = {'v': v.tolist(), 'u': str(k.descr["units"])}
else:
Expand Down

0 comments on commit e29dbf8

Please sign in to comment.