linalg¶
This module provides general purpose and/or specialized linear algebra routines.
- Authors:
Mihai Cara (contact: help@stsci.edu)
- License:
- tweakwcs.linalg.inv(m)[source]¶
This function computes inverse matrix using Gauss-Jordan elimination with full pivoting. Computations are performed using
numpy.longdouble
precision. On systems on whichnumpy.longdouble
is equivalent tonumpy.double
this function reverts tonumpy.linalg.inv
for performance reasons.- Parameters:
- m: numpy.ndarray
A 2D square matrix of type
numpy.ndarray
.
- Returns:
- invm: numpy.ndarray
Inverse matrix of the input matrix
m
: a 2D squarenumpy.ndarray
of typenumpy.longdouble
on systems on which it is more accurate thannumpy.double
.