numpy.find_common_type()

numpy.find_common_type(array_types, scalar_types) [source] Determine common type following standard coercion rules. Parameters: array_types : sequence A list of dtypes or dtype convertible objects representing arrays. scalar_types : sequence A list of dtypes or dtype convertible objects representing scalars. Returns: datatype : dtype The common data type, which is the maximum of array_types ignoring scalar_types, unless the maximum of scalar_types is of a different kind (dtype.kind)

matrix.partition()

matrix.partition(kth, axis=-1, kind='introselect', order=None) Rearranges the elements in the array in such a way that value of the element in kth position is in the position it would be in a sorted array. All elements smaller than the kth element are moved before this element and all equal or greater are moved behind it. The ordering of the elements in the two partitions is undefined. New in version 1.8.0. Parameters: kth : int or sequence of ints Element index to partition by. The kth

numpy.polynomial.hermite.hermweight()

numpy.polynomial.hermite.hermweight(x) [source] Weight function of the Hermite polynomials. The weight function is and the interval of integration is . the Hermite polynomials are orthogonal, but not normalized, with respect to this weight function. Parameters: x : array_like Values at which the weight function will be computed. Returns: w : ndarray The weight function at x. Notes

numpy.core.defchararray.count()

numpy.core.defchararray.count(a, sub, start=0, end=None) [source] Returns an array with the number of non-overlapping occurrences of substring sub in the range [start, end]. Calls str.count element-wise. Parameters: a : array_like of str or unicode sub : str or unicode The substring to search for. start, end : int, optional Optional arguments start and end are interpreted as slice notation to specify the range in which to count. Returns: out : ndarray Output array of ints. See al

ndarray.view()

ndarray.view(dtype=None, type=None) New view of array with the same data. Parameters: dtype : data-type or ndarray sub-class, optional Data-type descriptor of the returned view, e.g., float32 or int16. The default, None, results in the view having the same data-type as a. This argument can also be specified as an ndarray sub-class, which then specifies the type of the returned object (this is equivalent to setting the type parameter). type : Python type, optional Type of the returned vi

chararray.sort()

chararray.sort(axis=-1, kind='quicksort', order=None) Sort an array, in-place. Parameters: axis : int, optional Axis along which to sort. Default is -1, which means sort along the last axis. kind : {?quicksort?, ?mergesort?, ?heapsort?}, optional Sorting algorithm. Default is ?quicksort?. order : str or list of str, optional When a is an array with fields defined, this argument specifies which fields to compare first, second, etc. A single field can be specified as a string, and not a

Array creation routines

See also Array creation Ones and zeros empty(shape[, dtype, order]) Return a new array of given shape and type, without initializing entries. empty_like(a[, dtype, order, subok]) Return a new array with the same shape and type as a given array. eye(N[, M, k, dtype]) Return a 2-D array with ones on the diagonal and zeros elsewhere. identity(n[, dtype]) Return the identity array. ones(shape[, dtype, order]) Return a new array of given shape and type, filled with ones. ones_like(a[, dtyp

ndarray.tolist()

ndarray.tolist() Return the array as a (possibly nested) list. Return a copy of the array data as a (nested) Python list. Data items are converted to the nearest compatible Python type. Parameters: none Returns: y : list The possibly nested list of array elements. Notes The array may be recreated, a = np.array(a.tolist()). Examples >>> a = np.array([1, 2]) >>> a.tolist() [1, 2] >>> a = np.array([[1, 2], [3, 4]]) >>> list(a) [array([1, 2]), array([3,

generic.tolist()

generic.tolist() Not implemented (virtual attribute) Class generic exists solely to derive numpy scalars from, and possesses, albeit unimplemented, all the attributes of the ndarray class so as to provide a uniform API. See also The

numpy.polynomial.chebyshev.poly2cheb()

numpy.polynomial.chebyshev.poly2cheb(pol) [source] Convert a polynomial to a Chebyshev series. Convert an array representing the coefficients of a polynomial (relative to the ?standard? basis) ordered from lowest degree to highest, to an array of the coefficients of the equivalent Chebyshev series, ordered from lowest to highest degree. Parameters: pol : array_like 1-D array containing the polynomial coefficients Returns: c : ndarray 1-D array containing the coefficients of the equiva