Skip to content

Commit

Permalink
Merge pull request #4929 from neutrinoceros/art/bug/4928/logspace_typ…
Browse files Browse the repository at this point in the history
…esafety

BUG: ensure type safety in a call to np.logspace
  • Loading branch information
cphyc committed Jun 16, 2024
2 parents e9ba8ac + 4f17ed1 commit 01db599
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yt/frontends/art/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ def b2t(tb, n=1e2, logger=None, **kwargs):
return a2t(b2a(tb))
if len(tb) < n:
n = len(tb)
tbs = -1.0 * np.logspace(np.log10(-tb.min()), np.log10(-tb.max()), n)
tbs = -1.0 * np.logspace(np.log10(-tb.min()), np.log10(-tb.max()), int(n))
ages = []
for i, tbi in enumerate(tbs):
ages += (a2t(b2a(tbi)),)
Expand Down

0 comments on commit 01db599

Please sign in to comment.