safe_invert

grizli.utils.safe_invert(arr)[source]

Version-safe matrix inversion using numpy.linalg or numpy.matrix.I

Parameters
arrarray_like

The input array to be inverted.

Returns
_invndarray

The inverted array.