numpy.generic

class numpy.generic [source] Base class for numpy scalar types. Class from which most (all?) numpy scalar types are derived. For consistency, exposes the same API as ndarray, despite many consequent attributes being either ?get-only,? or completely irrelevant. This is the class from which it is strongly suggested users should derive custom scalar types. Attributes T transpose base base object data pointer to start of data dtype get array data-descriptor flags integer value of flags flat a 1

numpy.fv()

numpy.fv(rate, nper, pmt, pv, when='end') [source] Compute the future value. Given: a present value, pv an interest rate compounded once per period, of which there are nper total a (fixed) payment, pmt, paid either at the beginning (when = {?begin?, 1}) or the end (when = {?end?, 0}) of each period Return: the value at the end of the nper periods Parameters: rate : scalar or array_like of shape(M, ) Rate of interest as decimal (not per cent) per period nper : scalar or array_like of

numpy.full_like()

numpy.full_like(a, fill_value, dtype=None, order='K', subok=True) [source] Return a full array 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. fill_value : scalar Fill value. dtype : data-type, optional Overrides the data type of the result. 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? i

numpy.full()

numpy.full(shape, fill_value, dtype=None, order='C') [source] Return a new array of given shape and type, filled with fill_value. Parameters: shape : int or sequence of ints Shape of the new array, e.g., (2, 3) or 2. fill_value : scalar Fill value. dtype : data-type, optional The desired data-type for the array, e.g., np.int8. Default is float, but will change to np.array(fill_value).dtype in a future release. order : {?C?, ?F?}, optional Whether to store multidimensional data in C-

numpy.fromstring()

numpy.fromstring(string, dtype=float, count=-1, sep='') A new 1-D array initialized from raw binary or text data in a string. Parameters: string : str A string containing the data. dtype : data-type, optional The data type of the array; default: float. For binary input data, the data must be in exactly this format. count : int, optional Read this number of dtype elements from the data. If this is negative (the default), the count will be determined from the length of the data. sep :

numpy.fromregex()

numpy.fromregex(file, regexp, dtype) [source] Construct an array from a text file, using regular expression parsing. The returned array is always a structured array, and is constructed from all matches of the regular expression in the file. Groups in the regular expression are converted to fields of the structured array. Parameters: file : str or file File name or file object to read. regexp : str or regexp Regular expression used to parse the file. Groups in the regular expression corr

numpy.frompyfunc()

numpy.frompyfunc(func, nin, nout) Takes an arbitrary Python function and returns a Numpy ufunc. Can be used, for example, to add broadcasting to a built-in Python function (see Examples section). Parameters: func : Python function object An arbitrary Python function. nin : int The number of input arguments. nout : int The number of objects returned by func. Returns: out : ufunc Returns a Numpy universal function (ufunc) object. Notes The returned ufunc always returns PyObject ar

numpy.fromiter()

numpy.fromiter(iterable, dtype, count=-1) Create a new 1-dimensional array from an iterable object. Parameters: iterable : iterable object An iterable object providing data for the array. dtype : data-type The data-type of the returned array. count : int, optional The number of items to read from iterable. The default is -1, which means all data is read. Returns: out : ndarray The output array. Notes Specify count to improve performance. It allows fromiter to pre-allocate the ou

numpy.fromfunction()

numpy.fromfunction(function, shape, **kwargs) [source] Construct an array by executing a function over each coordinate. The resulting array therefore has a value fn(x, y, z) at coordinate (x, y, z). Parameters: function : callable The function is called with N parameters, where N is the rank of shape. Each parameter represents the coordinates of the array varying along a specific axis. For example, if shape were (2, 2), then the parameters in turn be (0, 0), (0, 1), (1, 0), (1, 1). shape

numpy.fromfile()

numpy.fromfile(file, dtype=float, count=-1, sep='') Construct an array from data in a text or binary file. A highly efficient way of reading binary data with a known data-type, as well as parsing simply formatted text files. Data written using the tofile method can be read using this function. Parameters: file : file or str Open file object or filename. dtype : data-type Data type of the returned array. For binary files, it is used to determine the size and byte-order of the items in th