Numeric¶

The numeric module provides methods that are lacking from the numpy module.

nutils.numeric.overlapping(arr, axis=-1, n=2)[source]

reinterpret data with overlaps

nutils.numeric.normdim(ndim, n)[source]

check bounds and make positive

nutils.numeric.get(arr, axis, item)[source]

take single item from array axis

nutils.numeric.contract(A, B, axis=-1)[source]
nutils.numeric.dot(A, B, axis=-1)[source]

Transform axis of A by contraction with first axis of B and inserting remaining axes. Note: with default axis=-1 this leads to multiplication of vectors and matrices following linear algebra conventions.

nutils.numeric.meshgrid(*args)[source]

multi-dimensional meshgrid generalisation

nutils.numeric.normalize(A, axis=-1)[source]

devide by normal

nutils.numeric.diagonalize(arg, axis=-1, newaxis=-1)[source]

insert newaxis, place axis on diagonal of axis and newaxis

nutils.numeric.eig(A)[source]

If A has repeated eigenvalues, numpy.linalg.eig sometimes fails to produce the complete eigenbasis. This function aims to fix that by identifying the problem and completing the basis where necessary.

nutils.numeric.ix(args)[source]

version of numpy.ix_() that allows for scalars

nutils.numeric.ext(A)[source]

Exterior For array of shape (n,n-1) return n-vector ex such that ex.array = 0 and det(arr;ex) = ex.ex