numpy.convolve()

numpy.convolve(a, v, mode='full') [source] Returns the discrete, linear convolution of two one-dimensional sequences. The convolution operator is often seen in signal processing, where it models the effect of a linear time-invariant system on a signal [R17]. In probability theory, the sum of two independent random variables is distributed according to the convolution of their individual distributions. If v is longer than a, the arrays are swapped before computation. Parameters: a : (N,) ar

numpy.conj()

numpy.conj(x[, out]) = Return the complex conjugate, element-wise. The complex conjugate of a complex number is obtained by changing the sign of its imaginary part. Parameters: x : array_like Input value. Returns: y : ndarray The complex conjugate of x, with same dtype as y. Examples >>> np.conjugate(1+2j) (1-2j) >>> x = np.eye(2) + 1j * np.eye(2) >>> np.conjugate(x) array([[ 1.-1.j, 0.-0.j], [ 0.-0.j, 1.-1.j]])

numpy.concatenate()

numpy.concatenate((a1, a2, ...), axis=0) Join a sequence of arrays along an existing axis. Parameters: a1, a2, ... : sequence of array_like The arrays must have the same shape, except in the dimension corresponding to axis (the first, by default). axis : int, optional The axis along which the arrays will be joined. Default is 0. Returns: res : ndarray The concatenated array. See also ma.concatenate Concatenate function that preserves input masks. array_split Split an array

numpy.compress()

numpy.compress(condition, a, axis=None, out=None) [source] Return selected slices of an array along given axis. When working along a given axis, a slice along that axis is returned in output for each index where condition evaluates to True. When working on a 1-D array, compress is equivalent to extract. Parameters: condition : 1-D array of bools Array that selects which entries to return. If len(condition) is less than the size of a along the given axis, then output is truncated to the le

numpy.common_type()

numpy.common_type(*arrays) [source] Return a scalar type which is common to the input arrays. The return type will always be an inexact (i.e. floating point) scalar type, even if all the arrays are integer arrays. If one of the inputs is an integer array, the minimum precision type that is returned is a 64-bit floating point dtype. All input arrays can be safely cast to the returned dtype without loss of information. Parameters: array1, array2, ... : ndarrays Input arrays. Returns: out

numpy.column_stack()

numpy.column_stack(tup) [source] Stack 1-D arrays as columns into a 2-D array. Take a sequence of 1-D arrays and stack them as columns to make a single 2-D array. 2-D arrays are stacked as-is, just like with hstack. 1-D arrays are turned into 2-D columns first. Parameters: tup : sequence of 1-D or 2-D arrays. Arrays to stack. All of them must have the same first dimension. Returns: stacked : 2-D array The array formed by stacking the given arrays. See also hstack, vstack, concatena

numpy.clip()

numpy.clip(a, a_min, a_max, out=None) [source] Clip (limit) the values in an array. Given an interval, values outside the interval are clipped to the interval edges. For example, if an interval of [0, 1] is specified, values smaller than 0 become 0, and values larger than 1 become 1. Parameters: a : array_like Array containing elements to clip. a_min : scalar or array_like Minimum value. a_max : scalar or array_like Maximum value. If a_min or a_max are array_like, then they will be br

numpy.choose()

numpy.choose(a, choices, out=None, mode='raise') [source] Construct an array from an index array and a set of arrays to choose from. First of all, if confused or uncertain, definitely look at the Examples - in its full generality, this function is less simple than it might seem from the following code description (below ndi = numpy.lib.index_tricks): np.choose(a,c) == np.array([c[a[I]][I] for I in ndi.ndindex(a.shape)]). But this omits some subtleties. Here is a fully general summary: Given

numpy.chararray

class numpy.chararray [source] Provides a convenient view on arrays of string and unicode values. Note The chararray class exists for backwards compatibility with Numarray, it is not recommended for new development. Starting from numpy 1.4, if one needs arrays of strings, it is recommended to use arrays of dtype object_, string_ or unicode_, and use the free functions in the numpy.char module for fast vectorized string operations. Versus a regular Numpy array of type str or unicode, this

numpy.ceil()

numpy.ceil(x[, out]) = Return the ceiling of the input, element-wise. The ceil of the scalar x is the smallest integer i, such that i >= x. It is often denoted as . Parameters: x : array_like Input data. Returns: y : ndarray or scalar The ceiling of each element in x, with float dtype. See also floor, trunc, rint Examples >>> a = np.array([-1.7, -1.5, -0.2, 0.2, 1.5, 1.7, 2.0]) >>> np.ceil(a) array([-1., -1., -0., 1., 2., 2., 2.])