numpy.degrees()

numpy.degrees(x[, out]) = Convert angles from radians to degrees. Parameters: x : array_like Input array in radians. out : ndarray, optional Output array of same shape as x. Returns: y : ndarray of floats The corresponding degree values; if out was supplied this is a reference to it. See also rad2deg equivalent function Examples Convert a radian array to degrees >>> rad = np.arange(12.)*np.pi/6 >>> np.degrees(rad) array([ 0., 30., 60., 90., 120.,

numpy.deg2rad()

numpy.deg2rad(x[, out]) = Convert angles from degrees to radians. Parameters: x : array_like Angles in degrees. Returns: y : ndarray The corresponding angle in radians. See also rad2deg Convert angles from radians to degrees. unwrap Remove large jumps in angle by wrapping. Notes New in version 1.3.0. deg2rad(x) is x * pi / 180. Examples >>> np.deg2rad(180) 3.1415926535897931

numpy.DataSource()

class numpy.DataSource(destpath='.') [source] A generic data source file (file, http, ftp, ...). DataSources can be local files or remote files/URLs. The files may also be compressed or uncompressed. DataSource hides some of the low-level details of downloading the file, allowing you to simply pass in a valid file path (or URL) and obtain a file object. Parameters: destpath : str or None, optional Path to the directory where the source file gets downloaded to for use. If destpath is None,

numpy.c_

numpy.c_ = Translates slice objects to concatenation along the second axis. This is short-hand for np.r_['-1,2,0', index expression], which is useful because of its common occurrence. In particular, arrays will be stacked along their last axis after being upgraded to at least 2-D with 1?s post-pended to the shape (column vectors made out of 1-D arrays). For detailed documentation, see r_. Examples >>> np.c_[np.array([[1,2,3]]), 0, 0, np.array([[4,5,6]])] array([[1, 2, 3, 0, 0, 4,

numpy.cumsum()

numpy.cumsum(a, axis=None, dtype=None, out=None) [source] Return the cumulative sum of the elements along a given axis. Parameters: a : array_like Input array. axis : int, optional Axis along which the cumulative sum is computed. The default (None) is to compute the cumsum over the flattened array. dtype : dtype, optional Type of the returned array and of the accumulator in which the elements are summed. If dtype is not specified, it defaults to the dtype of a, unless a has an integer

numpy.cumprod()

numpy.cumprod(a, axis=None, dtype=None, out=None) [source] Return the cumulative product of elements along a given axis. Parameters: a : array_like Input array. axis : int, optional Axis along which the cumulative product is computed. By default the input is flattened. dtype : dtype, optional Type of the returned array, as well as of the accumulator in which the elements are multiplied. If dtype is not specified, it defaults to the dtype of a, unless a has an integer dtype with a prec

numpy.ctypeslib.as_array()

numpy.ctypeslib.as_array(obj, shape=None) [source] Create a numpy array from a ctypes array or a ctypes POINTER. The numpy array shares the memory with the ctypes object. The size parameter must be given if converting from a ctypes POINTER. The size parameter is ignored if converting from a ctypes array numpy.ctypeslib.as_ctypes(obj) [source] Create and return a ctypes object from a numpy array. Actually anything that exposes the __array_interface__ is accepted. numpy.ctypeslib.ct

numpy.cross()

numpy.cross(a, b, axisa=-1, axisb=-1, axisc=-1, axis=None) [source] Return the cross product of two (arrays of) vectors. The cross product of a and b in is a vector perpendicular to both a and b. If a and b are arrays of vectors, the vectors are defined by the last axis of a and b by default, and these axes can have dimensions 2 or 3. Where the dimension of either a or b is 2, the third component of the input vector is assumed to be zero and the cross product calculated accordingly. In cas

numpy.cov()

numpy.cov(m, y=None, rowvar=True, bias=False, ddof=None, fweights=None, aweights=None) [source] Estimate a covariance matrix, given data and weights. Covariance indicates the level to which two variables vary together. If we examine N-dimensional samples, , then the covariance matrix element is the covariance of and . The element is the variance of . See the notes for an outline of the algorithm. Parameters: m : array_like A 1-D or 2-D array containing multiple variables and observatio

numpy.count_nonzero()

numpy.count_nonzero(a) Counts the number of non-zero values in the array a. Parameters: a : array_like The array for which to count non-zeros. Returns: count : int or array of int Number of non-zero values in the array. See also nonzero Return the coordinates of all the non-zero values. Examples >>> np.count_nonzero(np.eye(4)) 4 >>> np.count_nonzero([[0,1,7,0,0],[3,0,0,2,19]]) 5