How to use the awkward.type.LayoutArg function in awkward

To help you get started, we’ve selected a few awkward examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github scikit-hep / awkward-array / awkward / array / virtual.py View on Github external
def _util_layout(self, position, seen, lookup):
        args = (awkward.type.LayoutArg("generator", self._generator),
                awkward.type.LayoutArg("args", self._args),
                awkward.type.LayoutArg("kwargs", dict(self._kwargs)))
        if self.ismaterialized:
            awkward.type.LayoutNode(self.array, position + (0,), seen, lookup)
            args = args + (awkward.type.LayoutArg("array", position + (0,)),)
        return args
github scikit-hep / awkward-array / awkward / array / jagged.py View on Github external
def _util_layout(self, position, seen, lookup):
        awkward.type.LayoutNode(self._starts, position + (0,), seen, lookup)
        awkward.type.LayoutNode(self._stops, position + (1,), seen, lookup)
        awkward.type.LayoutNode(self._content, position + (2,), seen, lookup)
        return (awkward.type.LayoutArg("starts", position + (0,)),
                awkward.type.LayoutArg("stops", position + (1,)),
                awkward.type.LayoutArg("content", position + (2,)))
github scikit-hep / awkward-array / awkward / array / table.py View on Github external
def _util_layout(self, position, seen, lookup):
        args = ()
        for i, (n, x) in enumerate(self._contents.items()):
            awkward.type.LayoutNode(x, position + (i,), seen, lookup)
            args = args + (awkward.type.LayoutArg(n, position + (i,)),)
        return args
github scikit-hep / awkward-array / awkward / array / jagged.py View on Github external
def _util_layout(self, position, seen, lookup):
        awkward.type.LayoutNode(self._starts, position + (0,), seen, lookup)
        awkward.type.LayoutNode(self._stops, position + (1,), seen, lookup)
        awkward.type.LayoutNode(self._content, position + (2,), seen, lookup)
        return (awkward.type.LayoutArg("starts", position + (0,)),
                awkward.type.LayoutArg("stops", position + (1,)),
                awkward.type.LayoutArg("content", position + (2,)))
github scikit-hep / awkward-array / awkward / array / masked.py View on Github external
def _util_layout(self, position, seen, lookup):
        awkward.type.LayoutNode(self._mask, position + (0,), seen, lookup)
        awkward.type.LayoutNode(self._content, position + (1,), seen, lookup)
        return (awkward.type.LayoutArg("mask", position + (0,)),
                awkward.type.LayoutArg("content", position + (1,)),
                awkward.type.LayoutArg("maskedwhen", self._maskedwhen))
github scikit-hep / awkward-array / awkward / array / chunked.py View on Github external
def _util_layout(self, position, seen, lookup):
        positions = []
        for i, x in enumerate(self._chunks):
            awkward.type.LayoutNode(x, position + (i,), seen, lookup)
            positions.append(position + (i,))
        return (awkward.type.LayoutArg("chunkshape", self._chunkshape),
                awkward.type.LayoutArg("dtype", self._dtype),
                awkward.type.LayoutArg("chunks", positions))
github scikit-hep / awkward-array / awkward / array / virtual.py View on Github external
def _util_layout(self, position, seen, lookup):
        args = (awkward.type.LayoutArg("generator", self._generator),
                awkward.type.LayoutArg("args", self._args),
                awkward.type.LayoutArg("kwargs", dict(self._kwargs)))
        if self.ismaterialized:
            awkward.type.LayoutNode(self.array, position + (0,), seen, lookup)
            args = args + (awkward.type.LayoutArg("array", position + (0,)),)
        return args
github scikit-hep / awkward-array / awkward / array / masked.py View on Github external
def _util_layout(self, position, seen, lookup):
        awkward.type.LayoutNode(self._mask, position + (0,), seen, lookup)
        awkward.type.LayoutNode(self._content, position + (1,), seen, lookup)
        return (awkward.type.LayoutArg("mask", position + (0,)),
                awkward.type.LayoutArg("content", position + (1,)),
                awkward.type.LayoutArg("maskedwhen", self._maskedwhen))
github scikit-hep / awkward-array / awkward / array / masked.py View on Github external
def _util_layout(self, position, seen, lookup):
        awkward.type.LayoutNode(self._mask, position + (0,), seen, lookup)
        awkward.type.LayoutNode(self._content, position + (1,), seen, lookup)
        return (awkward.type.LayoutArg("mask", position + (0,)),
                awkward.type.LayoutArg("content", position + (1,)),
                awkward.type.LayoutArg("maskedwhen", self._maskedwhen),
                awkward.type.LayoutArg("lsborder", self._lsborder))