-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This changes the default behaviour of importing `b2h5py` to need explicit patching of the `h5py.Dataset` class either by calling the function `b2h5py.enable_fast_slicing()` or by using the `b2h5py.fast_slicing()` context manager. The old behaviour can still be obtained by explicitly importing `b2h5py.auto`. Documentation and tests have been updated accordingly.
- Loading branch information
Showing
7 changed files
with
85 additions
and
64 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
"""Automatic activation of Blosc2 optimized slicing for h5py. | ||
Importing this module enables the optimization globally, just use:: | ||
import b2h5py.auto | ||
After that, all slicing operations on Blosc2-compressed datasets will be | ||
transparently optimized when possible. | ||
""" | ||
|
||
from .blosc2 import enable_fast_slicing | ||
|
||
|
||
enable_fast_slicing() |
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
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