- 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)
893 Views
To change the sign of array values to that of a scalar, element-wise, use the numpy.copysign() method in Python Numpy. The 1st parameter of the copysign() is the value (array elements) to change the sign of. The 2nd parameter is the sign to be copied to 1st parameter value.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 to the number of outputs.The condition is ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
78 Views
To return element-wise True where signbit is set (less than zero), use the numpy.signbit() method in Python Numpy. The new location where we will store the result is a new array.Returns the output array, or reference to out if that was supplied. This is a scalar if x is a scalar. 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 to the number of ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
99 Views
To return element-wise True where signbit is set (less than zero), use the numpy.signbit() method in Python Numpy. Returns the output array, or reference to out if that was supplied. This is a scalar if x is a scalar.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 to the number of outputs.The condition is broadcast over the input. At locations where the condition is ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
72 Views
To compute the absolute values element-wise, use the numpy.fabs() method in Python Numpy. The new location where we will store the result is a new array.This function returns the absolute values (positive magnitude) of the data in x. Complex values are not handled, use absolute to find the absolute values of complex data. 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 out=None, locations ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
120 Views
To test array values for NaT, use the numpy.isnat() method in Python Numpy. The new location where we will store the result is a new array.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 out=None, locations within it where the condition is False will remain uninitialized.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)
423 Views
To test array for NaT, use the numpy.isnat() method in Python Numpy. 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 out=None, locations within it where the condition is False will remain uninitialized.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 ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
5K+ Views
To test element-wise for NaT, use the numpy.isnat() method in Python Numpy. It checks the value for datetime or timedelta data type.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 out=None, locations within it where the condition is False will remain uninitialized.StepsAt first, import the required library −import numpy as npTo test element-wise for NaT, use the numpy.isnat() method in Python Numpy. It checks ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
567 Views
To test element-wise for NaN, use the numpy.isnan() method in Python Numpy. Returns True where x is NaN, false otherwise. This is a scalar if x is a scalar. 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 out=None, locations within it where the condition is False will remain uninitialized.NumPy uses the IEEE Standard for Binary Floating-Point for Arithmetic (IEEE 754). This means that ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
194 Views
To test array values for infiniteness, use the numpy.isinf() method in Python Numpy. The new location where we will store the result is a new array. Returns a boolean array of the same shape as x, True where x == +/-inf, otherwise False.NumPy uses the IEEE Standard for Binary Floating-Point for Arithmetic (IEEE 754). Errors result if the second argument is supplied when the first argument is a scalar, or if the first and second arguments have different shapes.StepsAt first, import the required library −import numpy as npCreate an array with some inf values −arr = np.array([1, 2, 10, 50, ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
2K+ Views
To test array for positive or negative infinity, use the numpy.isinf() method in Python Numpy. Returns a boolean array of the same shape as x, True where x == +/-inf, otherwise False.NumPy uses the IEEE Standard for Binary Floating-Point for Arithmetic (IEEE 754). Errors result if the second argument is supplied when the first argument is a scalar, or if the first and second arguments have different shapes.StepsAt first, import the required library −import numpy as npCreate an array with some inf values −arr = np.array([1, 2, 10, 50, -np.inf, 0., np.inf]) Display the arrays −print("Array...", arr)Get the type of ... Read More