blosc2 3.7.2__tar.gz → 3.8.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.
Files changed (257) hide show
  1. {blosc2-3.7.2 → blosc2-3.8.0}/.pre-commit-config.yaml +2 -2
  2. {blosc2-3.7.2 → blosc2-3.8.0}/ANNOUNCE.rst +17 -8
  3. {blosc2-3.7.2 → blosc2-3.8.0}/CMakeLists.txt +1 -1
  4. {blosc2-3.7.2 → blosc2-3.8.0}/PKG-INFO +2 -2
  5. {blosc2-3.7.2 → blosc2-3.8.0}/README_DEVELOPERS.md +10 -0
  6. {blosc2-3.7.2 → blosc2-3.8.0}/RELEASE_NOTES.md +22 -0
  7. blosc2-3.8.0/ROADMAP-TO-4.0.md +23 -0
  8. {blosc2-3.7.2 → blosc2-3.8.0}/doc/python-blosc2.rst +8 -8
  9. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/animated_plot.py +1 -1
  10. {blosc2-3.7.2 → blosc2-3.8.0}/pyproject.toml +9 -3
  11. {blosc2-3.7.2 → blosc2-3.8.0}/src/blosc2/__init__.py +130 -3
  12. {blosc2-3.7.2 → blosc2-3.8.0}/src/blosc2/blosc2_ext.pyx +10 -2
  13. {blosc2-3.7.2 → blosc2-3.8.0}/src/blosc2/c2array.py +6 -2
  14. {blosc2-3.7.2 → blosc2-3.8.0}/src/blosc2/core.py +1 -1
  15. {blosc2-3.7.2 → blosc2-3.8.0}/src/blosc2/embed_store.py +1 -1
  16. {blosc2-3.7.2 → blosc2-3.8.0}/src/blosc2/lazyexpr.py +92 -113
  17. {blosc2-3.7.2 → blosc2-3.8.0}/src/blosc2/ndarray.py +950 -251
  18. {blosc2-3.7.2 → blosc2-3.8.0}/src/blosc2/proxy.py +5 -5
  19. {blosc2-3.7.2 → blosc2-3.8.0}/src/blosc2/schunk.py +3 -2
  20. {blosc2-3.7.2 → blosc2-3.8.0}/src/blosc2/tree_store.py +5 -5
  21. blosc2-3.8.0/src/blosc2/version.py +2 -0
  22. blosc2-3.8.0/tests/array-api-xfails.txt +17 -0
  23. {blosc2-3.7.2 → blosc2-3.8.0}/tests/ndarray/test_getitem.py +4 -0
  24. {blosc2-3.7.2 → blosc2-3.8.0}/tests/ndarray/test_lazyexpr.py +3 -3
  25. {blosc2-3.7.2 → blosc2-3.8.0}/tests/ndarray/test_ndarray.py +31 -9
  26. {blosc2-3.7.2 → blosc2-3.8.0}/tests/ndarray/test_proxy.py +2 -3
  27. {blosc2-3.7.2 → blosc2-3.8.0}/tests/ndarray/test_reductions.py +9 -1
  28. {blosc2-3.7.2 → blosc2-3.8.0}/tests/ndarray/test_setitem.py +6 -0
  29. blosc2-3.8.0/tests/ndarray/test_squeeze.py +32 -0
  30. {blosc2-3.7.2 → blosc2-3.8.0}/tests/test_mmap.py +0 -1
  31. {blosc2-3.7.2 → blosc2-3.8.0}/tests/test_open.py +1 -1
  32. {blosc2-3.7.2 → blosc2-3.8.0}/tests/test_prefilters.py +1 -1
  33. blosc2-3.7.2/src/blosc2/version.py +0 -1
  34. blosc2-3.7.2/tests/ndarray/test_squeeze.py +0 -29
  35. {blosc2-3.7.2 → blosc2-3.8.0}/.gitignore +0 -0
  36. {blosc2-3.7.2 → blosc2-3.8.0}/.guix/modules/python-blosc2-package.scm +0 -0
  37. {blosc2-3.7.2 → blosc2-3.8.0}/.guix-channel +0 -0
  38. {blosc2-3.7.2 → blosc2-3.8.0}/CONTRIBUTING.rst +0 -0
  39. {blosc2-3.7.2 → blosc2-3.8.0}/LICENSE.txt +0 -0
  40. {blosc2-3.7.2 → blosc2-3.8.0}/README.rst +0 -0
  41. {blosc2-3.7.2 → blosc2-3.8.0}/RELEASING.rst +0 -0
  42. {blosc2-3.7.2 → blosc2-3.8.0}/code_of_conduct.md +0 -0
  43. {blosc2-3.7.2 → blosc2-3.8.0}/doc/_static/blosc-favicon_32x32.png +0 -0
  44. {blosc2-3.7.2 → blosc2-3.8.0}/doc/_static/blosc-favicon_64x64.png +0 -0
  45. {blosc2-3.7.2 → blosc2-3.8.0}/doc/_static/blosc-logo_128.png +0 -0
  46. {blosc2-3.7.2 → blosc2-3.8.0}/doc/_static/blosc-logo_256.png +0 -0
  47. {blosc2-3.7.2 → blosc2-3.8.0}/doc/_static/css/custom.css +0 -0
  48. {blosc2-3.7.2 → blosc2-3.8.0}/doc/conf.py +0 -0
  49. {blosc2-3.7.2 → blosc2-3.8.0}/doc/development/code-of-conduct.rst +0 -0
  50. {blosc2-3.7.2 → blosc2-3.8.0}/doc/development/contributing.rst +0 -0
  51. {blosc2-3.7.2 → blosc2-3.8.0}/doc/development/index.rst +0 -0
  52. {blosc2-3.7.2 → blosc2-3.8.0}/doc/getting_started/index.rst +0 -0
  53. {blosc2-3.7.2 → blosc2-3.8.0}/doc/getting_started/installation.rst +0 -0
  54. {blosc2-3.7.2 → blosc2-3.8.0}/doc/getting_started/overview.rst +0 -0
  55. {blosc2-3.7.2 → blosc2-3.8.0}/doc/getting_started/tutorials/01.ndarray-basics.ipynb +0 -0
  56. {blosc2-3.7.2 → blosc2-3.8.0}/doc/getting_started/tutorials/02.lazyarray-expressions.ipynb +0 -0
  57. {blosc2-3.7.2 → blosc2-3.8.0}/doc/getting_started/tutorials/03.lazyarray-udf.ipynb +0 -0
  58. {blosc2-3.7.2 → blosc2-3.8.0}/doc/getting_started/tutorials/04.reductions.ipynb +0 -0
  59. {blosc2-3.7.2 → blosc2-3.8.0}/doc/getting_started/tutorials/05.persistent-reductions.ipynb +0 -0
  60. {blosc2-3.7.2 → blosc2-3.8.0}/doc/getting_started/tutorials/06.remote_proxy.ipynb +0 -0
  61. {blosc2-3.7.2 → blosc2-3.8.0}/doc/getting_started/tutorials/07.schunk-basics.ipynb +0 -0
  62. {blosc2-3.7.2 → blosc2-3.8.0}/doc/getting_started/tutorials/08.schunk-slicing_and_beyond.ipynb +0 -0
  63. {blosc2-3.7.2 → blosc2-3.8.0}/doc/getting_started/tutorials/09.ucodecs-ufilters.ipynb +0 -0
  64. {blosc2-3.7.2 → blosc2-3.8.0}/doc/getting_started/tutorials/10.prefilters.ipynb +0 -0
  65. {blosc2-3.7.2 → blosc2-3.8.0}/doc/getting_started/tutorials/images/blosc2-pipeline.png +0 -0
  66. {blosc2-3.7.2 → blosc2-3.8.0}/doc/getting_started/tutorials/images/blosc2-pipeline.svg +0 -0
  67. {blosc2-3.7.2 → blosc2-3.8.0}/doc/getting_started/tutorials/images/lazyexpr-broadcast.png +0 -0
  68. {blosc2-3.7.2 → blosc2-3.8.0}/doc/getting_started/tutorials/images/proxyconnection.png +0 -0
  69. {blosc2-3.7.2 → blosc2-3.8.0}/doc/getting_started/tutorials/images/reductions/3D-cube-plane.png +0 -0
  70. {blosc2-3.7.2 → blosc2-3.8.0}/doc/getting_started/tutorials/images/reductions/3D-cube.png +0 -0
  71. {blosc2-3.7.2 → blosc2-3.8.0}/doc/getting_started/tutorials/images/reductions/memory-access-2D-x.png +0 -0
  72. {blosc2-3.7.2 → blosc2-3.8.0}/doc/getting_started/tutorials/images/reductions/memory-access-2D-y.png +0 -0
  73. {blosc2-3.7.2 → blosc2-3.8.0}/doc/getting_started/tutorials/images/remote_proxy.png +0 -0
  74. {blosc2-3.7.2 → blosc2-3.8.0}/doc/getting_started/tutorials/images/ucodecs-filters/backward.png +0 -0
  75. {blosc2-3.7.2 → blosc2-3.8.0}/doc/getting_started/tutorials/images/ucodecs-filters/backward.svg +0 -0
  76. {blosc2-3.7.2 → blosc2-3.8.0}/doc/getting_started/tutorials/images/ucodecs-filters/decoder.png +0 -0
  77. {blosc2-3.7.2 → blosc2-3.8.0}/doc/getting_started/tutorials/images/ucodecs-filters/decoder.svg +0 -0
  78. {blosc2-3.7.2 → blosc2-3.8.0}/doc/getting_started/tutorials/images/ucodecs-filters/decoder2.png +0 -0
  79. {blosc2-3.7.2 → blosc2-3.8.0}/doc/getting_started/tutorials/images/ucodecs-filters/decoder2.svg +0 -0
  80. {blosc2-3.7.2 → blosc2-3.8.0}/doc/getting_started/tutorials/images/ucodecs-filters/encoder.png +0 -0
  81. {blosc2-3.7.2 → blosc2-3.8.0}/doc/getting_started/tutorials/images/ucodecs-filters/encoder.svg +0 -0
  82. {blosc2-3.7.2 → blosc2-3.8.0}/doc/getting_started/tutorials/images/ucodecs-filters/encoder2.png +0 -0
  83. {blosc2-3.7.2 → blosc2-3.8.0}/doc/getting_started/tutorials/images/ucodecs-filters/encoder2.svg +0 -0
  84. {blosc2-3.7.2 → blosc2-3.8.0}/doc/getting_started/tutorials/images/ucodecs-filters/forward.png +0 -0
  85. {blosc2-3.7.2 → blosc2-3.8.0}/doc/getting_started/tutorials/images/ucodecs-filters/forward.svg +0 -0
  86. {blosc2-3.7.2 → blosc2-3.8.0}/doc/getting_started/tutorials.rst +0 -0
  87. {blosc2-3.7.2 → blosc2-3.8.0}/doc/index.rst +0 -0
  88. {blosc2-3.7.2 → blosc2-3.8.0}/doc/reference/array_operations.rst +0 -0
  89. {blosc2-3.7.2 → blosc2-3.8.0}/doc/reference/c2array.rst +0 -0
  90. {blosc2-3.7.2 → blosc2-3.8.0}/doc/reference/classes.rst +0 -0
  91. {blosc2-3.7.2 → blosc2-3.8.0}/doc/reference/dict_store.rst +0 -0
  92. {blosc2-3.7.2 → blosc2-3.8.0}/doc/reference/embed_store.rst +0 -0
  93. {blosc2-3.7.2 → blosc2-3.8.0}/doc/reference/index.rst +0 -0
  94. {blosc2-3.7.2 → blosc2-3.8.0}/doc/reference/lazy_functions.rst +0 -0
  95. {blosc2-3.7.2 → blosc2-3.8.0}/doc/reference/lazyarray.rst +0 -0
  96. {blosc2-3.7.2 → blosc2-3.8.0}/doc/reference/linear_algebra.rst +0 -0
  97. {blosc2-3.7.2 → blosc2-3.8.0}/doc/reference/low_level.rst +0 -0
  98. {blosc2-3.7.2 → blosc2-3.8.0}/doc/reference/misc.rst +0 -0
  99. {blosc2-3.7.2 → blosc2-3.8.0}/doc/reference/ndarray.rst +0 -0
  100. {blosc2-3.7.2 → blosc2-3.8.0}/doc/reference/ndfield.rst +0 -0
  101. {blosc2-3.7.2 → blosc2-3.8.0}/doc/reference/proxy.rst +0 -0
  102. {blosc2-3.7.2 → blosc2-3.8.0}/doc/reference/proxyndsource.rst +0 -0
  103. {blosc2-3.7.2 → blosc2-3.8.0}/doc/reference/proxysource.rst +0 -0
  104. {blosc2-3.7.2 → blosc2-3.8.0}/doc/reference/reduction_functions.rst +0 -0
  105. {blosc2-3.7.2 → blosc2-3.8.0}/doc/reference/save_load.rst +0 -0
  106. {blosc2-3.7.2 → blosc2-3.8.0}/doc/reference/schunk.rst +0 -0
  107. {blosc2-3.7.2 → blosc2-3.8.0}/doc/reference/simpleproxy.rst +0 -0
  108. {blosc2-3.7.2 → blosc2-3.8.0}/doc/reference/storage.rst +0 -0
  109. {blosc2-3.7.2 → blosc2-3.8.0}/doc/reference/tree_store.rst +0 -0
  110. {blosc2-3.7.2 → blosc2-3.8.0}/doc/reference/utilities.rst +0 -0
  111. {blosc2-3.7.2 → blosc2-3.8.0}/doc/release_notes/index.md +0 -0
  112. {blosc2-3.7.2 → blosc2-3.8.0}/examples/blosc2_hdf5_compression.py +0 -0
  113. {blosc2-3.7.2 → blosc2-3.8.0}/examples/btune.py +0 -0
  114. {blosc2-3.7.2 → blosc2-3.8.0}/examples/c2array-get-slice.py +0 -0
  115. {blosc2-3.7.2 → blosc2-3.8.0}/examples/compress2_decompress2.py +0 -0
  116. {blosc2-3.7.2 → blosc2-3.8.0}/examples/compress_decompress.py +0 -0
  117. {blosc2-3.7.2 → blosc2-3.8.0}/examples/dict-store.py +0 -0
  118. {blosc2-3.7.2 → blosc2-3.8.0}/examples/embed-store.py +0 -0
  119. {blosc2-3.7.2 → blosc2-3.8.0}/examples/filler.py +0 -0
  120. {blosc2-3.7.2 → blosc2-3.8.0}/examples/gil.py +0 -0
  121. {blosc2-3.7.2 → blosc2-3.8.0}/examples/mmap-rw.py +0 -0
  122. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/arange-constructor.py +0 -0
  123. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/asarray_.py +0 -0
  124. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/broadcast_expr.py +0 -0
  125. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/buffer.py +0 -0
  126. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/bytedelta_filter.py +0 -0
  127. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/c2array_expr.py +0 -0
  128. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/compute_expr.py +0 -0
  129. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/compute_fields.py +0 -0
  130. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/compute_udf_numba.py +0 -0
  131. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/compute_where.py +0 -0
  132. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/copy_.py +0 -0
  133. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/empty_.py +0 -0
  134. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/eye-constructor.py +0 -0
  135. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/filter_sort_fields.py +0 -0
  136. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/formats.py +0 -0
  137. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/fromiter-constructor.py +0 -0
  138. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/general_expressions.py +0 -0
  139. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/getitem.py +0 -0
  140. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/iterchunks_info.py +0 -0
  141. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/jit-expr.py +0 -0
  142. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/jit-numpy-funcs.py +0 -0
  143. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/jit-reduc.py +0 -0
  144. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/lazyexpr_where_indexing.py +0 -0
  145. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/linspace-constructor.py +0 -0
  146. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/lists-vs-bools-idx.py +0 -0
  147. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/meta.py +0 -0
  148. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/ndarray_copy.py +0 -0
  149. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/ndmean.py +0 -0
  150. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/persistency.py +0 -0
  151. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/proxy-carray.py +0 -0
  152. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/proxy-ndarray.py +0 -0
  153. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/reduce_and_enlarge.py +0 -0
  154. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/reduce_expr.py +0 -0
  155. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/reduce_expr_save.py +0 -0
  156. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/reduce_string_expr.py +0 -0
  157. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/resize_.py +0 -0
  158. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/work_with_numpy.py +0 -0
  159. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ndarray/zfp_codec.py +0 -0
  160. {blosc2-3.7.2 → blosc2-3.8.0}/examples/pack_array.py +0 -0
  161. {blosc2-3.7.2 → blosc2-3.8.0}/examples/pack_tensor.py +0 -0
  162. {blosc2-3.7.2 → blosc2-3.8.0}/examples/postfilter1.py +0 -0
  163. {blosc2-3.7.2 → blosc2-3.8.0}/examples/postfilter2.py +0 -0
  164. {blosc2-3.7.2 → blosc2-3.8.0}/examples/postfilter3.py +0 -0
  165. {blosc2-3.7.2 → blosc2-3.8.0}/examples/prefilter.py +0 -0
  166. {blosc2-3.7.2 → blosc2-3.8.0}/examples/save_tensor.py +0 -0
  167. {blosc2-3.7.2 → blosc2-3.8.0}/examples/schunk.py +0 -0
  168. {blosc2-3.7.2 → blosc2-3.8.0}/examples/schunk_roundtrip.py +0 -0
  169. {blosc2-3.7.2 → blosc2-3.8.0}/examples/tree-store-blog.py +0 -0
  170. {blosc2-3.7.2 → blosc2-3.8.0}/examples/tree-store.py +0 -0
  171. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ucodecs.py +0 -0
  172. {blosc2-3.7.2 → blosc2-3.8.0}/examples/ufilters.py +0 -0
  173. {blosc2-3.7.2 → blosc2-3.8.0}/examples/vlmeta.py +0 -0
  174. {blosc2-3.7.2 → blosc2-3.8.0}/generate_version.py +0 -0
  175. {blosc2-3.7.2 → blosc2-3.8.0}/guix.scm +0 -0
  176. {blosc2-3.7.2 → blosc2-3.8.0}/images/Complete-Write-Read-B2ND.png +0 -0
  177. {blosc2-3.7.2 → blosc2-3.8.0}/images/M1-i386-vs-arm64-pack.png +0 -0
  178. {blosc2-3.7.2 → blosc2-3.8.0}/images/M1-i386-vs-arm64-unpack.png +0 -0
  179. {blosc2-3.7.2 → blosc2-3.8.0}/images/Read-Partial-Slices-B2ND.png +0 -0
  180. {blosc2-3.7.2 → blosc2-3.8.0}/images/b2nd-2level-parts.png +0 -0
  181. {blosc2-3.7.2 → blosc2-3.8.0}/images/eval-expr-full-mem-M2.png +0 -0
  182. {blosc2-3.7.2 → blosc2-3.8.0}/images/eval-expr-scarce-mem-M2.png +0 -0
  183. {blosc2-3.7.2 → blosc2-3.8.0}/images/lazyarray-dask-large.png +0 -0
  184. {blosc2-3.7.2 → blosc2-3.8.0}/images/lazyarray-dask-small.png +0 -0
  185. {blosc2-3.7.2 → blosc2-3.8.0}/images/lazyarray-expr-large.png +0 -0
  186. {blosc2-3.7.2 → blosc2-3.8.0}/images/lazyarray-expr.png +0 -0
  187. {blosc2-3.7.2 → blosc2-3.8.0}/images/linspace-compress.png +0 -0
  188. {blosc2-3.7.2 → blosc2-3.8.0}/images/linspace-decompress.png +0 -0
  189. {blosc2-3.7.2 → blosc2-3.8.0}/images/pack-array-cratios.png +0 -0
  190. {blosc2-3.7.2 → blosc2-3.8.0}/images/reduc-float64-amd.png +0 -0
  191. {blosc2-3.7.2 → blosc2-3.8.0}/images/reduc-float64-log-amd.png +0 -0
  192. {blosc2-3.7.2 → blosc2-3.8.0}/pytest.ini +0 -0
  193. {blosc2-3.7.2 → blosc2-3.8.0}/src/blosc2/dict_store.py +0 -0
  194. {blosc2-3.7.2 → blosc2-3.8.0}/src/blosc2/exceptions.py +0 -0
  195. {blosc2-3.7.2 → blosc2-3.8.0}/src/blosc2/helpers.py +0 -0
  196. {blosc2-3.7.2 → blosc2-3.8.0}/src/blosc2/info.py +0 -0
  197. {blosc2-3.7.2 → blosc2-3.8.0}/src/blosc2/storage.py +0 -0
  198. {blosc2-3.7.2 → blosc2-3.8.0}/tests/conftest.py +0 -0
  199. {blosc2-3.7.2 → blosc2-3.8.0}/tests/ndarray/test_auto_parts.py +0 -0
  200. {blosc2-3.7.2 → blosc2-3.8.0}/tests/ndarray/test_buffer.py +0 -0
  201. {blosc2-3.7.2 → blosc2-3.8.0}/tests/ndarray/test_c2array_expr.py +0 -0
  202. {blosc2-3.7.2 → blosc2-3.8.0}/tests/ndarray/test_c2array_reductions.py +0 -0
  203. {blosc2-3.7.2 → blosc2-3.8.0}/tests/ndarray/test_c2array_udf.py +0 -0
  204. {blosc2-3.7.2 → blosc2-3.8.0}/tests/ndarray/test_concatenate.py +0 -0
  205. {blosc2-3.7.2 → blosc2-3.8.0}/tests/ndarray/test_copy.py +0 -0
  206. {blosc2-3.7.2 → blosc2-3.8.0}/tests/ndarray/test_empty.py +0 -0
  207. {blosc2-3.7.2 → blosc2-3.8.0}/tests/ndarray/test_evaluate.py +0 -0
  208. {blosc2-3.7.2 → blosc2-3.8.0}/tests/ndarray/test_full.py +0 -0
  209. {blosc2-3.7.2 → blosc2-3.8.0}/tests/ndarray/test_get_slice_nchunks.py +0 -0
  210. {blosc2-3.7.2 → blosc2-3.8.0}/tests/ndarray/test_iterchunks_info.py +0 -0
  211. {blosc2-3.7.2 → blosc2-3.8.0}/tests/ndarray/test_jit.py +0 -0
  212. {blosc2-3.7.2 → blosc2-3.8.0}/tests/ndarray/test_lazyexpr_fields.py +0 -0
  213. {blosc2-3.7.2 → blosc2-3.8.0}/tests/ndarray/test_lazyudf.py +0 -0
  214. {blosc2-3.7.2 → blosc2-3.8.0}/tests/ndarray/test_lossy.py +0 -0
  215. {blosc2-3.7.2 → blosc2-3.8.0}/tests/ndarray/test_matmul.py +0 -0
  216. {blosc2-3.7.2 → blosc2-3.8.0}/tests/ndarray/test_metalayers.py +0 -0
  217. {blosc2-3.7.2 → blosc2-3.8.0}/tests/ndarray/test_mode.py +0 -0
  218. {blosc2-3.7.2 → blosc2-3.8.0}/tests/ndarray/test_nans.py +0 -0
  219. {blosc2-3.7.2 → blosc2-3.8.0}/tests/ndarray/test_numpy.py +0 -0
  220. {blosc2-3.7.2 → blosc2-3.8.0}/tests/ndarray/test_persistency.py +0 -0
  221. {blosc2-3.7.2 → blosc2-3.8.0}/tests/ndarray/test_proxy_c2array.py +0 -0
  222. {blosc2-3.7.2 → blosc2-3.8.0}/tests/ndarray/test_proxy_expr.py +0 -0
  223. {blosc2-3.7.2 → blosc2-3.8.0}/tests/ndarray/test_resize.py +0 -0
  224. {blosc2-3.7.2 → blosc2-3.8.0}/tests/ndarray/test_slice.py +0 -0
  225. {blosc2-3.7.2 → blosc2-3.8.0}/tests/ndarray/test_struct_dtype.py +0 -0
  226. {blosc2-3.7.2 → blosc2-3.8.0}/tests/ndarray/test_transpose.py +0 -0
  227. {blosc2-3.7.2 → blosc2-3.8.0}/tests/ndarray/test_zeros.py +0 -0
  228. {blosc2-3.7.2 → blosc2-3.8.0}/tests/test_bytes_array.py +0 -0
  229. {blosc2-3.7.2 → blosc2-3.8.0}/tests/test_comp_info.py +0 -0
  230. {blosc2-3.7.2 → blosc2-3.8.0}/tests/test_compress2.py +0 -0
  231. {blosc2-3.7.2 → blosc2-3.8.0}/tests/test_compression_parameters.py +0 -0
  232. {blosc2-3.7.2 → blosc2-3.8.0}/tests/test_compressors.py +0 -0
  233. {blosc2-3.7.2 → blosc2-3.8.0}/tests/test_decompress.py +0 -0
  234. {blosc2-3.7.2 → blosc2-3.8.0}/tests/test_dict_store.py +0 -0
  235. {blosc2-3.7.2 → blosc2-3.8.0}/tests/test_embed_store.py +0 -0
  236. {blosc2-3.7.2 → blosc2-3.8.0}/tests/test_iterchunks.py +0 -0
  237. {blosc2-3.7.2 → blosc2-3.8.0}/tests/test_open_c2array.py +0 -0
  238. {blosc2-3.7.2 → blosc2-3.8.0}/tests/test_pandas_udf_engine.py +0 -0
  239. {blosc2-3.7.2 → blosc2-3.8.0}/tests/test_pathlib.py +0 -0
  240. {blosc2-3.7.2 → blosc2-3.8.0}/tests/test_postfilters.py +0 -0
  241. {blosc2-3.7.2 → blosc2-3.8.0}/tests/test_proxy_schunk.py +0 -0
  242. {blosc2-3.7.2 → blosc2-3.8.0}/tests/test_python_blosc.py +0 -0
  243. {blosc2-3.7.2 → blosc2-3.8.0}/tests/test_schunk.py +0 -0
  244. {blosc2-3.7.2 → blosc2-3.8.0}/tests/test_schunk_constructor.py +0 -0
  245. {blosc2-3.7.2 → blosc2-3.8.0}/tests/test_schunk_delete.py +0 -0
  246. {blosc2-3.7.2 → blosc2-3.8.0}/tests/test_schunk_get_slice.py +0 -0
  247. {blosc2-3.7.2 → blosc2-3.8.0}/tests/test_schunk_get_slice_nchunks.py +0 -0
  248. {blosc2-3.7.2 → blosc2-3.8.0}/tests/test_schunk_insert.py +0 -0
  249. {blosc2-3.7.2 → blosc2-3.8.0}/tests/test_schunk_set_slice.py +0 -0
  250. {blosc2-3.7.2 → blosc2-3.8.0}/tests/test_schunk_update.py +0 -0
  251. {blosc2-3.7.2 → blosc2-3.8.0}/tests/test_storage.py +0 -0
  252. {blosc2-3.7.2 → blosc2-3.8.0}/tests/test_tensor.py +0 -0
  253. {blosc2-3.7.2 → blosc2-3.8.0}/tests/test_tree_store.py +0 -0
  254. {blosc2-3.7.2 → blosc2-3.8.0}/tests/test_ucodecs.py +0 -0
  255. {blosc2-3.7.2 → blosc2-3.8.0}/tests/test_ufilters.py +0 -0
  256. {blosc2-3.7.2 → blosc2-3.8.0}/tests/test_vlmeta.py +0 -0
  257. {blosc2-3.7.2 → blosc2-3.8.0}/update_version.py +0 -0
@@ -7,7 +7,7 @@ ci:
7
7
  default_stages: [pre-commit, pre-push]
8
8
  repos:
9
9
  - repo: https://github.com/pre-commit/pre-commit-hooks
10
- rev: v5.0.0
10
+ rev: v6.0.0
11
11
  hooks:
12
12
  - id: check-yaml
13
13
  - id: end-of-file-fixer
@@ -16,7 +16,7 @@ repos:
16
16
  - id: trailing-whitespace
17
17
 
18
18
  - repo: https://github.com/astral-sh/ruff-pre-commit
19
- rev: v0.12.7
19
+ rev: v0.12.11
20
20
  hooks:
21
21
  - id: ruff-check
22
22
  args: ["--fix", "--show-fixes"]
@@ -1,15 +1,24 @@
1
- Announcing Python-Blosc2 3.7.2
1
+ Announcing Python-Blosc2 3.8.0
2
2
  ==============================
3
3
 
4
- This is a maintenance release where:
4
+ This is a minor version release where we have aimed to make the first steps
5
+ towards complying fully with the array-api standard:
5
6
 
6
- ✅ We have updated the Blosc2 C library to 2.21.1, which fixes a regression
7
- in the build system detected in Fedora and Gentoo.
8
- ✅ We reverted signature of ``TreeStore.__init__(()`` for making benchmarks
9
- to get back to normal performance.
7
+ ✅ C-Blosc2 internal library updated to latest 2.21.2.
10
8
 
11
- Check our new blog post about ``TreeStore`` usage and performance at:
12
- https://www.blosc.org/posts/new-treestore-blosc2
9
+ ✅ numexpr version requirement pushed to 2.12.1 to incorporate
10
+ ``isnan``, ``isfinite``, ``isinf`` functions.
11
+
12
+ ✅ Indexing is now supported extensively and reasonably optimally for slices
13
+ with negative steps, general boolean arrays and fancy indices, with both get/setitem having
14
+ equal functionality. In PR #459 we extended the 1D fast path to general N-D,
15
+ with consequent speedups. In PR #461 we allowed fancy indexing and general slicing
16
+ with negative steps for set and getitem, with a memory-optimised path for setitem.
17
+
18
+ ✅ Various attributes and methods for the ``NDArray`` class, as well as functions, have
19
+ been added to increase compliance with the array-api standard. In addition,
20
+ linspace and arange functions have been made more numerically stable and now strictly
21
+ comply even with difficult floating-point edge cases.
13
22
 
14
23
  You can think of Python-Blosc2 3.x as an extension of NumPy/numexpr that:
15
24
 
@@ -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 96bce728dcdbf41fd86f142ebef9e513f87a7afb # v2.21.1
53
+ GIT_TAG 82a85f9d285d7ae6d141c73e84c7574bfc24a134 # v2.21.2
54
54
  )
55
55
  FetchContent_MakeAvailable(blosc2)
56
56
  include_directories("${blosc2_SOURCE_DIR}/include")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: blosc2
3
- Version: 3.7.2
3
+ Version: 3.8.0
4
4
  Summary: A fast & compressed ndarray library with a flexible compute engine.
5
5
  Author-Email: Blosc Development Team <blosc@blosc.org>
6
6
  Maintainer-Email: Blosc Development Team <blosc@blosc.org>
@@ -26,7 +26,7 @@ Requires-Dist: numpy>=1.26
26
26
  Requires-Dist: ndindex
27
27
  Requires-Dist: msgpack
28
28
  Requires-Dist: platformdirs
29
- Requires-Dist: numexpr; platform_machine != "wasm32"
29
+ Requires-Dist: numexpr>=2.12.1; platform_machine != "wasm32"
30
30
  Requires-Dist: py-cpuinfo; platform_machine != "wasm32"
31
31
  Requires-Dist: requests
32
32
  Provides-Extra: dev
@@ -70,3 +70,13 @@ We are using Sphinx for documentation. You can build the documentation by execu
70
70
  [You may need to install the `pandoc` package first: https://pandoc.org/installing.html]
71
71
 
72
72
  You will find the documentation in the `../html` directory.
73
+
74
+ ## Array API tests compatibility
75
+
76
+ You can test array API compatibility with the `array-api-tests` module.
77
+ Use the `tests/array-api-xfails.txt` to skip the tests that are not supported
78
+ and run pytest from the `array-api-tests` source dir like this:
79
+
80
+ ``` bash
81
+ ARRAY_API_TESTS_MODULE=blosc2 pytest array_api_tests --xfails-file ${BLOSC2_DIR}/tests/array-api-xfails.txt -xs
82
+ ```
@@ -1,5 +1,27 @@
1
1
  # Release notes
2
2
 
3
+ ## Changes from 3.8.0 to 3.8.1
4
+
5
+ XXX version-specific blurb XXX
6
+
7
+ ## Changes from 3.7.2 to 3.8.0
8
+
9
+ * C-Blosc2 internal library updated to latest 2.21.2.
10
+
11
+ * numexpr version requirement pushed to 2.12.1 to incorporate
12
+ ``isnan``, ``isfinite``, ``isinf`` functions.
13
+
14
+ * Indexing is now supported extensively and reasonably optimally for slices
15
+ with negative steps and general boolean arrays, with both get/setitem having
16
+ equal functionality. In PR #459 we extended the 1D fast path to general N-D,
17
+ with consequent speedups. In PR # we allowed fancy indexing and general slicing
18
+ with negative steps for set and getitem, with a memory-optimised path for setitem.
19
+
20
+ * Various attributes and methods for the ``NDArray`` class, as well as functions, have
21
+ been added to increase compliance with the array-api standard. In addition,
22
+ linspace and arange functions have been made more numerically stable and now strictly
23
+ comply even with difficult floating-point edge cases.
24
+
3
25
  ## Changes from 3.7.1 to 3.7.2
4
26
 
5
27
  * C-Blosc2 internal library updated to latest 2.21.1.
@@ -0,0 +1,23 @@
1
+ List of desired features for a 4.0 release
2
+ ------------------------------------------
3
+
4
+ * First and foremost, we would like to have at least of basic implementation of the [array API](https://data-apis.org/array-api). This will require a lot of low-level work on the basic NDArray container to make indexing to work as close as the standard.
5
+
6
+ * Have a completely specified format for the `TreeStore` and `DictStore`. The format should allow to have containers either in memory or on disk. Also, it should allow a sparse or contiguous storage. The user will be able to specify these properties by following the same conventions than for NDArray objects (alas, `urlpath` and `contiguous` params).
7
+
8
+ * New `.save()` and `.to_cframe()` methods should be implemented to convert from in-memory representations to on disk and viceversa.
9
+ * The format for `TreeStore` and `DictStore` will initially be defined at Python level, and documented only in the Python-Blosc2 repository. An implementation in the C library is desirable, but not mandatory at this time.
10
+
11
+ * A new `Table` object should be implemented based on the `TreeStore` class (a subclass?), with a label ('table'?) in metalayers indicating that the contents of the tree can be interpreted as regular table. As `TreeStore` is hierarchical, a subtree can also be interpreted as a `Table` if there a label in the metalayer of the subtree (or group in HDF5 parlance); that can lead to tables than can have different subtables embedded. It is not clear yet if should impose the same number of rows for all the columns.
12
+
13
+ The constructor for the `Table` object should take some parameters to specify properties:
14
+
15
+ * `columnar`: True or False. If True, every column will be stored in a different NDArray object. If False, the columns will be stored in the same NDArray object, with a compound dtype. In principle, one should be able to create tables that are hybrid between column and row wise, but at this point it is not clear what is the best way to do that.
16
+
17
+ `Table` should support at least these methods:
18
+
19
+ * `.__getitem__()` and `.__setitem__()` so that values can be get and set.
20
+ * `.append()` for appending (multi-) rows of data for all columns in one go.
21
+ * `.__iter__()` for easy and fast iteration over rows.
22
+ * `.where()`: an iterator for queying with conditions that are evaluated with the internal compute engine.
23
+ * `.index()` for indexing a column and getting better performance in queries (desirable, but optional for 4.0).
@@ -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.7.1 released on 2025-08-17!</a>
9
+ style="font-size: 1.5em;">Version 3.7.2 released on 2025-08-19!</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>
@@ -36,7 +36,7 @@
36
36
  <h3 style="margin-top: 10px; margin-bottom: 15px;">Top-Notch Compression</h3>
37
37
  </div>
38
38
 
39
- `Combine advanced codecs and filters <https://blosc.org/docs/LEAPS-INNOV_WP7_D74_v1.pdf>`_ for efficient `lossless <https://www.blosc.org/posts/bytedelta-enhance-compression-toolset/>`_ and `lossy <https://www.blosc.org/posts/blosc2-lossy-compression/>`_ compression to reduce storage space while maintaining high performance.
39
+ `Combine advanced codecs and filters <https://www.blosc.org/docs/2025-EuroSciPy-Blosc2.pdf>`_ for efficient `lossless <https://www.blosc.org/posts/bytedelta-enhance-compression-toolset/>`_ and `lossy <https://www.blosc.org/posts/blosc2-lossy-compression/>`_ compression to reduce storage space while maintaining high performance.
40
40
 
41
41
  .. grid-item-card::
42
42
  :class-card: intro-card text-center no-border
@@ -48,7 +48,7 @@
48
48
  <h3 style="margin-top: 10px; margin-bottom: 15px;">Full-Fledged NDArrays</h3>
49
49
  </div>
50
50
 
51
- `NDArray objects <https://www.blosc.org/python-blosc2/getting_started/tutorials/01.ndarray-basics.html>`_ enable efficient storage and manipulation of arbitrarily large N-dimensional datasets, following the `Array API <https://data-apis.org/array-api/latest/>`_ standard, with an additional `C-API <https://www.blosc.org/posts/blosc2-ndim-intro/>`_ available.
51
+ `NDArray objects <https://www.blosc.org/python-blosc2/getting_started/tutorials/01.ndarray-basics.html>`_ enable efficient storage and manipulation of arbitrarily large N-dimensional datasets, following the `Array API <https://data-apis.org/array-api/latest/>`_ standard, with an additional `C API <https://www.blosc.org/posts/blosc2-ndim-intro/>`_.
52
52
 
53
53
  .. grid-item-card::
54
54
  :class-card: intro-card text-center no-border
@@ -60,7 +60,7 @@
60
60
  <h3 style="margin-top: 10px; margin-bottom: 15px;">Compute Engine Inside</h3>
61
61
  </div>
62
62
 
63
- Combines compression with high-speed computation of complex `mathematical expressions <https://ironarray.io/blog/blosc2-eval-expressions>`_ and `reductions <https://www.blosc.org/posts/ndim-reductions/>`_, while maintaining compatibility with NumPy.
63
+ Combines compression with high-speed computation of complex `mathematical expressions <https://ironarray.io/blog/blosc2-eval-expressions>`_ and `reductions <https://www.blosc.org/python-blosc2/getting_started/tutorials/04.reductions.html>`_, while maintaining compatibility with NumPy.
64
64
 
65
65
  .. grid-item-card::
66
66
  :class-card: intro-card text-center no-border
@@ -68,11 +68,11 @@
68
68
  .. raw:: html
69
69
 
70
70
  <div style="text-align: center;">
71
- <i class="fas fa-th" style="font-size: 2em; color: #007acc; margin-bottom: 10px;"></i>
72
- <h3 style="margin-top: 10px; margin-bottom: 15px;">Sparse Data Mastery</h3>
71
+ <i class="fas fa-sitemap" style="font-size: 2em; color: #007acc; margin-bottom: 10px;"></i>
72
+ <h3 style="margin-top: 10px; margin-bottom: 15px;">Hierarchical Structures</h3>
73
73
  </div>
74
74
 
75
- Efficiently store and manipulate sparse data with `compact sparse constructs <https://www.blosc.org/docs/Exploring-MilkyWay-SciPy2023.pdf>`_ for optimized `performance <https://www.blosc.org/docs/Exploring-MilkyWay-SciPy2023-paper.pdf>`_.
75
+ Efficiently store data hierachically with the `TreeStore class <https://www.blosc.org/python-blosc2/reference/tree_store.html#blosc2.TreeStore>`_ for convenience and optimized `performance <https://www.blosc.org/posts/new-treestore-blosc2/>`_.
76
76
 
77
77
  .. grid-item-card::
78
78
  :class-card: intro-card text-center no-border
@@ -84,7 +84,7 @@
84
84
  <h3 style="margin-top: 10px; margin-bottom: 15px;">Flexible Storage</h3>
85
85
  </div>
86
86
 
87
- Access data from anywhere: read/write in `memory or disk <https://github.com/Blosc/python-blosc2/blob/main/doc/getting_started/tutorials/01.ndarray-basics.ipynb>`_, stream from `the network <https://www.blosc.org/python-blosc2/reference/c2array.html>`_, or use `memory-mapped files <https://www.blosc.org/python-blosc2/reference/storage.html#blosc2.Storage.params.mmap_mode>`_ for high-performance I/O.
87
+ Access data from anywhere: read/write in `memory or disk <https://www.blosc.org/docs/Exploring-MilkyWay-SciPy2023-paper.pdf>`_, stream from `the network <https://www.blosc.org/python-blosc2/reference/c2array.html>`_, or use `memory-mapped files <https://www.blosc.org/python-blosc2/reference/storage.html#blosc2.Storage.params.mmap_mode>`_ for high-performance I/O.
88
88
 
89
89
  .. grid-item-card::
90
90
  :class-card: intro-card text-center no-border
@@ -26,7 +26,7 @@ n_frames = int(1000 * scale) # Raise this for more frames
26
26
  dtype = np.float64 # Data type for the grid
27
27
  use_blosc2 = True # Set to False to use NumPy arrays instead
28
28
  realize_blosc2 = False # Set to False to skip Blosc2 realization
29
- make_animation = False # Set to False to skip animation creation
29
+ make_animation = True # Set to False to skip animation creation
30
30
  travel_dim = 2 # Dimension to travel through (0 for X, 1 for Y, 2 for Z)
31
31
 
32
32
  # --- Coordinate creation ---
@@ -37,11 +37,13 @@ dependencies = [
37
37
  "ndindex",
38
38
  "msgpack",
39
39
  "platformdirs",
40
- "numexpr; platform_machine != 'wasm32'",
40
+ "numexpr>=2.12.1; platform_machine != 'wasm32'",
41
41
  "py-cpuinfo; platform_machine != 'wasm32'",
42
42
  "requests",
43
43
  ]
44
- version = "3.7.2"
44
+ version = "3.8.0"
45
+ [project.entry-points."array_api"]
46
+ blosc2 = "blosc2"
45
47
 
46
48
 
47
49
  [project.optional-dependencies]
@@ -114,7 +116,7 @@ extend-select = [
114
116
  "SIM",
115
117
  "TC",
116
118
  "UP",
117
- ]
119
+ "C901"] # enable complexity rule
118
120
  ignore = [
119
121
  "B028",
120
122
  "PT011",
@@ -128,3 +130,7 @@ ignore = [
128
130
 
129
131
  [tool.ruff.lint.extend-per-file-ignores]
130
132
  "tests/**" = ["F841"]
133
+
134
+ [tool.ruff.lint.mccabe]
135
+ # Raise complexity from the default 10 to 13
136
+ max-complexity = 13
@@ -13,6 +13,8 @@
13
13
  import platform
14
14
  from enum import Enum
15
15
 
16
+ import numpy as np
17
+
16
18
  # Do the platform check once at module level
17
19
  IS_WASM = platform.machine() == "wasm32"
18
20
  # IS_WASM = True # for testing (comment this line out for production)
@@ -23,9 +25,10 @@ Flag for WebAssembly platform.
23
25
  if not IS_WASM:
24
26
  import numexpr
25
27
 
26
- from .version import __version__
28
+ from .version import __array_api_version__, __version__
27
29
 
28
30
  __version__ = __version__
31
+ __array_api_version__ = __array_api_version__
29
32
  """
30
33
  Python-Blosc2 version.
31
34
  """
@@ -164,6 +167,94 @@ VERSION_STRING = VERSION_STRING
164
167
  """
165
168
  The C-Blosc2 version's string."""
166
169
 
170
+
171
+ # For array-api compatibility
172
+ iinfo = np.iinfo
173
+ finfo = np.finfo
174
+
175
+ # dtypes for array-api
176
+ str_ = np.str_
177
+ bytes_ = np.bytes_
178
+ object_ = np.object_
179
+
180
+ from numpy import (
181
+ bool_,
182
+ complex64,
183
+ complex128,
184
+ e,
185
+ euler_gamma,
186
+ float16,
187
+ float32,
188
+ float64,
189
+ inf,
190
+ int8,
191
+ int16,
192
+ int32,
193
+ int64,
194
+ nan,
195
+ newaxis,
196
+ pi,
197
+ uint8,
198
+ uint16,
199
+ uint32,
200
+ uint64,
201
+ )
202
+
203
+ DEFAULT_COMPLEX = complex128
204
+ """
205
+ Default complex floating dtype."""
206
+
207
+ DEFAULT_FLOAT = float64
208
+ """
209
+ Default real floating dtype."""
210
+
211
+ DEFAULT_INT = int64
212
+ """
213
+ Default integer dtype."""
214
+
215
+ DEFAULT_INDEX = int64
216
+ """
217
+ Default indexing dtype."""
218
+
219
+
220
+ class Info:
221
+ def __init__(self, **kwargs):
222
+ for key, value in kwargs.items():
223
+ setattr(self, key, value)
224
+
225
+
226
+ def __array_namespace_info__() -> Info:
227
+ """
228
+ Return information about the array namespace following the Array API specification.
229
+ """
230
+
231
+ def _raise(exc):
232
+ raise exc
233
+
234
+ return Info(
235
+ capabilities=lambda: {
236
+ "boolean indexing": True,
237
+ "data-dependent shapes": False,
238
+ "max dimensions": MAX_DIM,
239
+ },
240
+ default_device=lambda: "cpu",
241
+ default_dtypes=lambda device=None: {
242
+ "real floating": DEFAULT_FLOAT,
243
+ "complex floating": DEFAULT_COMPLEX,
244
+ "integral": DEFAULT_INT,
245
+ "indexing": DEFAULT_INDEX,
246
+ }
247
+ if (device == "cpu" or device is None)
248
+ else _raise(ValueError("Only cpu devices allowed")),
249
+ dtypes=lambda device=None, kind=None: np.__array_namespace_info__().dtypes(kind=kind, device=device)
250
+ if (device == "cpu" or device is None)
251
+ else _raise(ValueError("Only cpu devices allowed")),
252
+ devices=lambda: ["cpu"],
253
+ name="blosc2",
254
+ version=__version__,
255
+ )
256
+
257
+
167
258
  # Public API for container module
168
259
  from .core import (
169
260
  clib_info,
@@ -237,9 +328,11 @@ from .ndarray import (
237
328
  are_partitions_aligned,
238
329
  are_partitions_behaved,
239
330
  arange,
331
+ broadcast_to,
240
332
  linspace,
241
333
  eye,
242
334
  asarray,
335
+ astype,
243
336
  indices,
244
337
  sort,
245
338
  reshape,
@@ -248,14 +341,19 @@ from .ndarray import (
248
341
  concatenate,
249
342
  expand_dims,
250
343
  empty,
344
+ empty_like,
251
345
  frombuffer,
252
346
  fromiter,
253
347
  get_slice_nchunks,
348
+ meshgrid,
254
349
  nans,
255
350
  uninit,
256
351
  zeros,
352
+ zeros_like,
257
353
  ones,
354
+ ones_like,
258
355
  full,
356
+ full_like,
259
357
  save,
260
358
  matmul,
261
359
  permute_dims,
@@ -278,6 +376,7 @@ from .lazyexpr import (
278
376
  get_expr_operands,
279
377
  validate_expr,
280
378
  evaluate,
379
+ slices_eval,
281
380
  )
282
381
  from .proxy import Proxy, ProxySource, ProxyNDSource, ProxyNDField, SimpleProxy, jit
283
382
 
@@ -328,13 +427,18 @@ from .ndarray import (
328
427
  arctan,
329
428
  arctan2,
330
429
  arctanh,
430
+ array_from_ffi_ptr,
331
431
  conj,
332
432
  contains,
333
433
  cos,
334
434
  cosh,
435
+ equal,
335
436
  exp,
336
437
  expm1,
337
438
  imag,
439
+ isfinite,
440
+ isinf,
441
+ isnan,
338
442
  lazywhere,
339
443
  log,
340
444
  log1p,
@@ -355,7 +459,7 @@ from .ndarray import (
355
459
  where,
356
460
  )
357
461
 
358
- __all__ = [
462
+ __all__ = [ # noqa : RUF022
359
463
  # Constants
360
464
  "EXTENDED_HEADER_LENGTH",
361
465
  "MAX_BUFFERSIZE",
@@ -363,6 +467,17 @@ __all__ = [
363
467
  "MIN_HEADER_LENGTH",
364
468
  "VERSION_DATE",
365
469
  "VERSION_STRING",
470
+ # Default dtypes
471
+ "DEFAULT_COMPLEX",
472
+ "DEFAULT_FLOAT",
473
+ "DEFAULT_INDEX",
474
+ "DEFAULT_INT",
475
+ # Mathematical constants
476
+ "e",
477
+ "pi",
478
+ "inf",
479
+ "nan",
480
+ "newaxis",
366
481
  # Classes
367
482
  "C2Array",
368
483
  "CParams",
@@ -406,7 +521,8 @@ __all__ = [
406
521
  "are_partitions_aligned",
407
522
  "are_partitions_behaved",
408
523
  "asarray",
409
- "clib_info",
524
+ "astypeclib_info",
525
+ "broadcast_to",
410
526
  "compress",
411
527
  "compress2",
412
528
  "compressor_list",
@@ -420,6 +536,9 @@ __all__ = [
420
536
  "decompress2",
421
537
  "detect_number_of_cores",
422
538
  "dparams_dflts",
539
+ "empty",
540
+ "empty_like",
541
+ "equal",
423
542
  "estore_from_cframe",
424
543
  "expand_dims",
425
544
  "expm1",
@@ -429,6 +548,7 @@ __all__ = [
429
548
  "frombuffer",
430
549
  "fromiter",
431
550
  "full",
551
+ "full_like",
432
552
  "get_blocksize",
433
553
  "get_cbuffer_sizes",
434
554
  "get_clib",
@@ -437,6 +557,9 @@ __all__ = [
437
557
  "get_expr_operands",
438
558
  "get_slice_nchunks",
439
559
  "indices",
560
+ "isfinite",
561
+ "isinf",
562
+ "isnan",
440
563
  "jit",
441
564
  "lazyexpr",
442
565
  "lazyudf",
@@ -451,10 +574,12 @@ __all__ = [
451
574
  "matrix_transpose",
452
575
  "max",
453
576
  "mean",
577
+ "meshgrid",
454
578
  "min",
455
579
  "nans",
456
580
  "ndarray_from_cframe",
457
581
  "ones",
582
+ "ones_like",
458
583
  "open",
459
584
  "pack",
460
585
  "pack_array",
@@ -493,4 +618,6 @@ __all__ = [
493
618
  "validate_expr",
494
619
  "var",
495
620
  "where",
621
+ "zeros",
622
+ "zeros_like",
496
623
  ]
@@ -2612,8 +2612,12 @@ cdef class NDArray:
2612
2612
  mask_[i] = mask[i]
2613
2613
  _check_rc(b2nd_squeeze_index(self.array, mask_), "Error while squeezing array")
2614
2614
 
2615
- if self.array.shape[0] == 1 and self.ndim == 1:
2616
- self.array.ndim = 0
2615
+ #this squeezes even if not asked for by mask - may have to use in future though
2616
+ #if self.array.shape[0] == 1 and self.ndim == 1:
2617
+ # self.array.ndim = 0
2618
+
2619
+ def as_ffi_ptr(self):
2620
+ return PyCapsule_New(self.array, <char *> "b2nd_array_t*", NULL)
2617
2621
 
2618
2622
  cdef udf_udata *_fill_udf_udata(self, func_id, inputs_id):
2619
2623
  cdef udf_udata *udata = <udf_udata *> malloc(sizeof(udf_udata))
@@ -2901,6 +2905,10 @@ def asarray(ndarray, chunks, blocks, **kwargs):
2901
2905
 
2902
2906
  return ndarray
2903
2907
 
2908
+ def array_from_ffi_ptr(array_ptr):
2909
+ array = <b2nd_array_t *> PyCapsule_GetPointer(array_ptr, <char *> "b2nd_array_t*")
2910
+ return blosc2.NDArray(_schunk=PyCapsule_New(array.sc, <char *> "blosc2_schunk*", NULL),
2911
+ _array=array_ptr)
2904
2912
 
2905
2913
  def ndarray_from_cframe(cframe, copy=False):
2906
2914
  cdef Py_buffer buf
@@ -45,13 +45,13 @@ def c2context(
45
45
  A parameter not specified or set to ``None`` will inherit the value from the
46
46
  previous context manager, defaulting to an environment variable (see
47
47
  below) if supported by that parameter. Parameters set to an empty string
48
- will not to be used in requests (with no default either).
48
+ will not be used in requests (without a default either).
49
49
 
50
50
  If the subscriber requires authorization for requests, you can either
51
51
  provide an `auth_token` (which you should have obtained previously from the
52
52
  subscriber), or both `username` and `password` to obtain the token by
53
53
  logging in to the subscriber. The token will be reused until it is explicitly
54
- reset or requested again in a subsequent context manager invocation.
54
+ reset or requested again in a later context manager invocation.
55
55
 
56
56
  Please note that this manager is reentrant but not safe for concurrent use.
57
57
 
@@ -190,6 +190,10 @@ class C2Array(blosc2.Operand):
190
190
  def __init__(self, path: str, /, urlbase: str | None = None, auth_token: str | None = None):
191
191
  """Create an instance of a remote NDArray.
192
192
 
193
+ Remote NDArrays can be accessed via HTTP from a Caterva2 server
194
+ (e.g., https://cat2.cloud). More information about Caterva2 at:
195
+ https://ironarray.io/caterva2.
196
+
193
197
  Parameters
194
198
  ----------
195
199
  path: str
@@ -1467,7 +1467,7 @@ def compute_chunks_blocks( # noqa: C901
1467
1467
 
1468
1468
  # Return an arbitrary value for chunks and blocks when shape has any 0 dim
1469
1469
  if 0 in shape:
1470
- return (1,) * len(shape), (1,) * len(shape)
1470
+ return shape, shape
1471
1471
 
1472
1472
  if blocks:
1473
1473
  if not isinstance(blocks, tuple | list):
@@ -31,7 +31,7 @@ class EmbedStore:
31
31
  Parameters
32
32
  ----------
33
33
  urlpath : str or None, optional
34
- Path for persistent storage. Using a ' .b2e' extension is recommended.
34
+ Path for persistent storage. Using a '.b2e' extension is recommended.
35
35
  If None, the embed store will be in memory only, which can be
36
36
  deserialized later using the :func:`blosc2.from_cframe` function.
37
37
  mode : str, optional