numpy.MaskedArray.swapaxes() is used to return a masked array view with interchangeable axes 1 and 2.
numpy.ma.swapaxes (axis1, axis2)
axis1: strong> [int] First axis.
axis2: [int] Second axis.
Return: [swapped_array] Resultant array. p>
Code # 1:
Input array: [[1 2] [3 -1] [5 -3]] Masked array: [ [- 2] [3 -] [5 -3]] Output swapped masked array: [[- 3 5] [2 - -3]]
Code # 2:
Input array: [[[2.0e + 08 3.0e-05] ] [[-4.5e + 01 2.0e + 05]]] 3D Masked array: [[[- 3e-05]] [[-45.0 200000.0]]] Output swapped masked array: [[[- -45.0] ] [[3e-05 200000.0]]]
We are witnessing a movement that will completely transform any part of business and society. The word we have given to this move- ment is Big Data and it will change everything, from the way banks an...
IRMA is a research-based professional organization dedicated to advancing the concepts and practices of information resource management in modern organizations. The primary purpose of IRMA is to promo...
Pandas for Everyone: Python Data Analysis (Addison-Wesley Data & Analytics Series), 1st Edition. Pandas for Everyone brings together the practical knowledge and insights you need to solve real-worl...
This book introduces machine learning methods in finance. It features a unified treatment of machine learn...