Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pysheds/sview.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ def __new__(cls, input_array, viewfinder=None, metadata={}):
try:
assert np.can_cast(viewfinder.nodata, obj.dtype, casting='safe')
except:
raise TypeError('`nodata` value not representable in dtype of array.')
raise TypeError(f"Cannot cast nodata value {viewfinder.nodata} (type: {type(viewfinder.nodata)}) to array dtype {obj.dtype}.")

# Don't allow original viewfinder and metadata to be modified
viewfinder = viewfinder.copy()
metadata = metadata.copy()
Expand Down