Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def minimum(self, other):
if istensor(other):
other = other.tensor
else:
other = self.backend.ones_like(self.tensor) * other
return self.backend.min(self.tensor, other)
def maximum(self, other):
if istensor(other):
other = other.tensor
else:
other = self.backend.ones_like(self.tensor) * other
return self.backend.max(self.tensor, other)