You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When running Raster.reproject on an object for which the items in self.res are numpy.float64 (as opposed to float), it fails at this line with "ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()"
This is because the test dst_res == self.res[0] == self.res[1] behaves differently. With float, it returns a single boolean, for np.float64, it returns a tuple of booleans.
To Reproduce
As self.res cannot be set manually, the best way to reproduce (and the way I came across the bug) is to load with downsampling:
Describe the bug
When running
Raster.reproject
on an object for which the items inself.res
are numpy.float64 (as opposed to float), it fails at this line with "ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()"This is because the test
dst_res == self.res[0] == self.res[1]
behaves differently. With float, it returns a single boolean, for np.float64, it returns a tuple of booleans.To Reproduce
As
self.res
cannot be set manually, the best way to reproduce (and the way I came across the bug) is to load with downsampling:Expected behavior
The function should proceed without error.
System (please complete the following information):
Irrelevant
The text was updated successfully, but these errors were encountered: