legend-pydataobj 1.6.0__py3-none-any.whl → 1.6.1__py3-none-any.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: legend_pydataobj
3
- Version: 1.6.0
3
+ Version: 1.6.1
4
4
  Summary: LEGEND Python Data Objects
5
5
  Author: The LEGEND Collaboration
6
6
  Maintainer: The LEGEND Collaboration
@@ -1,5 +1,5 @@
1
1
  lgdo/__init__.py,sha256=nv9kORuX2FCA6rQLbH959E0fuGMfZvHb0H5uyrLr2WI,3046
2
- lgdo/_version.py,sha256=Ry70pc5l-IBhT9gahlkNwZPp4g0CzVEWqsat9H-UASY,411
2
+ lgdo/_version.py,sha256=edFVVa8HpVPfLqL2y6CKtViSqJREfmXxInA-HCy-134,411
3
3
  lgdo/cli.py,sha256=hHc0Cz4ZXEOwo55oIukHAhHUkw09ePr4m3sO7eUbWHA,8018
4
4
  lgdo/lgdo_utils.py,sha256=6a2YWEwpyEMXlAyTHZMO01aqxy6SxJzPZkGNWKNWuS0,2567
5
5
  lgdo/lh5_store.py,sha256=xHwzbKNueEtFwScxrgfvCo2_bWKS6j7ojrpeF9kQflc,8483
@@ -28,7 +28,7 @@ lgdo/lh5/_serializers/read/encoded.py,sha256=LTdSqEH5tJOdqcSCrMLWutYiQ4FwBFIPF7F
28
28
  lgdo/lh5/_serializers/read/ndarray.py,sha256=4vdgHwj_yIon1KvSiOkDSHq7CJhYtFcjjSHijsvp1aU,3481
29
29
  lgdo/lh5/_serializers/read/scalar.py,sha256=YwvA6kyNUh6H0kh2L7bzfgLkA8Et2dQFjp2nFnRmeGI,755
30
30
  lgdo/lh5/_serializers/read/utils.py,sha256=K_HDQ_H-vtbs_gEif1MTtFki4qh6lw-5HE7b-7_s-9Q,417
31
- lgdo/lh5/_serializers/read/vector_of_vectors.py,sha256=nlaoOuDPDQvZWslGm3YxyRkcFodfSBEXRKwY046VDvM,6318
31
+ lgdo/lh5/_serializers/read/vector_of_vectors.py,sha256=ED4gr2Sw5TZBeww2c2kLbqn9dWYBk1VTgHiR4-5E1Mc,6665
32
32
  lgdo/lh5/_serializers/write/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
33
  lgdo/lh5/_serializers/write/array.py,sha256=Gosg8rOCH_2dRMj_oNSWyXuoYXDjy0OK--GCYWswR4U,2803
34
34
  lgdo/lh5/_serializers/write/composite.py,sha256=f3b4YeOoUr8y1wA7zsKEFT5mIwX8SD0MYQ40unMRyQc,8460
@@ -42,13 +42,13 @@ lgdo/types/fixedsizearray.py,sha256=7Fj4QS9ubaeEf2tM3HwjSs6AuG8hKSYaT6Hy7Y_VHdQ,
42
42
  lgdo/types/lgdo.py,sha256=UnJDi1emQYVgH_H29Vipfs4LelPopxG5pgZUu1eKOlw,2761
43
43
  lgdo/types/scalar.py,sha256=c5Es2vyDqyWTPV6mujzfIzMpC1jNWkEIcvYyWQUxH3Q,1933
44
44
  lgdo/types/struct.py,sha256=rLtyPthut2wjwiOqwntPrYjjt3uRQbTLWWjiewfKm20,3979
45
- lgdo/types/table.py,sha256=YL_71PalmGnh4YvaDlK0oY4aeypYRAETwJEkRHVOUu8,16887
45
+ lgdo/types/table.py,sha256=-ldEt_sY-Q5GqcqrDjvCKJ5fZ79NDa9hY-gs4mYgNZQ,17153
46
46
  lgdo/types/vectorofvectors.py,sha256=9pKtPfvh0vQ-nmg68LUM8cMttoxTl0BG3QH5awQtSxo,24503
47
47
  lgdo/types/vovutils.py,sha256=7BWPP0BSj-92ifbCIUBcfqxG5-TS8uxujTyJJuDFI04,10302
48
48
  lgdo/types/waveformtable.py,sha256=f2tS4f1OEoYaTM5ldCX9zmw8iSISCT3t3wS1SrPdu_o,9901
49
- legend_pydataobj-1.6.0.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
50
- legend_pydataobj-1.6.0.dist-info/METADATA,sha256=WuFjFye6W_q3YdhE5tHCQlcKNaOCml-TK7ItWAM_f34,44353
51
- legend_pydataobj-1.6.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
52
- legend_pydataobj-1.6.0.dist-info/entry_points.txt,sha256=Uu5MTlppBZxB4QGlLv-oX8FqACWjAZDNii__TBDJwLQ,72
53
- legend_pydataobj-1.6.0.dist-info/top_level.txt,sha256=KyR-EUloqiXcQ62IWnzBmtInDtvsHl4q2ZJAZgTcLXE,5
54
- legend_pydataobj-1.6.0.dist-info/RECORD,,
49
+ legend_pydataobj-1.6.1.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
50
+ legend_pydataobj-1.6.1.dist-info/METADATA,sha256=NZ3aab8ZfKqIs7LRyrYyJB6eJxegscC5cWu3ZDnJ-ZY,44353
51
+ legend_pydataobj-1.6.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
52
+ legend_pydataobj-1.6.1.dist-info/entry_points.txt,sha256=Uu5MTlppBZxB4QGlLv-oX8FqACWjAZDNii__TBDJwLQ,72
53
+ legend_pydataobj-1.6.1.dist-info/top_level.txt,sha256=KyR-EUloqiXcQ62IWnzBmtInDtvsHl4q2ZJAZgTcLXE,5
54
+ legend_pydataobj-1.6.1.dist-info/RECORD,,
lgdo/_version.py CHANGED
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '1.6.0'
16
- __version_tuple__ = version_tuple = (1, 6, 0)
15
+ __version__ = version = '1.6.1'
16
+ __version_tuple__ = version_tuple = (1, 6, 1)
@@ -168,6 +168,12 @@ def _h5_read_vector_of_vectors(
168
168
  )
169
169
 
170
170
  if obj_buf is not None:
171
+ # if the buffer is partially filled, cumulative_length will be invalid
172
+ # (i.e. non monotonically increasing). Let's fix that but filling the
173
+ # rest of the array with the length of flattened_data
174
+ end = obj_buf_start + n_rows_read
175
+ obj_buf.cumulative_length.nda[end:] = obj_buf.cumulative_length.nda[end - 1]
176
+
171
177
  return obj_buf, n_rows_read
172
178
 
173
179
  return (
lgdo/types/table.py CHANGED
@@ -327,6 +327,9 @@ class Table(Struct):
327
327
  else:
328
328
  self_unwrap[obj] = flat_self[obj].view_as("np", with_units=False)
329
329
 
330
+ msg = f"evaluating {expr!r} with locals={(self_unwrap | parameters)} and {has_ak=}"
331
+ log.debug(msg)
332
+
330
333
  # use numexpr if we are only dealing with numpy data types
331
334
  if not has_ak:
332
335
  out_data = ne.evaluate(
@@ -334,6 +337,9 @@ class Table(Struct):
334
337
  local_dict=(self_unwrap | parameters),
335
338
  )
336
339
 
340
+ msg = f"...the result is {out_data!r}"
341
+ log.debug(msg)
342
+
337
343
  # need to convert back to LGDO
338
344
  # np.evaluate should always return a numpy thing?
339
345
  if out_data.ndim == 0:
@@ -353,6 +359,9 @@ class Table(Struct):
353
359
  globs = {"ak": ak, "np": np}
354
360
  out_data = eval(expr, globs, (self_unwrap | parameters))
355
361
 
362
+ msg = f"...the result is {out_data!r}"
363
+ log.debug(msg)
364
+
356
365
  # need to convert back to LGDO
357
366
  if isinstance(out_data, ak.Array):
358
367
  if out_data.ndim == 1: