-
Notifications
You must be signed in to change notification settings - Fork 551
Closed
Description
The rasterio.features.sieve function docs states that it works with integer and float32 types. However, the code and actual behavior of rasterio.features.sieve only accepts interger types:
rasterio/rasterio/_features.pyx
Line 185 in 95f1f5f
| valid_dtypes = ('int16', 'int32', 'uint8', 'uint16') |
Running the code belowe always returns ValueError: image dtype must be one of: rasterio.int16, rasterio.int32, rasterio.uint8, rasterio.uint16, despite documentation saying it would accept float32.
import numpy
from rasterio.features import sieve
m = numpy.eye(5, dtype=numpy.float32)
res = sieve(m, 2)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels