Skip to content

Commit

Permalink
Avoid duplicate arguments
Browse files Browse the repository at this point in the history
Stupid kwargs >.<
  • Loading branch information
teutoburg committed Nov 26, 2024
1 parent a2d8bfe commit 58ef400
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scopesim_templates/stellar/stars.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def star_field(n, mmin, mmax, width, height=None, filter_name="V",
mmin, mmax = u.Quantity(mmin, u.mag), u.Quantity(mmax, u.mag)

if "x" in kwargs and "y" in kwargs:
x, y = kwargs["x"], kwargs["y"]
x, y = kwargs.pop("x"), kwargs.pop("y")
else:
rands = np.random.random(size=(2, n)) - 0.5
x, y = width * rands[0], height * rands[1]
Expand Down

0 comments on commit 58ef400

Please sign in to comment.