Skip to content

Commit

Permalink
Bug fix in the previous patch
Browse files Browse the repository at this point in the history
  • Loading branch information
Sonia El Hedri committed Jan 12, 2024
1 parent 87bae9c commit 6ef4245
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/snewpy/models/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def get_initial_spectra(self, t, E, flavors=Flavor):
- loggamma(1+a) + a*np.log(E) - (1+a)*(E/Ea)) / (u.erg * u.s)
#remove bad values
result[np.isnan(result)] = 0
result[E==0] = 0
result[:, E==0] = 0
#remove unnecessary dimensions, if E or t was scalar:
result = np.squeeze(result)
initialspectra[flavor] = result
Expand Down

0 comments on commit 6ef4245

Please sign in to comment.