legend-pydataobj 1.11.4__py3-none-any.whl → 1.11.5__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.
- {legend_pydataobj-1.11.4.dist-info → legend_pydataobj-1.11.5.dist-info}/METADATA +1 -1
- {legend_pydataobj-1.11.4.dist-info → legend_pydataobj-1.11.5.dist-info}/RECORD +8 -8
- lgdo/_version.py +2 -2
- lgdo/types/vectorofvectors.py +15 -8
- {legend_pydataobj-1.11.4.dist-info → legend_pydataobj-1.11.5.dist-info}/LICENSE +0 -0
- {legend_pydataobj-1.11.4.dist-info → legend_pydataobj-1.11.5.dist-info}/WHEEL +0 -0
- {legend_pydataobj-1.11.4.dist-info → legend_pydataobj-1.11.5.dist-info}/entry_points.txt +0 -0
- {legend_pydataobj-1.11.4.dist-info → legend_pydataobj-1.11.5.dist-info}/top_level.txt +0 -0
@@ -1,5 +1,5 @@
|
|
1
1
|
lgdo/__init__.py,sha256=QMYK9HhoMi0pbahPN8mPD18gyTxscFgo7QKfCxVhy-0,3196
|
2
|
-
lgdo/_version.py,sha256=
|
2
|
+
lgdo/_version.py,sha256=DTx-xWFNqQz9P95loDaKgAV4WuiaQCg5aAro9mWfGoA,413
|
3
3
|
lgdo/cli.py,sha256=Qm2EPmoIVxENAR8BeW7oWpTdHT4GbV-owfzM5NkgjvM,9353
|
4
4
|
lgdo/lgdo_utils.py,sha256=6a2YWEwpyEMXlAyTHZMO01aqxy6SxJzPZkGNWKNWuS0,2567
|
5
5
|
lgdo/lh5_store.py,sha256=5BzbJA9sLcqjp8bJDc2olwOiw0VS6rmfg3cfh1kQkRY,8512
|
@@ -44,12 +44,12 @@ lgdo/types/lgdo.py,sha256=RQ2P70N7IWMBDnLLuJI3sm6zQTIKyOMSsKZtBNzmE90,2928
|
|
44
44
|
lgdo/types/scalar.py,sha256=c5Es2vyDqyWTPV6mujzfIzMpC1jNWkEIcvYyWQUxH3Q,1933
|
45
45
|
lgdo/types/struct.py,sha256=Q0OWLVd4B0ciLb8t6VsxU3MPbmGLZ7WfQNno1lSQS0Q,4918
|
46
46
|
lgdo/types/table.py,sha256=KPxKeLKqKQPkC_H75XraW0c1KRAhDdyGKBktVkD-KLw,18779
|
47
|
-
lgdo/types/vectorofvectors.py,sha256=
|
47
|
+
lgdo/types/vectorofvectors.py,sha256=Al9FmY44M-vnzhPdQlFOzwm06LNGBI7RSLSdU5pl9us,24663
|
48
48
|
lgdo/types/vovutils.py,sha256=7BWPP0BSj-92ifbCIUBcfqxG5-TS8uxujTyJJuDFI04,10302
|
49
49
|
lgdo/types/waveformtable.py,sha256=f2tS4f1OEoYaTM5ldCX9zmw8iSISCT3t3wS1SrPdu_o,9901
|
50
|
-
legend_pydataobj-1.11.
|
51
|
-
legend_pydataobj-1.11.
|
52
|
-
legend_pydataobj-1.11.
|
53
|
-
legend_pydataobj-1.11.
|
54
|
-
legend_pydataobj-1.11.
|
55
|
-
legend_pydataobj-1.11.
|
50
|
+
legend_pydataobj-1.11.5.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
51
|
+
legend_pydataobj-1.11.5.dist-info/METADATA,sha256=fV8jiU0IVhLxZWz9r6MdH1v53yEecRwaWlF8jN5zxxc,44382
|
52
|
+
legend_pydataobj-1.11.5.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
53
|
+
legend_pydataobj-1.11.5.dist-info/entry_points.txt,sha256=Uu5MTlppBZxB4QGlLv-oX8FqACWjAZDNii__TBDJwLQ,72
|
54
|
+
legend_pydataobj-1.11.5.dist-info/top_level.txt,sha256=KyR-EUloqiXcQ62IWnzBmtInDtvsHl4q2ZJAZgTcLXE,5
|
55
|
+
legend_pydataobj-1.11.5.dist-info/RECORD,,
|
lgdo/_version.py
CHANGED
lgdo/types/vectorofvectors.py
CHANGED
@@ -13,6 +13,7 @@ import awkward as ak
|
|
13
13
|
import awkward_pandas as akpd
|
14
14
|
import numpy as np
|
15
15
|
import pandas as pd
|
16
|
+
from numba import jit
|
16
17
|
from numpy.typing import ArrayLike, DTypeLike, NDArray
|
17
18
|
|
18
19
|
from .. import utils
|
@@ -560,18 +561,16 @@ class VectorOfVectors(LGDO):
|
|
560
561
|
compatible one.
|
561
562
|
"""
|
562
563
|
if self.ndim == 2:
|
563
|
-
ak_arr = self.view_as("ak")
|
564
|
-
|
565
564
|
if max_len is None:
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
).to_numpy(allow_missing=False)
|
571
|
-
|
565
|
+
lens = np.copy(self.cumulative_length)
|
566
|
+
lens[1:] = lens[1:] - lens[:-1]
|
567
|
+
max_len = int(np.max(lens))
|
568
|
+
nda = np.full((len(self), max_len), fill_val)
|
572
569
|
if preserve_dtype:
|
573
570
|
nda = nda.astype(self.flattened_data.dtype, copy=False)
|
574
571
|
|
572
|
+
_to_aoesa(self.flattened_data.nda, self.cumulative_length.nda, nda)
|
573
|
+
|
575
574
|
return aoesa.ArrayOfEqualSizedArrays(nda=nda, attrs=self.getattrs())
|
576
575
|
|
577
576
|
raise NotImplementedError
|
@@ -664,3 +663,11 @@ class VectorOfVectors(LGDO):
|
|
664
663
|
|
665
664
|
msg = f"{library} is not a supported third-party format."
|
666
665
|
raise ValueError(msg)
|
666
|
+
|
667
|
+
|
668
|
+
@jit
|
669
|
+
def _to_aoesa(flattened_array, cumulative_length, nda):
|
670
|
+
prev_cl = 0
|
671
|
+
for i, cl in enumerate(cumulative_length):
|
672
|
+
nda[i, : (cl - prev_cl)] = flattened_array[prev_cl:cl]
|
673
|
+
prev_cl = cl
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|