ndarray

Qus. 1 : <p>What is the output of the following code ?</p><pre>import numpy as np<br>y = np.array([[11, 12, 13, 14], [32, 33, 34, 35]])<br>print(y.ndim)</pre>

  1. 1
  2. 2
  3. 3
  4. 0
Qus. 2 : The most important object defined in NumPy is an N-dimensional array type called?

  1. ndarray
  2. narray
  3. nd_array
  4. darray
Qus. 3 : Which of the following arrays is a two dimensional (2-D) array?

  1. 89
  2. [1,2,3,4]
  3. [1,2,3],[3,4,5],[1,3,4]
  4. [[2 3 5][ 4 5 6][4 5 6]]
Qus. 4 : Numpy array's dimension are known as

  1. axes
  2. degree
  3. cordinate
  4. points
Qus. 5 : What is the main object type in NumPy that represents homogeneous arrays?

  1. List
  2. Array
  3. Matrix
  4. Set
Qus. 6 : How can you create a NumPy array from a Python list?

  1. numpy.array(list)
  2. numpy.array(list, dtype=float)
  3. Both a and b
  4. None of the above

Programs

Create a numpy array having two dimensions and shape(3,3) and perform the following operations on array elements:

View Solution


Write a program to find the intersection of two arrays

View Solution


Latest Current Affairs 2024 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online MBA 2 years Online MCA Online BCA Best Website and Software Company in Allahabad