all_like
ones_like
one_alike
all of the mentioned
What will be the output of the following ?
import numpy as npa = np.array( [2, 3, 4, 5] )b = np.arange(4)print(a+b)
[2 3 4 5]
[3 4 5 6]
[1 2 3 4]
[2 4 6 8]
We can find the dimension of the array
Size of array
Operational activities on Matrix
None of the mentioned above
To make a Matrix with all diagonal element 0
To make a Matrix with first row 0
To make a Matrix with all elements 0
None of the above
numpy.maximum()
numpy.arraymax()
numpy.amax()
numpy.big()
What will be output for the following code?
import numpy as npa=np.array([[1,2,3],[0,1,4]])print (a.size)
1
5
6
4
import numpy as npa=np.array([2,4])b=np.array([3,5])c=a*bprint(c)
[ 2 4 3 5]
[ 6 20]
[ 6 12 10 20]
26
Indexing
Slicing
Reshaping
What is the output of the following code?
import numpy as np a=np.array([1,2,3,5,8]) b=np.array([0,3,4,2,1]) c=a+b c=c*a print(c[2])
10
21
12
28
What will be output for the following code ?
import numpy as np
ary=np.array([1,2,3,5,8])
ary=ary+1
print(ary[1])
0
2
3
import numpy as nparr=np.array([1,2,3])print(arr.shape)
(3,)
(4,)
rank
dtype
shape
None of these
arr=np.array([1,2,3,4],dtype='float')
arr=np.array([1,2,3,4],dtype='f')
arr=np.array([1,2,3,4],dtype=float)
All of the above
Numbering Python
Number In Python
Numerical Python
array_split()
split()
split_array()
hstack() and vstack()
unlimited length
all private members must have leading and trailing underscores
Preferred Installer Program
numpy.array(list)
numpy.array(list, dtype=float)
Both a and b
import numpy as npa = np.array([1,2,3,5,8])b = np.array([0,1,5,4,2])c = a + bc = c*aprint (c[2])
24
import numpy as npprint(np.maximum([2, 3, 4], [1, 5, 2]))
[1 5 2]
[1 5 4]
[2 3 4]
[2 5 4]
import numpy as npary = np.array([1,2,3,5,8])ary = ary + 1print (ary[1])
Mathematical and logical operations on arrays.
Fourier transforms and routines for shape manipulation.
Operations related to linear algebra.
import numpy as npa=np.array([2,4,1])b=a.copy()a[1]=3print(b)
[2 4 1]
[2 3 1]
[3 4 1]
[2 4 3]
import numpy as npa = np.array([[1, 2, 3],[0,1,4],[11,22,33]])print (a.size)
9
np.concatenate()
np.join()
np.array_join()
np.join_array()
What will be the output of following Python code?
import numpy as npa = np.array([(10,20,30)])print(a.itemsize)
All of the mentioned above
import numpy as npa = np.array([1, 5, 4, 7, 8])a = a + 1print(a[1])
7
Number of Rows and Column in array
Size of each items in array
Number of elements in array
Largest element of an array
It creates a new Python list.
It creates a NumPy array.
It performs element-wise addition.
It calculates the mean of an array.
arr=np.float([1,2,3,4])
arr=np.array([1,2,3,4]).toFloat()
arr=np.farray([1,2,3,4])
from numpy import *
import numpy
import numpy as my_numpy
All of above
full
empty
init
Shape
Array
both a) and b)
None of the above.
What will be the output of the following Python code?
len(["hello",2, 4, 6])
Error
ndarray
narray
nd_array
darray
numpy.linspace()
numpy.range()
numpy.arrange()
numpy.spaceline()
import numpy as npa=np.array([2,3,4,5])print(a.dtype)
int32
int
float
none of these
import numpy as npa = np.array([[ 1,2,3,4], [5,6,7,8], [9,10,11,12]])print(a[2,2])
11
8
axes
degree
cordinate
points
integer
string
boolean
A machine learning library
A web development framework
A numerical computing library in Python
A data visualization tool
Indexed
Sliced
Iterated
np.array()
np.zeros()
np.empty()
np.ndim(array_name)
array_name.ndim()
np.dim(array_name)
array_name.dim
import numpy as npa=np.array([2,4,1])b=aa[1]=3print(b)
np.array([4,5,6])
np.create_array([4,5,6])
np.createArray([4,5,6])
np.numpyArray([4,5,6])
NumPy arrays have contiguous memory location
They are more speedy to work with
They are more convenient to deal with
Guido van Rossum
Travis Oliphant
Wes McKinney
Jim Hugunin
What is the output of the following code ?
import numpy as npa = np.array([[1,2,3]])print(a.shape)
(2,3)
(3,1)
(1,3)
None of These
To make a Matrix with all element 0