- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 1204 Articles for Numpy
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
4K+ Views
To compare two arrays and return the element-wise maximum, use the numpy.maximum() method in Python Numpy. Return value is either True or False. Returns the maximum of x1 and x2, element-wise. This is a scalar if both x1 and x2 are scalars.Compare two arrays and returns a new array containing the element-wise maxima. If one of the elements being compared is a NaN, then that element is returned. If both elements are NaNs then the first is returned. The latter distinction is important for complex NaNs, which are defined as at least one of the real or imaginary parts being ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
467 Views
To return the truth value of an array equal to another element-wise, use the numpy.equal() method in Python Numpy. Return value is either True or False.The function returns an output array, element-wise comparison of x1 and x2. Typically of type bool, unless dtype=object is passed. This is a scalar if both x1 and x2 are scalars.The out is a location into which the result is stored. If provided, it must have a shape that the inputs broadcast to. If not provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
107 Views
To return the truth value of an array less than equal to another element-wise, use the numpy.less_equal() method in Python Numpy. Return value is either True or False. Returns output array, element-wise comparison of x1 and x2. Typically of type bool, unless dtype=object is passed. This is a scalar if both x1 and x2 are scalars.The condition is broadcast over the input. At locations where the condition is True, the out array will be set to the ufunc result. Elsewhere, the out array will retain its original value. Note that if an uninitialized out array is created via the default ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
198 Views
To compute the truth value of an array XOR another array element-wise, use the numpy.logical_xor() method in Python Numpy. Return value is either True or False. Return value is the Boolean result of the logical XOR operation applied to the elements of x1 and x2; the shape is determined by broadcasting. This is a scalar if both x1 and x2 are scalars.The out is a location into which the result is stored. If provided, it must have a shape that the inputs broadcast to. If not provided or None, a freshly-allocated array is returned. A tuple (possible only as a ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
167 Views
To reduce a multi-dimensional array, use the np.ufunc.reduce() method in Python Numpy. Here, we have used multiply.reduce() to reduce it to the multiplication of elements. The axis is set using the "axis" parameter. Axis or axes along which a reduction is performedThe numpy.ufunc has functions that operate element by element on whole arrays. The ufuncs are written in C (for speed) and linked into Python with NumPy’s ufunc facility. A universal function (or ufunc for short) is a function that operates on ndarrays in an element-by-element fashion, supporting array broadcasting, type casting, and several other standard features. That is, a ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
432 Views
To compare two arrays with some NaN values and return the element-wise minimum, use the numpy.maximum() method in Python NumpyIf one of the elements being compared is a NaN, then that element is returned.If both elements are NaNs then the first is returnedThe latter distinction is important for complex NaNs, which are defined as at least one of the real or imaginary parts being a NaN.The net effect is that NaNs are propagated.Returns the minimum of x1 and x2, element-wise. This is a scalar if both x1 and x2 are scalars.Compare two arrays and returns a new array containing the ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
3K+ Views
To reduce a multi-dimensional array, use the np.ufunc.reduce() method in Python Numpy. Here, we have used multiply.reduce() to reduce it to the multiplication of elements.The numpy.ufunc has functions that operate element by element on whole arrays. The ufuncs are written in C (for speed) and linked into Python with NumPy's ufunc facility.A universal function (or ufunc for short) is a function that operates on ndarrays in an element-byelement fashion, supporting array broadcasting, type casting, and several other standard features. That is, a ufunc is a "vectorized" wrapper for a function that takes a fixed number of specific inputs and produces ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
2K+ Views
To compare two arrays and return the element-wise minimum, use the numpy.minimum() method in Python Numpy. Return value is either True or False. Returns the minimum of x1 and x2, element-wise. This is a scalar if both x1 and x2 are scalars.Compare two arrays and returns a new array containing the element-wise minima. If one of the elements being compared is a NaN, then that element is returned. If both elements are NaNs then the first is returned. The latter distinction is important for complex NaNs, which are defined as at least one of the real or imaginary parts being ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
1K+ Views
To reduce array's dimension by one, use the np.ufunc.reduce() method in Python Numpy. Here, we have used multiply.reduce() to reduce it to the multiplication of all the elements.The numpy.ufunc has functions that operate element by element on whole arrays. The ufuncs are written in C (for speed) and linked into Python with NumPy's ufunc facility. A universal function (or ufunc for short) is a function that operates on ndarrays in an element-by-element fashion, supporting array broadcasting, type casting, and several other standard features. That is, a ufunc is a "vectorized" wrapper for a function that takes a fixed number of ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
119 Views
To compare two arrays with some Inf values and return the element-wise maximum, use the numpy.maximum() method in Python Numpy. Return value is either True or False. Returns the maximum of x1 and x2, element-wise. This is a scalar if both x1 and x2 are scalars.Compare two arrays and returns a new array containing the element-wise maxima. If one of the elements being compared is a NaN, then that element is returned. If both elements are NaNs then the first is returned. The latter distinction is important for complex NaNs, which are defined as at least one of the real ... Read More