Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def flat_take(layout):
idx = awkward1.Array(layout)
return target._content()[idx.mask[idx >= 0]]
def globalindex():
gidx = awkward1.Array(
awkward1.layout.ListOffsetArray32(
awkward1.layout.Index32(source_offsets), index.generator(),
)
)
gidx = gidx.mask[gidx >= 0] + target_offsets[:-1]
return awkward1.fill_none(awkward1.flatten(gidx), -1)
k[len(name) + 1 :]: arrays[k]
for k in arrays
if k.startswith(name + "_")
},
parameters={
"__record__": mixin,
"events_key": self._keyprefix,
},
)
events = awkward1.layout.RecordArray(
{name: collectionfactory(name) for name in collections},
parameters={"metadata": self._metadata},
)
self._events = awkward1.Array(events)
return self._events