MCPcopy Create free account
hub / github.com/pymupdf/PyMuPDF / __add__

Method __add__

src/__init__.py:8635–8642  ·  view source on GitHub ↗
(self, m)

Source from the content-addressed store, hash-verified

8633 return math.sqrt(sum([c*c for c in self]))
8634
8635 def __add__(self, m):
8636 if hasattr(m, "__float__"):
8637 return Matrix(self.a + m, self.b + m, self.c + m,
8638 self.d + m, self.e + m, self.f + m)
8639 if len(m) != 6:
8640 raise ValueError("Matrix: bad seq len")
8641 return Matrix(self.a + m[0], self.b + m[1], self.c + m[2],
8642 self.d + m[3], self.e + m[4], self.f + m[5])
8643
8644 def __bool__(self):
8645 return not (max(self) == min(self) == 0)

Callers

nothing calls this directly

Calls 1

MatrixClass · 0.85

Tested by

no test coverage detected