Skip to content

Commit

Permalink
Fix: OverflowError error when casting approx sum to integer
Browse files Browse the repository at this point in the history
  • Loading branch information
rantolin committed Jan 8, 2025
1 parent f9f5ff5 commit e76d76c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions raster_loader/io/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,8 +507,8 @@ def raster_band_approx_stats(
_sum = 0
sum_squares = 0
if count > 0:
_sum = int(np.sum(samples_band))
sum_squares = int(np.sum(np.array(samples_band) ** 2))
_sum = np.sum(samples_band)
sum_squares = np.sum(np.array(samples_band) ** 2)

if basic_stats:
quantiles = None
Expand Down

0 comments on commit e76d76c

Please sign in to comment.