MCPcopy Index your code
hub / github.com/pymupdf/PyMuPDF / IdentityMatrix

Class IdentityMatrix

src/__init__.py:8872–8893  ·  view source on GitHub ↗

Identity matrix [1, 0, 0, 1, 0, 0]

Source from the content-addressed store, hash-verified

8870
8871
8872class IdentityMatrix(Matrix):
8873 """Identity matrix [1, 0, 0, 1, 0, 0]"""
8874
8875 def __hash__(self):
8876 return hash((1,0,0,1,0,0))
8877
8878 def __init__(self):
8879 Matrix.__init__(self, 1.0, 1.0)
8880
8881 def __repr__(self):
8882 return "IdentityMatrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)"
8883
8884 def __setattr__(self, name, value):
8885 if name in "ad":
8886 self.__dict__[name] = 1.0
8887 elif name in "bcef":
8888 self.__dict__[name] = 0.0
8889 else:
8890 self.__dict__[name] = value
8891
8892 def checkargs(*args):
8893 raise NotImplementedError("Identity is readonly")
8894
8895Identity = IdentityMatrix()
8896

Callers 1

__init__.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…