Skip to content

Instantly share code, notes, and snippets.

@PratyushTripathy
Created September 4, 2021 10:47
Show Gist options
  • Save PratyushTripathy/e6587d535d407a0c8a47db9819d745f9 to your computer and use it in GitHub Desktop.
Save PratyushTripathy/e6587d535d407a0c8a47db9819d745f9 to your computer and use it in GitHub Desktop.
# binarise the array
arr_sb = (arr_sb == 1).astype(int)
# display the range of values
print('Min and max value of single band raster:', arr_sb.min(), arr_sb.max())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment