How to use the awkward1.zip function in awkward1

To help you get started, we’ve selected a few awkward1 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 CoffeaTeam / coffea / coffea / nanoevents / methods / vector.py View on Github external
def sum(self, axis=-1):
        return awkward1.zip(
            {
                "x": awkward1.sum(self.x, axis=axis),
                "y": awkward1.sum(self.y, axis=axis),
                "z": awkward1.sum(self.z, axis=axis),
                "t": awkward1.sum(self.t, axis=axis),
            },
            with_name="LorentzVector",
        )
github CoffeaTeam / coffea / coffea / nanoaod / nanoawkward1.py View on Github external
def add(self, other):
        return awkward1.zip(
            {
                "x": self.x + other.x,
                "y": self.y + other.y,
                "z": self.z + other.z,
                "t": self.t + other.t,
                "charge": self.charge + other.charge,
            },
            with_name="Candidate",
        )
github CoffeaTeam / coffea / coffea / nanoevents / methods / vector.py View on Github external
def prod(self, other):
        return awkward1.zip(
            {"x": self.x * other, "y": self.y * other}, with_name="TwoVector",
        )
github CoffeaTeam / coffea / coffea / nanoevents / methods / vector.py View on Github external
def add(self, other):
        return awkward1.zip(
            {"x": self.x + other.x, "y": self.y + other.y, "z": self.z + other.z},
            with_name="ThreeVector",
        )
github CoffeaTeam / coffea / coffea / nanoevents / methods / candidate.py View on Github external
def add(self, other):
        return awkward1.zip(
            {
                "x": self.x + other.x,
                "y": self.y + other.y,
                "z": self.z + other.z,
                "t": self.t + other.t,
                "charge": self.charge + other.charge,
            },
            with_name="Candidate",
        )
github CoffeaTeam / coffea / coffea / nanoevents / methods / candidate.py View on Github external
def sum(self, axis=-1):
        return awkward1.zip(
            {
                "x": awkward1.sum(self.x, axis=axis),
                "y": awkward1.sum(self.y, axis=axis),
                "z": awkward1.sum(self.z, axis=axis),
                "t": awkward1.sum(self.t, axis=axis),
                "charge": awkward1.sum(self.charge, axis=axis),
            },
            with_name="Candidate",
        )
github CoffeaTeam / coffea / coffea / nanoaod / nanoawkward1.py View on Github external
def prod(self, other):
        return awkward1.zip(
            {
                "x": self.x * other,
                "y": self.y * other,
                "z": self.z * other,
                "t": self.t * other,
            },
            with_name="LorentzVector",
        )
github CoffeaTeam / coffea / coffea / nanoevents / methods / vector.py View on Github external
def sum(self, axis=-1):
        return awkward1.zip(
            {
                "x": awkward1.sum(self.x, axis=axis),
                "y": awkward1.sum(self.y, axis=axis),
                "z": awkward1.sum(self.z, axis=axis),
            },
            with_name="ThreeVector",
        )