Search
Searching..
- numpy.equal
...NumPy reference Routines and objects by topic Logic functions numpy.equal...
- numpy.char.equal (Python function, in numpy.char.equal)
- numpy.equal (Python data, in numpy.equal)
- numpy.strings.equal (Python data, in numpy.strings.equal)
numpy.polynomial
...– Check if types match Poly.has_samewindow(p1, p2) – Check if windows match Misc p.linspace() – Return x, p(x) at equally-spaced points in domain p.mapparms() – Return the parameters for the linear mapping between domain and window. p...
- Array creation
...the stop value is sometimes included. numpy.linspace will create arrays with a specified number of elements, and spaced equally between the specified beginning and end values. For example: >>> import numpy as np >>> np.linspace(1., 4., 6) a...
- Array iterator API
...oadcast so elements need to be duplicated to get a constant stride. In normal buffering, the size of each inner loop is equal to the buffer size, or possibly larger if NPY_ITER_GROWINNER is specified. If NPY_ITER_REDUCE_OK is enabled and a...
- Data type promotion in NumPy
...dtype. For example, a uint8 is an unsigned integer stored using 8 bits. The result of an operation will always be of an equal or higher kind of any of the inputs. Furthermore, the result will always have a precision greater than or equal to...
- Data types
...nce, when performing basic arithmetic operations involving floating-point numbers: >>> 0.3 - 0.2 - 0.1 # This does not equal 0 due to floating-point precision -2.7755575615628914e-17 To handle such cases, it’s advisable to use functions...
- Interoperability with NumPy
...ndarray object directly: >>> x = np.array([1, 2, 3, 4]) >>> f(x) 21.1977562209304 We would like this function to work equally well with any NumPy-like array object. NumPy allows a class to indicate that it would like to handle computation...
- Memory alignment
...ex64 datatype is implemented as struct { float real, imag; }. This has “true” alignment of 4 and “uint” alignment of 8 (equal to the true alignment of uint64). Some cases where uint and true alignment are different (default GCC Linux): ar...
- Miscellaneous
...numpy: nan, inf, NaNs can be used as a poor-man’s mask (if you don’t care what the 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...
- NumPy 1.10.0 Release Notes
...lose uses np.isclose internally. np.allclose now uses np.isclose internally and inherits the ability to compare NaNs as equal by setting equal_nan=True. Subclasses, such as np.ma.MaskedArray, are also preserved now. np.genfromtxt now hand...
- NumPy 1.13.0 Release Notes
...ypeError when negative applied to booleans. subtract(bool_, bool_), TypeError when subtracting boolean from boolean. np.equal, np.not_equal, object identity doesn’t override failed comparison. np.equal, np.not_equal, object identity doesn’t...
- NumPy 1.14.0 Release Notes
...urce did not have a field. Correspondingly, the order of fields in a structured dtypes now matters when computing dtype equality. For example, with the dtypes x = dtype({'names': ['A', 'B'], 'formats': ['i4', 'f4'], 'offsets': [0, 4]}) y =...
- NumPy 1.15.0 Release Notes
...by some downstream projects remain available, but will not be maintained. The standard testing utilities, assert_almost_equal and such, are not be affected by this change except for the nose specific functions import_nose and raises. Those...
- NumPy 1.16.0 Release Notes
...dification in any version of NumPy. NaT comparisons Consistent with the behavior of NaN, all comparisons other than inequality checks with datetime64 or timedelta64 NaT (“not-a-time”) values now always return False, and inequality checks...
- NumPy 1.19.0 Release Notes
...ero. The parameter has the same meaning as it does in reduction functions such as numpy.sum or numpy.mean. (gh-15870) equal_nan parameter for numpy.array_equal The keyword argument equal_nan was added to numpy.array_equal. equal_nan is a...
- NumPy 1.21.0 Release Notes
...8658. (gh-18658) Changes to comparisons with dtype=... When the dtype= (or signature) arguments to comparison ufuncs (equal, less, etc.) is used, this will denote the desired output dtype in the future. This means that: np.equal(2, 3, dt...
- NumPy 1.23.0 Release Notes
...eter has the same meaning 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. Set...
- NumPy 1.23.3 Release Notes
...to fix MacOS savez test #22222: TYP,BUG: Reduce argument validation in C-based __class_getitem__ #22223: TST: ensure np.equal.reduce raises a TypeError #22224: BUG: Fix the implementation of numpy.array_api.vecdot #22230: BUG: Better report...
- NumPy 1.24 Release Notes
...to numpy.show_config which displays the build-related information. (gh-21468) strict option for testing.assert_array_equal The strict option is now available for testing.assert_array_equal. Setting strict=True will disable the broadcasti...
- NumPy 1.25.0 Release Notes
...even though the documentation states it is always excluded. (gh-23229) When comparing datetimes and timedelta using np.equal or np.not_equal numpy previously allowed the comparison with casting="unsafe". This operation now fails. Forcing t...
- NumPy 1.7.0 Release Notes
...rm or given non-uniform probabilities. New function isclose Returns a boolean array where two arrays are element-wise equal within a tolerance. Both relative and absolute tolerance can be specified. Preliminary multi-dimensional support...
- NumPy 1.7.2 Release Notes
...ot filled enough gh-3192: f2py crashes with UnboundLocalError exception gh-442: Concatenate with axis=None now requires equal number of array elements gh-2485: Fix for astype(‘S’) string truncate issue gh-3312: bug in count_nonzero gh-2684:...
- NumPy 1.8.0 Release Notes
...partition by index k moves the k smallest element to the front of an array. All elements before k are then smaller or equal than the value in position k and all elements following k are then greater or equal than the value in position k....
- NumPy 1.8.2 Release Notes
...x only release in the 1.8.x series. Issues fixed gh-4836: partition produces wrong results for multiple selections in equal ranges gh-4656: Make fftpack._raw_fft threadsafe gh-4628: incorrect argument order to _copyto in in np.nanmax, np....
- NumPy 1.9.0 Release Notes
...rank function The rank function has been deprecated to avoid confusion with numpy.linalg.matrix_rank. Object array equality comparisons In the future object array comparisons both == and np.equal will not make use of identity checks an...
- NumPy 2.2.0 Release Notes
...4 and timedelta64 hashes now correctly match the Pythons builtin datetime and timedelta ones. The hashes now evaluated equal even for equal values with different time units. (gh-14622) Fixed a number of issues around promotion for string...
- NumPy core math library
...as a normal type in C, since it is a typedef for npy_uint16. For example, 1.0 looks like 0x3c00 to C, and if you do an equality comparison between the different signed zeros, you will get -0.0 != 0.0 (0x8000 != 0x0000), which is incorrect....
- NumPy for MATLAB users
...) generate a random 3x4 array with default random number generator and seed = 42 linspace(1,3,4) np.linspace(1,3,4) 4 equally spaced samples between 1 and 3, inclusive [x,y]=meshgrid(0:8,0:5) np.mgrid[0:9.,0:6.] or np.meshgrid(r_[0:9.],r...
- NumPy project governance and decision-making
...only way for a Partner to influence the project is by actively contributing to the open development of the project, in equal terms to any other member of the community of Contributors and Council Members. Merely using Project Software in i...
- NumPy quickstart
...the shape tuple is therefore the number of axes, ndim. ndarray.sizethe total number of elements of the array. This is equal to the product of the elements of shape. ndarray.dtypean object describing the type of the elements in the array....
- numpy.absolute
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.acos
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.acosh
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.add
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.all
...es to True. Notes Not a Number (NaN), positive infinity and negative infinity evaluate to True because these are not equal to zero. Changed in version 2.0: Before NumPy 2.0, all did not return booleans for object dtype input arrays. Thi...
- numpy.allclose
...numpy.allclose numpy.allclose(a, b, rtol=1e-05, atol=1e-08, equal_nan=False)[source] Returns True if two arrays are element-wise equal within a tolerance. The tolerance values are...
- numpy.any
...te to True. Notes Not a Number (NaN), positive infinity and negative infinity evaluate to True because these are not equal to zero. Changed in version 2.0: Before NumPy 2.0, any did not return booleans for object dtype input arrays. Thi...
- numpy.apply_along_axis
...identical to the shape of arr, except along the axis dimension. This axis is removed, and replaced with new dimensions equal to the shape of the return value of func1d. So if func1d returns a scalar out will have one fewer dimensions than...
- numpy.arccos
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.arccosh
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.arcsin
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.arcsinh
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.arctan
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.arctan2
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.arctanh
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.argsort
...bool, optionalSort stability. If True, the returned array will maintain the relative order of a values which compare as equal. If False or None, this is not guaranteed. Internally, this option selects kind='stable'. Default: None. New in v...
- numpy.array2string
...actional digits, but if an element can be uniquely represented with fewer digits only print it with that many. ‘maxprec_equal’: Print at most precision fractional digits, but if every element in the array can be uniquely represented with an...
- numpy.array_equal
...NumPy reference Routines and objects by topic Logic functions numpy.array_equal...
- numpy.array_equiv
...umpy.array_equiv numpy.array_equiv(a1, a2)[source] Returns True if input arrays are shape consistent and all elements equal. Shape consistent means they are either the same shape, or one input array can be broadcasted to create the same s...
- numpy.array_split
...e only difference between these functions is that array_split allows indices_or_sections to be an integer that does not equally divide the axis. For an array of length l that should be split into n sections, it returns l % n sub-arrays of s...
- numpy.asin
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.asinh
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.atan
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.atan2
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.atanh
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.average
...and shape consistent with a along the specified axis. If weights=None, then all data in a are assumed to have a weight equal to one. The calculation is: avg = sum(a * weights) / sum(weights) where the sum is over all included elements. T...
- numpy.bartlett
...m value normalized to one (the value one appears only if the number of samples is odd), with the first and last samples equal to zero. See also blackman, hamming, hanning, kaiser Notes The Bartlett window is defined as \[w(n) = \fr...
- numpy.bincount
...f bins for the output array. Returns: outndarray of intsThe result of binning the input array. The length of out is equal to np.amax(x)+1. Raises: ValueErrorIf the input is not 1-dimensional, or contains elements with negative value...
- numpy.bitwise_and
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.bitwise_count
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.bitwise_invert
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.bitwise_left_shift
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.bitwise_or
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.bitwise_right_shift
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.bitwise_xor
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.block
...ns match. Returns: block_arrayndarrayThe array assembled from the given blocks. The dimensionality of the output is equal to the greatest of: the dimensionality of all the inputs the depth to which the input list is nested Raises:...
- numpy.cbrt
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.ceil
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.char.add
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.char.chararray.ctypes
...ay be raised instead. In particular, the object will still have the as_parameter attribute which will return an integer equal to the data attribute. Examples >>> import numpy as np >>> import ctypes >>> x = np.array([[0, 1], [2, 3]], dtype=...
- numpy.char.chararray.size
...numpy.char.chararray.size attribute char.chararray.size Number of elements in the array. Equal to np.prod(a.shape), i.e., the product of the array’s dimensions. Notes a.size returns a standard arbitrary precis...
- numpy.char.equal
...erence NumPy’s module structure Legacy fixed-width string functionality numpy.char.equal...
- numpy.char.greater
...rray_like of str or unicodeInput arrays of the same shape. Returns: outndarrayOutput array of bools. See also equal, not_equal, greater_equal, less_equal, less Examples >>> import numpy as np >>> x1 = np.array(['a', 'b', 'c']) >...
- numpy.char.greater_equal
...NumPy’s module structure Legacy fixed-width string functionality numpy.char.greater_equal...
- numpy.char.isalnum
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.char.isalpha
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.char.isdecimal
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.char.isdigit
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.char.islower
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.char.isnumeric
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.char.isspace
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.char.istitle
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.char.isupper
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.char.less
...rray_like of str or unicodeInput arrays of the same shape. Returns: outndarrayOutput array of bools. See also equal, not_equal, greater_equal, less_equal, greater Examples >>> import numpy as np >>> x1 = np.array(['a', 'b', 'c']...
- numpy.char.less_equal
...e NumPy’s module structure Legacy fixed-width string functionality numpy.char.less_equal...
- numpy.char.not_equal
...ce NumPy’s module structure Legacy fixed-width string functionality numpy.char.not_equal...
- numpy.char.str_len
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.clip
...also Output type determination Notes When a_min is greater than a_max, clip returns an array in which all values are equal to a_max, as shown in the second example. Examples >>> import numpy as np >>> a = np.arange(10) >>> a array([0, 1,...
- numpy.concat
...ma.concatenateConcatenate function that preserves input masks. array_splitSplit an array into multiple sub-arrays of equal or near-equal size. splitSplit array into a list of multiple sub-arrays of equal size. hsplitSplit array into mu...
- numpy.concatenate
...ma.concatenateConcatenate function that preserves input masks. array_splitSplit an array into multiple sub-arrays of equal or near-equal size. splitSplit array into a list of multiple sub-arrays of equal size. hsplitSplit array into mu...
- numpy.conj
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.conjugate
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.copysign
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.cos
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.cosh
...provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. wherearray_like, optionalThis condition is broadcast over the input. At locations where...
- numpy.cross
...rns: cndarrayVector cross product(s). Raises: ValueErrorWhen the dimension of the vector(s) in a and/or b does not equal 2 or 3. See also innerInner product outerOuter product. linalg.crossAn Array API compatible variation of n...
- numpy.cumsum
- numpy.cumulative_sum
- numpy.deg2rad
- numpy.degrees
- numpy.diagonal
- numpy.distutils.ccompiler.CCompiler_spawn
- numpy.divide
- numpy.divmod
- numpy.dsplit
- numpy.equal
- numpy.exp
- numpy.exp2
- numpy.expm1
- numpy.eye
- numpy.fabs
- numpy.fft.fft2
- numpy.float_power
- numpy.floor
- numpy.floor_divide
- numpy.fmax
- numpy.fmin
- numpy.fmod
- numpy.frexp
- numpy.geomspace
- numpy.gradient
- numpy.greater
- numpy.greater_equal
- numpy.heaviside
- numpy.histogram
- numpy.histogram2d
- numpy.histogram_bin_edges
- numpy.histogramdd
- numpy.hsplit
- numpy.hypot
- numpy.in1d
- numpy.invert
- numpy.isclose
- numpy.iscomplexobj
- numpy.isfinite
- numpy.isin
- numpy.isinf
- numpy.isnan
- numpy.isnat
- numpy.isrealobj
- numpy.issubdtype
- numpy.ldexp
- numpy.left_shift
- numpy.less
- numpy.less_equal
- numpy.lib.NumpyVersion
- numpy.linalg.diagonal
- numpy.linalg.lstsq
- numpy.linalg.matrix_power
- numpy.linalg.matrix_rank
- numpy.linalg.pinv
- numpy.linalg.qr
- numpy.linalg.slogdet
- numpy.linalg.solve
- numpy.linalg.tensordot
- numpy.linalg.tensorsolve
- numpy.linspace
- numpy.loadtxt
- numpy.log
- numpy.log10
- numpy.log1p
- numpy.log2
- numpy.logaddexp
- numpy.logaddexp2
- numpy.logical_and
- numpy.logical_not
- numpy.logical_or
- numpy.logical_xor
- numpy.logspace
- numpy.ma.allclose
- numpy.ma.allequal
- numpy.ma.apply_along_axis
- numpy.ma.average
- numpy.ma.clip
- numpy.ma.conjugate
- numpy.ma.hsplit
- numpy.ma.intersect1d
- numpy.ma.mask_cols
- numpy.ma.mask_rows
- numpy.ma.masked_array.ctypes
- numpy.ma.masked_array.partition
- numpy.ma.masked_array.size
- numpy.ma.masked_equal
- numpy.ma.masked_greater_equal
- numpy.ma.masked_less_equal
- numpy.ma.masked_not_equal