Search
Search Results
Search finished, found 118 page(s) matching the search query.
- numpy.ndarray.take
...Array objects The N-dimensional array (ndarray) numpy.ndarray numpy.ndarray.take...
- numpy.ndarray.take (Python method, in numpy.ndarray.take)
- Array iterator API
...possibly NPY_ITER_GROWINNER. Create a copy of this iterator for each thread (minus one for the first iterator). Then, take the iteration index range [0, NpyIter_GetIterSize(iter)) and split it up into tasks, for example using a TBB parall...
- Beyond the basics
...all. As function calls can be time consuming, one way to speed up this kind of algorithm is to write the function so it takes a vector of data and then write the iteration so the function call is performed for an entire dimension of data at...
- Constants of the
numpy.ma
module...s transposed. MaskedArray.T View of the transposed array. Item selection and manipulation For array methods that take an axis keyword, it defaults to None. If axis is None, then the array is treated as a 1-D array. Any other value fo...
- ctypes foreign function interface (
numpy.ctypeslib
)...NumPy supplies the load_library function as a convenience. Changed in version 1.20.0: Allow libname and loader_path to take any path-like object. Parameters: libnamepath-likeName of the library, which can have ‘lib’ as a prefix, but wit...
- How to contribute to the NumPy documentation
...each out if you have questions or need someone to guide you through your first steps – we’re happy to help. Minutes are taken on hackmd.io and stored in the NumPy Archive repository. What’s needed The NumPy Documentation has the details c...
- How to extend NumPy
...is passed to a function or macro that is going to steal the reference ( e.g. PyTuple_SET_ITEM, and most functions that take PyArray_Descr objects). Typically you get a new reference to a variable when it is created or is the return value o...
- How to index
ndarrays
...rr[row_indices, column_indices] array([[ 1, 3], [ 4, 6], [10, 10]]) Index along a specific axis Use take. See also take_along_axis and put_along_axis. >>> a = np.arange(30).reshape(2, 3, 5) >>> a array([[[ 0, 1, 2, 3,...
- Indexing on
ndarrays
...eates a view instead of a copy as in the case of built-in Python sequences such as string, tuple and list. Care must be taken when extracting a small portion from a large array which becomes useless after the extraction, because the small p...
- Interoperability with NumPy
.... The __array_ufunc__ protocol A universal function (or ufunc for short) is a “vectorized” wrapper for a function that takes a fixed number of specific inputs and produces a fixed number of specific outputs. The output of the ufunc (and it...
- Memory management in NumPy
...related call a = np.zeros((nx,ny)) # non-NumPy related call b = [i**2 for i in range(nx*ny)] snapshot1 = tracemalloc.take_snapshot() # We filter the snapshot to only select NumPy related calls np_domain = np.lib.tracemalloc_domain dom_fi...
- NumPy 1.11.0 Release Notes
...sis will raise IndexError, e.g., a[..., ...]. Non-integers used as index values will raise TypeError, e.g., in reshape, take, and specifying reduce axis. In a future release the following changes will be made. The rand function exposed in...
- NumPy 1.12.0 Release Notes
...ple ellipsis raises IndexError, e.g., a[..., ...]. Non-integers used as index values raise TypeError, e.g., in reshape, take, and specifying reduce axis. FutureWarning to changed behavior np.full now returns an array of the fill-value’s...
- NumPy 1.13.0 Release Notes
...supports unevenly spaced data Users can now specify a not-constant spacing for data. In particular np.gradient can now take: A single scalar to specify a sample distance for all dimensions. N scalars to specify a constant sample distance...
- NumPy 1.15.0 Release Notes
...s that correspond to the common elements. np.quantile and np.nanquantile Like np.percentile and np.nanpercentile, but takes quantiles in [0, 1] rather than percentiles in [0, 100]. np.percentile is now a thin wrapper around np.quantile wi...
- NumPy 1.16.0 Release Notes
...to arr Previously the caller was responsible for keeping the array alive for the lifetime of the pointer. Speedup np.take for read-only arrays The implementation of np.take no longer makes an unnecessary copy of the source array when its...
- NumPy 1.17.0 Release Notes
...his code was removed. If needed, use frombuffer(memoryview(obj), ...) instead. out is buffered for memory overlaps in take, choose, put If the out argument to these functions is provided and has memory overlap with the other arguments, it...
- NumPy 1.20.0 Release Notes
...on 3 only. Uses of Python 2.7 C-API functions have been updated to Python 3 only. Users who need the old version should take it from an older version of NumPy. (gh-17580) Void dtype discovery in np.array In calls using np.array(..., dtype...
- NumPy 1.22.0 Release Notes
...64]] numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]] (gh-19879) Improvements ctypeslib.load_library can now take any path-like object All parameters in the can now take any path-like object. This includes the likes of strings, b...
- NumPy 1.4.0 Release Notes
...- like PyArray_Correlate, but implements the usual definition of correlation. Inputs are not swapped, and conjugate is taken for complex arrays. PyArray_NeighborhoodIterNew - a new iterator to iterate over a neighborhood of a point, with a...
- NumPy 1.8.0 Release Notes
...ems in the array, and will increment the third item twice: numpy.add.at(arr, [0, 1, 2, 2], 1) This is what many have mistakenly thought arr[[0, 1, 2, 2]] += 1 would do, but that does not work as the incremented value of arr[2] is simply cop...
- NumPy 2.0.0 Release Notes
...s and PyArray_GetNumericOps has been expired and the functions removed. (Deprecated in NumPy 1.16) (gh-23998) The fasttake, fastclip, and fastputmask ArrFuncs deprecation is now finalized. The deprecated function fastCopyAndTranspose and...
- NumPy C code explanations
...ese offsets can be arbitrary numbers. Therefore, the possibility of encountering misaligned data must be recognized and taken into account if necessary. N-D iterators See also Iterating over arrays A very common operation in much of Num...
- NumPy for MATLAB users
...njugate transpose, inverse, and asarray() of the matrix, respectively. Convenience constructor The array constructor takes (nested) Python sequences as initializers. As in, array([[1,2,3],[4,5,6]]). The matrix constructor additionally ta...
- NumPy quickstart
...nce as an argument. >>> a = np.array(1, 2, 3, 4) # WRONG Traceback (most recent call last): ... TypeError: array() takes from 1 to 2 positional arguments but 4 were given >>> a = np.array([1, 2, 3, 4]) # RIGHT array transforms seque...
- numpy.apply_over_axes
- numpy.array2string
- numpy.compress
- numpy.einsum
- numpy.emath.logn
- numpy.extract
- numpy.gradient
- numpy.i: a SWIG interface file for NumPy
- numpy.ix_
- numpy.lib.format.read_array
- numpy.lib.scimath.logn
- numpy.lib.stride_tricks.sliding_window_view
- numpy.linalg.tensordot
- numpy.ma.apply_over_axes
- numpy.ma.diag
- numpy.ma.dot
- numpy.ma.ediff1d
- numpy.ma.masked_array.sort
- numpy.ma.masked_array.take
- numpy.ma.MaskedArray.sort
- numpy.ma.MaskedArray.take
- numpy.ma.MaskType.take
- numpy.ma.maximum_fill_value
- numpy.ma.minimum_fill_value
- numpy.matrix.ravel
- numpy.nanstd
- numpy.ndarray.getfield
- numpy.ndarray.take
- numpy.piecewise
- numpy.place
- numpy.polynomial.chebyshev.chebgrid2d
- numpy.polynomial.chebyshev.chebgrid3d
- numpy.polynomial.hermite.hermgrid2d
- numpy.polynomial.hermite.hermgrid3d
- numpy.polynomial.hermite_e.hermegrid2d
- numpy.polynomial.hermite_e.hermegrid3d
- numpy.polynomial.laguerre.laggrid2d
- numpy.polynomial.laguerre.laggrid3d
- numpy.polynomial.legendre.leggrid2d
- numpy.polynomial.legendre.leggrid3d
- numpy.polynomial.polynomial.polygrid2d
- numpy.polynomial.polynomial.polygrid3d
- numpy.put_along_axis
- numpy.putmask
- numpy.r_
- numpy.random.dirichlet
- numpy.random.Generator.dirichlet
- numpy.random.Generator.lognormal
- numpy.random.Generator.multinomial
- numpy.random.lognormal
- numpy.random.multinomial
- numpy.random.rand
- numpy.random.randn
- numpy.random.RandomState.dirichlet
- numpy.random.RandomState.lognormal
- numpy.random.RandomState.multinomial
- numpy.random.RandomState.rand
- numpy.random.RandomState.randn
- numpy.ravel
- numpy.record.take
- numpy.reshape
- numpy.select
- numpy.shares_memory
- numpy.sinc
- numpy.std
- numpy.take
- numpy.take_along_axis
- numpy.tensordot
- numpy.ufunc.reduceat
- numpy.unique
- numpy.unwrap
- numpy.vdot
- NumPy: the absolute basics for beginners
- Python types and C-structures
- Standard array subclasses
- Subclassing ndarray
- The
numpy.ma
module - The N-dimensional array (
ndarray
) - Typing (
numpy.typing
) - What is NumPy?
- Array API
- Array objects
- Copies and views
- Data type objects (
dtype
) - Iterating over arrays
- Putting the inner loop in Cython
- Structured arrays
- ufunc API
- Universal functions (
ufunc
) - Universal functions (
ufunc
) basics - Using Python as glue
- Writing custom array containers