Skip to content

Commit

Permalink
Fix numba compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
CalebBell committed Dec 30, 2021
1 parent 45b1021 commit 8276f24
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions chemicals/heat_capacity.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def calculate_integral_over_T(self, Ta, Tb):
force_calculate = calculate
try:
if IS_NUMBA:
ShomateRange = jitclass([('coeffs', numba.types.UniTuple(numba.float64, 6)),
ShomateRange = jitclass([('coeffs', numba.types.UniTuple(numba.float64, 5)),
('Tmin', numba.float64),
('Tmax', numba.float64)])(ShomateRange)
except:
Expand Down Expand Up @@ -855,9 +855,9 @@ def _load_Cp_data():
Cp_dat = phase_values[i]
if Cp_dat is not None:
if len(Cp_dat) == 1:
d[CAS] = ShomateRange(Cp_dat[0][2:], Cp_dat[0][0], Cp_dat[0][1])
d[CAS] = ShomateRange(tuple(Cp_dat[0][2:]), Cp_dat[0][0], Cp_dat[0][1])
else:
phase_models = [ShomateRange(Cp_dat[i][2:], Cp_dat[i][0], Cp_dat[i][1]) for i in range(len(Cp_dat))]
phase_models = [ShomateRange(tuple(Cp_dat[i][2:]), Cp_dat[i][0], Cp_dat[i][1]) for i in range(len(Cp_dat))]
d[CAS] = PiecewiseHeatCapacity(phase_models)


Expand Down

0 comments on commit 8276f24

Please sign in to comment.