- 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
AmitDiwan has Published 11360 Articles
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
101 Views
To reduce a multi-dimensional array, use the np.ufunc.reduce() method in Python Numpy. Here, we have used add.reduce() to reduce it to the addition of elements. The axis 0 is set using the "axis" parameter.The numpy.ufunc has functions that operate element by element on whole arrays. The ufuncs are written in ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
174 Views
To reduce a multi-dimensional array, use the np.ufunc.reduce() method in Python Numpy. Here, we have used add.reduce() to reduce it to the addition of elements. The axis is set using the "axis" parameter.A universal function (ufunc) is a function that operates on ndarrays in an element-by-element fashion, supporting array broadcasting, ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
203 Views
To return the non-negative square-root of an array, element-wise, use the numpy.sqrt() method in Python Numpy.An array of the same shape as x, containing the positive square-root of each element in x. If any element in x is complex, a complex array is returned (and the square-roots of negative reals ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
130 Views
To return the natural logarithm of one plus the input array, element-wise., use the numpy.log1p() method in Python Numpy. It calculates log(1 + x).For complex-valued input, log1p is a complex analytical function that has a branch cut [-inf, -1] and is continuous from above on it. log1p handles the floating-point ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
1K+ Views
To return the base 10 logarithm of the input array, element-wise, use the numpy.log10() method in Python Numpy. For real-valued input data types, log10 always returns real output. For each value that cannot be expressed as a real number or infinity, it yields nan and sets the invalid floating point ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
616 Views
To compute the Heaviside step function, use the numpy.heaviside() method in Python Numpy. The 1st parameter is the input array. The 2nd parameter is the value of the function when array element is 0. Returns the output array, element-wise Heaviside step function of x1. This is a scalar if both ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
124 Views
To return an element-wise indication of the sign of complex types, use the numpy.sign() method in Python Numpy.The sign function returns -1 if x < 0, 0 if x==0, 1 if x > 0. nan is returned for nan inputs. For complex inputs, the sign function returns sign(x.real) + 0j ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
198 Views
To return an element-wise indication of the sign of a number, use the numpy.sign() method in Python Numpy.The sign function returns -1 if x < 0, 0 if x==0, 1 if x > 0. nan is returned for nan inputs. For complex inputs, the sign function returns sign(x.real) + 0j ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
7K+ Views
To round elements of the array to the nearest integer, use the numpy.rint() method in Python Numpy. For values exactly halfway between rounded decimal values, NumPy rounds to the nearest even value.The out is a location into which the result is stored. If provided, it must have a shape that ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
1K+ Views
To return the absolute value of complex values, use the numpy.absolute() method in Python Numpy. 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 ... Read More