Array From Existing Data

Qus. 1 : <p>What will be the output of the following ?</p><pre>import numpy as np<br>a=np.array([2,4,1])<br>b=a.copy()<br>a[1]=3<br>print(b)</pre>

  1. [2 4 1]
  2. [2 3 1]
  3. [3 4 1]
  4. [2 4 3]
Qus. 2 : Which function is used to generate evenly spaced values within a specified range?

  1. numpy.linspace()
  2. numpy.range()
  3. numpy.arrange()
  4. numpy.spaceline()

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 2025 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