datatypes NumPy

Qus. 1 : which one is the correct syntax to create an array of type float?

  1. arr=np.float([1,2,3,4])
  2. arr=np.array([1,2,3,4]).toFloat()
  3. arr=np.array([1,2,3,4],dtype='float')
  4. arr=np.farray([1,2,3,4])
Qus. 2 : What is a correct syntax to create an array of type float?

  1. arr=np.array([1,2,3,4],dtype='float')
  2. arr=np.array([1,2,3,4],dtype='f')
  3. arr=np.array([1,2,3,4],dtype=float)
  4. All of the above
Qus. 3 : <p>What is the datatype of x ?</p><pre>import numpy as np<br>a=np.array([1,2,3,4])<br>x=a.tolist()</pre><div><br></div>

  1. int
  2. array
  3. tuple
  4. list
Qus. 4 : _____ creates an uninitialized array of specified shape and dtype.

  1. full
  2. empty
  3. init
  4. None of these
Qus. 5 : What is default data type of NumPy Array

  1. float
  2. integer
  3. string
  4. boolean


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) O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad