Search
Search Results
Search finished, found 38 page(s) matching the search query.
- numpy.ndarray.choose
...Array objects The N-dimensional array (ndarray) numpy.ndarray numpy.ndarray.choose...
- numpy.ndarray.choose (Python method, in numpy.ndarray.choose)
- Indexing on
ndarrays
...is, each index specified selects the array corresponding to the rest of the dimensions selected. In the above example, choosing 0 means that the remaining dimension of length 5 is being left unspecified, and that what is returned is an arr...
- Internal organization of NumPy arrays
...at all. NumPy will know how to map the new index order to the data without moving the data. So if this is true, why not choose the index order that matches what you most expect? In particular, why not define row-ordered images to use the im...
- NumPy 1.13.0 Release Notes
...bandwidth is required to perform the operation. axes argument for unique In an N-dimensional array, the user can now choose the axis along which to look for duplicate N-1-dimensional elements using numpy.unique. The original behaviour is...
- NumPy 1.14.0 Release Notes
...de, see compatibility notes above. hermitian option added to``np.linalg.matrix_rank`` The new hermitian option allows choosing between standard SVD based matrix rank calculation and the more efficient eigenvalue based method for symmetric...
- NumPy 1.17.0 Release Notes
...prime length. See below under Improvements. New radix sort and timsort sorting methods. It is currently not possible to choose which will be used. They are hardwired to the datatype and used when either stable or mergesort is passed as the...
- NumPy 1.19.0 Release Notes
...cases the behaviour is unchanged. Note that the use of this C-API function is generally discouraged. This also fixes np.choose to behave the same way as the rest of NumPy in this respect. (gh-14933) Fasttake and fastputmask slots are depr...
- NumPy 1.20.0 Release Notes
...depend on the object: Some array-likes may expect the new behaviour, and users can ignore the warning. The object can choose to expose the sequence protocol to opt-in to the new behaviour. For example, shapely will allow conversion to an...
- NumPy 1.21.0 Release Notes
...e output dtype precisely, you may do so by either casting the inputs or providing an output array using out=. NumPy may choose to allow providing an exact output dtype here in the future, which would be preceded by a FutureWarning. (gh-1871...
- NumPy 1.25.0 Release Notes
...@= b >>> print(a) [[1 1] [5 5] [9 9]] (gh-21120) Added NPY_ENABLE_CPU_FEATURES environment variable Users may now choose to enable only a subset of the built CPU features at runtime by specifying the NPY_ENABLE_CPU_FEATURES environmen...
- NumPy 1.7.0 Release Notes
...st release that supports Python 2.4 - 2.5. Highlights where= parameter to ufuncs (allows the use of boolean arrays to choose where a computation should be done) vectorize improvements (added ‘excluded’ and ‘cache’ keyword, general cleanup...
- NumPy 2.1.0 Release Notes
...mpy.ma.MaskedArray. See the typing docs for more information. (gh-26081) np.quantile with method closest_observation chooses nearest even order statistic This changes the definition of nearest for border cases from the nearest odd order...
- NumPy quickstart
...stack Questionsall, any, nonzero, where Orderingargmax, argmin, argsort, max, min, ptp, searchsorted, sort Operationschoose, compress, cumprod, cumsum, inner, ndarray.fill, imag, prod, put, putmask, real, sum Basic Statisticscov, mean,...
- numpy.arctan2
...ting='same_kind', order='K', dtype=None, subok=True[, signature]) = <ufunc 'arctan2'> Element-wise arc tangent of x1/x2 choosing the quadrant correctly. The quadrant (i.e., branch) is chosen so that arctan2(x1, x2) is the signed angle in ra...
- numpy.atan2
...ting='same_kind', order='K', dtype=None, subok=True[, signature]) = <ufunc 'arctan2'> Element-wise arc tangent of x1/x2 choosing the quadrant correctly. The quadrant (i.e., branch) is chosen so that arctan2(x1, x2) is the signed angle in ra...
- numpy.choose
...NumPy reference Routines and objects by topic Indexing routines numpy.choose...
- numpy.compress
...s: compressed_arrayndarrayA copy of a without the slices along axis for which condition is false. See also take, choose, diag, diagonal, select ndarray.compressEquivalent method in ndarray extractEquivalent method when working on 1-...
- numpy.in1d
...plus the max-min value of ar2. assume_unique has no effect when the ‘table’ option is used. If None, will automatically choose ‘table’ if the required memory allocation is less than or equal to 6 times the sum of the sizes of ar1 and ar2, o...
- numpy.isin
...ax-min value of test_elements. assume_unique has no effect when the ‘table’ option is used. If None, will automatically choose ‘table’ if the required memory allocation is less than or equal to 6 times the sum of the sizes of element and te...
- numpy.ma.choose
...NumPy reference NumPy’s module structure Masked array operations numpy.ma.choose...
- numpy.ma.MaskType.choose
...numpy.ma.MaskType.choose...
- numpy.ndarray.choose
...Array objects The N-dimensional array (ndarray) numpy.ndarray numpy.ndarray.choose...
- numpy.ndarray.getfield
...ray([[1.+1.j, 0.+0.j], [0.+0.j, 2.+4.j]]) >>> x.getfield(np.float64) array([[1., 0.], [0., 2.]]) By choosing an offset of 8 bytes we can select the complex part of the array for our view: >>> x.getfield(np.float64, offse...
- numpy.piecewise
...ned by the boolean arrays in condlist. Portions not covered by any condition have a default value of 0. See also choose, select, where Notes This is similar to choose or select, except that functions are evaluated on elements of x...
- numpy.polynomial.polynomial.polyfit
...ial will usually get rid of the warning (but may not be what you want, of course; if you have independent reason(s) for choosing the degree which isn’t working, you may have to: a) reconsider those reasons, and/or b) reconsider the quality...
- numpy.random.Generator.multivariate_hypergeometric
...tric distribution. The multivariate hypergeometric distribution is a generalization of the hypergeometric distribution. Choose nsample items at random without replacement from a collection with N distinct types. N is the length of colors,...
- numpy.random.random_integers
...ss 'numpy.int64'> >>> np.random.random_integers(5, size=(3,2)) array([[5, 4], # random [3, 3], [4, 5]]) Choose five random numbers from the set of five evenly-spaced numbers between 0 and 2.5, inclusive (i.e., from the set \...
- numpy.random.RandomState.random_integers
...ss 'numpy.int64'> >>> np.random.random_integers(5, size=(3,2)) array([[5, 4], # random [3, 3], [4, 5]]) Choose five random numbers from the set of five evenly-spaced numbers between 0 and 2.5, inclusive (i.e., from the set \...
- numpy.record.choose
...ce Array objects Standard array subclasses numpy.record numpy.record.choose...
- numpy.select
...ng array in condlist is True. See also whereReturn elements from one of two arrays depending on condition. take, choose, compress, diag, diagonal Examples >>> import numpy as np Beginning with an array of integers from 0 to 5 (in...
- numpy.sort
...ress it switches to heapsort. This implementation makes quicksort O(n*log(n)) in the worst case. ‘stable’ automatically chooses the best stable sorting algorithm for the data type being sorted. It, along with ‘mergesort’ is currently mapped...
- numpy.where
...ed. Parameters: conditionarray_like, boolWhere True, yield x, otherwise yield y. x, yarray_likeValues from which to choose. x, y and condition need to be broadcastable to some shape. Returns: outndarrayAn array with elements from x...
- The N-dimensional array (
ndarray
)...the following methods there are also corresponding functions in numpy: all, any, argmax, argmin, argpartition, argsort, choose, clip, compress, copy, cumprod, cumsum, diagonal, imag, max, mean, min, nonzero, partition, prod, put, ravel, rea...
- Array API
...em, setitem, and cast (some of the cast functions may be NULL if no support is desired). To avoid confusion, you should choose a unique character typecode but this is not enforced and not relied on internally. A user-defined type number is...
- Glossary
...e trailing comma distinguishes a one-element tuple from a parenthesized n. -1 In a dimension entry, instructs NumPy to choose the length that will keep the total number of array elements the same. >>> np.arange(12).reshape(4, -1).shape (4,...
- Universal functions (
ufunc
)...metric inverse tangent, element-wise. arctan2(x1, x2, /[, out, where, casting, ...]) Element-wise arc tangent of x1/x2 choosing the quadrant correctly. hypot(x1, x2, /[, out, where, casting, ...]) Given the "legs" of a right triangle, ret...
- Using Python as glue
...c_intp), ctypes.POINTER(np.ctypeslib.c_intp)] Next, define a simple selection function that chooses which addition function to call in the shared library based on the data-type: def select(dtype): if dtype.ch...