blosc2 3.3.4__tar.gz → 3.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {blosc2-3.3.4 → blosc2-3.5.0}/.pre-commit-config.yaml +1 -1
- {blosc2-3.3.4 → blosc2-3.5.0}/ANNOUNCE.rst +5 -6
- {blosc2-3.3.4 → blosc2-3.5.0}/CMakeLists.txt +1 -1
- {blosc2-3.3.4 → blosc2-3.5.0}/PKG-INFO +1 -1
- {blosc2-3.3.4 → blosc2-3.5.0}/README_DEVELOPERS.md +14 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/RELEASE_NOTES.md +21 -2
- {blosc2-3.3.4 → blosc2-3.5.0}/RELEASING.rst +2 -1
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/python-blosc2.rst +1 -1
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/ndarray.rst +3 -0
- blosc2-3.5.0/examples/blosc2_hdf5_compression.py +95 -0
- blosc2-3.5.0/examples/ndarray/lazyexpr_where_indexing.py +42 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/pyproject.toml +1 -1
- {blosc2-3.3.4 → blosc2-3.5.0}/src/blosc2/__init__.py +3 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/src/blosc2/blosc2_ext.pyx +37 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/src/blosc2/core.py +2 -5
- blosc2-3.5.0/src/blosc2/exceptions.py +7 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/src/blosc2/helpers.py +1 -1
- {blosc2-3.3.4 → blosc2-3.5.0}/src/blosc2/lazyexpr.py +68 -47
- {blosc2-3.3.4 → blosc2-3.5.0}/src/blosc2/ndarray.py +117 -4
- {blosc2-3.3.4 → blosc2-3.5.0}/src/blosc2/proxy.py +51 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/src/blosc2/schunk.py +1 -2
- blosc2-3.5.0/src/blosc2/version.py +1 -0
- blosc2-3.5.0/tests/ndarray/test_concatenate.py +90 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/ndarray/test_lazyexpr.py +44 -11
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/ndarray/test_lazyexpr_fields.py +50 -10
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/ndarray/test_lossy.py +4 -5
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/ndarray/test_reductions.py +14 -1
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/ndarray/test_resize.py +24 -0
- blosc2-3.5.0/tests/test_pandas_udf_engine.py +120 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/test_schunk_constructor.py +1 -1
- blosc2-3.3.4/src/blosc2/version.py +0 -1
- {blosc2-3.3.4 → blosc2-3.5.0}/.gitignore +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/.guix/modules/python-blosc2-package.scm +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/.guix-channel +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/CONTRIBUTING.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/LICENSE.txt +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/README.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/code_of_conduct.md +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/_static/blosc-favicon_32x32.png +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/_static/blosc-favicon_64x64.png +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/_static/blosc-logo_128.png +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/_static/blosc-logo_256.png +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/_static/css/custom.css +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/conf.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/development/code-of-conduct.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/development/contributing.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/development/index.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/getting_started/index.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/getting_started/installation.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/getting_started/overview.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/getting_started/tutorials/01.ndarray-basics.ipynb +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/getting_started/tutorials/02.lazyarray-expressions.ipynb +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/getting_started/tutorials/03.lazyarray-udf.ipynb +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/getting_started/tutorials/04.reductions.ipynb +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/getting_started/tutorials/05.persistent-reductions.ipynb +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/getting_started/tutorials/06.remote_proxy.ipynb +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/getting_started/tutorials/07.schunk-basics.ipynb +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/getting_started/tutorials/08.schunk-slicing_and_beyond.ipynb +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/getting_started/tutorials/10.ucodecs-ufilters.ipynb +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/getting_started/tutorials/11.prefilters.ipynb +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/getting_started/tutorials/12.postfilters.ipynb +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/getting_started/tutorials/images/blosc2-pipeline.png +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/getting_started/tutorials/images/blosc2-pipeline.svg +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/getting_started/tutorials/images/lazyexpr-broadcast.png +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/getting_started/tutorials/images/reductions/3D-cube-plane.png +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/getting_started/tutorials/images/reductions/3D-cube.png +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/getting_started/tutorials/images/reductions/memory-access-2D-x.png +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/getting_started/tutorials/images/reductions/memory-access-2D-y.png +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/getting_started/tutorials/images/remote_proxy.png +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/getting_started/tutorials/images/ucodecs-filters/backward.png +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/getting_started/tutorials/images/ucodecs-filters/backward.svg +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/getting_started/tutorials/images/ucodecs-filters/decoder.png +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/getting_started/tutorials/images/ucodecs-filters/decoder.svg +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/getting_started/tutorials/images/ucodecs-filters/decoder2.png +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/getting_started/tutorials/images/ucodecs-filters/decoder2.svg +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/getting_started/tutorials/images/ucodecs-filters/encoder.png +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/getting_started/tutorials/images/ucodecs-filters/encoder.svg +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/getting_started/tutorials/images/ucodecs-filters/encoder2.png +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/getting_started/tutorials/images/ucodecs-filters/encoder2.svg +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/getting_started/tutorials/images/ucodecs-filters/forward.png +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/getting_started/tutorials/images/ucodecs-filters/forward.svg +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/getting_started/tutorials.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/index.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/array_operations.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/autofiles/schunk/blosc2.schunk.SChunk.__getitem__.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/autofiles/schunk/blosc2.schunk.SChunk.__init__.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/autofiles/schunk/blosc2.schunk.SChunk.__len__.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/autofiles/schunk/blosc2.schunk.SChunk.__setitem__.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/autofiles/schunk/blosc2.schunk.SChunk.append_data.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/autofiles/schunk/blosc2.schunk.SChunk.decompress_chunk.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/autofiles/schunk/blosc2.schunk.SChunk.delete_chunk.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/autofiles/schunk/blosc2.schunk.SChunk.fill_special.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/autofiles/schunk/blosc2.schunk.SChunk.filler.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/autofiles/schunk/blosc2.schunk.SChunk.get_chunk.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/autofiles/schunk/blosc2.schunk.SChunk.get_slice.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/autofiles/schunk/blosc2.schunk.SChunk.insert_chunk.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/autofiles/schunk/blosc2.schunk.SChunk.insert_data.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/autofiles/schunk/blosc2.schunk.SChunk.iterchunks.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/autofiles/schunk/blosc2.schunk.SChunk.iterchunks_info.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/autofiles/schunk/blosc2.schunk.SChunk.postfilter.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/autofiles/schunk/blosc2.schunk.SChunk.prefilter.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/autofiles/schunk/blosc2.schunk.SChunk.remove_postfilter.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/autofiles/schunk/blosc2.schunk.SChunk.remove_prefilter.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/autofiles/schunk/blosc2.schunk.SChunk.to_cframe.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/autofiles/schunk/blosc2.schunk.SChunk.update_chunk.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/autofiles/schunk/blosc2.schunk.SChunk.update_data.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/c2array.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/classes.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/decorators.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/index.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/lazy_functions.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/lazyarray.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/linear_algebra.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/low_level.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/ndfield.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/proxy.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/proxyndsource.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/proxysource.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/reduction_functions.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/save_load.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/schunk.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/simpleproxy.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/storage.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/reference/utilities.rst +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/doc/release_notes/index.md +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/btune.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/c2array-get-slice.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/compress2_decompress2.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/compress_decompress.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/filler.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/gil.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/mmap-rw.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ndarray/arange-constructor.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ndarray/asarray_.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ndarray/broadcast_expr.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ndarray/buffer.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ndarray/bytedelta_filter.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ndarray/c2array_expr.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ndarray/compute_expr.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ndarray/compute_fields.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ndarray/compute_udf_numba.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ndarray/compute_where.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ndarray/copy_.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ndarray/empty_.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ndarray/eye-constructor.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ndarray/filter_sort_fields.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ndarray/formats.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ndarray/fromiter-constructor.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ndarray/general_expressions.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ndarray/getitem.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ndarray/iterchunks_info.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ndarray/jit-expr.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ndarray/jit-numpy-funcs.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ndarray/jit-reduc.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ndarray/linspace-constructor.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ndarray/lists-vs-bools-idx.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ndarray/meta.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ndarray/ndarray_copy.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ndarray/ndmean.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ndarray/persistency.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ndarray/proxy-carray.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ndarray/proxy-ndarray.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ndarray/reduce_and_enlarge.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ndarray/reduce_expr.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ndarray/reduce_expr_save.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ndarray/reduce_string_expr.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ndarray/resize_.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ndarray/work_with_numpy.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ndarray/zfp_codec.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/pack_array.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/pack_tensor.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/postfilter1.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/postfilter2.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/postfilter3.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/prefilter.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/save_tensor.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/schunk.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/schunk_roundtrip.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ucodecs.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/ufilters.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/examples/vlmeta.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/generate_version.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/guix.scm +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/images/Complete-Write-Read-B2ND.png +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/images/M1-i386-vs-arm64-pack.png +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/images/M1-i386-vs-arm64-unpack.png +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/images/Read-Partial-Slices-B2ND.png +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/images/b2nd-2level-parts.png +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/images/eval-expr-full-mem-M2.png +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/images/eval-expr-scarce-mem-M2.png +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/images/lazyarray-dask-large.png +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/images/lazyarray-dask-small.png +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/images/lazyarray-expr-large.png +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/images/lazyarray-expr.png +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/images/linspace-compress.png +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/images/linspace-decompress.png +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/images/pack-array-cratios.png +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/images/reduc-float64-amd.png +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/images/reduc-float64-log-amd.png +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/pytest.ini +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/src/blosc2/c2array.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/src/blosc2/info.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/src/blosc2/storage.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/conftest.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/ndarray/test_auto_parts.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/ndarray/test_buffer.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/ndarray/test_c2array_expr.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/ndarray/test_c2array_reductions.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/ndarray/test_c2array_udf.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/ndarray/test_copy.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/ndarray/test_empty.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/ndarray/test_evaluate.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/ndarray/test_full.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/ndarray/test_get_slice_nchunks.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/ndarray/test_getitem.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/ndarray/test_iterchunks_info.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/ndarray/test_jit.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/ndarray/test_lazyudf.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/ndarray/test_matmul.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/ndarray/test_metalayers.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/ndarray/test_mode.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/ndarray/test_nans.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/ndarray/test_ndarray.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/ndarray/test_numpy.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/ndarray/test_persistency.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/ndarray/test_proxy.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/ndarray/test_proxy_c2array.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/ndarray/test_proxy_expr.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/ndarray/test_setitem.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/ndarray/test_slice.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/ndarray/test_squeeze.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/ndarray/test_struct_dtype.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/ndarray/test_transpose.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/ndarray/test_zeros.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/test_bytes_array.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/test_comp_info.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/test_compress2.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/test_compression_parameters.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/test_compressors.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/test_decompress.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/test_iterchunks.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/test_mmap.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/test_open.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/test_open_c2array.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/test_pathlib.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/test_postfilters.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/test_prefilters.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/test_proxy_schunk.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/test_python_blosc.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/test_schunk.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/test_schunk_delete.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/test_schunk_get_slice.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/test_schunk_get_slice_nchunks.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/test_schunk_insert.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/test_schunk_set_slice.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/test_schunk_update.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/test_storage.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/test_tensor.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/test_ucodecs.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/test_ufilters.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/tests/test_vlmeta.py +0 -0
- {blosc2-3.3.4 → blosc2-3.5.0}/update_version.py +0 -0
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
Announcing Python-Blosc2 3.
|
|
1
|
+
Announcing Python-Blosc2 3.5.0
|
|
2
2
|
==============================
|
|
3
3
|
|
|
4
|
-
This
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
been improved to be more consistent with NumPy.
|
|
4
|
+
This release adds significant new functionality in the form of ``stack()``.
|
|
5
|
+
It allows you to stack multiple Blosc2 NDarrays along a new axis, similar
|
|
6
|
+
to NumPy's ``np.stack()``. This is particularly useful for creating
|
|
7
|
+
higher-dimensional arrays from lower-dimensional ones.
|
|
9
8
|
|
|
10
9
|
You can think of Python-Blosc2 3.x as an extension of NumPy/numexpr that:
|
|
11
10
|
|
|
@@ -50,7 +50,7 @@ else()
|
|
|
50
50
|
include(FetchContent)
|
|
51
51
|
FetchContent_Declare(blosc2
|
|
52
52
|
GIT_REPOSITORY https://github.com/Blosc/c-blosc2
|
|
53
|
-
GIT_TAG
|
|
53
|
+
GIT_TAG abb9cd973c2d2d2d068e13934641dcbdedb06752 # v2.19.0 (expand_dims added)
|
|
54
54
|
)
|
|
55
55
|
FetchContent_MakeAvailable(blosc2)
|
|
56
56
|
include_directories("${blosc2_SOURCE_DIR}/include")
|
|
@@ -22,6 +22,20 @@ You are done!
|
|
|
22
22
|
pip install . # add -e for editable mode
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
+
There are situations where you may want to build the C-Blosc2 library separately, for example, when debugging issues in the C library. In that case, let's assume you have the C-Blosc2 library installed in `/usr/local`:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
CMAKE_PREFIX_PATH=/usr/local USE_SYSTEM_BLOSC2=1 pip install -e .
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
and then, you can run the tests with:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
LD_LIBRARY_PATH=/usr/local/lib pytest
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
[replace `LD_LIBRARY_PATH` with the appropriate environment variable for your system, such as `DYLD_LIBRARY_PATH` on macOS or `PATH` on Windows, if necessary].
|
|
38
|
+
|
|
25
39
|
That's it! You can now proceed to the testing section.
|
|
26
40
|
|
|
27
41
|
## Testing
|
|
@@ -1,8 +1,27 @@
|
|
|
1
1
|
# Release notes
|
|
2
2
|
|
|
3
|
-
## Changes from 3.
|
|
3
|
+
## Changes from 3.4.0 to 3.5.0
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
* New `blosc2.stack()` function for stacking multiple arrays along a new axis.
|
|
6
|
+
Useful for creating multi-dimensional arrays from multiple 1D arrays.
|
|
7
|
+
See PR #427. Thanks to [@lshaw8317](Luke Shaw) for the implementation!
|
|
8
|
+
|
|
9
|
+
* New `blosc2.expand_dims()` function for expanding the dimensions of an array.
|
|
10
|
+
This is useful for adding a new axis to an array, similar to NumPy's `np.expand_dims()`.
|
|
11
|
+
See PR #427. Thanks to [@lshaw8317](Luke Shaw) for the implementation!
|
|
12
|
+
|
|
13
|
+
## Changes from 3.3.4 to 3.4.0
|
|
14
|
+
|
|
15
|
+
* Added C-level ``concatenate`` function in response to community request. When possible, uses an optimised path which avoids decompression and recompression, giving a significant performance boost. See PR #423.
|
|
16
|
+
|
|
17
|
+
* Slicing has been added to string-based lazyexprs, so that one may use
|
|
18
|
+
expressions like `expr[1:3] +1` to compute a slice of the expression. This is useful
|
|
19
|
+
for getting a sub-expression of a larger expression, and it works with both
|
|
20
|
+
string-based and lazy expressions. See PR #417.
|
|
21
|
+
|
|
22
|
+
* Relatedly, the behaviour of the `slice` parameter in the `compute()` method of `LazyExpr` has been made more consistent and is now better documented, so that results are as expected. See PR #419.
|
|
23
|
+
|
|
24
|
+
* UDF support for pandas has been added to allow for the use of ``blosc2.jit``. See PR #418. Thanks to [@datapythonista](https://github.com/datapythonista) for the implementation!
|
|
6
25
|
|
|
7
26
|
## Changes from 3.3.3 to 3.3.4
|
|
8
27
|
|
|
@@ -110,7 +110,8 @@ Checking packaging
|
|
|
110
110
|
|
|
111
111
|
[upload e.g.:] blosc2-3.2.0-cp312-cp312-pyodide_2024_0_wasm32.whl
|
|
112
112
|
|
|
113
|
-
|
|
113
|
+
The wheels may be downloaded by going to "Actions->Python wheels for WASM" and selecting the completed workflow run for the version you are releasing.
|
|
114
|
+
Then, go to the "Artifacts" dropdown and download the WASM wheel file.
|
|
114
115
|
Announcing
|
|
115
116
|
----------
|
|
116
117
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
<p style="text-align: center; color: black; background-color: rgba(230, 169, 9, 0.65);">
|
|
8
8
|
<a href="https://github.com/Blosc/python-blosc2/blob/main/RELEASE_NOTES.md"
|
|
9
|
-
style="font-size: 1.5em;">Version 3.
|
|
9
|
+
style="font-size: 1.5em;">Version 3.4.0 released on 2025-06-13!</a>
|
|
10
10
|
<span style="display: inline-block; width: 20px;"></span>
|
|
11
11
|
<span style="font-family: monospace;">pip install blosc2 -U</span>
|
|
12
12
|
</p>
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
#######################################################################
|
|
2
|
+
# Copyright (c) 2019-present, Blosc Development Team <blosc@blosc.org>
|
|
3
|
+
# All rights reserved.
|
|
4
|
+
#
|
|
5
|
+
# This source code is licensed under a BSD-style license (found in the
|
|
6
|
+
# LICENSE file in the root directory of this source tree)
|
|
7
|
+
#######################################################################
|
|
8
|
+
|
|
9
|
+
# This shows how to convert a generic .h5 file to a custom blosc2-compressed .h5 file
|
|
10
|
+
# The blosc2 plugin in hdf5plugin doesn't support custom block shapes, and so one
|
|
11
|
+
# has to go a different route for more bespoke compression
|
|
12
|
+
|
|
13
|
+
import os
|
|
14
|
+
|
|
15
|
+
import h5py
|
|
16
|
+
import hdf5plugin
|
|
17
|
+
|
|
18
|
+
import blosc2
|
|
19
|
+
|
|
20
|
+
clevel = 5 # compression level, e.g., 0-9, where 0 is no compression and 9 is maximum compression
|
|
21
|
+
fname_in = "kevlar.h5" # input file with the kevlar dataset
|
|
22
|
+
fname_out = "kevlar-blosc2.h5"
|
|
23
|
+
if not os.path.exists(fname_in):
|
|
24
|
+
raise FileNotFoundError(
|
|
25
|
+
f"Input file {fname_in} does not exist\n"
|
|
26
|
+
"Please download it from the kevlar repository at:"
|
|
27
|
+
" http://www.silx.org/pub/pyFAI/pyFAI_UM_2020/data_ID13/kevlar.h5"
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
# Example 1
|
|
31
|
+
# hdf5plugin supports limited blosc2 compression with certain codecs
|
|
32
|
+
cname = "zstd"
|
|
33
|
+
with h5py.File(fname_in, "r") as fr:
|
|
34
|
+
dset = fr["/entry/data/data"][:]
|
|
35
|
+
with h5py.File(fname_out, "w") as fw:
|
|
36
|
+
g = fw.create_group("/data")
|
|
37
|
+
b2comp = hdf5plugin.Blosc2(cname=cname, clevel=clevel, filters=hdf5plugin.Blosc2.BITSHUFFLE)
|
|
38
|
+
dset_out = g.create_dataset(
|
|
39
|
+
f"cname-{cname}",
|
|
40
|
+
data=dset,
|
|
41
|
+
dtype=dset.dtype,
|
|
42
|
+
chunks=(1,) + dset.shape[1:], # chunk size of 1 frame
|
|
43
|
+
**b2comp,
|
|
44
|
+
)
|
|
45
|
+
print("Successfully compressed file with hdf5plugin")
|
|
46
|
+
|
|
47
|
+
# Example 2
|
|
48
|
+
# For other codecs (e.g grok) or for more custom compression such as with user-defined block shapes, one
|
|
49
|
+
# has to use a more involved route
|
|
50
|
+
blocks = (50, 80, 80)
|
|
51
|
+
chunks = (200, 240, 240)
|
|
52
|
+
cparams = {
|
|
53
|
+
"codec": blosc2.Codec.LZ4,
|
|
54
|
+
"filters": [blosc2.Filter.BITSHUFFLE],
|
|
55
|
+
"splitmode": blosc2.SplitMode.NEVER_SPLIT,
|
|
56
|
+
"clevel": clevel,
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if os.path.exists("dset.b2nd"): # don't reload dset to blosc2 if already done so once
|
|
60
|
+
b2im = blosc2.open(urlpath="dset.b2nd", mode="r")
|
|
61
|
+
s, d = b2im.shape, b2im.dtype
|
|
62
|
+
else:
|
|
63
|
+
with h5py.File(fname_in, "r") as fr: # load file and process to blosc2 array
|
|
64
|
+
dset = fr["/entry/data/data"][:]
|
|
65
|
+
b2im = blosc2.asarray(
|
|
66
|
+
dset, chunks=chunks, blocks=blocks, cparams=cparams, urlpath="dset.b2nd", mode="w"
|
|
67
|
+
)
|
|
68
|
+
d = dset.dtype
|
|
69
|
+
del dset
|
|
70
|
+
|
|
71
|
+
# Write to .h5 file #
|
|
72
|
+
with h5py.File(fname_out, "w") as fw:
|
|
73
|
+
g = fw.create_group("/data")
|
|
74
|
+
b2comp = hdf5plugin.Blosc2() # just for identification, no compression algorithm specified
|
|
75
|
+
dset_out = g.create_dataset(
|
|
76
|
+
"cname-customlz4",
|
|
77
|
+
s,
|
|
78
|
+
d,
|
|
79
|
+
chunks=chunks, # chunk size of 1 frame
|
|
80
|
+
**b2comp,
|
|
81
|
+
)
|
|
82
|
+
# Write individual blosc2 chunks directly to hdf5
|
|
83
|
+
# hdf5 requires a cframe, which is only available via blosc2 schunks (not chunks)
|
|
84
|
+
for info in b2im.iterchunks_info():
|
|
85
|
+
ncoords = tuple(n * chunks[i] for i, n in enumerate(info.coords))
|
|
86
|
+
aux = blosc2.empty(
|
|
87
|
+
shape=b2im.chunks, chunks=b2im.chunks, blocks=b2im.blocks, dtype=b2im.dtype
|
|
88
|
+
) # very cheap memory allocation
|
|
89
|
+
aux.schunk.insert_chunk(
|
|
90
|
+
0, b2im.get_chunk(info.nchunk)
|
|
91
|
+
) # insert chunk into blosc2 array so we have schunk wrapper (no decompression required)
|
|
92
|
+
dset_out.id.write_direct_chunk(
|
|
93
|
+
ncoords, aux.schunk.to_cframe()
|
|
94
|
+
) # convert schunk to cframe and write to hdf5
|
|
95
|
+
print("Successfully compressed file with custom parameters")
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Imports
|
|
2
|
+
|
|
3
|
+
import numpy as np
|
|
4
|
+
|
|
5
|
+
import blosc2
|
|
6
|
+
|
|
7
|
+
N = 1000
|
|
8
|
+
it = ((-x + 1, x - 2, 0.1 * x) for x in range(N))
|
|
9
|
+
sa = blosc2.fromiter(
|
|
10
|
+
it, dtype=[("A", "i4"), ("B", "f4"), ("C", "f8")], shape=(N,), urlpath="sa-1M.b2nd", mode="w"
|
|
11
|
+
)
|
|
12
|
+
expr = sa["(A < B)"]
|
|
13
|
+
A = sa["A"][:]
|
|
14
|
+
B = sa["B"][:]
|
|
15
|
+
C = sa["C"][:]
|
|
16
|
+
temp = sa[:]
|
|
17
|
+
indices = A < B
|
|
18
|
+
idx = np.argmax(indices)
|
|
19
|
+
|
|
20
|
+
# One might think that expr[:10] gives the first 10 elements of the evaluated expression, but this is not the case.
|
|
21
|
+
# It actually computes the expression on the first 10 elements of the operands; since for some elements the condition
|
|
22
|
+
# is False, the result will be shorter than 10 elements.
|
|
23
|
+
# Returns less than 10 elements in general
|
|
24
|
+
sliced = expr.compute(slice(0, 10))
|
|
25
|
+
gotitem = expr[:10]
|
|
26
|
+
np.testing.assert_array_equal(sliced[:], gotitem)
|
|
27
|
+
np.testing.assert_array_equal(gotitem, temp[:10][indices[:10]]) # Equivalent syntax
|
|
28
|
+
# Actually this makes sense since one can understand this as a request to compute on a portion of operands.
|
|
29
|
+
# If one desires a portion of the result, one should compute the whole expression and then slice it.
|
|
30
|
+
|
|
31
|
+
# Get first element for which condition is true
|
|
32
|
+
sliced = expr.compute(idx)
|
|
33
|
+
gotitem = expr[idx]
|
|
34
|
+
# Arrays of one element
|
|
35
|
+
np.testing.assert_array_equal(sliced[()], gotitem)
|
|
36
|
+
np.testing.assert_array_equal(gotitem, temp[idx])
|
|
37
|
+
|
|
38
|
+
# Should return void arrays here.
|
|
39
|
+
sliced = expr.compute(0)
|
|
40
|
+
gotitem = expr[0]
|
|
41
|
+
np.testing.assert_array_equal(sliced[()], gotitem)
|
|
42
|
+
np.testing.assert_array_equal(gotitem, temp[0])
|
|
@@ -238,6 +238,8 @@ from .ndarray import (
|
|
|
238
238
|
sort,
|
|
239
239
|
reshape,
|
|
240
240
|
copy,
|
|
241
|
+
concatenate,
|
|
242
|
+
expand_dims,
|
|
241
243
|
empty,
|
|
242
244
|
frombuffer,
|
|
243
245
|
fromiter,
|
|
@@ -252,6 +254,7 @@ from .ndarray import (
|
|
|
252
254
|
permute_dims,
|
|
253
255
|
transpose,
|
|
254
256
|
matrix_transpose,
|
|
257
|
+
stack,
|
|
255
258
|
)
|
|
256
259
|
|
|
257
260
|
from .c2array import c2context, C2Array, URLPath
|
|
@@ -507,6 +507,9 @@ cdef extern from "b2nd.h":
|
|
|
507
507
|
int b2nd_squeeze_index(b2nd_array_t *array, const c_bool *index)
|
|
508
508
|
int b2nd_resize(b2nd_array_t *array, const int64_t *new_shape, const int64_t *start)
|
|
509
509
|
int b2nd_copy(b2nd_context_t *ctx, b2nd_array_t *src, b2nd_array_t **array)
|
|
510
|
+
int b2nd_concatenate(b2nd_context_t *ctx, b2nd_array_t *src1, b2nd_array_t *src2,
|
|
511
|
+
int8_t axis, c_bool copy, b2nd_array_t **array)
|
|
512
|
+
int b2nd_expand_dims(const b2nd_array_t *array, b2nd_array_t ** view, const int8_t axis)
|
|
510
513
|
int b2nd_from_schunk(blosc2_schunk *schunk, b2nd_array_t **array)
|
|
511
514
|
|
|
512
515
|
void blosc2_unidim_to_multidim(uint8_t ndim, int64_t *shape, int64_t i, int64_t *index)
|
|
@@ -2867,3 +2870,37 @@ def schunk_get_slice_nchunks(schunk: SChunk, key):
|
|
|
2867
2870
|
res[i] = chunks_idx[i]
|
|
2868
2871
|
free(chunks_idx)
|
|
2869
2872
|
return res
|
|
2873
|
+
|
|
2874
|
+
|
|
2875
|
+
def concatenate(arr1: NDArray, arr2: NDArray, axis: int, **kwargs):
|
|
2876
|
+
"""
|
|
2877
|
+
Concatenate two NDArray objects along a specified axis.
|
|
2878
|
+
"""
|
|
2879
|
+
cdef c_bool copy = kwargs.pop("copy", True)
|
|
2880
|
+
cdef b2nd_context_t *ctx = create_b2nd_context(arr1.shape, arr1.chunks, arr1.blocks, arr1.dtype, kwargs)
|
|
2881
|
+
if ctx == NULL:
|
|
2882
|
+
raise RuntimeError("Error while creating the context for concatenation")
|
|
2883
|
+
|
|
2884
|
+
cdef b2nd_array_t *array
|
|
2885
|
+
_check_rc(b2nd_concatenate(ctx, arr1.array, arr2.array, axis, copy, &array),
|
|
2886
|
+
"Error while concatenating the arrays")
|
|
2887
|
+
_check_rc(b2nd_free_ctx(ctx), "Error while freeing the context")
|
|
2888
|
+
|
|
2889
|
+
if copy:
|
|
2890
|
+
# We have copied the concatenated data into a new array
|
|
2891
|
+
return blosc2.NDArray(_schunk=PyCapsule_New(array.sc, <char *> "blosc2_schunk*", NULL),
|
|
2892
|
+
_array=PyCapsule_New(array, <char *> "b2nd_array_t*", NULL))
|
|
2893
|
+
else:
|
|
2894
|
+
# Return the first array, which now contains the concatenated data
|
|
2895
|
+
return arr1
|
|
2896
|
+
|
|
2897
|
+
def expand_dims(arr1: NDArray, axis: int):
|
|
2898
|
+
"""
|
|
2899
|
+
Add new dummy axis to NDArray object at specified dimension.
|
|
2900
|
+
"""
|
|
2901
|
+
cdef b2nd_array_t *view
|
|
2902
|
+
_check_rc(b2nd_expand_dims(arr1.array, &view, axis),
|
|
2903
|
+
"Error while concatenating the arrays")
|
|
2904
|
+
|
|
2905
|
+
return blosc2.NDArray(_schunk=PyCapsule_New(view.sc, <char *> "blosc2_schunk*", NULL),
|
|
2906
|
+
_array=PyCapsule_New(view, <char *> "b2nd_array_t*", NULL))
|
|
@@ -1092,9 +1092,7 @@ def detect_number_of_cores() -> int:
|
|
|
1092
1092
|
# Dictionaries for the maps between compressor names and libs
|
|
1093
1093
|
codecs = compressor_list(plugins=True)
|
|
1094
1094
|
# Map for compression libraries and versions
|
|
1095
|
-
clib_versions = {}
|
|
1096
|
-
for codec in compressor_list(plugins=False):
|
|
1097
|
-
clib_versions[codec.name] = clib_info(codec)[1].decode("utf-8")
|
|
1095
|
+
clib_versions = {codec.name: clib_info(codec)[1].decode("utf-8") for codec in compressor_list(plugins=False)}
|
|
1098
1096
|
|
|
1099
1097
|
|
|
1100
1098
|
def os_release_pretty_name():
|
|
@@ -1422,7 +1420,6 @@ def compute_partition(nitems, maxshape, minpart=None):
|
|
|
1422
1420
|
if rsize <= max_items:
|
|
1423
1421
|
# rsize = rsize if size % rsize == 0 else nearest_divisor(size, rsize)
|
|
1424
1422
|
rsize = rsize if size % rsize == 0 else blosc2_ext.nearest_divisor(size, rsize)
|
|
1425
|
-
partition[-(i + 1)] = rsize
|
|
1426
1423
|
else:
|
|
1427
1424
|
rsize = max(max_items, minsize)
|
|
1428
1425
|
# new_rsize = rsize if size % rsize == 0 else nearest_divisor(size, rsize, strict=True)
|
|
@@ -1430,7 +1427,7 @@ def compute_partition(nitems, maxshape, minpart=None):
|
|
|
1430
1427
|
# If the new rsize is not too far from the original rsize, use it
|
|
1431
1428
|
if rsize // 2 < new_rsize < rsize * 2:
|
|
1432
1429
|
rsize = new_rsize
|
|
1433
|
-
|
|
1430
|
+
partition[-(i + 1)] = rsize
|
|
1434
1431
|
max_items //= rsize
|
|
1435
1432
|
|
|
1436
1433
|
return partition
|
|
@@ -32,7 +32,7 @@ def _inherit_doc_parameter(parent_func, parameter, replacements=None):
|
|
|
32
32
|
# Next parameter starts, stop copying lines
|
|
33
33
|
break
|
|
34
34
|
matching_lines.append(line)
|
|
35
|
-
assert
|
|
35
|
+
assert matching_lines, (
|
|
36
36
|
f"Could not extract the parameter {parameter} from the docstring of {parent_func.__name__}"
|
|
37
37
|
)
|
|
38
38
|
|