pninexus 3.2.2__cp37-cp37m-manylinux_2_27_x86_64.whl → 3.3.0__cp37-cp37m-manylinux_2_27_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
@@ -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
@@ -3,12 +3,12 @@ pninexus.libs/libboost_regex-d540ceeb.so.1.67.0,sha256=taV5XTpPfMEjoB676RkDw-ojm
3
3
  pninexus.libs/libaec-1bb4980e.so.0.0.8,sha256=BbkOlAFSTzWpavqSUk6bR6ccxgmcuwSNvsX8QRsEeOs,33241
4
4
  pninexus.libs/libsnappy-d31ed3fe.so.1.1.7,sha256=0Ok9Dt97FoPUAlmXzX_SX-DFfcuKGYWK3tq1j06VwWc,36849
5
5
  pninexus.libs/libjpeg-4f3446bc.so.62.2.0,sha256=W8jUBNrmskizke39gd6OeloECIFMk8cB-YxRVG-lz-I,437929
6
+ pninexus.libs/libpninexus-99d2e4bc.so.3.3.0,sha256=2eZ1yIs2hPbvaG7_gTWAZIEP-YAFn5yqTCCPMzZEEYM,2379745
6
7
  pninexus.libs/libbz2-e0ca5bfb.so.1.0.4,sha256=vubLsBlLM6GtTYc9SD3B3IignuU3MJG_km-SSvybLww,79033
7
8
  pninexus.libs/libhdf5_serial-063eb5b0.so.103.0.0,sha256=Fv0D2R13fsMu8Sr3R32WDjXvmrhgPobbgovDZkeTv4E,3823857
8
- pninexus.libs/libpninexus-33fe0cfe.so.3.2.0,sha256=GmRWMtfCn9-XGeF5w8Rd9FkfbaHDsmhUonKNPprWhhs,2370449
9
- pninexus.libs/libh5cpp-9e3bb076.so.0.6.0,sha256=GOGwBBxCaEWCBiKjpxBozd34U8kvLkX-KnTrm4Cfxok,805265
10
9
  pninexus.libs/libhdf5_serial_hl-588b5460.so.100.1.1,sha256=G8kkpVrpDNYFMldXqeredHKfaQyT5ykS8vcx6HlnY00,166193
11
10
  pninexus.libs/liblz4-244066c2.so.1.8.3,sha256=C2imoT99UD7X4fdzBDGO6zps7xGZ6iqdaSImmpsQ-dI,126001
11
+ pninexus.libs/libh5cpp-df4379fb.so.0.7.1,sha256=ekLpJHqB4n68DqKr2s0ou37mWE6sv9BvovxqNja2qZI,805265
12
12
  pninexus.libs/libboost_date_time-aab2211d.so.1.67.0,sha256=6FVkgMzkskS5aA2MJEXK3m5slyzV9bfimlzMcrOmiC0,97265
13
13
  pninexus.libs/libsz-21529705.so.2.0.1,sha256=yB7l2fkLqErDnyDajmQ4LZbQ_g5vNizXnLlz19xoIHQ,16769
14
14
  pninexus.libs/libblosc-82b628ea.so.1.15.1,sha256=yLjVA_AbRdDKMHpzCR2Tr2cUhPoNr4Fvl9cHQOT4Y0w,67017
@@ -16,36 +16,36 @@ pninexus.libs/libicudata-11c54049.so.63.1,sha256=QY3cPDdyM4eAmnqbXWapprHAXmJU_s0
16
16
  pninexus.libs/libicui18n-e809f84d.so.63.1,sha256=vHj04BC36O24MtUiMB1HooPbXdHXQYU6e6_LDtvAjQQ,3966993
17
17
  pninexus.libs/libzstd-6f101564.so.1.3.8,sha256=aL3X6TggG2yWdkP4qqp5k06DKBP6nO0OwU4hV5sBlTY,654065
18
18
  pninexus.libs/libboost_python37-fe57a016.so.1.67.0,sha256=gvUSnT6E87GTjz_477Rlo3UDv7hQOr8omTWxFO2uitA,327017
19
- pninexus-3.2.2.dist-info/METADATA,sha256=lAvKjjl5Zp_BrlhZzCM65AebT6GuZXagEtUJXAHU1OQ,4813
20
- pninexus-3.2.2.dist-info/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
21
- pninexus-3.2.2.dist-info/WHEEL,sha256=9bnnqBPBvVgvkiUMrd1tEYQXnseyGW4W6pBAcfI6DBA,113
22
- pninexus-3.2.2.dist-info/RECORD,,
23
- pninexus-3.2.2.dist-info/top_level.txt,sha256=02ZiLP_54gh4H6BS7DYE4eWvJRPhsCiFNUNgznIbPV8,9
24
19
  pninexus/__init__.py,sha256=VGnNxm2gixVy1tn3CamhzVPmQwVHd_nG4B3uJ_cOaMo,126
25
20
  pninexus/filters/libh5blosc.so,sha256=tU5sl6hLHAXingnc2DhNCMxRrygcL_kCG0gFWLn_puw,21889
26
- pninexus/filters/libh5lz4.so,sha256=hpyvukZXvpdeahFWLV9qS4FNSczE-dmiVupFrokvZtU,147129
21
+ pninexus/filters/libh5lz4.so,sha256=NgReOcilHD1Anvd8JBzma7VLiwdhLLvHC3-lOuuklzo,21809
27
22
  pninexus/filters/libh5mafisc.so,sha256=WxsM75ivdpKNeG6XqVYYRsRnXQ0Y5JP7lc-G-vbD_kc,244761
28
23
  pninexus/filters/libh5zfp.so,sha256=HWmyn_cHPKM1DAKjDq21mlZqgw7zgJnstMpfmFAbI2E,186449
29
24
  pninexus/filters/libh5lzf.so,sha256=pccH4EQGdD0nPV36f7wWYjZXyWmMtswr-zKaAliNssY,25649
30
25
  pninexus/filters/libh5jpeg.so,sha256=0uo1GZArPrDIkZdOm6S2-nl2jwhbsy2W5YEGQ7WZUAY,22033
31
- pninexus/filters/libh5bz2.so,sha256=h_tQcYIfKA1e0S-m-3cVa1qSuCh6f0k0faBeunWMP6A,21665
26
+ pninexus/filters/libh5bz2.so,sha256=CafeuVryK-0q46MfAwcXcVk4H34eLc6DPoPhPd_Ex6I,21393
32
27
  pninexus/filters/__init__.py,sha256=a_UTMrhbkD1DpGnLkzON92UVCfQWNQTSvJ09Rtqzzqw,175
33
28
  pninexus/filters/libh5bshuf.so,sha256=Dxdi9hybyxjStQt3xD93_FiO_dzvnbEL2e9SfJB6E98,165105
34
- pninexus/nexus/_nexus.cpython-37m-x86_64-linux-gnu.so,sha256=qakVtHES1WS-8MlRSeLIuGcT7jwK9wo3xY7qyaVdwgc,8331713
29
+ pninexus/nexus/_nexus.cpython-37m-x86_64-linux-gnu.so,sha256=88XCrr_Q4rQa5cnkfR0-5u1xtYGaTEy7k73Dh1h-bMc,8327593
35
30
  pninexus/nexus/__init__.py,sha256=M7YMP1avSRLSZXeSqO5fWoBmf_oScF2pVshFqo2zKNk,6035
36
- pninexus/h5cpp/_filter.cpython-37m-x86_64-linux-gnu.so,sha256=mg_Zzwy2bUuMcXsi8l89Tg2QV6sWjcTzSdHCkuneRaA,3119441
37
- pninexus/h5cpp/_datatype.cpython-37m-x86_64-linux-gnu.so,sha256=PjzP3srBjfURzcn9oPBnuBiUZZEIRL03IUybJNQgQaE,4197505
38
- pninexus/h5cpp/_file.cpython-37m-x86_64-linux-gnu.so,sha256=jEQtQLkhKJmVsuM5_GFxwOosvbx-tDKFmnbqlHmUyfM,3411225
39
- pninexus/h5cpp/_node.cpython-37m-x86_64-linux-gnu.so,sha256=al5G-Gl0Z7yyhQikqoNkZWTw5UxyVFYY3vnzTGPpyms,9656089
40
- pninexus/h5cpp/_attribute.cpython-37m-x86_64-linux-gnu.so,sha256=qlnSqpyOFy7bjbORsdDqZaY4cJNRK_VUgxtbOd0QGO0,4174657
31
+ pninexus/h5cpp/_filter.cpython-37m-x86_64-linux-gnu.so,sha256=H_BCJIdMbaPdYnhXJCGCZyFoXUUVp1KnOtJV8GJcr5A,3119441
32
+ pninexus/h5cpp/_datatype.cpython-37m-x86_64-linux-gnu.so,sha256=P5Im7ioQElSXMgW1AwJGk1VxV506HHCbunzJxtkEEx4,4197505
33
+ pninexus/h5cpp/_file.cpython-37m-x86_64-linux-gnu.so,sha256=rA7FY2-AX2SKz79HgLn0t7A-mU91nH2hdpMupCy3YK0,3411225
34
+ pninexus/h5cpp/_node.cpython-37m-x86_64-linux-gnu.so,sha256=-KhjbQoWTmOjxTIElDmgE26xyerCX1ka2FdmEiiXKRQ,9656089
35
+ pninexus/h5cpp/_attribute.cpython-37m-x86_64-linux-gnu.so,sha256=JH0mPEJO8keyWRAMnG2J8cLw38q7yj00XNNtuGceQfs,4174617
41
36
  pninexus/h5cpp/__init__.py,sha256=kL1E5me6zbHAMazYDHGdBaGznqnaYlMrizgHhQnl298,1010
42
- pninexus/h5cpp/_property.cpython-37m-x86_64-linux-gnu.so,sha256=aX7xgyKO0DkE4JuoCeYO_RSvttLLfDVPuugvhyyYYf4,9364865
43
- pninexus/h5cpp/_dataspace.cpython-37m-x86_64-linux-gnu.so,sha256=Dm4NeeW7pzqzb0GFtwHN05jhJlsNJiRzyr1oW1YiWcE,4218609
44
- pninexus/h5cpp/_h5cpp.cpython-37m-x86_64-linux-gnu.so,sha256=W087LjEntUwRYwOiN_OZOimjyxFG-T-v2SbDevPcS-E,3185585
37
+ pninexus/h5cpp/_property.cpython-37m-x86_64-linux-gnu.so,sha256=rNLQ47p21H1VTdj_tGY5oV8P2SPQU8K9dJDes8YTAc4,9364865
38
+ pninexus/h5cpp/_dataspace.cpython-37m-x86_64-linux-gnu.so,sha256=Kz4Blh-qUM0qCVhsjjvfqZ04q3npVjbiLx6D36_2gYU,4218609
39
+ pninexus/h5cpp/_h5cpp.cpython-37m-x86_64-linux-gnu.so,sha256=lM7LfzU7ZT_z24m3i2XMxnjCJf4C7JtbCwtQK9isXT4,3185585
45
40
  pninexus/h5cpp/datatype/__init__.py,sha256=1Uasm4jp871gORJwQ2sjvvt_EJ_zTmE58DRYlKIUl2g,5471
46
41
  pninexus/h5cpp/dataspace/__init__.py,sha256=fFYOpmSvE1jqOE2cNL8X7npPmtIykDYOMgJc3jm8VpE,756
47
- pninexus/h5cpp/attribute/__init__.py,sha256=KO8BTlp_wJHpDntHjY-jgkF0WJZA9Fp1uG__OOnJP3Q,1088
48
- pninexus/h5cpp/node/__init__.py,sha256=1-CY3AowIkqRHDQGjRBX29EXSx5HYWgIzNxXEWW4Aoc,14649
42
+ pninexus/h5cpp/attribute/__init__.py,sha256=FFzFpA-nMwUOcOJFXrVz2i7NWmG192r1N9UVoeudkdc,1729
43
+ pninexus/h5cpp/node/__init__.py,sha256=zy90mD2GVcbsc4hsbOjApVPOJFkWs0Ef32UjHNwRboo,15187
49
44
  pninexus/h5cpp/file/__init__.py,sha256=BjZcRliMYQZb-VYc6k-OWm29XXanMsZjzR1iMbQIVds,478
50
45
  pninexus/h5cpp/filter/__init__.py,sha256=oHiUNyLk5tCMcieoxXxCLoMd788wx8Flzu407poVVnI,1500
51
46
  pninexus/h5cpp/property/__init__.py,sha256=h84toTAZvm9ac6_bX7IsXLN4ZymPHIweCmUcweL14wM,2729
47
+ pninexus-3.3.0.dist-info/METADATA,sha256=FiFOmRRz4TmC6K2EsOpiaSnFR_xmUdzZKRYKe9C8zto,4867
48
+ pninexus-3.3.0.dist-info/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
49
+ pninexus-3.3.0.dist-info/WHEEL,sha256=7vW0paDGAbm5dFQ7RIprhucqW2-9R8WwAT-EuvNOHWM,113
50
+ pninexus-3.3.0.dist-info/RECORD,,
51
+ pninexus-3.3.0.dist-info/top_level.txt,sha256=02ZiLP_54gh4H6BS7DYE4eWvJRPhsCiFNUNgznIbPV8,9
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.41.2)
2
+ Generator: bdist_wheel (0.42.0)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp37-cp37m-manylinux_2_27_x86_64
5
5
 
index db21128..367e2aa 100644
Binary file
Binary file