Skip to content

Commit

Permalink
write VMEC input CURTOR (#1019)
Browse files Browse the repository at this point in the history
`_Profile.__call__` returns an ndarray, but we need a float to print it
as a string.
  • Loading branch information
ddudt authored May 15, 2024
2 parents d9f4a8d + 33f4fbb commit ef81903
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion desc/vmec.py
Original file line number Diff line number Diff line change
Expand Up @@ -1472,7 +1472,7 @@ def write_vmec_input(cls, eq, fname, header="", **kwargs): # noqa: C901
else:
current = eq.current
f.write(" NCURR = 1\n") # current profile specified
f.write(" CURTOR = {:+14.8E}\n".format(float(current(1)))) # AC scale
f.write(" CURTOR = {:+14.8E}\n".format(float(current(1)[0]))) # AC scale
if isinstance(current, PowerSeriesProfile) and current.sym:
f.write(" AC =") # current power series coefficients
for ac in current.params:
Expand Down

0 comments on commit ef81903

Please sign in to comment.