numpy.ones_like()

numpy.ones_like(a, dtype=None, order='K', subok=True) [source] Return an array of ones with the same shape and type as a given array. Parameters: a : array_like The shape and data-type of a define these same attributes of the returned array. dtype : data-type, optional Overrides the data type of the result. New in version 1.6.0. order : {?C?, ?F?, ?A?, or ?K?}, optional Overrides the memory layout of the result. ?C? means C-order, ?F? means F-order, ?A? means ?F? if a is Fortran con

numpy.ones()

numpy.ones(shape, dtype=None, order='C') [source] Return a new array of given shape and type, filled with ones. Parameters: shape : int or sequence of ints Shape of the new array, e.g., (2, 3) or 2. dtype : data-type, optional The desired data-type for the array, e.g., numpy.int8. Default is numpy.float64. order : {?C?, ?F?}, optional Whether to store multidimensional data in C- or Fortran-contiguous (row- or column-wise) order in memory. Returns: out : ndarray Array of ones with

numpy.ogrid

numpy.ogrid = nd_grid instance which returns an open multi-dimensional ?meshgrid?. An instance of numpy.lib.index_tricks.nd_grid which returns an open (i.e. not fleshed out) mesh-grid when indexed, so that only one dimension of each returned array is greater than 1. The dimension 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)

numpy.obj2sctype()

numpy.obj2sctype(rep, default=None) [source] Return the scalar dtype or NumPy equivalent of Python type of an object. Parameters: rep : any The object of which the type is returned. default : any, optional If given, this is returned for objects whose types can not be determined. If not given, None is returned for those objects. Returns: dtype : dtype or Python type The data type of rep. See also sctype2char, issctype, issubsctype, issubdtype, maximum_sctype Examples >>>

numpy.npv()

numpy.npv(rate, values) [source] Returns the NPV (Net Present Value) of a cash flow series. Parameters: rate : scalar The discount rate. values : array_like, shape(M, ) The values of the time series of cash flows. The (fixed) time interval between cash flow ?events? must be the same as that for which rate is given (i.e., if rate is per year, then precisely a year is understood to elapse between each cash flow event). By convention, investments or ?deposits? are negative, income or ?with

numpy.nper()

numpy.nper(rate, pmt, pv, fv=0, when='end') [source] Compute the number of periodic payments. Parameters: rate : array_like Rate of interest (per period) pmt : array_like Payment pv : array_like Present value fv : array_like, optional Future value when : {{?begin?, 1}, {?end?, 0}}, {string, int}, optional When payments are due (?begin? (1) or ?end? (0)) Notes The number of periods nper is computed by solving the equation: fv + pv*(1+rate)**nper + pmt*(1+rate*when)/rate*((1+rate)

numpy.not_equal()

numpy.not_equal(x1, x2[, out]) = Return (x1 != x2) element-wise. Parameters: x1, x2 : array_like Input arrays. out : ndarray, optional A placeholder the same shape as x1 to store the result. See doc.ufuncs (Section ?Output arguments?) for more details. Returns: not_equal : ndarray bool, scalar bool For each element in x1, x2, return True if x1 is not equal to x2 and False otherwise. See also equal, greater, greater_equal, less, less_equal Examples >>> np.not_equal([1.,

numpy.nonzero()

numpy.nonzero(a) [source] Return the indices of the elements that are non-zero. Returns a tuple of arrays, one for each dimension of a, containing the indices of the non-zero elements in that dimension. The values in a are always tested and returned in row-major, C-style order. The corresponding non-zero values can be obtained with: a[nonzero(a)] To group the indices by element, rather than dimension, use: transpose(nonzero(a)) The result of this is always a 2-D array, with a row for each

numpy.newbuffer()

numpy.newbuffer(size) Return a new uninitialized buffer object. Parameters: size : int Size in bytes of returned buffer object. Returns: newbuffer : buffer object Returned, uninitialized buffer object of size bytes.

numpy.newaxis

ndarrays can be indexed using the standard Python x[obj] syntax, where x is the array and obj the selection. There are three kinds of indexing available: field access, basic slicing, advanced indexing. Which one occurs depends on obj. Note In Python, x[(exp1, exp2, ..., expN)] is equivalent to x[exp1, exp2, ..., expN]; the latter is just syntactic sugar for the former. Basic Slicing and Indexing Basic slicing extends Python?s basic concept of slicing to N dimensions. Basic slicing occurs wh