0% found this document useful (0 votes)
8 views1 page

Numpy Array Manipulation Techniques

This document provides 10 questions about operations that can be performed on NumPy arrays including: creating a 3x3 Boolean array of all Trues; replacing odd numbers with -1; getting common/matching elements and their positions between two arrays; swapping columns and rows; reversing columns and rows; printing an array with 3 decimal places; and computing the mean, median, and standard deviation of an array.

Uploaded by

Kartik Singh
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views1 page

Numpy Array Manipulation Techniques

This document provides 10 questions about operations that can be performed on NumPy arrays including: creating a 3x3 Boolean array of all Trues; replacing odd numbers with -1; getting common/matching elements and their positions between two arrays; swapping columns and rows; reversing columns and rows; printing an array with 3 decimal places; and computing the mean, median, and standard deviation of an array.

Uploaded by

Kartik Singh
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Q1.

Create a 3×3 numpy array of all True’s (Boolean)


Q2. Replace all odd numbers in array with -1
Q3. Get the common items between array1 and array2
[Link] the positions where elements of  a  and  b  match

Q5. Swap columns 1 and 2 in the array.


[Link] rows 1 and 2 in the array.
Q7. Reverse the columns of a 2D array.
 Q8. Reverse the rows of a 2D array.
Q9. Print or show only 3 decimal places of the numpy
array.
Q10. how to compute mean, median and standard
deviation of an array.

You might also like