Search
Search Results
Search finished, found 81 page(s) matching the search query.
- numpy.unique
...NumPy reference Routines and objects by topic Array manipulation routines numpy.unique...
- numpy.unique_all
...NumPy reference Routines and objects by topic Set routines numpy.unique_all...
- numpy.unique_counts
...NumPy reference Routines and objects by topic Set routines numpy.unique_counts...
- numpy.unique_values
...NumPy reference Routines and objects by topic Set routines numpy.unique_values...
- numpy.unique_inverse
...NumPy reference Routines and objects by topic Set routines numpy.unique_inverse...
- numpy.ma.unique (Python function, in numpy.ma.unique)
- numpy.unique (Python function, in numpy.unique)
- Data types
...how to modify an array’s data-type. NumPy numerical types are instances of numpy.dtype (data-type) objects, each having unique characteristics. Once you have imported NumPy using import numpy as np you can create arrays with a specified dt...
- How to contribute to the NumPy documentation
...cally. You have to add the desired C/C++ header paths within the sub-config files of Doxygen. Sub-config files have the unique name .doxyfile, which you can usually find near directories that contain documented headers. You need to create a...
- NumPy 1.13.0 Release Notes
...improve performance for large arrays as less memory 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 ele...
- NumPy 1.14.0 Release Notes
...previously would accept dtype=some_array, with the implied semantics of dtype=some_array.dtype. This was undocumented, unique across the numpy functions, and if used would likely correspond to a typo. 1D np.linalg.norm preserves float in...
- NumPy 1.14.1 Release Notes
...True default. Some fixes for optimization have been applied and optimize=False is now the default. The sort order in np.unique when axis=<some-number> will now always be lexicographic in the subarray elements. In previous NumPy versions the...
- NumPy 1.15.0 Release Notes
...uble-double floating-point-format on these systems was not accounted for. float128s now print with correct rounding and uniqueness. Warning to ppc users: You should upgrade glibc if it is version <=2.23, especially if using float128. On ppc...
- NumPy 1.16.0 Release Notes
...comparisons now return False without a warning, finishing a deprecation cycle begun in NumPy 1.11. np.lib.function_base.unique was removed, finishing a deprecation cycle begun in NumPy 1.4. Use numpy.unique instead. multi-field indexing now...
- NumPy 1.18.0 Release Notes
...Fortran-to-C type map customizations from. (gh-15113) Improvements Different C numeric types of the same size have unique names On any given platform, two of np.intc, np.int_, and np.longlong would previously appear indistinguishable t...
- NumPy 1.21.0 Release Notes
...format_float_scientific . This kwd guarantees that at least the given number of digits will be printed when printing in unique=True mode, even if the extra digits are unnecessary to uniquely specify the value. It is the counterpart to the p...
- NumPy 1.21.1 Release Notes
...e handling #19390: ENH: SIMD architectures to show_config #19391: BUG: Do not raise deprecation warning for all nans in unique… #19392: BUG: Fix NULL special case in object-to-any cast code #19430: MAINT: Use arm64-graviton2 for testing on...
- NumPy 1.23.0 Release Notes
...ing as it does in reduction functions such as numpy.sum or numpy.mean. (gh-21485) New parameter equal_nan added to np.unique np.unique was changed in 1.21 to treat all NaN values as equal and return a single NaN. Setting equal_nan=False w...
- NumPy 1.24 Release Notes
..., arr) Is now always false. While previously it was true for the specific cast. (gh-21925) Returned arrays respect uniqueness of dtype kwarg objects When the dtype keyword argument is used with array or asarray, the dtype of the return...
- NumPy 1.26.0 Release Notes
...nctions and subroutines can be annotated with bind(c). f2py will handle both the correct type mapping, and preserve the unique label for other C interfaces. Note: bind(c, name = 'routine_name_other_than_fortran_routine') is not honored by t...
- NumPy 1.4.0 Release Notes
...ar to an elementwise version of the Python operator ‘in’. All of these functions now accept the boolean keyword assume_unique. This is False by default, but can be set True if the input arrays are known not to contain duplicates, which can...
- NumPy 1.6.2 Release Notes
...fix release. It also includes a number of documentation and build improvements. Issues fixed numpy.core #2063: make unique() return consistent index #1138: allow creating arrays from empty buffers or empty slices #1446: correct note abo...
- NumPy 1.8.1 Release Notes
...t work with flexible dtypes gh-3173: Segmentation fault when ‘size’ argument to random.multinomial gh-2799: allow using unique with lists of complex gh-3504: fix linspace truncation for integer array scalar gh-4191: get_info(‘openblas’) doe...
- NumPy 1.9.0 Release Notes
...d to np.vander The ordering of the columns of the Vandermonde matrix can be specified with this new boolean argument. unique_counts parameter added to np.unique The number of times each unique item comes up in the input can now be obtaine...
- NumPy 2.0.0 Release Notes
...nctions and subroutines can be annotated with bind(c). f2py will handle both the correct type mapping, and preserve the unique label for other C interfaces. Note: bind(c, name = 'routine_name_other_than_fortran_routine') is not honored by t...
- NumPy 2.0.1 Release Notes
...to nearest even order #26960: BUG: Fix off-by-one error in amount of characters in strip #26961: API: Partially revert unique with return_inverse #26962: BUG,MAINT: Fix utf-8 character stripping memory access #26963: BUG: Fix out-of-bound...
- NumPy for MATLAB users
...rm \(\mathbf{Zx}=\mathbf{y}\) decimate(x, q) signal.resample(x, np.ceil(len(x)/q)) downsample with low-pass filtering unique(a) np.unique(a) a vector of unique values in array a squeeze(a) a.squeeze() remove singleton dimensions of array...
- NumPy quickstart
...able objects as references, so function calls make no copy. >>> def f(x): ... print(id(x)) ... >>> id(a) # id is a unique identifier of an object 148293216 # may vary >>> f(a) 148293216 # may vary View or shallow copy Differe...
- numpy.array2string
...exactly precision fractional digits, even if this would print more or fewer digits than necessary to specify the value uniquely. ‘unique’: Print the minimum number of fractional digits necessary to represent each value uniquely. Different...
- numpy.bincount
...r if minlength is negative. TypeErrorIf the type of the input is float or complex. See also histogram, digitize, unique Examples >>> import numpy as np >>> np.bincount(np.arange(5)) array([1, 1, 1, 1, 1]) >>> np.bincount(np.array([...
- numpy.correlate
...l.correlateuses FFT which has superior performance on large arrays. Notes The definition of correlation above is not unique and sometimes correlation may be defined differently. Another common definition is [1]: \[c'_k = \sum_n a_{n} \c...
- numpy.digitize
...ValueErrorIf bins is not monotonic. TypeErrorIf the type of the input is complex. See also bincount, histogram, unique, searchsorted Notes If values in x are such that they fall outside the bin range, attempting to index bins with...
- numpy.dtype
- numpy.dtype.char
...numpy.dtype.char attribute dtype.char A unique character code for each of the 21 different built-in types. Examples >>> import numpy as np >>> x = np.dtype(floa...
- numpy.dtype.num
...numpy.dtype.num attribute dtype.num A unique number for each of the 21 different built-in types. These are roughly ordered from least-to-most precision. Examp...
- numpy.format_float_positional
...numpy.format_float_positional numpy.format_float_positional(x, precision=None, unique=True, fractional=True, trim='k', sign=False, pad_left=None, pad_right=None, min_digits=None)[source] Format a flo...
- numpy.format_float_scientific
...numpy.format_float_scientific numpy.format_float_scientific(x, precision=None, unique=True, trim='k', sign=False, pad_left=None, exp_digits=None, min_digits=None)[source] Format a floating-point scal...
- numpy.in1d
...numpy.in1d numpy.in1d(ar1, ar2, assume_unique=False, invert=False, *, kind=None)[source] Test whether each element of a 1-D array is also present in a second a...
- numpy.intersect1d
...numpy.intersect1d numpy.intersect1d(ar1, ar2, assume_unique=False, return_indices=False)[source] Find the intersection of two arrays. Return the sorted, unique values that a...
- numpy.isin
...numpy.isin numpy.isin(element, test_elements, assume_unique=False, invert=False, *, kind=None)[source] Calculates element in test_elements, broadcasting over element only. R...
- numpy.ma.intersect1d
...numpy.ma.intersect1d ma.intersect1d(ar1, ar2, assume_unique=False)[source] Returns the unique elements common to both arrays. Masked values are considered equal one to the o...
- numpy.ma.setdiff1d
- numpy.ma.setxor1d
- numpy.ma.unique
...NumPy reference NumPy’s module structure Masked array operations numpy.ma.unique...
- numpy.moveaxis
- numpy.nanpercentile
...tionalThis parameter specifies the method to use for estimating the percentile. There are many different methods, some unique to NumPy. See the notes for explanation. The options sorted by their R type as summarized in the H&F paper [1] a...
- numpy.nanquantile
...optionalThis parameter specifies the method to use for estimating the quantile. There are many different methods, some unique to NumPy. See the notes for explanation. The options sorted by their R type as summarized in the H&F paper [1] a...
- numpy.pad
...ence, array_like, int}Number of values padded to the edges of each axis. ((before_1, after_1), ... (before_N, after_N)) unique pad widths for each axis. (before, after) or ((before, after),) yields same before and after pad for each axis. (...
- numpy.percentile
...tionalThis parameter specifies the method to use for estimating the percentile. There are many different methods, some unique to NumPy. See the notes for explanation. The options sorted by their R type as summarized in the H&F paper [1] a...
- numpy.quantile
...optionalThis parameter specifies the method to use for estimating the quantile. There are many different methods, some unique to NumPy. The recommended options, numbered as they appear in [1], are: ‘inverted_cdf’ ‘averaged_inverted_cdf’ ‘...
- numpy.random.Generator.normal
...commonly occurring distribution of samples influenced by a large number of tiny, random disturbances, each with its own unique distribution [2]. Parameters: locfloat or array_like of floatsMean (“centre”) of the distribution. scalefloat...
- numpy.random.normal
...commonly occurring distribution of samples influenced by a large number of tiny, random disturbances, each with its own unique distribution [2]. Note New code should use the normal method of a Generator instance instead; please see the Qui...
- numpy.random.RandomState.normal
...commonly occurring distribution of samples influenced by a large number of tiny, random disturbances, each with its own unique distribution [2]. Note New code should use the normal method of a Generator instance instead; please see the Qui...
- numpy.repeat
- numpy.set_printoptions
...n for floating point output (default 8). May be None if floatmode is not fixed, to print as many digits as necessary to uniquely specify the value. thresholdint, optionalTotal number of array elements which trigger summarization rather tha...
- numpy.setdiff1d
- numpy.setxor1d
...numpy.setxor1d numpy.setxor1d(ar1, ar2, assume_unique=False)[source] Find the set exclusive-or of two arrays. Return the sorted, unique values that are in only one (no...
- numpy.union1d
- numpy.unique
...NumPy reference Routines and objects by topic Array manipulation routines numpy.unique...
- numpy.unique_all
...NumPy reference Routines and objects by topic Set routines numpy.unique_all...
- numpy.unique_counts
...NumPy reference Routines and objects by topic Set routines numpy.unique_counts...
- numpy.unique_inverse
...NumPy reference Routines and objects by topic Set routines numpy.unique_inverse...
- numpy.unique_values
...NumPy reference Routines and objects by topic Set routines numpy.unique_values...
- NumPy: the absolute basics for beginners
...) array([[2, 1, 1, 0], [0, 0, 0, 4]]) # may vary Read more about random number generation here. How to get unique items and counts This section covers np.unique() You can find the unique elements in an array easily with np.uni...
- Python types and C-structures
- Random sampling (
numpy.random
) - Standard array subclasses
...y’s public API, which was called in the form func(*args, **kwargs). types is a collection collections.abc.Collection of unique argument types from the original NumPy function call that implement __array_function__. The tuple args and dict k...
- numpy.unique_all (Python function, in numpy.unique_all)
- numpy.unique_counts (Python function, in numpy.unique_counts)
- numpy.unique_inverse (Python function, in numpy.unique_inverse)
- numpy.unique_values (Python function, in numpy.unique_values)
- Array API
...em, 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 returned...
- Beyond the basics
...tions you call PyArray_RegisterDataType (new_descr). The return value from this call is an integer providing you with a unique type_number that specifies your data-type. This type number should be stored and made available by your module so...
- Data type objects (
dtype
)...he byte order. One-character stringsEach built-in data-type has a character code (the updated Numeric typecodes), that uniquely identifies it. Example >>> import numpy as np >>> dt = np.dtype('b') # byte, native byte order >>> dt = np....
- Generalized universal function API
- How does the CPU dispatcher work?
- Parallel random number generation
...e space to avoid overlapping or request streams from a common global service. This general “tree-hashing” scheme is not unique to numpy but not yet widespread. Python has increasingly-flexible mechanisms for parallelization available, and t...
- Performance
- Scalars
- ufunc API
- Working with Arrays of Strings And Bytes