
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
216 Views
To return the variance of the masked array elements, use the ma.MaskedArray.var() in Python Numpy. Returns the variance of the array elements, a measure of the spread of a distribution. The variance is computed for the flattened array by default, otherwise over the specified axis.The “axis” parameter is the axis ... Read More

AmitDiwan
451 Views
To shift the bits of array elements of a 2d array to the right, use the numpy.right_shift() method in Python Numpy. Bits are shifted to the right x2. Because the internal representation of numbers is in binary format, this operation is equivalent to dividing x1 by 2**x2.The x1 is the ... Read More

AmitDiwan
143 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
314 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
137 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
131 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
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
134 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
129 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
662 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