linalg

This module provides general purpose and/or specialized linear algebra routines.

Authors:

Mihai Cara (contact: help@stsci.edu)

License:

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 which numpy.longdouble is equivalent to numpy.double this function reverts to numpy.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 square numpy.ndarray of type numpy.longdouble on systems on which it is more accurate than numpy.double.