ArtificialStellarPopulations / ArtPop

✨ ArtPop – Building artificial galaxies one star at a time.
https://artpop.readthedocs.io/en/latest/
MIT License
61 stars 10 forks source link

Fix bugs in latest Python #18

Closed MilesCranmer closed 7 months ago

MilesCranmer commented 8 months ago

This fixes a couple of bugs I have ran into:

  1. Using type(phot_system) == str => isinstance(phot_system, str). For me it was for some reason the current check didn't work, and "HSC" was not detected as a string, and ending up passing "H" to the isochrone grid (i.e., the first element of that list).
  2. The default numpy generator is subclassed to np.random.Generator so the current detector doesn't work. This adds another check for that.
MilesCranmer commented 8 months ago

Friendly ping

johnnygreco commented 7 months ago

Thanks @MilesCranmer!