zmodn.Zmodn.inv()

Compute the inverse of the Zmodn object (for both scalars and matrices).

Returns:

Inverse as a Zmodn object.

Return type:

Zmodn

Raises:

ValueError – If the matrix is not square or not invertible.