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], 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.


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


version of numpy.ix_() that allows for scalars


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

class nutils.numeric.const[source]