Numpy Practice Questions

 

Numpy practice questions

1)      Create an array using numpy library

2)      Create 2-D, 3-D array and display the dimension and type of array

3)      Create an array with values ranging from 100 to 120

4)      Demonstrate linspace() , logspace() functions

5)      Write a program to create another shape from an array without changing its data

6)      Write a program to create an array of 10's with the same shape and type as the given array.

Ex [10 10 10 10]

7)      Write a program to create a 3-D array with ones on a diagonal and zeros else where

8)      Write a program to create an array size 3x3 of ones and zeros.

9)      Create an array with 6 random integers between 10 and 20

10)   Write a program to find the 4th element and last element of a 3x3 array.

11)   Write a program to create an array and then use copy , view functions on the array ,show the differences.

12)   Write a program to find the indices of the maximum and minimum values along the given axis of an array

13)   Write a program to join two arrays along the axis

14)   Create an array with 10 elements and split into 2 and 3 arrays

15)   Write a program to get the values and indices of the elements that are bigger than 10 in a given array

16)   Write a program to sort the array elements along the axis.

17)   Write a program to implement arithmetic operations on arrays. ( addition, subtraction, multiplication, modulus,division, power,reciprocal)

18)   Write a program to create an array with complex numbers and display real, imaginary, conjugate values.

19)   Write a program to print mean and median of an array along the given axis

20)   Write a program to print variance and standard deviation of the given array elements

Comments

Popular posts from this blog

ML LAB