ndarray.flags

ndarray.flags Information about the memory layout of the array. Notes The flags object can be accessed dictionary-like (as in a.flags['WRITEABLE']), or by using lowercased attribute names (as in a.flags.writeable). Short flag names are only supported in dictionary access. Only the UPDATEIFCOPY, WRITEABLE, and ALIGNED flags can be changed by the user, via direct assignment to the attribute or dictionary entry, or by calling ndarray.setflags. The array flags cannot be set arbitrarily: UPDATEI

RandomState.wald()

RandomState.wald(mean, scale, size=None) Draw samples from a Wald, or inverse Gaussian, distribution. As the scale approaches infinity, the distribution becomes more like a Gaussian. Some references claim that the Wald is an inverse Gaussian with mean equal to 1, but this is by no means universal. The inverse Gaussian distribution was first studied in relationship to Brownian motion. In 1956 M.C.K. Tweedie used the name inverse Gaussian because there is an inverse relationship between the t

numpy.nanmedian()

numpy.nanmedian(a, axis=None, out=None, overwrite_input=False, keepdims=False) [source] Compute the median along the specified axis, while ignoring NaNs. Returns the median of the array elements. New in version 1.9.0. Parameters: a : array_like Input array or object that can be converted to an array. axis : {int, sequence of int, None}, optional Axis or axes along which the medians are computed. The default is to compute the median along a flattened version of the array. A sequence of

numpy.matrix

class numpy.matrix [source] Returns a matrix from an array-like object, or from a string of data. A matrix is a specialized 2-D array that retains its 2-D nature through operations. It has certain special operators, such as * (matrix multiplication) and ** (matrix power). Parameters: data : array_like or string If data is a string, it is interpreted as a matrix with commas or spaces separating columns, and semicolons separating rows. dtype : data-type Data-type of the output matrix. co

HermiteE Module, “Probabilists’” (numpy.polynomial.hermite_e)

New in version 1.6.0. This module provides a number of objects (mostly functions) useful for dealing with HermiteE series, including a HermiteE class that encapsulates the usual arithmetic operations. (General information on how this module represents and works with such polynomials is in the docstring for its ?parent? sub-package, numpy.polynomial). HermiteE Class HermiteE(coef[, domain, window]) An HermiteE series class. Basics hermeval(x, c[, tensor]) Evaluate an HermiteE series at p

numpy.set_printoptions()

numpy.set_printoptions(precision=None, threshold=None, edgeitems=None, linewidth=None, suppress=None, nanstr=None, infstr=None, formatter=None) [source] Set printing options. These options determine the way floating point numbers, arrays and other NumPy objects are displayed. Parameters: precision : int, optional Number of digits of precision for floating point output (default 8). threshold : int, optional Total number of array elements which trigger summarization rather than full repr

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.result_type()

numpy.result_type(*arrays_and_dtypes) Returns the type that results from applying the NumPy type promotion rules to the arguments. Type promotion in NumPy works similarly to the rules in languages like C++, with some slight differences. When both scalars and arrays are used, the array?s type takes precedence and the actual value of the scalar is taken into account. For example, calculating 3*a, where a is an array of 32-bit floats, intuitively should result in a 32-bit float output. If the

MaskedArray.ctypes

MaskedArray.ctypes An object to simplify the interaction of the array with the ctypes module. This attribute creates an object that makes it easier to use arrays when calling shared libraries with the ctypes module. The returned object has, among others, data, shape, and strides attributes (see Notes below) which themselves return ctypes objects that can be used as arguments to a shared library. Parameters: None Returns: c : Python object Possessing attributes data, shape, strides, etc.

numpy.random.exponential()

numpy.random.exponential(scale=1.0, size=None) Draw samples from an exponential distribution. Its probability density function is for x > 0 and 0 elsewhere. is the scale parameter, which is the inverse of the rate parameter . The rate parameter is an alternative, widely used parameterization of the exponential distribution [R218]. The exponential distribution is a continuous analogue of the geometric distribution. It describes many common situations, such as the size of raindrops mea