Fix issues with recent versions of Dask and Numba #313
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.
The PR contains fixes for two issues with Dask (1) and Numba/Numpy (2):
distributed
package: HDF5 file remains open after computations with Dask array based on HDF5 dataset is completed dask/distributed#8452 The working solution (also a workaround) can be found in https://gist.github.com/dmgav/9fa69d1e507eff46e8098f082b0a1611 and includes overriding default serializers and deserializers forh5py
files and datasets. The code is also included in this PR description below.List index out of range
error when run with Numba JIT (it was working correctly without Numba JIT). The issue was tracked to the use ofnumpy.convolve
function. The part of the function using convolution was reimplemented using an explicit loop, multiplication and subtraction. In the initial tests, the new solution appears to work at least as fast as the old solution when compiled with Numba JIT.Original code based on
np.convolve
:Replacement code: