pninexus 3.2.2__cp39-cp39-manylinux_2_31_x86_64.whl → 3.3.0__cp39-cp39-manylinux_2_31_x86_64.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.
Binary file
Binary file
Binary file
@@ -1,5 +1,6 @@
1
1
  from __future__ import print_function
2
2
  import numpy
3
+ import sys
3
4
 
4
5
  from pninexus.h5cpp import property
5
6
  from pninexus.h5cpp._attribute import AttributeManager
@@ -8,6 +9,10 @@ from pninexus.h5cpp._attribute import Attribute
8
9
  __all__ = ["property", "AttributeManager", "Attribute"]
9
10
 
10
11
 
12
+ if sys.version_info > (3,):
13
+ unicode = str
14
+
15
+
11
16
  def attribute__getitem__(self, index):
12
17
 
13
18
  data = self.read()
@@ -20,15 +25,28 @@ def attribute_write(self, data):
20
25
  write_data = data
21
26
  if not isinstance(write_data, numpy.ndarray):
22
27
  write_data = numpy.array(write_data)
23
-
24
28
  if write_data.dtype.kind == 'U':
25
- write_data = write_data.astype("S")
29
+ try:
30
+ write_data = write_data.astype("S")
31
+ except Exception:
32
+ if isinstance(data, numpy.ndarray) and data.shape:
33
+ shape = data.shape
34
+ if len(shape) > 1:
35
+ data = data.flatten()
36
+ write_data = numpy.array(
37
+ [bytes(unicode(dt).encode('utf-8')) for dt in data])
38
+ if len(shape) > 1:
39
+ write_data = write_data.reshape(shape)
40
+ else:
41
+ write_data = numpy.array(unicode(data).encode('utf-8'))
26
42
  elif write_data.dtype == 'bool':
27
43
  write_data = write_data.astype("int8")
28
44
 
45
+ # print("DATA", data, write_data)
29
46
  try:
30
47
  self._write(write_data)
31
- except RuntimeError:
48
+ except RuntimeError as e:
49
+ print(str(e))
32
50
  print(write_data, write_data.dtype)
33
51
 
34
52
 
@@ -5,6 +5,7 @@ from pninexus.h5cpp import dataspace
5
5
  from pninexus.h5cpp import datatype
6
6
  from pninexus.h5cpp.filter import ExternalFilters
7
7
  import numpy
8
+ import sys
8
9
  # from collections import OrderedDict
9
10
 
10
11
  #
@@ -45,6 +46,10 @@ except Exception:
45
46
  VDSAvailable = False
46
47
 
47
48
 
49
+ if sys.version_info > (3,):
50
+ unicode = str
51
+
52
+
48
53
  def copy(node, base, path=None, link_creation_list=property.LinkCreationList(),
49
54
  object_copy_list=property.ObjectCopyList()):
50
55
  """Copy an object within the HDF5 tree
@@ -275,8 +280,19 @@ def dataset_write(self, data, selection=None):
275
280
  # if the data is a unicode numpy array we have to convert it to a
276
281
  # simple string array
277
282
  if data.dtype.kind == 'U':
278
- data = data.astype('S')
279
-
283
+ try:
284
+ data = data.astype('S')
285
+ except Exception:
286
+ if isinstance(data, numpy.ndarray) and data.shape:
287
+ shape = data.shape
288
+ if len(shape) > 1:
289
+ data = data.flatten()
290
+ data = numpy.array(
291
+ [bytes(unicode(dt).encode('utf-8')) for dt in data])
292
+ if len(shape) > 1:
293
+ data = data.reshape(shape)
294
+ else:
295
+ data = numpy.array(unicode(data).encode('utf-8'))
280
296
  #
281
297
  # determine memory datatype and dataspace
282
298
  # - if the file type is a variable length string we have to adjust the
@@ -286,7 +302,7 @@ def dataset_write(self, data, selection=None):
286
302
 
287
303
  if isinstance(self.datatype, datatype.String):
288
304
  if self.datatype.is_variable_length:
289
- memory_type = datatype.String.variable()
305
+ memory_type = self.datatype
290
306
 
291
307
  # if the data is bool numpy array we have to convert it to a
292
308
  # int array
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pninexus
3
- Version: 3.2.2
3
+ Version: 3.3.0
4
4
  Summary: Python wrapper for the H5CPP and PNI libraries
5
5
  Home-page: https://github.com/pni-libraries/python-pninexus
6
6
  Author: Eugen Wintersberger
@@ -21,6 +21,7 @@ Classifier: Programming Language :: Python :: 3.8
21
21
  Classifier: Programming Language :: Python :: 3.9
22
22
  Classifier: Programming Language :: Python :: 3.10
23
23
  Classifier: Programming Language :: Python :: 3.11
24
+ Classifier: Programming Language :: Python :: 3.12
24
25
  Requires-Dist: numpy
25
26
 
26
27
  Python bindings for PNI/NeXus and h5cpp
@@ -103,8 +104,8 @@ For Python3 just replace python with python3 in the above instructions.
103
104
  Debian and Ubuntu packages
104
105
  ~~~~~~~~~~~~~~~~~~~~~~~~~~
105
106
 
106
- Debian ``bookworm``, ``bullseye``, ``buster`` or Ubuntu ``lunar``,
107
- ``jammy``, ``focal`` packages can be found in the HDRI repository.
107
+ Debian ``bookworm``, ``bullseye``, ``buster`` or Ubuntu ``oracular``,
108
+ ``noble``, ``jammy`` packages can be found in the HDRI repository.
108
109
 
109
110
  To install the debian packages, add the PGP repository key
110
111
 
@@ -114,19 +115,19 @@ To install the debian packages, add the PGP repository key
114
115
  $ curl -s http://repos.pni-hdri.de/debian_repo.pub.gpg | gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/debian-hdri-repo.gpg --import
115
116
  $ chmod 644 /etc/apt/trusted.gpg.d/debian-hdri-repo.gpg
116
117
 
117
- and then download the corresponding source list, e.g. for ``bullseye``
118
+ and then download the corresponding source list, e.g. for ``bookworm``
118
119
 
119
120
  ::
120
121
 
121
122
  $ cd /etc/apt/sources.list.d
122
- $ wget http://repos.pni-hdri.de/bullseye-pni-hdri.list
123
+ $ wget http://repos.pni-hdri.de/bookworm-pni-hdri.list
123
124
 
124
- or ``jammy``
125
+ or ``noble``
125
126
 
126
127
  ::
127
128
 
128
129
  $ cd /etc/apt/sources.list.d
129
- $ wget http://repos.pni-hdri.de/jammy-pni-hdri.list
130
+ $ wget http://repos.pni-hdri.de/noble-pni-hdri.list
130
131
 
131
132
  respectively.
132
133
 
@@ -135,16 +136,16 @@ Finally,
135
136
  ::
136
137
 
137
138
  $ apt-get update
138
- $ apt-get install python-pninexus
139
+ $ apt-get install python3-pninexus
139
140
 
140
141
  or
141
142
 
142
143
  ::
143
144
 
144
145
  $ apt-get update
145
- $ apt-get install python3-pninexus
146
+ $ apt-get install python-pninexus
146
147
 
147
- for python3.
148
+ for python2.
148
149
 
149
150
 
150
151
  Manylinux wheels from PyPI
@@ -1,50 +1,50 @@
1
1
  pninexus/__init__.py,sha256=VGnNxm2gixVy1tn3CamhzVPmQwVHd_nG4B3uJ_cOaMo,126
2
- pninexus/h5cpp/_file.cpython-39-x86_64-linux-gnu.so,sha256=duh1Ih5awTDiMIc0BiBTzoDa95xUOJx6LOFvZ7_A0og,2716409
3
- pninexus/h5cpp/_dataspace.cpython-39-x86_64-linux-gnu.so,sha256=rjBcSJhCqrzIpmpgm0yti-p6kidTMWq2-LjlN1BanJQ,3752633
2
+ pninexus/filters/__init__.py,sha256=a_UTMrhbkD1DpGnLkzON92UVCfQWNQTSvJ09Rtqzzqw,175
3
+ pninexus/filters/libh5blosc.so,sha256=8e0LKqHEJ6oIYk-OjFrRo_93rG7Bk7721cSoistFq2k,21705
4
+ pninexus/filters/libh5bshuf.so,sha256=Y5roqlp-7OHZws7RMLmTswyO9EyAYKeTV6u07b7MTHI,39457
5
+ pninexus/filters/libh5bz2.so,sha256=WasF0JwBj2Fr9UukWJmUc1oRRkvOeZU_R9_yoxKCYRg,21393
6
+ pninexus/filters/libh5jpeg.so,sha256=hT0XBTcJXD9ptKPkAS0zaxD6NfJPISnG0EFQJpBkanc,21849
7
+ pninexus/filters/libh5lz4.so,sha256=7GmN6r_1WfSCk3XUXj9ewxyIbvZEONl9wwDlPVVpOFw,21617
8
+ pninexus/filters/libh5lzf.so,sha256=Rz9yD1oQi__xtiKrGNfXsNLsfc5gpzbWaCF7f70wTuU,25625
9
+ pninexus/filters/libh5mafisc.so,sha256=IpPKPGIKKO5JFWA_8fmG-7FOJwA_V8sF9C9io0wiOfU,236385
10
+ pninexus/filters/libh5zfp.so,sha256=gq_QHtHPRY8vRfZpM3LOej7YCqBqMxrrsRTJT80OytY,190521
4
11
  pninexus/h5cpp/__init__.py,sha256=kL1E5me6zbHAMazYDHGdBaGznqnaYlMrizgHhQnl298,1010
5
- pninexus/h5cpp/_property.cpython-39-x86_64-linux-gnu.so,sha256=SMpjQ-Ff0Id-K4g8ccz0DLDQAfH_1fcvvKO66VN7KEA,8135169
6
- pninexus/h5cpp/_h5cpp.cpython-39-x86_64-linux-gnu.so,sha256=GU7hMs-4cyfJvkzdDJQ3Bx_dPlsItyVbc5targQ46Aw,2665033
7
- pninexus/h5cpp/_datatype.cpython-39-x86_64-linux-gnu.so,sha256=66mFrj_mKwLno6D1gonH2rlQZIKZ_85qxPwvU6k_0sU,3778873
8
- pninexus/h5cpp/_attribute.cpython-39-x86_64-linux-gnu.so,sha256=LvRhKZjffMNQKuvsXsP4UoqV_kJIvYgO7JqLvkTbcHM,3262873
9
- pninexus/h5cpp/_node.cpython-39-x86_64-linux-gnu.so,sha256=mCRn4lLOeVIRQE1oOUtaxVyORoEfQGbML1jAORDCEo8,8884513
10
- pninexus/h5cpp/_filter.cpython-39-x86_64-linux-gnu.so,sha256=hKpdqWfYQq4Lq-nMq5PMM5fl_ORophaSg_7U9zPbT7o,2797057
11
- pninexus/h5cpp/property/__init__.py,sha256=h84toTAZvm9ac6_bX7IsXLN4ZymPHIweCmUcweL14wM,2729
12
- pninexus/h5cpp/attribute/__init__.py,sha256=KO8BTlp_wJHpDntHjY-jgkF0WJZA9Fp1uG__OOnJP3Q,1088
13
- pninexus/h5cpp/datatype/__init__.py,sha256=1Uasm4jp871gORJwQ2sjvvt_EJ_zTmE58DRYlKIUl2g,5471
12
+ pninexus/h5cpp/_attribute.cpython-39-x86_64-linux-gnu.so,sha256=592CJ0dFxo7OBboHd3nhAX_G9tPT4bCLRLpdD-VOT_o,3267009
13
+ pninexus/h5cpp/_dataspace.cpython-39-x86_64-linux-gnu.so,sha256=dTnOVVjLVw9y2z3k0BxIVHixlGiVji9XIVIbkE8Tj14,3752633
14
+ pninexus/h5cpp/_datatype.cpython-39-x86_64-linux-gnu.so,sha256=NXUAx_7Chb_5VBIO1HzgBR06HaboqS3vKbeKtIHo6oE,3778873
15
+ pninexus/h5cpp/_file.cpython-39-x86_64-linux-gnu.so,sha256=RWrsyEIwQ5WVAgcC2LLukqmUBM0qrcadBEDZ5AcHPi0,2720585
16
+ pninexus/h5cpp/_filter.cpython-39-x86_64-linux-gnu.so,sha256=h78AfTVI98URqkivx4JtSaYlomX1FB-vjD0izI4jFto,2797057
17
+ pninexus/h5cpp/_h5cpp.cpython-39-x86_64-linux-gnu.so,sha256=xHgYk3FIaHRe6IEnkKJfkegnrNsitXajpY6EDzvWpiU,2665113
18
+ pninexus/h5cpp/_node.cpython-39-x86_64-linux-gnu.so,sha256=zriXf3Wf6F-virJ8ywzE7QPFxV97jmgI245QdB-82bQ,8888689
19
+ pninexus/h5cpp/_property.cpython-39-x86_64-linux-gnu.so,sha256=FXSFZalKnV5tqqVMnfKQUbAP_HHPDFI5gjLUhS0L0xM,8135169
20
+ pninexus/h5cpp/attribute/__init__.py,sha256=FFzFpA-nMwUOcOJFXrVz2i7NWmG192r1N9UVoeudkdc,1729
14
21
  pninexus/h5cpp/dataspace/__init__.py,sha256=fFYOpmSvE1jqOE2cNL8X7npPmtIykDYOMgJc3jm8VpE,756
22
+ pninexus/h5cpp/datatype/__init__.py,sha256=1Uasm4jp871gORJwQ2sjvvt_EJ_zTmE58DRYlKIUl2g,5471
15
23
  pninexus/h5cpp/file/__init__.py,sha256=BjZcRliMYQZb-VYc6k-OWm29XXanMsZjzR1iMbQIVds,478
16
- pninexus/h5cpp/node/__init__.py,sha256=1-CY3AowIkqRHDQGjRBX29EXSx5HYWgIzNxXEWW4Aoc,14649
17
24
  pninexus/h5cpp/filter/__init__.py,sha256=oHiUNyLk5tCMcieoxXxCLoMd788wx8Flzu407poVVnI,1500
25
+ pninexus/h5cpp/node/__init__.py,sha256=zy90mD2GVcbsc4hsbOjApVPOJFkWs0Ef32UjHNwRboo,15187
26
+ pninexus/h5cpp/property/__init__.py,sha256=h84toTAZvm9ac6_bX7IsXLN4ZymPHIweCmUcweL14wM,2729
18
27
  pninexus/nexus/__init__.py,sha256=M7YMP1avSRLSZXeSqO5fWoBmf_oScF2pVshFqo2zKNk,6035
19
- pninexus/nexus/_nexus.cpython-39-x86_64-linux-gnu.so,sha256=JnKUNf9rT0fwgcLQfDCnhQ8HbkRma000J1igw0Z9-x8,7229409
20
- pninexus/filters/libh5bz2.so,sha256=PY1cQ1OlsF-hQFIbNkbbFcUPBwFcyFlzFB5jF3cm7nE,21409
21
- pninexus/filters/libh5bshuf.so,sha256=VsGS94HM9RnxkuK7oaauijndGClpjqqdF3SqGgqLBhc,156729
22
- pninexus/filters/__init__.py,sha256=a_UTMrhbkD1DpGnLkzON92UVCfQWNQTSvJ09Rtqzzqw,175
23
- pninexus/filters/libh5blosc.so,sha256=8e0LKqHEJ6oIYk-OjFrRo_93rG7Bk7721cSoistFq2k,21705
24
- pninexus/filters/libh5lzf.so,sha256=Rz9yD1oQi__xtiKrGNfXsNLsfc5gpzbWaCF7f70wTuU,25625
25
- pninexus/filters/libh5lz4.so,sha256=DNNmanPG0iK7X0Pfp7pnDEtWDp_FEDpFyjnwmceILAw,125376
26
- pninexus/filters/libh5zfp.so,sha256=gq_QHtHPRY8vRfZpM3LOej7YCqBqMxrrsRTJT80OytY,190521
27
- pninexus/filters/libh5mafisc.so,sha256=IpPKPGIKKO5JFWA_8fmG-7FOJwA_V8sF9C9io0wiOfU,236385
28
- pninexus/filters/libh5jpeg.so,sha256=hT0XBTcJXD9ptKPkAS0zaxD6NfJPISnG0EFQJpBkanc,21849
28
+ pninexus/nexus/_nexus.cpython-39-x86_64-linux-gnu.so,sha256=VGySDKXrkkMwvw7g8SztcC35xxxcmIV1JPiNHX7BNys,7225377
29
+ pninexus.libs/libaec-9e64cc6f.so.0.0.10,sha256=2jYRFefNIHLYj0kVV29Z2PcjB9IJHR5FnAIcyrrx4ww,33625
30
+ pninexus.libs/libblosc-e00bb777.so.1.20.1,sha256=uuKmsCkvdatJVr2VinZBAb0HvGjbgEyYzMWeRioZPy8,71105
31
+ pninexus.libs/libboost_python39-02e7880c.so.1.74.0,sha256=HtrSOz0fZUXJw9lfeMa58ngRB6C4pqCJq7ra5DS6tpU,279377
32
+ pninexus.libs/libboost_regex-cbd9ce10.so.1.74.0,sha256=vmZOigQG2vjItL4RBDLoZDOo0J3Q1HNHE3PNRPwWRdg,1214697
33
+ pninexus.libs/libbz2-05b89fa1.so.1.0.4,sha256=Q6rCmfBkqqWLbvHn5_FWzFQ4_SiCaF0cWByMZEYP5DM,79033
34
+ pninexus.libs/libh5cpp-455ccdbe.so.0.7.1,sha256=BN5At9J2mndS2To3v4nNuqiCB3Aba0fRkfmkE7BCsSw,783473
35
+ pninexus.libs/libhdf5_serial-09772f97.so.103.2.0,sha256=AbESfvc1z-Pax1N8ZrnTe2aPC5XTIYHzEiS37KUYpM4,3812049
29
36
  pninexus.libs/libhdf5_serial_hl-5f45f219.so.100.1.3,sha256=gFJscCE7AHrKIbxQ8f5X26qYeBe8nZOSE25b3yly930,162089
37
+ pninexus.libs/libicudata-daecc24c.so.67.1,sha256=ukRO_0HDIC6PORsLELbEOMOaN9B4xCYOKQWbljXJDiE,28410225
38
+ pninexus.libs/libicui18n-0dd9fd81.so.67.1,sha256=P3wWOex8HI9t5ci0q0eSoFNGVvAhHfWAR18lCdk7zvY,4221673
39
+ pninexus.libs/libicuuc-650d19e2.so.67.1,sha256=vNw0-o7AbOIYx-D0yl74QGl3uYsB-FCQyroRsfj3u2U,2323873
30
40
  pninexus.libs/libjpeg-210b8ad5.so.62.3.0,sha256=ffdsWw65umMOA1Hx3uQHt8SiY_cP4LdhXYIq_xOw_Z4,540385
31
- pninexus.libs/libboost_python39-02e7880c.so.1.74.0,sha256=HtrSOz0fZUXJw9lfeMa58ngRB6C4pqCJq7ra5DS6tpU,279377
32
41
  pninexus.libs/liblz4-221240df.so.1.9.3,sha256=IF026cnxRHOqi8DhVyfKPAmikgWHXDypJvjBc3eq-Ho,142617
33
- pninexus.libs/libh5cpp-c66d9f40.so.0.6.0,sha256=Q-3Nnfh9UhkZ3ArEwsDkZsK4srfALzHmI21yvJ4nM7o,783473
34
- pninexus.libs/libicuuc-650d19e2.so.67.1,sha256=vNw0-o7AbOIYx-D0yl74QGl3uYsB-FCQyroRsfj3u2U,2323873
35
- pninexus.libs/libhdf5_serial-09772f97.so.103.2.0,sha256=AbESfvc1z-Pax1N8ZrnTe2aPC5XTIYHzEiS37KUYpM4,3812049
36
- pninexus.libs/libaec-9e64cc6f.so.0.0.10,sha256=2jYRFefNIHLYj0kVV29Z2PcjB9IJHR5FnAIcyrrx4ww,33625
37
- pninexus.libs/libpninexus-9f7f71b5.so.3.1.0,sha256=48H19Zzb7OeHvSxwqn5Sftp_tmBrcRA0YHZlgUyffpE,2002769
42
+ pninexus.libs/libpninexus-774d4d58.so.3.3.0,sha256=MoxZxmUZZBEMgvFejr6NnUxLnSCxyTMieeyjjiACnsw,2043233
43
+ pninexus.libs/libsnappy-a527f3d8.so.1.1.8,sha256=j2aYfR9Nw93VjAQlZdz-MpoIGQCSSdSGZbOK-Ztixd4,45233
38
44
  pninexus.libs/libsz-49099ae8.so.2.0.1,sha256=4Fh3BA7-Lbwk2AcTR7XOu07o0ZXQ1RE5QIWX0xVmHNU,20833
39
- pninexus.libs/libicui18n-0dd9fd81.so.67.1,sha256=P3wWOex8HI9t5ci0q0eSoFNGVvAhHfWAR18lCdk7zvY,4221673
40
45
  pninexus.libs/libzstd-96200194.so.1.4.8,sha256=7vmo9hTearjY-AUxvdX47dhPX-Ln0DQd4qFt74GWRus,911761
41
- pninexus.libs/libbz2-05b89fa1.so.1.0.4,sha256=Q6rCmfBkqqWLbvHn5_FWzFQ4_SiCaF0cWByMZEYP5DM,79033
42
- pninexus.libs/libsnappy-a527f3d8.so.1.1.8,sha256=j2aYfR9Nw93VjAQlZdz-MpoIGQCSSdSGZbOK-Ztixd4,45233
43
- pninexus.libs/libicudata-daecc24c.so.67.1,sha256=ukRO_0HDIC6PORsLELbEOMOaN9B4xCYOKQWbljXJDiE,28410225
44
- pninexus.libs/libblosc-e00bb777.so.1.20.1,sha256=uuKmsCkvdatJVr2VinZBAb0HvGjbgEyYzMWeRioZPy8,71105
45
- pninexus.libs/libboost_regex-cbd9ce10.so.1.74.0,sha256=vmZOigQG2vjItL4RBDLoZDOo0J3Q1HNHE3PNRPwWRdg,1214697
46
- pninexus-3.2.2.dist-info/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
47
- pninexus-3.2.2.dist-info/RECORD,,
48
- pninexus-3.2.2.dist-info/WHEEL,sha256=YxOnZbvl0SPor_BPSYk8b3XY4hg9dmD1gAwh_rQGz5c,112
49
- pninexus-3.2.2.dist-info/top_level.txt,sha256=02ZiLP_54gh4H6BS7DYE4eWvJRPhsCiFNUNgznIbPV8,9
50
- pninexus-3.2.2.dist-info/METADATA,sha256=lAvKjjl5Zp_BrlhZzCM65AebT6GuZXagEtUJXAHU1OQ,4813
46
+ pninexus-3.3.0.dist-info/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
47
+ pninexus-3.3.0.dist-info/METADATA,sha256=FiFOmRRz4TmC6K2EsOpiaSnFR_xmUdzZKRYKe9C8zto,4867
48
+ pninexus-3.3.0.dist-info/WHEEL,sha256=4_vMZfcr3bpmzsR8-UxHKJyYOZtZw5pkd7T85-1DFz8,112
49
+ pninexus-3.3.0.dist-info/top_level.txt,sha256=02ZiLP_54gh4H6BS7DYE4eWvJRPhsCiFNUNgznIbPV8,9
50
+ pninexus-3.3.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.41.2)
2
+ Generator: bdist_wheel (0.45.1)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp39-cp39-manylinux_2_31_x86_64
5
5
 
index 4302805..46941d8 100644
Binary file
Binary file