RandomState.choice()

RandomState.choice(a, size=None, replace=True, p=None) Generates a random sample from a given 1-D array New in version 1.7.0. Parameters: a : 1-D array-like or int If an ndarray, a random sample is generated from its elements. If an int, the random sample is generated as if a was np.arange(n) size : int or tuple of ints, optional Output shape. If the given shape is, e.g., (m, n, k), then m * n * k samples are drawn. Default is None, in which case a single value is returned. replace

numpy.array2string()

numpy.array2string(a, max_line_width=None, precision=None, suppress_small=None, separator=' ', prefix='', style=, formatter=None) [source] Return a string representation of an array. Parameters: a : ndarray Input array. max_line_width : int, optional The maximum number of columns the string should span. Newline characters splits the string appropriately after array elements. precision : int, optional Floating point precision. Default is the current printing precision (usually 8), whic

numpy.polynomial.hermite_e.hermeval()

numpy.polynomial.hermite_e.hermeval(x, c, tensor=True) [source] Evaluate an HermiteE series at points x. If c is of length n + 1, this function returns the value: The parameter x is converted to an array only if it is a tuple or a list, otherwise it is treated as a scalar. In either case, either x or its elements must support multiplication and addition both with themselves and with the elements of c. If c is a 1-D array, then p(x) will have the same shape as x. If c is multidimensional,

MaskedArray.reshape()

MaskedArray.reshape(*s, **kwargs) [source] Give a new shape to the array without changing its data. Returns a masked array containing the same data, but with a new shape. The result is a view on the original array; if this is not possible, a ValueError is raised. Parameters: shape : int or tuple of ints The new shape should be compatible with the original shape. If an integer is supplied, then the result will be a 1-D array of that length. order : {?C?, ?F?}, optional Determines whether

numpy.imag()

numpy.imag(val) [source] Return the imaginary part of the elements of the array. Parameters: val : array_like Input array. Returns: out : ndarray Output array. If val is real, the type of val is used for the output. If val has complex elements, the returned type is float. See also real, angle, real_if_close Examples >>> a = np.array([1+2j, 3+4j, 5+6j]) >>> a.imag array([ 2., 4., 6.]) >>> a.imag = np.array([8, 10, 12]) >>> a array([ 1. +8.j, 3

generic.ravel()

generic.ravel() Not implemented (virtual attribute) Class generic exists solely to derive numpy scalars from, and possesses, albeit unimplemented, all the attributes of the ndarray class so as to provide a uniform API. See also The

MaskedArray.__ilshift__

MaskedArray.__ilshift__ x.__ilshift__(y) <==> x<<=y

numpy.triu_indices()

numpy.triu_indices(n, k=0, m=None) [source] Return the indices for the upper-triangle of an (n, m) array. Parameters: n : int The size of the arrays for which the returned indices will be valid. k : int, optional Diagonal offset (see triu for details). m : int, optional New in version 1.9.0. The column dimension of the arrays for which the returned arrays will be valid. By default m is taken equal to n. Returns: inds : tuple, shape(2) of ndarrays, shape(n) The indices for the tr

record.any()

record.any() Not implemented (virtual attribute) Class generic exists solely to derive numpy scalars from, and possesses, albeit unimplemented, all the attributes of the ndarray class so as to provide a uniform API. See also The

RandomState.poisson()

RandomState.poisson(lam=1.0, size=None) Draw samples from a Poisson distribution. The Poisson distribution is the limit of the binomial distribution for large N. Parameters: lam : float or sequence of float Expectation of interval, should be >= 0. A sequence of expectation intervals must be broadcastable over the requested size. size : int or tuple of ints, optional Output shape. If the given shape is, e.g., (m, n, k), then m * n * k samples are drawn. Default is None, in which case