Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
mixin = self._mixin_map.get(name, "NanoCollection")
if "o" + name in arrays and name not in arrays:
# list collection
offsets = arrays["o" + name]
content = {
k[len(name) + 1 :]: arrays[k]
for k in arrays
if k.startswith(name + "_")
}
recordparams = {
"__doc__": offsets.parameters["__doc__"],
"__record__": mixin,
"events_key": self._keyprefix,
"collection_name": name,
}
form = awkward1.forms.ListOffsetForm(
"i32",
awkward1.forms.RecordForm(
{k: v.form for k, v in content.items()}, parameters=recordparams
),
)
generator = awkward1.layout.ArrayGenerator(
self._listarray,
(offsets, content, recordparams),
{},
form=form,
length=len(self),
)
source = "runtime"
return awkward1.layout.VirtualArray(
generator,
self._cache,