cpp-zarr 1.5.0__cp314-cp314-win_amd64.whl

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.
@@ -0,0 +1,2 @@
1
+ Version: 1.13.0
2
+ Arguments: ['C:\\Users\\matt\\AppData\\Local\\Temp\\cibw-run-qgge8v94\\cp314-win_amd64\\build\\venv\\Scripts\\delvewheel', 'repair', '--ignore-existing', '-w', 'C:\\Users\\matt\\AppData\\Local\\Temp\\cibw-run-qgge8v94\\cp314-win_amd64\\repaired_wheel', 'C:\\Users\\matt\\AppData\\Local\\Temp\\cibw-run-qgge8v94\\cp314-win_amd64\\built_wheel\\cpp_zarr-1.5.0-cp314-cp314-win_amd64.whl']
@@ -0,0 +1,18 @@
1
+ Metadata-Version: 2.4
2
+ Name: cpp-zarr
3
+ Version: 1.5.0
4
+ Summary: Python wrappers for cpp-zarr
5
+ Home-page: https://github.com/abcucberkeley/cpp-zarr
6
+ Author: Matthew Mueller
7
+ Author-email: matthewmueller@berkeley.edu
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Operating System :: OS Independent
10
+ Requires-Python: >=3.9, <3.15
11
+ Requires-Dist: numpy>=1.20
12
+ Dynamic: author
13
+ Dynamic: author-email
14
+ Dynamic: classifier
15
+ Dynamic: home-page
16
+ Dynamic: requires-dist
17
+ Dynamic: requires-python
18
+ Dynamic: summary
@@ -0,0 +1,12 @@
1
+ cppzarr/cppzarr.cp314-win_amd64.pyd,sha256=WUyNfBOEIMl_tFk6PnTp5Sjgg3PGX5-SgldK5IQXiBI,322560
2
+ cppzarr/cppzarrwrappers.py,sha256=vlomntqknVUV8LM_G3gkNpE5GGOQ4Y7cR5ZOzgIWE1w,1438
3
+ cppzarr/libcppZarr.dll,sha256=FXiB8Y1BA_G5H4N1wlS1HAxCV8zIYtuZulZl8NKrm2Y,4851633
4
+ cppzarr/__init__.py,sha256=dv4T-7rURterLL-JeaJczXvEparaDogbl0HHaFTDfyE,382
5
+ cpp_zarr-1.5.0.dist-info/DELVEWHEEL,sha256=1s8qCaVz_B1lauIjXc6ucBxymwGierqGGdLO0s-tK9I,401
6
+ cpp_zarr-1.5.0.dist-info/METADATA,sha256=0186POOVh3jtBbryaFGAL5sITkTH2_e1oJKTQRNG5yw,521
7
+ cpp_zarr-1.5.0.dist-info/RECORD,,
8
+ cpp_zarr-1.5.0.dist-info/top_level.txt,sha256=J0NyVJpD0yKL_9AbF7QpZJ5l4tmcudbQDRDlq3SLohs,8
9
+ cpp_zarr-1.5.0.dist-info/WHEEL,sha256=jhxrRP3tdEfm7toB1X7dl5x6f0bu6Tve2cWwIdkbL8U,101
10
+ cpp_zarr.libs/libgcc_s_seh-1-d6da4cfa1995bb52f40dac190ab36db1.dll,sha256=1tpM-hmVu1L0DawZCrNtsdD1017zD3iDIb4NnEIWYBg,101376
11
+ cpp_zarr.libs/libgomp-1.dll,sha256=kmChzkMihmMw46nmFkSCUBoOMLLutLH7FdgpJcNyzZU,258048
12
+ cpp_zarr.libs/libwinpthread-1.dll,sha256=4BuOhf1nwrhh9k1MzH32B1m1iapBAACij6K4SiCJF1s,54784
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: false
4
+ Tag: cp314-cp314-win_amd64
5
+
@@ -0,0 +1 @@
1
+ cppzarr
Binary file
Binary file
cppzarr/__init__.py ADDED
@@ -0,0 +1,12 @@
1
+ """""" # start delvewheel patch
2
+ def _delvewheel_patch_1_13_0():
3
+ import os
4
+ if os.path.isdir(libs_dir := os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, 'cpp_zarr.libs'))):
5
+ os.add_dll_directory(libs_dir)
6
+
7
+
8
+ _delvewheel_patch_1_13_0()
9
+ del _delvewheel_patch_1_13_0
10
+ # end delvewheel patch
11
+
12
+ from .cppzarrwrappers import read_zarr, write_zarr
Binary file
@@ -0,0 +1,33 @@
1
+ import numpy as np
2
+ import os
3
+ from .cppzarr import pybind11_read_zarr, pybind11_write_zarr
4
+
5
+
6
+ def read_zarr(file_name, start_coords=None, end_coords=None):
7
+ if not os.path.isfile(os.path.join(file_name, '.zarray')):
8
+ raise Exception(f'{file_name} does not exist. The .zarray metadata file was not found')
9
+ if start_coords is None:
10
+ start_coords = [0, 0, 0]
11
+ if end_coords is None:
12
+ end_coords = [0, 0, 0]
13
+ im = pybind11_read_zarr(file_name, start_coords, end_coords)
14
+ return im
15
+
16
+
17
+ def write_zarr(file_name, data, start_coords=None, end_coords=None, cname='zstd', clevel=1, order='F', chunks=None,
18
+ dimension_separator='.'):
19
+ crop = False
20
+ if start_coords is not None or end_coords is not None:
21
+ crop = True
22
+ if chunks is None:
23
+ chunks = [256, 256, 256]
24
+ if start_coords is None:
25
+ start_coords = [0, 0, 0]
26
+ if end_coords is None:
27
+ end_coords = [data.shape[0], data.shape[1], data.shape[2]]
28
+ if end_coords[0]-start_coords[0] <= 0 or end_coords[1]-start_coords[1] <= 0 or end_coords[2]-start_coords[2] <= 0:
29
+ raise Exception(f'Invalid start_coords or end_coords!')
30
+ if data.flags['C_CONTIGUOUS'] or not data.flags['F_CONTIGUOUS']:
31
+ data = np.asfortranarray(data)
32
+ pybind11_write_zarr(file_name, data, start_coords, end_coords, cname, clevel, order, chunks, dimension_separator, crop)
33
+ return
cppzarr/libcppZarr.dll ADDED
Binary file