-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not mutate weights in reduce.mode! Fixes #145
Apart from mutating the weights (which are eligilable for re-use!), this might also cause issues with concurrent writes, since the regrid uses a parallel for loop via numba.prange. With this commit, we allocate a new (heap) array for every call of mode. For large grids, this is an enormous amount of small allocations, but mode is a relatively slow method anyway...
- Loading branch information
Showing
2 changed files
with
11 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters