Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 97137

Raster is a data format consisting of regular grids of values, usually stored in an image-like format.

0 votes
2 answers
1k views

Sum of values in raster

Upon importing a raster file, how can I get the sum of all values given in the raster file? … import rioxarray as rxr raster= rxr.open_rasterio( 'raster.tif', masked=True ).squeeze() raster.sum() only yields cryptic output. raster.sum() Out[22]: <xarray.DataArray ()> array(1.0032373e …
Stücke's user avatar
  • 541