numpy.record

class numpy.record [source] A data-type scalar that allows field access as attribute lookup. Attributes T transpose base base object data pointer to start of data dtype dtype object flags integer value of flags flat a 1-d view of scalar imag imaginary part of scalar itemsize length of one element in bytes nbytes length of item in bytes ndim number of array dimensions real real part of scalar shape tuple of array dimensions size number of elements in the gentype strides tuple of bytes steps

numpy.reciprocal()

numpy.reciprocal(x[, out]) = Return the reciprocal of the argument, element-wise. Calculates 1/x. Parameters: x : array_like Input array. Returns: y : ndarray Return array. Notes Note This function is not designed to work with integers. For integer arguments with absolute value larger than 1 the result is always zero because of the way Python handles integer division. For integer zero the result is an overflow. Examples >>> np.reciprocal(2.) 0.5 >>> np.reciproca

numpy.recarray

class numpy.recarray [source] Construct an ndarray that allows field access using attributes. Arrays may have a data-types containing fields, analogous to columns in a spread sheet. An example is [(x, int), (y, float)], where each entry in the array is a pair of (int, float). Normally, these attributes are accessed using dictionary lookups such as arr['x'] and arr['y']. Record arrays allow the fields to be accessed as members of the array, using arr.x and arr.y. Parameters: shape : tuple

numpy.real_if_close()

numpy.real_if_close(a, tol=100) [source] If complex input returns a real array if complex parts are close to zero. ?Close to zero? is defined as tol * (machine epsilon of the type for a). Parameters: a : array_like Input array. tol : float Tolerance in machine epsilons for the complex part of the elements in the array. Returns: out : ndarray If a is real, the type of a is used for the output. If a has complex elements, the returned type is float. See also real, imag, angle Notes

numpy.real()

numpy.real(val) [source] Return the real 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_if_close, imag, angle Examples >>> a = np.array([1+2j, 3+4j, 5+6j]) >>> a.real array([ 1., 3., 5.]) >>> a.real = 9 >>> a array([ 9.+2.j, 9.+4.j, 9.+6.j]) >>&

numpy.ravel_multi_index()

numpy.ravel_multi_index(multi_index, dims, mode='raise', order='C') Converts a tuple of index arrays into an array of flat indices, applying boundary modes to the multi-index. Parameters: multi_index : tuple of array_like A tuple of integer arrays, one array for each dimension. dims : tuple of ints The shape of array into which the indices from multi_index apply. mode : {?raise?, ?wrap?, ?clip?}, optional Specifies how out-of-bounds indices are handled. Can specify either one mode or

numpy.ravel()

numpy.ravel(a, order='C') [source] Return a contiguous flattened array. A 1-D array, containing the elements of the input, is returned. A copy is made only if needed. As of NumPy 1.10, the returned array will have the same type as the input array. (for example, a masked array will be returned for a masked array input) Parameters: a : array_like Input array. The elements in a are read in the order specified by order, and packed as a 1-D array. order : {?C?,?F?, ?A?, ?K?}, optional The el

numpy.rate()

numpy.rate(nper, pmt, pv, fv, when='end', guess=0.1, tol=1e-06, maxiter=100) [source] Compute the rate of interest per period. Parameters: nper : array_like Number of compounding periods pmt : array_like Payment pv : array_like Present value fv : array_like Future value when : {{?begin?, 1}, {?end?, 0}}, {string, int}, optional When payments are due (?begin? (1) or ?end? (0)) guess : float, optional Starting guess for solving the rate of interest tol : float, optional Required

numpy.RankWarning

exception numpy.RankWarning [source] Issued by polyfit when the Vandermonde matrix is rank deficient. For more information, a way to suppress the warning, and an example of RankWarning being issued, see polyfit.

numpy.random.zipf()

numpy.random.zipf(a, size=None) Draw samples from a Zipf distribution. Samples are drawn from a Zipf distribution with specified parameter a > 1. The Zipf distribution (also known as the zeta distribution) is a continuous probability distribution that satisfies Zipf?s law: the frequency of an item is inversely proportional to its rank in a frequency table. Parameters: a : float > 1 Distribution parameter. size : int or tuple of ints, optional Output shape. If the given shape is, e