Search
Searching.
- numpy.ma.zeros
...NumPy reference NumPy’s module structure Masked array operations numpy.ma.zeros...
- numpy.ma.zeros_like
...NumPy reference NumPy’s module structure Masked array operations numpy.ma.zeros_like...
- numpy.ma.zeros (Python data, in numpy.ma.zeros)
- numpy.matlib.zeros (Python function, in numpy.matlib.zeros)
numpy.distutils
user guide...th. Any SciPy package may depend on NumPy packages but the dependence on other SciPy packages should be kept minimal or zero. A SciPy package contains, in addition to its sources, the following files and directories: setup.py — building sc...
- Array creation
...rsion from other Python structures (i.e. lists and tuples) Intrinsic NumPy array creation functions (e.g. arange, ones, zeros, etc.) Replicating, joining, or mutating existing arrays Reading arrays from disk, either from standard or custom...
- Array iterator API
...usage within the NumPy codebase itself. For example, here is a slightly tweaked version of the code for PyArray_CountNonzero, which counts the number of non-zero elements in an array. npy_intp PyArray_CountNonzero(PyArrayObject* self) {...
- Constants of the
numpy.ma
module...value. MaskedArray.item(*args) Copy an element of an array to a standard Python scalar and return it. MaskedArray.nonzero() Return the indices of unmasked elements that are not zero. MaskedArray.put(indices, values[, mode]) Set storage-...
- Data types
...o store both entries without truncation. If we specify a shorter or longer data type, the string is either truncated or zero-padded to fit in the specified width: >>> np.array(["hello", "world!"], dtype="U5") array(['hello', 'world'], dtype...
- Discrete Fourier Transform (
numpy.fft
)...) Return the Discrete Fourier Transform sample frequencies (for usage with rfft, irfft). fftshift(x[, axes]) Shift the zero-frequency component to the center of the spectrum. ifftshift(x[, axes]) The inverse of fftshift. Background...
- How to extend NumPy
...interface, 3) any object with an __array__ method (which should return an ndarray), and 4) any scalar object (becomes a zero-dimensional array). Sub-classes of the ndarray that otherwise fit the requirements will be passed through. If you w...
- How to index
ndarrays
...0, 52, 54], [60, 62, 64], [70, 72, 74], [80, 82, 84], [90, 92, 94]]) Filter values Non-zero elements Use nonzero to get a tuple of array indices of non-zero elements corresponding to every dimension: >>> z =...
- Interoperability with NumPy
..., users still want to work with these arrays using the familiar NumPy API and reuse existing code with minimal (ideally zero) porting overhead. With this goal in mind, various protocols are defined for implementations of multi-dimensional a...
- Memory management in NumPy
...Py PyDataMem_* routines. NumPy added a small cache of allocated memory in its internal npy_alloc_cache, npy_alloc_cache_zero, and npy_free_cache functions. These wrap alloc, alloc-and-memset(0) and free respectively, but when npy_free_cache...
- Miscellaneous
...original value was) Note: cannot use equality to test NaNs. E.g.: >>> myarr = np.array([1., 0., np.nan, 3.]) >>> np.nonzero(myarr == np.nan) (array([], dtype=int64),) >>> np.nan == np.nan # is always False! Use special numpy functions ins...
- NumPy 1.10.0 Release Notes
...s made in the order of the axes, in which case the input array was returned. A view is now returned in all cases. nonzero now returns base ndarrays Previously, an inconsistency existed between 1-D inputs (returning a base ndarray) and hi...
- NumPy 1.10.2 Release Notes
...is_fortran(a), that was using PyArray_ISFORTRAN to check for Fortran contiguity instead of PyArray_IS_F_CONTIGUOUS. You may want to regenerate swigged files using the updated numpy.i Deprecate views changing dimensions in fortran order Th...
- NumPy 1.10.4 Release Notes
...dows binaries. Compatibility notes The trace function now calls the trace method on subclasses of ndarray, except for matrix, for which the current behavior is preserved. This is to help with the units package of AstroPy and hopefully wil...
- NumPy 1.11.0 Release Notes
...loor_divide. Some corner cases also change, for instance, NaN is always returned for both functions when the divisor is zero, divmod(1.0, inf) returns (0.0, 1.0) except on MSVC 2008, and divmod(-1.0, inf) returns (-1.0, inf). C API Remove...
- NumPy 1.11.1 Release Notes
...several build related improvements. Wheels for Linux, Windows, and OSX can be found on PyPI. Fixes Merged #7506 BUG: Make sure numpy imports on python 2.6 when nose is unavailable. #7530 BUG: Floating exception with invalid axis in np.le...
- NumPy 1.11.2 Release Notes
- NumPy 1.12.0 Release Notes
...wers The previous behavior depended on whether numpy scalar integers or numpy integer arrays were involved. For arrays Zero to negative integer powers returned least integral value. Both 1, -1 to negative integer powers returned correct va...
- NumPy 1.12.1 Release Notes
...and OSX can be found on PyPI, Bugs Fixed BUG: Fix wrong future nat warning and equiv type logic error… BUG: Fix wrong masked median for some special cases DOC: Place np.average in inline code TST: Work around isfinite inconsistency on i38...
- NumPy 1.13.0 Release Notes
...her forms of indexing. C API changes GUfuncs on empty arrays and NpyIter axis removal It is now allowed to remove a zero-sized axis from NpyIter. Which may mean that code removing axes from NpyIter has to add an additional check when ac...
- NumPy 1.14.0 Release Notes
...form np.asarray(a.flat) are used, or when a.flat is passed as the out parameter to a ufunc. np.tensordot now returns zero array when contracting over 0-length dimension Previously np.tensordot raised a ValueError when contracting over 0-...
- NumPy 1.14.2 Release Notes
- NumPy 1.14.3 Release Notes
- NumPy 1.14.6 Release Notes
- NumPy 1.15.0 Release Notes
...oat inputs, and that of ufuncs in general. For all types of scalar or 0d input, the result is now a scalar. np.flatnonzero works on numpy-convertible types np.flatnonzero now uses np.ravel(a) instead of a.ravel(), so it works for lists, t...
- NumPy 1.16.0 Release Notes
...nalg.svd now work with empty arrays Previously, a LinAlgError would be raised when an empty matrix/empty matrices (with zero rows and/or columns) is/are passed in. Now outputs of appropriate shapes are returned. Chain exceptions to give b...
- NumPy 1.16.1 Release Notes
...djusted to return NaT The modulus operation with two np.timedelta64 operands now returns NaT in the case of division by zero, rather than returning zero...
- NumPy 1.16.2 Release Notes
- NumPy 1.17.0 Release Notes
...since arrays created in such a manner are very rare in practice and only available through the NumPy C-API. numpy.nonzero should no longer be called on 0d arrays The behavior of numpy.nonzero on 0d arrays was surprising, making uses of i...
- NumPy 1.18.0 Release Notes
...ow produces a consistent result on 0d arrays On N-d arrays, numpy.argwhere now always produces an array of shape (n_non_zero, arr.ndim), even when arr.ndim == 0. Previously, the last axis would have a dimension of 1 in this case. (gh-13610)...
- NumPy 1.20.0 Release Notes
...ion may be useful for consistency with NumPy arrays (for example, NumPy behaves differently for things like division by zero). (gh-14882) Passing shape=None to functions with a non-optional shape argument is deprecated Previously, this wa...
- NumPy 1.20.2 Release Notes
...NumPy 1.20.2 Release Notes NumPy 1.20.2 is a bugfix release containing several fixes merged to the main branch after the NumPy 1.20.1 release. Contributors A total of 7 people contributed to this release. People with...
- NumPy 1.21.1 Release Notes
...ing #19350: MAINT: Annotate missing attributes of np.number subclasses #19351: BUG: Fix cast safety and comparisons for zero sized voids #19352: BUG: Correct Cython declaration in random #19353: BUG: protect against accessing base attribute...
- NumPy 1.21.3 Release Notes
...e merged for this release. #19745: ENH: Add dtype-support to 3 `generic/ndarray methods #19955: BUG: Resolve Divide by Zero on Apple silicon + test failures… #19958: MAINT: Mark type-check-only ufunc subclasses as ufunc aliases… #19994: BU...
- NumPy 1.22.0 Release Notes
...tes NumPy 1.22.0 is a big release featuring the work of 153 contributors spread over 609 pull requests. There have been many improvements, highlights are: Annotations of the main namespace are essentially complete. Upstream is a moving tar...
- NumPy 1.22.3 Release Notes
- NumPy 1.23.0 Release Notes
...entation, and expire old deprecations. The highlights are: Implementation of loadtxt in C, greatly improving its performance. Exposing DLPack at the Python level for easy data exchange. Changes to the promotion and comparisons of structure...
- NumPy 1.24 Release Notes
...casions: >>> np.array([np.iinfo(np.int32).min]*10, dtype=np.int32) // np.int32(-1) <stdin>:1: RuntimeWarning: divide by zero encountered in floor_divide array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=int32) Integer division overflow now retu...
- NumPy 1.24.1 Release Notes
...NumPy 1.24.1 Release Notes NumPy 1.24.1 is a maintenance release that fixes bugs and regressions discovered after the 1.24.0 release. The Python versions supported b...
- NumPy 1.25.0 Release Notes
...ns no __slots__, ensuring that subclasses can now make use of this feature in Python. (gh-23113) Fix power of complex zero np.power now returns a different result for 0^{non-zero} for complex numbers. Note that the value is only defined...
- NumPy 1.3.0 Release Notes
...mensionality of the inputs is, as well as the corresponding dimensionality of the outputs (the element-wise ufuncs have zero core dimensions). The list of the core dimensions for all arguments is called the “signature” of a ufunc. For examp...
- NumPy 1.4.0 Release Notes
- NumPy 1.6.0 Release Notes
...efore such routines could be called from Python but the corresponding Fortran routines received assumed shape arrays as zero length arrays which caused unpredicted results. Thanks to Lorenz Hüdepohl for pointing out the correct way to inter...
- NumPy 1.6.2 Release Notes
...1672: fix allclose() to work for scalar inf #1747: make np.median() work for 0-D arrays #1776: make complex division by zero to yield inf properly #1675: add scalar support for the format() function #1905: explicitly check for NaNs in allcl...
- NumPy 1.7.0 Release Notes
...the result gets converted to the array type (of possibly larger size) as illustrated by the following examples: >>> (np.zeros((2,), dtype=np.uint8) + np.int16(257)).dtype dtype('uint16') >>> (np.zeros((2,), dtype=np.int8) + np.uint16(257))....
- NumPy 1.7.2 Release Notes
- NumPy 1.8.0 Release Notes
- NumPy 1.8.2 Release Notes
- NumPy 1.9.0 Release Notes
- NumPy 1.9.2 Release Notes
- NumPy 2.0.0 Release Notes
- NumPy 2.0.1 Release Notes
- NumPy 2.1.0 Release Notes
- NumPy 2.1.3 Release Notes
- NumPy 2.2.0 Release Notes
- NumPy benchmarks
- NumPy C code explanations
- NumPy core math library
- NumPy for MATLAB users
- NumPy quickstart
- numpy.all
- numpy.allclose
- numpy.angle
- numpy.any
- numpy.argwhere