numpy.remainder()

numpy.remainder(x1, x2[, out]) = Return element-wise remainder of division. Computes the remainder complementary to the floor_divide function. It is equivalent to the Python modulus operator``x1 % x2`` and has the same sign as the divisor x2. It should not be confused with the Matlab(TM) rem function. Parameters: x1 : array_like Dividend array. x2 : array_like Divisor array. out : ndarray, optional Array into which the output is placed. Its type is preserved and it must be of the rig

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

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.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.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.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

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.