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

numpy.setdiff1d(ar1, ar2, assume_unique=False) [source] Find the set difference of two arrays. Return the sorted, unique values in ar1 that are not in ar2. Parameters: ar1 : array_like Input array. ar2 : array_like Input comparison array. assume_unique : bool If True, the input arrays are both assumed to be unique, which can speed up the calculation. Default is False. Returns: setdiff1d : ndarray Sorted 1D array of values in ar1 that are not in ar2. See also numpy.lib.arrayset

record.getfield()

record.getfield()

RandomState.shuffle()

RandomState.shuffle(x) Modify a sequence in-place by shuffling its contents. Parameters: x : array_like The array or list to be shuffled. Returns: None Examples >>> arr = np.arange(10) >>> np.random.shuffle(arr) >>> arr [1 7 5 2 9 4 3 6 0 8] This function only shuffles the array along the first index of a multi-dimensional array: >>> arr = np.arange(9).reshape((3, 3)) >>> np.random.shuffle(arr) >>> arr array([[3, 4, 5], [6,

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.ma.masked_less()

numpy.ma.masked_less(x, value, copy=True) [source] Mask an array where less than a given value. This function is a shortcut to masked_where, with condition = (x < value). See also masked_where Mask where a condition is met. Examples >>> import numpy.ma as ma >>> a = np.arange(4) >>> a array([0, 1, 2, 3]) >>> ma.masked_less(a, 2) masked_array(data = [-- -- 2 3], mask = [ True True False False], fill_value=999999)

numpy.polynomial.polynomial.polyroots()

numpy.polynomial.polynomial.polyroots(c) [source] Compute the roots of a polynomial. Return the roots (a.k.a. ?zeros?) of the polynomial Parameters: c : 1-D array_like 1-D array of polynomial coefficients. Returns: out : ndarray Array of the roots of the polynomial. If all the roots are real, then out is also real, otherwise it is complex. See also chebroots Notes The root estimates are obtained as the eigenvalues of the companion matrix, Roots far from the origin of the comple

chararray.dump()

chararray.dump(file) Dump a pickle of the array to the specified file. The array can be read back with pickle.load or numpy.load. Parameters: file : str A string naming the dump file.

ndarray.base

ndarray.base Base object if memory is from some other object. Examples The base of an array that owns its memory is None: >>> x = np.array([1,2,3,4]) >>> x.base is None True Slicing creates a view, whose memory is shared with x: >>> y = x[2:] >>> y.base is x True

numpy.ma.expand_dims()

numpy.ma.expand_dims(x, axis) [source] Expand the shape of an array. Expands the shape of the array by including a new axis before the one specified by the axis parameter. This function behaves the same as numpy.expand_dims but preserves masked elements. See also numpy.expand_dims Equivalent function in top-level NumPy module. Examples >>> import numpy.ma as ma >>> x = ma.array([1, 2, 4]) >>> x[1] = ma.masked >>> x masked_array(data = [1 -- 4],