- 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 11359 Articles
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
81 Views
To shift the bits of an integer to the right, use the numpy.right_shift() method in Python Numpy. We have set the count of shifts as a new array. Bits are shifted to the right x2. Because the internal representation of numbers is in binary format, this operation is equivalent to ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
222 Views
To return element-wise a copy of the string with uppercase characters converted to lowercase and vice versa, use the numpy.char.swapcase() method in Python Numpy. For 8-bit strings, this method is locale-dependent.The function swapcase() returns an output array of str or unicode, depending on input type. The numpy.char module provides a ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
76 Views
To return a copy of an array with the leading and trailing characters removed, use the numpy.char.strip() method in Python Numpy. The "chars" parameter is used to set a string specifying the set of characters to be removed. If omitted or None, the chars argument defaults to removing whitespace. The ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
93 Views
To return the sum along diagonals of the masked array elements, use the ma.MaskedArray.trace() in Numpy. The offset parameter is the offset of the diagonal from the main diagonal. Can be both positive and negative. Defaults to 0.The axis 1 and axis 2 are the axes to be used as ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
2K+ Views
To convert masked array to float type, use the ma.MaskedArray.__float__() method in Numpy. A mask is either nomask, indicating that no value of the associated array is invalid, or an array of booleans that determines for each element of the associated array whether the value is valid or not.StepsAt first, ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
82 Views
To get the imaginary part from the masked array, use the ma.MaskedArray.imag attribute in Numpy. This property is a view on the imaginary part of this MaskedArray.A mask is either nomask, indicating that no value of the associated array is invalid, or an array of booleans that determines for each ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
89 Views
To get the Tuple of bytes to step in each dimension when traversing an array, use the ma.MaskedArray.strides attribute in Numpy. The byte offset of element (i[0], i[1], ..., i[n]) in an array a is −offset = sum(np.array(i) * a.strides)A mask is either nomask, indicating that no value of the ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
579 Views
To get the total bytes consumed by the masked array, use the ma.MaskedArray.nbytes attribute in Numpy. Does not include memory consumed by non-element attributes of the array object.A mask is either nomask, indicating that no value of the associated array is invalid, or an array of booleans that determines for ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
533 Views
To compare and return True if two string arrays are equal, use the numpy.char.equal() method in Python Numpy. The arr1 and arr2 are the two input string arrays of the same shape. Unlike numpy.equal, this comparison is performed by first stripping whitespace characters from the end of the string. This ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
149 Views
To return the numeric string left-filled with zeros, use the numpy.char.zfill() method in Python Numpy. Here, The 1st parameter is the inout arrayThe 2nd parameter is the "width" i.e. the width of string to left-fill elements in arrayThe numpy.char module provides a set of vectorized string operations for arrays of ... Read More