doc_content stringlengths 1 386k | doc_id stringlengths 5 188 |
|---|---|
numpy.generic.squeeze method generic.squeeze()
Scalar method identical to the corresponding array attribute. Please see ndarray.squeeze. | numpy.reference.generated.numpy.generic.squeeze |
numpy.generic.strides attribute generic.strides
Tuple of bytes steps in each dimension. | numpy.reference.generated.numpy.generic.strides |
numpy.generic.T attribute generic.T
Scalar attribute identical to the corresponding array attribute. Please see ndarray.T. | numpy.reference.generated.numpy.generic.t |
get_build_temp_dir()[source]
Return a path to a temporary directory where temporary files should be placed. | numpy.reference.distutils#numpy.distutils.misc_util.Configuration.get_build_temp_dir |
get_config_cmd()[source]
Returns the numpy.distutils config command instance. | numpy.reference.distutils#numpy.distutils.misc_util.Configuration.get_config_cmd |
get_distribution()[source]
Return the distutils distribution object for self. | numpy.reference.distutils#numpy.distutils.misc_util.Configuration.get_distribution |
get_info(*names)[source]
Get resources information. Return information (from system_info.get_info) for all of the names in the argument list in a single dictionary. | numpy.reference.distutils#numpy.distutils.misc_util.Configuration.get_info |
get_subpackage(subpackage_name, subpackage_path=None, parent_name=None, caller_level=1)[source]
Return list of subpackage configurations. Parameters
subpackage_namestr or None
Name of the subpackage to get the configuration. ‘*’ in subpackage_name is handled as a wildcard.
subpackage_pathstr
If None, then t... | numpy.reference.distutils#numpy.distutils.misc_util.Configuration.get_subpackage |
get_version(version_file=None, version_variable=None)[source]
Try to get version string of a package. Return a version string of the current package or None if the version information could not be detected. Notes This method scans files named __version__.py, <packagename>_version.py, version.py, and __svn_version__.p... | numpy.reference.distutils#numpy.distutils.misc_util.Configuration.get_version |
have_f77c()[source]
Check for availability of Fortran 77 compiler. Use it inside source generating function to ensure that setup distribution instance has been initialized. Notes True if a Fortran 77 compiler is available (because a simple Fortran 77 code was able to be compiled successfully). | numpy.reference.distutils#numpy.distutils.misc_util.Configuration.have_f77c |
have_f90c()[source]
Check for availability of Fortran 90 compiler. Use it inside source generating function to ensure that setup distribution instance has been initialized. Notes True if a Fortran 90 compiler is available (because a simple Fortran 90 code was able to be compiled successfully) | numpy.reference.distutils#numpy.distutils.misc_util.Configuration.have_f90c |
numpy.i: a SWIG Interface File for NumPy Introduction The Simple Wrapper and Interface Generator (or SWIG) is a powerful tool for generating wrapper code for interfacing to a wide variety of scripting languages. SWIG can parse header files, and using only the code prototypes, create an interface to the target language... | numpy.reference.swig.interface-file |
numpy.lib.format.descr_to_dtype lib.format.descr_to_dtype(descr)[source]
Returns a dtype based off the given description. This is essentially the reverse of dtype_to_descr(). It will remove the valueless padding fields created by, i.e. simple fields like dtype(‘float32’), and then convert the description to its cor... | numpy.reference.generated.numpy.lib.format.descr_to_dtype |
numpy.lib.format.dtype_to_descr lib.format.dtype_to_descr(dtype)[source]
Get a serializable descriptor from the dtype. The .descr attribute of a dtype object cannot be round-tripped through the dtype() constructor. Simple types, like dtype(‘float32’), have a descr which looks like a record array with one field with... | numpy.reference.generated.numpy.lib.format.dtype_to_descr |
numpy.lib.format.header_data_from_array_1_0 lib.format.header_data_from_array_1_0(array)[source]
Get the dictionary of header metadata from a numpy.ndarray. Parameters
arraynumpy.ndarray
Returns
ddict
This has the appropriate entries for writing its string representation to the header of the file. | numpy.reference.generated.numpy.lib.format.header_data_from_array_1_0 |
numpy.lib.format.magic lib.format.magic(major, minor)[source]
Return the magic string for the given file format version. Parameters
majorint in [0, 255]
minorint in [0, 255]
Returns
magicstr
Raises
ValueError if the version cannot be formatted. | numpy.reference.generated.numpy.lib.format.magic |
numpy.lib.format.open_memmap lib.format.open_memmap(filename, mode='r+', dtype=None, shape=None, fortran_order=False, version=None)[source]
Open a .npy file as a memory-mapped array. This may be used to read an existing file or create a new one. Parameters
filenamestr or path-like
The name of the file on disk... | numpy.reference.generated.numpy.lib.format.open_memmap |
numpy.lib.format.read_array lib.format.read_array(fp, allow_pickle=False, pickle_kwargs=None)[source]
Read an array from an NPY file. Parameters
fpfile_like object
If this is not a real file object, then this may take extra memory and time.
allow_picklebool, optional
Whether to allow writing pickled data.... | numpy.reference.generated.numpy.lib.format.read_array |
numpy.lib.format.read_array_header_1_0 lib.format.read_array_header_1_0(fp)[source]
Read an array header from a filelike object using the 1.0 file format version. This will leave the file object located just after the header. Parameters
fpfilelike object
A file object or something with a read() method like a ... | numpy.reference.generated.numpy.lib.format.read_array_header_1_0 |
numpy.lib.format.read_array_header_2_0 lib.format.read_array_header_2_0(fp)[source]
Read an array header from a filelike object using the 2.0 file format version. This will leave the file object located just after the header. New in version 1.9.0. Parameters
fpfilelike object
A file object or something with... | numpy.reference.generated.numpy.lib.format.read_array_header_2_0 |
numpy.lib.format.read_magic lib.format.read_magic(fp)[source]
Read the magic string to get the version of the file format. Parameters
fpfilelike object
Returns
majorint
minorint | numpy.reference.generated.numpy.lib.format.read_magic |
numpy.lib.format.write_array lib.format.write_array(fp, array, version=None, allow_pickle=True, pickle_kwargs=None)[source]
Write an array to an NPY file, including a header. If the array is neither C-contiguous nor Fortran-contiguous AND the file_like object is not a real file object, this function will have to co... | numpy.reference.generated.numpy.lib.format.write_array |
numpy.lib.format.write_array_header_1_0 lib.format.write_array_header_1_0(fp, d)[source]
Write the header for an array using the 1.0 format. Parameters
fpfilelike object
ddict
This has the appropriate entries for writing its string representation to the header of the file. | numpy.reference.generated.numpy.lib.format.write_array_header_1_0 |
numpy.lib.format.write_array_header_2_0 lib.format.write_array_header_2_0(fp, d)[source]
Write the header for an array using the 2.0 format.
The 2.0 format allows storing very large structured arrays. New in version 1.9.0. Parameters
fpfilelike object
ddict
This has the appropriate entries for writing... | numpy.reference.generated.numpy.lib.format.write_array_header_2_0 |
numpy.lib.scimath.arccos lib.scimath.arccos(x)[source]
Compute the inverse cosine of x. Return the “principal value” (for a description of this, see numpy.arccos) of the inverse cosine of x. For real x such that abs(x) <= 1, this is a real number in the closed interval \([0, \pi]\). Otherwise, the complex principle... | numpy.reference.generated.numpy.lib.scimath.arccos |
numpy.lib.scimath.arcsin lib.scimath.arcsin(x)[source]
Compute the inverse sine of x. Return the “principal value” (for a description of this, see numpy.arcsin) of the inverse sine of x. For real x such that abs(x) <= 1, this is a real number in the closed interval \([-\pi/2, \pi/2]\). Otherwise, the complex princi... | numpy.reference.generated.numpy.lib.scimath.arcsin |
numpy.lib.scimath.arctanh lib.scimath.arctanh(x)[source]
Compute the inverse hyperbolic tangent of x. Return the “principal value” (for a description of this, see numpy.arctanh) of arctanh(x). For real x such that abs(x) < 1, this is a real number. If abs(x) > 1, or if x is complex, the result is complex. Finally, ... | numpy.reference.generated.numpy.lib.scimath.arctanh |
numpy.lib.scimath.log lib.scimath.log(x)[source]
Compute the natural logarithm of x. Return the “principal value” (for a description of this, see numpy.log) of \(log_e(x)\). For real x > 0, this is a real number (log(0) returns -inf and log(np.inf) returns inf). Otherwise, the complex principle value is returned. ... | numpy.reference.generated.numpy.lib.scimath.log |
numpy.lib.scimath.log10 lib.scimath.log10(x)[source]
Compute the logarithm base 10 of x. Return the “principal value” (for a description of this, see numpy.log10) of \(log_{10}(x)\). For real x > 0, this is a real number (log10(0) returns -inf and log10(np.inf) returns inf). Otherwise, the complex principle value i... | numpy.reference.generated.numpy.lib.scimath.log10 |
numpy.lib.scimath.log2 lib.scimath.log2(x)[source]
Compute the logarithm base 2 of x. Return the “principal value” (for a description of this, see numpy.log2) of \(log_2(x)\). For real x > 0, this is a real number (log2(0) returns -inf and log2(np.inf) returns inf). Otherwise, the complex principle value is returne... | numpy.reference.generated.numpy.lib.scimath.log2 |
numpy.lib.scimath.logn lib.scimath.logn(n, x)[source]
Take log base n of x. If x contains negative inputs, the answer is computed and returned in the complex domain. Parameters
narray_like
The integer base(s) in which the log is taken.
xarray_like
The value(s) whose log base n is (are) required. Return... | numpy.reference.generated.numpy.lib.scimath.logn |
numpy.lib.scimath.power lib.scimath.power(x, p)[source]
Return x to the power p, (x**p). If x contains negative values, the output is converted to the complex domain. Parameters
xarray_like
The input value(s).
parray_like of ints
The power(s) to which x is raised. If x contains multiple values, p has to e... | numpy.reference.generated.numpy.lib.scimath.power |
numpy.lib.scimath.sqrt lib.scimath.sqrt(x)[source]
Compute the square root of x. For negative input elements, a complex value is returned (unlike numpy.sqrt which returns NaN). Parameters
xarray_like
The input value(s). Returns
outndarray or scalar
The square root of x. If x was a scalar, so is out, o... | numpy.reference.generated.numpy.lib.scimath.sqrt |
numpy.lib.stride_tricks.as_strided lib.stride_tricks.as_strided(x, shape=None, strides=None, subok=False, writeable=True)[source]
Create a view into the array with the given shape and strides. Warning This function has to be used with extreme care, see notes. Parameters
xndarray
Array to create a new.
sha... | numpy.reference.generated.numpy.lib.stride_tricks.as_strided |
numpy.lib.stride_tricks.sliding_window_view lib.stride_tricks.sliding_window_view(x, window_shape, axis=None, *, subok=False, writeable=False)[source]
Create a sliding window view into the array with the given window shape. Also known as rolling or moving window, the window slides across all dimensions of the array... | numpy.reference.generated.numpy.lib.stride_tricks.sliding_window_view |
numpy.linalg.cholesky linalg.cholesky(a)[source]
Cholesky decomposition. Return the Cholesky decomposition, L * L.H, of the square matrix a, where L is lower-triangular and .H is the conjugate transpose operator (which is the ordinary transpose if a is real-valued). a must be Hermitian (symmetric if real-valued) an... | numpy.reference.generated.numpy.linalg.cholesky |
numpy.linalg.cond linalg.cond(x, p=None)[source]
Compute the condition number of a matrix. This function is capable of returning the condition number using one of seven different norms, depending on the value of p (see Parameters below). Parameters
x(…, M, N) array_like
The matrix whose condition number is so... | numpy.reference.generated.numpy.linalg.cond |
numpy.linalg.det linalg.det(a)[source]
Compute the determinant of an array. Parameters
a(…, M, M) array_like
Input array to compute determinants for. Returns
det(…) array_like
Determinant of a. See also slogdet
Another way to represent the determinant, more suitable for large matrices where und... | numpy.reference.generated.numpy.linalg.det |
numpy.linalg.eig linalg.eig(a)[source]
Compute the eigenvalues and right eigenvectors of a square array. Parameters
a(…, M, M) array
Matrices for which the eigenvalues and right eigenvectors will be computed Returns
w(…, M) array
The eigenvalues, each repeated according to its multiplicity. The eigenv... | numpy.reference.generated.numpy.linalg.eig |
numpy.linalg.eigh linalg.eigh(a, UPLO='L')[source]
Return the eigenvalues and eigenvectors of a complex Hermitian (conjugate symmetric) or a real symmetric matrix. Returns two objects, a 1-D array containing the eigenvalues of a, and a 2-D square array or matrix (depending on the input type) of the corresponding ei... | numpy.reference.generated.numpy.linalg.eigh |
numpy.linalg.eigvals linalg.eigvals(a)[source]
Compute the eigenvalues of a general matrix. Main difference between eigvals and eig: the eigenvectors aren’t returned. Parameters
a(…, M, M) array_like
A complex- or real-valued matrix whose eigenvalues will be computed. Returns
w(…, M,) ndarray
The eige... | numpy.reference.generated.numpy.linalg.eigvals |
numpy.linalg.eigvalsh linalg.eigvalsh(a, UPLO='L')[source]
Compute the eigenvalues of a complex Hermitian or real symmetric matrix. Main difference from eigh: the eigenvectors are not computed. Parameters
a(…, M, M) array_like
A complex- or real-valued matrix whose eigenvalues are to be computed.
UPLO{‘L’, ... | numpy.reference.generated.numpy.linalg.eigvalsh |
numpy.linalg.inv linalg.inv(a)[source]
Compute the (multiplicative) inverse of a matrix. Given a square matrix a, return the matrix ainv satisfying dot(a, ainv) = dot(ainv, a) = eye(a.shape[0]). Parameters
a(…, M, M) array_like
Matrix to be inverted. Returns
ainv(…, M, M) ndarray or matrix
(Multiplica... | numpy.reference.generated.numpy.linalg.inv |
numpy.linalg.LinAlgError exception linalg.LinAlgError[source]
Generic Python-exception-derived object raised by linalg functions. General purpose exception class, derived from Python’s exception.Exception class, programmatically raised in linalg functions when a Linear Algebra-related condition would prevent furthe... | numpy.reference.generated.numpy.linalg.linalgerror |
numpy.linalg.lstsq linalg.lstsq(a, b, rcond='warn')[source]
Return the least-squares solution to a linear matrix equation. Computes the vector x that approximately solves the equation a @ x = b. The equation may be under-, well-, or over-determined (i.e., the number of linearly independent rows of a can be less tha... | numpy.reference.generated.numpy.linalg.lstsq |
numpy.linalg.matrix_power linalg.matrix_power(a, n)[source]
Raise a square matrix to the (integer) power n. For positive integers n, the power is computed by repeated matrix squarings and matrix multiplications. If n == 0, the identity matrix of the same shape as M is returned. If n < 0, the inverse is computed and... | numpy.reference.generated.numpy.linalg.matrix_power |
numpy.linalg.matrix_rank linalg.matrix_rank(A, tol=None, hermitian=False)[source]
Return matrix rank of array using SVD method Rank of the array is the number of singular values of the array that are greater than tol. Changed in version 1.14: Can now operate on stacks of matrices Parameters
A{(M,), (…, M, N)}... | numpy.reference.generated.numpy.linalg.matrix_rank |
numpy.linalg.multi_dot linalg.multi_dot(arrays, *, out=None)[source]
Compute the dot product of two or more arrays in a single function call, while automatically selecting the fastest evaluation order. multi_dot chains numpy.dot and uses optimal parenthesization of the matrices [1] [2]. Depending on the shapes of t... | numpy.reference.generated.numpy.linalg.multi_dot |
numpy.linalg.norm linalg.norm(x, ord=None, axis=None, keepdims=False)[source]
Matrix or vector norm. This function is able to return one of eight different matrix norms, or one of an infinite number of vector norms (described below), depending on the value of the ord parameter. Parameters
xarray_like
Input ar... | numpy.reference.generated.numpy.linalg.norm |
numpy.linalg.pinv linalg.pinv(a, rcond=1e-15, hermitian=False)[source]
Compute the (Moore-Penrose) pseudo-inverse of a matrix. Calculate the generalized inverse of a matrix using its singular-value decomposition (SVD) and including all large singular values. Changed in version 1.14: Can now operate on stacks of ma... | numpy.reference.generated.numpy.linalg.pinv |
numpy.linalg.qr linalg.qr(a, mode='reduced')[source]
Compute the qr factorization of a matrix. Factor the matrix a as qr, where q is orthonormal and r is upper-triangular. Parameters
aarray_like, shape (…, M, N)
An array-like object with the dimensionality of at least 2.
mode{‘reduced’, ‘complete’, ‘r’, ‘ra... | numpy.reference.generated.numpy.linalg.qr |
numpy.linalg.slogdet linalg.slogdet(a)[source]
Compute the sign and (natural) logarithm of the determinant of an array. If an array has a very small or very large determinant, then a call to det may overflow or underflow. This routine is more robust against such issues, because it computes the logarithm of the dete... | numpy.reference.generated.numpy.linalg.slogdet |
numpy.linalg.solve linalg.solve(a, b)[source]
Solve a linear matrix equation, or system of linear scalar equations. Computes the “exact” solution, x, of the well-determined, i.e., full rank, linear matrix equation ax = b. Parameters
a(…, M, M) array_like
Coefficient matrix.
b{(…, M,), (…, M, K)}, array_like... | numpy.reference.generated.numpy.linalg.solve |
numpy.linalg.svd linalg.svd(a, full_matrices=True, compute_uv=True, hermitian=False)[source]
Singular Value Decomposition. When a is a 2D array, it is factorized as u @ np.diag(s) @ vh
= (u * s) @ vh, where u and vh are 2D unitary arrays and s is a 1D array of a’s singular values. When a is higher-dimensional, SVD ... | numpy.reference.generated.numpy.linalg.svd |
numpy.linalg.tensorinv linalg.tensorinv(a, ind=2)[source]
Compute the ‘inverse’ of an N-dimensional array. The result is an inverse for a relative to the tensordot operation tensordot(a, b, ind), i. e., up to floating-point accuracy, tensordot(tensorinv(a), a, ind) is the “identity” tensor for the tensordot operati... | numpy.reference.generated.numpy.linalg.tensorinv |
numpy.linalg.tensorsolve linalg.tensorsolve(a, b, axes=None)[source]
Solve the tensor equation a x = b for x. It is assumed that all indices of x are summed over in the product, together with the rightmost indices of a, as is done in, for example, tensordot(a, x, axes=b.ndim). Parameters
aarray_like
Coefficie... | numpy.reference.generated.numpy.linalg.tensorsolve |
numpy.ma.all ma.all(self, axis=None, out=None, keepdims=<no value>) = <numpy.ma.core._frommethod object>
Returns True if all elements evaluate to True. The output array is masked where all the values along the given axis are masked: if the output would have been a scalar and that all the values are masked, then the... | numpy.reference.generated.numpy.ma.all |
numpy.ma.allclose ma.allclose(a, b, masked_equal=True, rtol=1e-05, atol=1e-08)[source]
Returns True if two arrays are element-wise equal within a tolerance. This function is equivalent to allclose except that masked values are treated as equal (default) or unequal, depending on the masked_equal argument. Parameter... | numpy.reference.generated.numpy.ma.allclose |
numpy.ma.allequal ma.allequal(a, b, fill_value=True)[source]
Return True if all entries of a and b are equal, using fill_value as a truth value where either or both are masked. Parameters
a, barray_like
Input arrays to compare.
fill_valuebool, optional
Whether masked values in a or b are considered equal ... | numpy.reference.generated.numpy.ma.allequal |
numpy.ma.anom ma.anom(self, axis=None, dtype=None) = <numpy.ma.core._frommethod object>
Compute the anomalies (deviations from the arithmetic mean) along the given axis. Returns an array of anomalies, with the same shape as the input and where the arithmetic mean is computed along the given axis. Parameters
axi... | numpy.reference.generated.numpy.ma.anom |
numpy.ma.anomalies ma.anomalies(self, axis=None, dtype=None) = <numpy.ma.core._frommethod object>
Compute the anomalies (deviations from the arithmetic mean) along the given axis. Returns an array of anomalies, with the same shape as the input and where the arithmetic mean is computed along the given axis. Paramet... | numpy.reference.generated.numpy.ma.anomalies |
numpy.ma.any ma.any(self, axis=None, out=None, keepdims=<no value>) = <numpy.ma.core._frommethod object>
Returns True if any of the elements of a evaluate to True. Masked values are considered as False during computation. Refer to numpy.any for full documentation. See also numpy.ndarray.any
corresponding functio... | numpy.reference.generated.numpy.ma.any |
numpy.ma.append ma.append(a, b, axis=None)[source]
Append values to the end of an array. New in version 1.9.0. Parameters
aarray_like
Values are appended to a copy of this array.
barray_like
These values are appended to a copy of a. It must be of the correct shape (the same shape as a, excluding axis). ... | numpy.reference.generated.numpy.ma.append |
numpy.ma.apply_along_axis ma.apply_along_axis(func1d, axis, arr, *args, **kwargs)[source]
Apply a function to 1-D slices along the given axis. Execute func1d(a, *args, **kwargs) where func1d operates on 1-D arrays and a is a 1-D slice of arr along axis. This is equivalent to (but faster than) the following use of n... | numpy.reference.generated.numpy.ma.apply_along_axis |
numpy.ma.apply_over_axes ma.apply_over_axes(func, a, axes)[source]
Apply a function repeatedly over multiple axes. func is called as res = func(a, axis), where axis is the first element of axes. The result res of the function call must have either the same dimensions as a or one less dimension. If res has one less ... | numpy.reference.generated.numpy.ma.apply_over_axes |
numpy.ma.arange ma.arange([start, ]stop, [step, ]dtype=None, *, like=None) = <numpy.ma.core._convert2ma object>
Return evenly spaced values within a given interval. Values are generated within the half-open interval [start, stop) (in other words, the interval including start but excluding stop). For integer argumen... | numpy.reference.generated.numpy.ma.arange |
numpy.ma.argmax ma.argmax(self, axis=None, fill_value=None, out=None) = <numpy.ma.core._frommethod object>
Returns array of indices of the maximum values along the given axis. Masked values are treated as if they had the value fill_value. Parameters
axis{None, integer}
If None, the index is into the flattened... | numpy.reference.generated.numpy.ma.argmax |
numpy.ma.argmin ma.argmin(self, axis=None, fill_value=None, out=None) = <numpy.ma.core._frommethod object>
Return array of indices to the minimum values along the given axis. Parameters
axis{None, integer}
If None, the index is into the flattened array, otherwise along the specified axis
fill_valuescalar or... | numpy.reference.generated.numpy.ma.argmin |
numpy.ma.argsort ma.argsort(a, axis=<no value>, kind=None, order=None, endwith=True, fill_value=None)[source]
Return an ndarray of indices that sort the array along the specified axis. Masked values are filled beforehand to fill_value. Parameters
axisint, optional
Axis along which to sort. If None, the defaul... | numpy.reference.generated.numpy.ma.argsort |
numpy.ma.around ma.around = <numpy.ma.core._MaskedUnaryOperation object>
Round an array to the given number of decimals. See also around
equivalent function; see for details. | numpy.reference.generated.numpy.ma.around |
numpy.ma.array ma.array(data, dtype=None, copy=False, order=None, mask=False, fill_value=None, keep_mask=True, hard_mask=False, shrink=True, subok=True, ndmin=0)[source]
An array class with possibly masked values. Masked values of True exclude the corresponding element from any computation. Construction: x = Masked... | numpy.reference.generated.numpy.ma.array |
numpy.ma.asanyarray ma.asanyarray(a, dtype=None)[source]
Convert the input to a masked array, conserving subclasses. If a is a subclass of MaskedArray, its class is conserved. No copy is performed if the input is already an ndarray. Parameters
aarray_like
Input data, in any form that can be converted to an ar... | numpy.reference.generated.numpy.ma.asanyarray |
numpy.ma.asarray ma.asarray(a, dtype=None, order=None)[source]
Convert the input to a masked array of the given data-type. No copy is performed if the input is already an ndarray. If a is a subclass of MaskedArray, a base class MaskedArray is returned. Parameters
aarray_like
Input data, in any form that can b... | numpy.reference.generated.numpy.ma.asarray |
numpy.ma.atleast_1d ma.atleast_1d(*args, **kwargs) = <numpy.ma.extras._fromnxfunction_allargs object>
Convert inputs to arrays with at least one dimension. Scalar inputs are converted to 1-dimensional arrays, whilst higher-dimensional inputs are preserved. Parameters
arys1, arys2, …array_like
One or more inpu... | numpy.reference.generated.numpy.ma.atleast_1d |
numpy.ma.atleast_2d ma.atleast_2d(*args, **kwargs) = <numpy.ma.extras._fromnxfunction_allargs object>
View inputs as arrays with at least two dimensions. Parameters
arys1, arys2, …array_like
One or more array-like sequences. Non-array inputs are converted to arrays. Arrays that already have two or more dimens... | numpy.reference.generated.numpy.ma.atleast_2d |
numpy.ma.atleast_3d ma.atleast_3d(*args, **kwargs) = <numpy.ma.extras._fromnxfunction_allargs object>
View inputs as arrays with at least three dimensions. Parameters
arys1, arys2, …array_like
One or more array-like sequences. Non-array inputs are converted to arrays. Arrays that already have three or more di... | numpy.reference.generated.numpy.ma.atleast_3d |
numpy.ma.average ma.average(a, axis=None, weights=None, returned=False)[source]
Return the weighted average of array over the given axis. Parameters
aarray_like
Data to be averaged. Masked entries are not taken into account in the computation.
axisint, optional
Axis along which to average a. If None, aver... | numpy.reference.generated.numpy.ma.average |
numpy.ma.choose ma.choose(indices, choices, out=None, mode='raise')[source]
Use an index array to construct a new array from a list of choices. Given an array of integers and a list of n choice arrays, this method will create a new array that merges each of the choice arrays. Where a value in index is i, the new ar... | numpy.reference.generated.numpy.ma.choose |
numpy.ma.clip ma.clip(*args, **kwargs) = <numpy.ma.core._convert2ma object>
Clip (limit) the values in an array. Given an interval, values outside the interval are clipped to the interval edges. For example, if an interval of [0, 1] is specified, values smaller than 0 become 0, and values larger than 1 become 1. Eq... | numpy.reference.generated.numpy.ma.clip |
numpy.ma.clump_masked ma.clump_masked(a)[source]
Returns a list of slices corresponding to the masked clumps of a 1-D array. (A “clump” is defined as a contiguous region of the array). Parameters
andarray
A one-dimensional masked array. Returns
sliceslist of slice
The list of slices, one for each cont... | numpy.reference.generated.numpy.ma.clump_masked |
numpy.ma.clump_unmasked ma.clump_unmasked(a)[source]
Return list of slices corresponding to the unmasked clumps of a 1-D array. (A “clump” is defined as a contiguous region of the array). Parameters
andarray
A one-dimensional masked array. Returns
sliceslist of slice
The list of slices, one for each c... | numpy.reference.generated.numpy.ma.clump_unmasked |
numpy.ma.column_stack ma.column_stack(*args, **kwargs) = <numpy.ma.extras._fromnxfunction_seq object>
Stack 1-D arrays as columns into a 2-D array. Take a sequence of 1-D arrays and stack them as columns to make a single 2-D array. 2-D arrays are stacked as-is, just like with hstack. 1-D arrays are turned into 2-D ... | numpy.reference.generated.numpy.ma.column_stack |
numpy.ma.common_fill_value ma.common_fill_value(a, b)[source]
Return the common filling value of two masked arrays, if any. If a.fill_value == b.fill_value, return the fill value, otherwise return None. Parameters
a, bMaskedArray
The masked arrays for which to compare fill values. Returns
fill_valuescal... | numpy.reference.generated.numpy.ma.common_fill_value |
numpy.ma.compress_cols ma.compress_cols(a)[source]
Suppress whole columns of a 2-D array that contain masked values. This is equivalent to np.ma.compress_rowcols(a, 1), see compress_rowcols for details. See also compress_rowcols | numpy.reference.generated.numpy.ma.compress_cols |
numpy.ma.compress_rowcols ma.compress_rowcols(x, axis=None)[source]
Suppress the rows and/or columns of a 2-D array that contain masked values. The suppression behavior is selected with the axis parameter. If axis is None, both rows and columns are suppressed. If axis is 0, only rows are suppressed. If axis is 1 o... | numpy.reference.generated.numpy.ma.compress_rowcols |
numpy.ma.compress_rows ma.compress_rows(a)[source]
Suppress whole rows of a 2-D array that contain masked values. This is equivalent to np.ma.compress_rowcols(a, 0), see compress_rowcols for details. See also compress_rowcols | numpy.reference.generated.numpy.ma.compress_rows |
numpy.ma.compressed ma.compressed(x)[source]
Return all the non-masked data as a 1-D array. This function is equivalent to calling the “compressed” method of a ma.MaskedArray, see ma.MaskedArray.compressed for details. See also ma.MaskedArray.compressed
Equivalent method. | numpy.reference.generated.numpy.ma.compressed |
numpy.ma.concatenate ma.concatenate(arrays, axis=0)[source]
Concatenate a sequence of arrays along the given axis. Parameters
arrayssequence of array_like
The arrays must have the same shape, except in the dimension corresponding to axis (the first, by default).
axisint, optional
The axis along which the ... | numpy.reference.generated.numpy.ma.concatenate |
numpy.ma.conjugate ma.conjugate(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <numpy.ma.core._MaskedUnaryOperation object>
Return the complex conjugate, element-wise. The complex conjugate of a complex number is obtained by changing the sign of its ima... | numpy.reference.generated.numpy.ma.conjugate |
numpy.ma.copy ma.copy(self, *args, **params) a.copy(order='C') = <numpy.ma.core._frommethod object>
Return a copy of the array. Parameters
order{‘C’, ‘F’, ‘A’, ‘K’}, optional
Controls the memory layout of the copy. ‘C’ means C-order, ‘F’ means F-order, ‘A’ means ‘F’ if a is Fortran contiguous, ‘C’ otherwise. ... | numpy.reference.generated.numpy.ma.copy |
numpy.ma.corrcoef ma.corrcoef(x, y=None, rowvar=True, bias=<no value>, allow_masked=True, ddof=<no value>)[source]
Return Pearson product-moment correlation coefficients. Except for the handling of missing data this function does the same as numpy.corrcoef. For more details and examples, see numpy.corrcoef. Parame... | numpy.reference.generated.numpy.ma.corrcoef |
numpy.ma.count ma.count(self, axis=None, keepdims=<no value>) = <numpy.ma.core._frommethod object>
Count the non-masked elements of the array along the given axis. Parameters
axisNone or int or tuple of ints, optional
Axis or axes along which the count is performed. The default, None, performs the count over ... | numpy.reference.generated.numpy.ma.count |
numpy.ma.count_masked ma.count_masked(arr, axis=None)[source]
Count the number of masked elements along the given axis. Parameters
arrarray_like
An array with (possibly) masked elements.
axisint, optional
Axis along which to count. If None (default), a flattened version of the array is used. Returns
... | numpy.reference.generated.numpy.ma.count_masked |
numpy.ma.cov ma.cov(x, y=None, rowvar=True, bias=False, allow_masked=True, ddof=None)[source]
Estimate the covariance matrix. Except for the handling of missing data this function does the same as numpy.cov. For more details and examples, see numpy.cov. By default, masked values are recognized as such. If x and y h... | numpy.reference.generated.numpy.ma.cov |
numpy.ma.cumprod ma.cumprod(self, axis=None, dtype=None, out=None) = <numpy.ma.core._frommethod object>
Return the cumulative product of the array elements over the given axis. Masked values are set to 1 internally during the computation. However, their position is saved, and the result will be masked at the same l... | numpy.reference.generated.numpy.ma.cumprod |
numpy.ma.cumsum ma.cumsum(self, axis=None, dtype=None, out=None) = <numpy.ma.core._frommethod object>
Return the cumulative sum of the array elements over the given axis. Masked values are set to 0 internally during the computation. However, their position is saved, and the result will be masked at the same locatio... | numpy.reference.generated.numpy.ma.cumsum |
numpy.ma.default_fill_value ma.default_fill_value(obj)[source]
Return the default fill value for the argument object. The default filling value depends on the datatype of the input array or the type of the input scalar:
datatype default
bool True
int 999999
float 1.e20
complex 1.e20+0j
object ‘?’
st... | numpy.reference.generated.numpy.ma.default_fill_value |
numpy.ma.diag ma.diag(v, k=0)[source]
Extract a diagonal or construct a diagonal array. This function is the equivalent of numpy.diag that takes masked values into account, see numpy.diag for details. See also numpy.diag
Equivalent function for ndarrays. | numpy.reference.generated.numpy.ma.diag |
numpy.ma.diff ma.diff(*args, **kwargs) = <numpy.ma.core._convert2ma object>
Calculate the n-th discrete difference along the given axis. The first difference is given by out[i] = a[i+1] - a[i] along the given axis, higher differences are calculated by using diff recursively. Parameters
aarray_like
Input array... | numpy.reference.generated.numpy.ma.diff |
numpy.ma.dot ma.dot(a, b, strict=False, out=None)[source]
Return the dot product of two arrays. This function is the equivalent of numpy.dot that takes masked values into account. Note that strict and out are in different position than in the method version. In order to maintain compatibility with the corresponding... | numpy.reference.generated.numpy.ma.dot |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.