Add conditional to set _mv variable to np.uint64 data type #47
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allow the processing of large rasters, shaped at (63708, 79780), for
Flwdir
object.Issue addressed
Closes #46
Explanation
As described in issue #46, when large rasters are used, an IndexError was thrown from underlying numba code.
The upstream_count function was the cause of the Indexing Error, due to an incorrect value set in the
_mv
variable when using anp.uint64
data type.Checklist
main
Additional Notes (optional)
The setting of the np.uint64 dtype in pyflwdir.py was not accounted for, and caused non-correct values in the
_mv
variable, when assigned in core.py. This was causing the C pointer references to not line up with the signed integer type that was being used in python. See numpy docs fornp.intp()
The downstream effects