
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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 10744 Articles

AmitDiwan
483 Views
To return the greatest common divisor, use the numpy.gcd() method in Python Numpy. The parameters are arrays of values. If x1.shape != x2.shape, they must be broadcastable to a common shape (which becomes the shape of the output).To return the lowest common multiple, use the numpy.lcm() method in Python Numpy. ... Read More

AmitDiwan
168 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
267 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
278 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
183 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
2K+ 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
801 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
182 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
261 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
8K+ 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