
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
990 Views
To stack 1-D arrays as columns into a 2-D array, use the ma.column_stack() method in Python Numpy. Take a sequence of 1-D arrays and stack them as columns to make a single 2-D array. 2-D arrays are stacked as-is, just like with hstack. 1-D arrays are turned into 2-D columns ... Read More

AmitDiwan
2K+ Views
To stack arrays in sequence vertically (row wise), use the ma.row_stack() method in Python Numpy. This is equivalent to concatenation along the first axis after 1-D arrays of shape (N, ) have been reshaped to (1, N). Rebuilds arrays divided by vsplit. Returns the array formed by stacking the given ... Read More

AmitDiwan
192 Views
To remove axes of length one, use the ma.MaskedArray.squeeze() method in Numpy. The axis is set using the "axis" parameter. The axis selects a subset of the entries of length one in the shape. If an axis is selected with shape entry greater than one, an error is raised.The function ... Read More

AmitDiwan
163 Views
To convert inputs to arrays with at least two dimensions, use the ma.atleast_2d() method in Python Numpy. The parameters are One or more array-like sequences. Non-array inputs are converted to arrays. Arrays that already have two or more dimensions are preserved.The method returns an array, or list of arrays, each ... Read More

AmitDiwan
260 Views
To convert inputs to arrays with at least one dimension, use the ma.atleast_1d() method in Python Numpy. Scalar inputs are converted to 1-dimensional arrays, whilst higher-dimensional inputs are preserved. It returns an array, or list of arrays, each with a.ndim >= 1. Copies are made only if necessary. The function ... Read More

AmitDiwan
151 Views
To get or set the mask of the array if it has no named fields, use the MaskedArray.recordmask in Python Numpy. For structured arrays, returns a ndarray of booleans where entries are True if all the fields are masked, False otherwise.A masked array is the combination of a standard numpy.ndarray ... Read More

AmitDiwan
262 Views
To display the current mask, use the ma.MaskedArray.mask in Python Numpy. 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 is invalid, or an array of booleans that determines for each element of ... Read More

AmitDiwan
131 Views
To count the number of masked elements along specific axis, use the ma.MaskedArray.count_masked() method. The axis 0 is set using the "axis" parameter. The method returns the total number of masked elements (axis=None) or the number of masked elements along each slice of the given axis.The axis parameter is the ... Read More

AmitDiwan
128 Views
To compute the differences between consecutive elements of a masked array, use the MaskedArray.ediff1d() method in Python Numpy.The "to_begin" parameter sets the array of number(s) to prepend at the start of the returned differences. The "to_end" parameter sets the array of number(s) to append at the end of the returned ... Read More

AmitDiwan
137 Views
To count the number of masked elements along specific axis, use the ma.MaskedArray.count_masked() method. The axis is set using the "axis" parameter. The method returns the total number of masked elements (axis=None) or the number of masked elements along each slice of the given axis.The axis parameter is the axis ... Read More