Skip to content

Commit fd527dc

Browse files
authored
Merge pull request #56 from NatLabRockies/fix-hvac-error
update np.trapz() call to np.trapezoid()
2 parents ebc467a + 1a34ccc commit fd527dc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

nrel/routee/transit/thermal_energy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def interp_power(t: np.number) -> float:
144144
# sample in small steps for accurate integration
145145
ts = np.arange(s, e, 0.01) # 0.01 h = 36 s resolution
146146
ps = np.array([interp_power(t) for t in ts])
147-
energy = np.trapz(ps, ts) # integrate kW over hours → kWh
147+
energy = np.trapezoid(ps, ts) # integrate kW over hours → kWh
148148
energies.append(energy)
149149

150150
return np.array(energies)

0 commit comments

Comments
 (0)