Skip to content

Commit bafb982

Browse files
committed
fix new numpy>=2.4.0 error
1 parent 90a6650 commit bafb982

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

bifacial_radiance/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1645,8 +1645,8 @@ def getSingleTimestampTrackerAngle(self, timeindex, metdata=None, gcr=None,
16451645
trackingdata = pvlib.tracking.singleaxis(sunzen, sunaz,
16461646
axis_tilt, azimuth,
16471647
limit_angle, backtrack, gcr)
1648-
1649-
tracker_theta = float(np.round(trackingdata['tracker_theta'],2))
1648+
# convert returned np.array or series to float and round to 2 digits
1649+
tracker_theta = list(trackingdata['tracker_theta'].round(2))[0]
16501650
tracker_theta = tracker_theta*-1 # bifacial_radiance uses East (morning) theta as positive
16511651

16521652
return tracker_theta

0 commit comments

Comments
 (0)