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
25
stars
19
forks
source link
Broken from_hdf by casting lists as floats with np.float64 #321
The function separation_from_orbital_period as called in BinaryStar.from_oneline_df is now broken when loading systems from hdf. Somehow when numpy arrays are passed they are cast as floats which breaks when trying to set the history attributes for BinaryStar. (e.g. list(separation) is now being called on a float instead of a np.array)
https://github.com/POSYDON-code/POSYDON/blob/1640a3eb977c97e1d646ac19c9e64bfbc7a83c68/posydon/utils/common_functions.py#L255-L258
The function
separation_from_orbital_period
as called inBinaryStar.from_oneline_df
is now broken when loading systems from hdf. Somehow when numpy arrays are passed they are cast as floats which breaks when trying to set the history attributes forBinaryStar
. (e.g.list(separation)
is now being called on a float instead of a np.array)produces the very unexpected behavior: