bayespy.utils.linalg.inv

bayespy.utils.linalg.inv(A, ndim=1)[source]

General array inversion.

Supports broadcasting and inversion of multidimensional arrays. For instance, an array with shape (4,3,2,3,2) could mean that there are four (3*2) x (3*2) matrices to be inverted. This can be done by inv(A, ndim=2). For inverting scalars, ndim=0. For inverting matrices, ndim=1.