POSYDON-code / POSYDON

POSYDON is a next-generation single and binary-star population synthesis code incorporating full stellar structure and evolution modeling with the use of MESA.
BSD 3-Clause "New" or "Revised" License
29 stars 19 forks source link

Update common_functions.py #335

Closed ZepeiX closed 3 months ago

ZepeiX commented 3 months ago

setting lambda=np.nan raises the error ValueError("lambda_CE has a negative value")

mkruckow commented 3 months ago

A case were too much negation hurts. Using if (lambda_CE < -tolerance): would have worked, too. Now it's more explicit to allow np.nan.