numpy.bitwise_or()

numpy.bitwise_or(x1, x2[, out]) = Compute the bit-wise OR of two arrays element-wise. Computes the bit-wise OR of the underlying binary representation of the integers in the input arrays. This ufunc implements the C/Python operator |. Parameters: x1, x2 : array_like Only integer and boolean types are handled. out : ndarray, optional Array into which the output is placed. Its type is preserved and it must be of the right shape to hold the output. See doc.ufuncs. Returns: out : array_

numpy.bitwise_and()

numpy.bitwise_and(x1, x2[, out]) = Compute the bit-wise AND of two arrays element-wise. Computes the bit-wise AND of the underlying binary representation of the integers in the input arrays. This ufunc implements the C/Python operator &. Parameters: x1, x2 : array_like Only integer and boolean types are handled. Returns: out : array_like Result. See also logical_and, bitwise_or, bitwise_xor binary_repr Return the binary representation of the input number as a string. Examp

numpy.bincount()

numpy.bincount(x, weights=None, minlength=None) Count number of occurrences of each value in array of non-negative ints. The number of bins (of size 1) is one larger than the largest value in x. If minlength is specified, there will be at least this number of bins in the output array (though it will be longer if necessary, depending on the contents of x). Each bin gives the number of occurrences of its index value in x. If weights is specified the input array is weighted by it, i.e. if a va

numpy.binary_repr()

numpy.binary_repr(num, width=None) [source] Return the binary representation of the input number as a string. For negative numbers, if width is not given, a minus sign is added to the front. If width is given, the two?s complement of the number is returned, with respect to that width. In a two?s-complement system negative numbers are represented by the two?s complement of the absolute value. This is the most common method of representing signed integers on computers [R16]. A N-bit two?s-com

numpy.base_repr()

numpy.base_repr(number, base=2, padding=0) [source] Return a string representation of a number in the given base system. Parameters: number : int The value to convert. Only positive values are handled. base : int, optional Convert number to the base number system. The valid range is 2-36, the default value is 2. padding : int, optional Number of zeros padded on the left. Default is 0 (no padding). Returns: out : str String representation of number in base system. See also bin

numpy.bartlett()

numpy.bartlett(M) [source] Return the Bartlett window. The Bartlett window is very similar to a triangular window, except that the end points are at zero. It is often used in signal processing for tapering a signal, without generating too much ripple in the frequency domain. Parameters: M : int Number of points in the output window. If zero or less, an empty array is returned. Returns: out : array The triangular window, with the maximum value normalized to one (the value one appears o

numpy.average()

numpy.average(a, axis=None, weights=None, returned=False) [source] Compute the weighted average along the specified axis. Parameters: a : array_like Array containing data to be averaged. If a is not an array, a conversion is attempted. axis : int, optional Axis along which to average a. If None, averaging is done over the flattened array. weights : array_like, optional An array of weights associated with the values in a. Each value in a contributes to the average according to its asso

numpy.atleast_3d()

numpy.atleast_3d(*arys) [source] View inputs as arrays with at least three dimensions. Parameters: arys1, arys2, ... : array_like One or more array-like sequences. Non-array inputs are converted to arrays. Arrays that already have three or more dimensions are preserved. Returns: res1, res2, ... : ndarray An array, or tuple of arrays, each with a.ndim >= 3. Copies are avoided where possible, and views with three or more dimensions are returned. For example, a 1-D array of shape (N,)

numpy.atleast_2d()

numpy.atleast_2d(*arys) [source] View inputs as arrays with at least two dimensions. Parameters: arys1, arys2, ... : array_like One or more array-like sequences. Non-array inputs are converted to arrays. Arrays that already have two or more dimensions are preserved. Returns: res, res2, ... : ndarray An array, or tuple of arrays, each with a.ndim >= 2. Copies are avoided where possible, and views with two or more dimensions are returned. See also atleast_1d, atleast_3d Examples

numpy.atleast_1d()

numpy.atleast_1d(*arys) [source] Convert inputs to arrays with at least one dimension. Scalar inputs are converted to 1-dimensional arrays, whilst higher-dimensional inputs are preserved. Parameters: arys1, arys2, ... : array_like One or more input arrays. Returns: ret : ndarray An array, or sequence of arrays, each with a.ndim >= 1. Copies are made only if necessary. See also atleast_2d, atleast_3d Examples >>> np.atleast_1d(1.0) array([ 1.]) >>> x = np.aran