
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
512 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 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 ... Read More

AmitDiwan
235 Views
To test array values for finiteness, use the numpy.isfinite() method in Python Numpy. Returns True where x is not positive infinity, negative infinity, or NaN; false otherwise. This is a scalar if x is a scalar.This condition is broadcast over the input. At locations where the condition is True, the ... Read More

AmitDiwan
539 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.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 ... Read More

AmitDiwan
458 Views
To compare two arrays and return the element-wise minimum ignoring NaNs, use the numpy.fmin() method in Python Numpy. Return value is either True or False.Compare two arrays and returns a new array containing the element-wise maxima. If one of the elements being compared is a NaN, then the non-nan element ... Read More

AmitDiwan
1K+ Views
To return the cube-root of an array, element-wise, use the numpy.cbrt() method in Python Numpy. An array of the same shape as x, containing the cube cube-root of each element in x. If out was provided, y is a reference to it. This is a scalar if x is a ... Read More

AmitDiwan
938 Views
To compare two arrays and return the element-wise maximum, use the numpy.fmax() method in Python Numpy. Return value is either True or False.Compare two arrays and returns a new array containing the element-wise maxima. If one of the elements being compared is a NaN, then the non-nan element is returned. ... Read More

AmitDiwan
1K+ Views
To calculate the absolute value, we can use two methods, fabs() and absolute(). To return the absolute value element-wise, use the numpy.fabs() method in Python Numpy. This displays the output in float.To return the absolute value element-wise, you can also use the numpy.absolute() method in Python Numpy. The out is ... Read More

AmitDiwan
298 Views
To return the element-wise quotient and remainder simultaneously, use the numpy.fmod() method in Python Numpy. Here, the 1st parameter is the Dividend array. The 2nd parameter is the Divisor array.This is the NumPy implementation of the C library function fmod, the remainder has the same sign as the dividend x1. ... Read More

AmitDiwan
433 Views
To compare two arrays and return the element-wise maximum ignoring NaNs, use the numpy.fmax() method in Python Numpy. Return value is either True or False.Compare two arrays and returns a new array containing the element-wise maxima. If one of the elements being compared is a NaN, then the non-nan element ... Read More

AmitDiwan
2K+ 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 ... Read More