Various utility routines
Returns (p0, p1), (p1, p2), ...
where p is an iterator
Returns an array of indices.
An interface to numpy’s mgrid routine, supporting simpler slicing notation.
Arguments:
shape : tuple of positive integers giving dimensions of array
Returns wrapped copy of f that ensures output shape matches input shape.
Details : if the shapes of the first argument and output of the function f do not agree, the output will be expanded via numpy.tile until it is the same shape as the first input. Shapes are computed via numpy.shape.