
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
114 Views
To return the data portion of the masked array as a hierarchical Python list, use the ma.MaskedArray.tolist() method in Numpy. Data items are converted to the nearest compatible Python type.Masked values are converted to fill_value. If fill_value is None, the corresponding entries in the output list will be None. The ... Read More

AmitDiwan
2K+ Views
To transform a masked array into a flexible-type array, use the ma.MaskedArray.toflex() method in Numpy. The flexible type array that is returned will have two fields: the _data field stores the _data part of the array.The method returns a new flexible-type ndarray with two fields: the first element containing a ... Read More

AmitDiwan
131 Views
To return a copy of self, with masked values filled with a given value, use the ma.MaskedArray.filled() method. The "fill_value" parameter is the value to use for invalid entries. Can be scalar or non-scalar.The fill_value is the value to use for invalid entries. Can be scalar or non-scalar. If non-scalar, ... Read More

AmitDiwan
486 Views
To return all the non-masked data as a 1-D array, use the ma.MaskedArray.compressed() 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 ... Read More

AmitDiwan
255 Views
To swap the bytes of the array elements, use the ma.MaskedArray.byteswap() method in Numpy. Toggle between low-endian and big-endian data representation by returning a byteswapped array, optionally swapped in-place. Arrays of byte-strings are not swapped. The real and imaginary parts of a complex number are swapped individually. It returns the ... Read More

AmitDiwan
198 Views
To swap the bytes of the masked array, use the ma.MaskedArray.byteswap() method in Numpy. The parameter "inplace" is set to True i.e. swap bytes in-place.Toggle between low-endian and big-endian data representation by returning a byteswapped array, optionally swapped in-place. Arrays of byte-strings are not swapped. The real and imaginary parts ... Read More

AmitDiwan
133 Views
To return the copy of the array, cast to a specified type, use the ma.MaskedArray.astype() method in Numpy. The parameter is the data-type to which the array is cast. Another parameter, order controls the memory layout order of the result. ‘C’ means C order, ‘F’ means Fortran order, ‘A’ means ... Read More

AmitDiwan
185 Views
To repeat elements of a masked array, use the ma.MaskedArray.repeat() method in Numpy. The "repeats" parameter sets the number of repetitions for each element. Here, repeats is broadcasted to fit the shape of the given axis. It returns the output array which has the same shape as a, except along ... Read More

AmitDiwan
275 Views
To return specified diagonals, use the ma.MaskedArray.diagonal() method in Numpy. Set the Offset of the diagonal from the main diagonal. Can be positive or negative.A masked array is the combination of a standard numpy.ndarray and a mask. A mask is either nomask, indicating that no value of the associated array ... Read More

AmitDiwan
125 Views
To set storage-indexed locations to corresponding values, use the ma.MaskedArray.put() method in Numpy. The "mode" parameter specifies how out-of-bounds indices will behave. Sets self._data.flat[n] = values[n] for each n in indices. If values is shorter than indices then it will repeat. If values has some masked values, the initial mask ... Read More