numpy.source()

numpy.source(object, output=', mode 'w' at 0x402ae078>) [source] Print or write to a file the source code for a Numpy object. The source code is only returned for objects written in Python. Many functions and classes are defined in C and will therefore not return useful information. Parameters: object : numpy object Input object. This can be any object (function, class, module, ...). output : file object, optional If output not supplied then source code is printed to screen (sys.stdo

numpy.matlib.empty()

numpy.matlib.empty(shape, dtype=None, order='C') [source] Return a new matrix of given shape and type, without initializing entries. Parameters: shape : int or tuple of int Shape of the empty matrix. dtype : data-type, optional Desired output data-type. order : {?C?, ?F?}, optional Whether to store multi-dimensional data in row-major (C-style) or column-major (Fortran-style) order in memory. See also empty_like, zeros Notes empty, unlike zeros, does not set the matrix values to ze

recarray.tofile()

recarray.tofile(fid, sep="", format="%s") Write array to a file as text or binary (default). Data is always written in ?C? order, independent of the order of a. The data produced by this method can be recovered using the function fromfile(). Parameters: fid : file or str An open file object, or a string containing a filename. sep : str Separator between array items for text output. If ?? (empty), a binary file is written, equivalent to file.write(a.tobytes()). format : str Format stri

numpy.polynomial.hermite.hermtrim()

numpy.polynomial.hermite.hermtrim(c, tol=0) [source] Remove ?small? ?trailing? coefficients from a polynomial. ?Small? means ?small in absolute value? and is controlled by the parameter tol; ?trailing? means highest order coefficient(s), e.g., in [0, 1, 1, 0, 0] (which represents 0 + x + x**2 + 0*x**3 + 0*x**4) both the 3-rd and 4-th order coefficients would be ?trimmed.? Parameters: c : array_like 1-d array of coefficients, ordered from lowest order to highest. tol : number, optional T

MaskedArray.count()

MaskedArray.count(axis=None) [source] Count the non-masked elements of the array along the given axis. Parameters: axis : int, optional Axis along which to count the non-masked elements. If axis is None, all non-masked elements are counted. Returns: result : int or ndarray If axis is None, an integer count is returned. When axis is not None, an array with shape determined by the lengths of the remaining axes, is returned. See also count_masked Count masked elements in array or a

recarray.swapaxes()

recarray.swapaxes(axis1, axis2) Return a view of the array with axis1 and axis2 interchanged. Refer to numpy.swapaxes for full documentation. See also numpy.swapaxes equivalent function

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

HermiteE.has_sametype()

HermiteE.has_sametype(other) [source] Check if types match. New in version 1.7.0. Parameters: other : object Class instance. Returns: bool : boolean True if other is same class as self

Legendre.has_samecoef()

Legendre.has_samecoef(other) [source] Check if coefficients match. New in version 1.6.0. Parameters: other : class instance The other class must have the coef attribute. Returns: bool : boolean True if the coefficients are the same, False otherwise.

numpy.ma.make_mask_descr()

numpy.ma.make_mask_descr(ndtype) [source] Construct a dtype description list from a given dtype. Returns a new dtype object, with the type of all fields in ndtype to a boolean type. Field names are not altered. Parameters: ndtype : dtype The dtype to convert. Returns: result : dtype A dtype that looks like ndtype, the type of all fields is boolean. Examples >>> import numpy.ma as ma >>> dtype = np.dtype({'names':['foo', 'bar'], 'formats':[np.f