Add input validation for nodata value.
This value must be within the ranges of the data type. Check this with np.can_cast(nodata, dtype) for integers and np.can_cast(float(nodata), dtype) for float data types.
This value must be within the ranges of the data type. Check this with np.can_cast(nodata, dtype) for integers and np.can_cast(float(nodata), dtype) for float data types.