numpy.mod()

numpy.mod(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 right sha

numpy.mirr()

numpy.mirr(values, finance_rate, reinvest_rate) [source] Modified internal rate of return. Parameters: values : array_like Cash flows (must contain at least one positive and one negative value) or nan is returned. The first value is considered a sunk cost at time zero. finance_rate : scalar Interest rate paid on the cash flows reinvest_rate : scalar Interest rate received on the cash flows upon reinvestment Returns: out : float Modified internal rate of return

numpy.min_scalar_type()

numpy.min_scalar_type(a) For scalar a, returns the data type with the smallest size and smallest scalar kind which can hold its value. For non-scalar array a, returns the vector?s dtype unmodified. Floating point values are not demoted to integers, and complex values are not demoted to floats. Parameters: a : scalar or array_like The value whose minimal data type is to be found. Returns: out : dtype The minimal data type. See also result_type, promote_types, dtype, can_cast Notes

numpy.mintypecode()

numpy.mintypecode(typechars, typeset='GDFgdf', default='d') [source] Return the character for the minimum-size type to which given types can be safely cast. The returned type character must represent the smallest size dtype such that an array of the returned type can handle the data from an array of all types in typechars (or if typechars is an array, then its dtype.char). Parameters: typechars : list of str or array_like If a list of strings, each string should represent a dtype. If arra

numpy.minimum()

numpy.minimum(x1, x2[, out]) = Element-wise minimum of array elements. Compare two arrays and returns a new array containing the element-wise minima. If one of the elements being compared is a NaN, then that element is returned. If both elements are NaNs then the first is returned. The latter distinction is important for complex NaNs, which are defined as at least one of the real or imaginary parts being a NaN. The net effect is that NaNs are propagated. Parameters: x1, x2 : array_like T

numpy.mgrid

numpy.mgrid = nd_grid instance which returns a dense multi-dimensional ?meshgrid?. An instance of numpy.lib.index_tricks.nd_grid which returns an dense (or fleshed out) mesh-grid when indexed, so that each returned argument has the same shape. The dimensions and number of the output arrays are equal to the number of indexing dimensions. If the step length is not a complex number, then the stop is not inclusive. However, if the step length is a complex number (e.g. 5j), then the integer par

numpy.meshgrid()

numpy.meshgrid(*xi, **kwargs) [source] Return coordinate matrices from coordinate vectors. Make N-D coordinate arrays for vectorized evaluations of N-D scalar/vector fields over N-D grids, given one-dimensional coordinate arrays x1, x2,..., xn. Changed in version 1.9: 1-D and 0-D cases are allowed. Parameters: x1, x2,..., xn : array_like 1-D arrays representing the coordinates of a grid. indexing : {?xy?, ?ij?}, optional Cartesian (?xy?, default) or matrix (?ij?) indexing of output. S

numpy.memmap

class numpy.memmap [source] Create a memory-map to an array stored in a binary file on disk. Memory-mapped files are used for accessing small segments of large files on disk, without reading the entire file into memory. Numpy?s memmap?s are array-like objects. This differs from Python?s mmap module, which uses file-like objects. This subclass of ndarray has some unpleasant interactions with some operations, because it doesn?t quite fit properly as a subclass. An alternative to using this su

numpy.median()

numpy.median(a, axis=None, out=None, overwrite_input=False, keepdims=False) [source] Compute the median along the specified axis. Returns the median of the array elements. 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 axes is supported since version 1.9.0. out : n

numpy.mean()

numpy.mean(a, axis=None, dtype=None, out=None, keepdims=False) [source] Compute the arithmetic mean along the specified axis. Returns the average of the array elements. The average is taken over the flattened array by default, otherwise over the specified axis. float64 intermediate and return values are used for integer inputs. Parameters: a : array_like Array containing numbers whose mean is desired. If a is not an array, a conversion is attempted. axis : None or int or tuple of ints, o