Skip to content

Commit

Permalink
Merge pull request #18 from MilesCranmer/main
Browse files Browse the repository at this point in the history
Fix bugs in latest Python
  • Loading branch information
johnnygreco authored Mar 28, 2024
2 parents cfaf229 + cc8e972 commit c69a908
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/artpop/stars/isochrones.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ def __init__(self, log_age, feh, phot_system, mist_path=MIST_PATH,
logger.debug('Using nearest log_age = {:.2f}'.format(self.log_age))

# store phot_system as list to allow multiple photometric systems
if type(phot_system) == str:
if isinstance(phot_system, str):
phot_system = [phot_system]

# fetch first isochrone grid, interpolating on [Fe/H] if necessary
Expand Down
2 changes: 1 addition & 1 deletion src/artpop/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def check_random_state(seed):
return np.random.mtrand._rand
if isinstance(seed, (numbers.Integral, np.integer)):
return np.random.RandomState(seed)
if isinstance(seed, np.random.RandomState):
if isinstance(seed, np.random.RandomState) or isinstance(np.random.Generator):
return seed
if type(seed)==list:
if type(seed[0])==int:
Expand Down

0 comments on commit c69a908

Please sign in to comment.