numpy.searchsorted()

numpy.searchsorted(a, v, side='left', sorter=None) [source] Find indices where elements should be inserted to maintain order. Find the indices into a sorted array a such that, if the corresponding elements in v were inserted before the indices, the order of a would be preserved. Parameters: a : 1-D array_like Input array. If sorter is None, then it must be sorted in ascending order, otherwise sorter must be an array of indices that sort it. v : array_like Values to insert into a. side

numpy.savez()

numpy.savez(file, *args, **kwds) [source] Save several arrays into a single file in uncompressed .npz format. If arguments are passed in with no keywords, the corresponding variable names, in the .npz file, are ?arr_0?, ?arr_1?, etc. If keyword arguments are given, the corresponding variable names, in the .npz file will match the keyword names. Parameters: file : str or file Either the file name (string) or an open file (file-like object) where the data will be saved. If file is a string,

numpy.savez_compressed()

numpy.savez_compressed(file, *args, **kwds) [source] Save several arrays into a single file in compressed .npz format. If keyword arguments are given, then filenames are taken from the keywords. If arguments are passed in with no keywords, then stored file names are arr_0, arr_1, etc. Parameters: file : str File name of .npz file. args : Arguments Function arguments. kwds : Keyword arguments Keywords. See also numpy.savez Save several arrays into an uncompressed .npz file format

numpy.save()

numpy.save(file, arr, allow_pickle=True, fix_imports=True) [source] Save an array to a binary file in NumPy .npy format. Parameters: file : file or str File or filename to which the data is saved. If file is a file-object, then the filename is unchanged. If file is a string, a .npy extension will be appended to the file name if it does not already have one. allow_pickle : bool, optional Allow saving object arrays using Python pickles. Reasons for disallowing pickles include security (lo

numpy.savetxt()

numpy.savetxt(fname, X, fmt='%.18e', delimiter=' ', newline='\n', header='', footer='', comments='# ') [source] Save an array to a text file. Parameters: fname : filename or file handle If the filename ends in .gz, the file is automatically saved in compressed gzip format. loadtxt understands gzipped files transparently. X : array_like Data to be saved to a text file. fmt : str or sequence of strs, optional A single format (%10.5f), a sequence of formats, or a multi-format string, e.g

numpy.r_

numpy.r_ = Translates slice objects to concatenation along the first axis. This is a simple way to build up arrays quickly. There are two use cases. If the index expression contains comma separated arrays, then stack them along their first axis. If the index expression contains slice notation or scalars then create a 1-D array with a range indicated by the slice notation. If slice notation is used, the syntax start:stop:step is equivalent to np.arange(start, stop, step) inside of the brack

numpy.round_()

numpy.round_(a, decimals=0, out=None) [source] Round an array to the given number of decimals. Refer to around for full documentation. See also around equivalent function

numpy.rot90()

numpy.rot90(m, k=1) [source] Rotate an array by 90 degrees in the counter-clockwise direction. The first two dimensions are rotated; therefore, the array must be at least 2-D. Parameters: m : array_like Array of two or more dimensions. k : integer Number of times the array is rotated by 90 degrees. Returns: y : ndarray Rotated array. See also fliplr Flip an array horizontally. flipud Flip an array vertically. Examples >>> m = np.array([[1,2],[3,4]], int) >>&

numpy.roots()

numpy.roots(p) [source] Return the roots of a polynomial with coefficients given in p. The values in the rank-1 array p are coefficients of a polynomial. If the length of p is n+1 then the polynomial is described by: p[0] * x**n + p[1] * x**(n-1) + ... + p[n-1]*x + p[n] Parameters: p : array_like Rank-1 array of polynomial coefficients. Returns: out : ndarray An array containing the complex roots of the polynomial. Raises: ValueError When p cannot be converted to a rank-1 array.

numpy.rollaxis()

numpy.rollaxis(a, axis, start=0) [source] Roll the specified axis backwards, until it lies in a given position. Parameters: a : ndarray Input array. axis : int The axis to roll backwards. The positions of the other axes do not change relative to one another. start : int, optional The axis is rolled until it lies before this position. The default, 0, results in a ?complete? roll. Returns: res : ndarray For Numpy >= 1.10 a view of a is always returned. For earlier Numpy versions