pangolin.interface.Interface.inv

Contents

pangolin.interface.Interface.inv#

Interface.inv(a)[source]#

Invert a square matrix.

The IR verifies that the input is a square matrix. Invertibility depends on the matrix’s value and therefore remains a backend-level value constraint.

Parameters:

a (RVLike) – Input square matrix.

Return type:

RV

Examples

>>> import pangolin.interface as pi
>>> pi.inv([[1, 0], [0, 2]]).shape
(2, 2)