File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,6 +50,9 @@ def __init__(
5050 The cosmology used to perform ray-tracing calculations.
5151 """
5252
53+ # if isinstance(galaxies, af.ModelInstance):
54+ # galaxies = list(galaxies.values())
55+
5356 self .galaxies = galaxies
5457
5558 self .cosmology = cosmology or ag .cosmo .Planck15 ()
Original file line number Diff line number Diff line change @@ -32,7 +32,8 @@ def plane_redshifts_from(galaxies: List[ag.Galaxy]) -> List[float]:
3232
3333 galaxies_ascending_redshift = sorted (galaxies , key = lambda galaxy : galaxy .redshift )
3434
35- plane_redshifts = [galaxy .redshift for galaxy in galaxies_ascending_redshift ]
35+ # Coerce to float to avoid issues with other float types not being hashable.
36+ plane_redshifts = [float (galaxy .redshift ) for galaxy in galaxies_ascending_redshift ]
3637
3738 return list (dict .fromkeys (plane_redshifts ))
3839
You can’t perform that action at this time.
0 commit comments