numpy.vsplit()

numpy.vsplit(ary, indices_or_sections) [source] Split an array into multiple sub-arrays vertically (row-wise). Please refer to the split documentation. vsplit is equivalent to split with axis=0 (default), the array is always split along the first axis regardless of the array dimension. See also split Split an array into multiple sub-arrays of equal size. Examples >>> x = np.arange(16.0).reshape(4, 4) >>> x array([[ 0., 1., 2., 3.], [ 4., 5., 6., 7

numpy.vectorize()

class numpy.vectorize(pyfunc, otypes='', doc=None, excluded=None, cache=False) [source] Generalized function class. Define a vectorized function which takes a nested sequence of objects or numpy arrays as inputs and returns a numpy array as output. The vectorized function evaluates pyfunc over successive tuples of the input arrays like the python map function, except it uses the broadcasting rules of numpy. The data type of the output of vectorized is determined by calling the function with

numpy.vdot()

numpy.vdot(a, b) Return the dot product of two vectors. The vdot(a, b) function handles complex numbers differently than dot(a, b). If the first argument is complex the complex conjugate of the first argument is used for the calculation of the dot product. Note that vdot handles multidimensional arrays differently than dot: it does not perform a matrix product, but flattens input arguments to 1-D vectors first. Consequently, it should only be used for vectors. Parameters: a : array_like I

numpy.var()

numpy.var(a, axis=None, dtype=None, out=None, ddof=0, keepdims=False) [source] Compute the variance along the specified axis. Returns the variance of the array elements, a measure of the spread of a distribution. The variance is computed for the flattened array by default, otherwise over the specified axis. Parameters: a : array_like Array containing numbers whose variance is desired. If a is not an array, a conversion is attempted. axis : None or int or tuple of ints, optional Axis or

numpy.vander()

numpy.vander(x, N=None, increasing=False) [source] Generate a Vandermonde matrix. The columns of the output matrix are powers of the input vector. The order of the powers is determined by the increasing boolean argument. Specifically, when increasing is False, the i-th output column is the input vector raised element-wise to the power of N - i - 1. Such a matrix with a geometric progression in each row is named for Alexandre- Theophile Vandermonde. Parameters: x : array_like 1-D input arr

numpy.unwrap()

numpy.unwrap(p, discont=3.141592653589793, axis=-1) [source] Unwrap by changing deltas between values to 2*pi complement. Unwrap radian phase p by changing absolute jumps greater than discont to their 2*pi complement along the given axis. Parameters: p : array_like Input array. discont : float, optional Maximum discontinuity between values, default is pi. axis : int, optional Axis along which unwrap will operate, default is the last axis. Returns: out : ndarray Output array. Se

numpy.unravel_index()

numpy.unravel_index(indices, dims, order='C') Converts a flat index or array of flat indices into a tuple of coordinate arrays. Parameters: indices : array_like An integer array whose elements are indices into the flattened version of an array of dimensions dims. Before version 1.6.0, this function accepted just one index value. dims : tuple of ints The shape of the array to use for unraveling indices. order : {?C?, ?F?}, optional Determines whether the indices should be viewed as ind

numpy.unpackbits()

numpy.unpackbits(myarray, axis=None) Unpacks elements of a uint8 array into a binary-valued output array. Each element of myarray represents a bit-field that should be unpacked into a binary-valued output array. The shape of the output array is either 1-D (if axis is None) or the same shape as the input array with unpacking done along the axis specified. Parameters: myarray : ndarray, uint8 type Input array. axis : int, optional Unpacks along this axis. Returns: unpacked : ndarray, u

numpy.unique()

numpy.unique(ar, return_index=False, return_inverse=False, return_counts=False) [source] Find the unique elements of an array. Returns the sorted unique elements of an array. There are three optional outputs in addition to the unique elements: the indices of the input array that give the unique values, the indices of the unique array that reconstruct the input array, and the number of times each unique value comes up in the input array. Parameters: ar : array_like Input array. This will b

numpy.union1d()

numpy.union1d(ar1, ar2) [source] Find the union of two arrays. Return the unique, sorted array of values that are in either of the two input arrays. Parameters: ar1, ar2 : array_like Input arrays. They are flattened if they are not already 1D. Returns: union1d : ndarray Unique, sorted union of the input arrays. See also numpy.lib.arraysetops Module with a number of other functions for performing set operations on arrays. Examples >>> np.union1d([-1, 0, 1], [-2, 0, 2]) a