Skip to content

Commit

Permalink
Readme: Mention context manager.
Browse files Browse the repository at this point in the history
  • Loading branch information
ivilata committed Dec 8, 2023
1 parent 2132e71 commit e048e2f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ After that, optimization will be attempted for any slicing of a dataset (of the

.. _hdf5plugin: https://github.com/silx-kit/hdf5plugin

You may globally disable the optimization after importing ``b2h5py`` by calling ``b2h5py.unpatch_dataset_class()``, and enable it again with ``b2h5py.patch_dataset_class()``. Even if the module is imported and the ``Dataset`` class is patched, you may still force-disable the optimization by setting ``BLOSC2_FILTER=1`` in the environment.
You may globally disable the optimization after importing ``b2h5py`` by calling ``b2h5py.unpatch_dataset_class()``, and enable it again with ``b2h5py.patch_dataset_class()``. You may
also perform this patching temporarily using ``patching_dataset_class()`` to get a context manager.

Even if the module is imported and the ``Dataset`` class is patched, you may still force-disable the optimization by setting ``BLOSC2_FILTER=1`` in the environment.

Building
--------
Expand Down

0 comments on commit e048e2f

Please sign in to comment.