Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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",
)
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",
)
def prod(self, other):
return awkward1.zip(
{"x": self.x * other, "y": self.y * other}, with_name="TwoVector",
)
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",
)
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",
)
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",
)
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",
)
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",
)