Only integers
Only floating-point numbers
Homogeneous, but can be integers or floating-point numbers
Heterogeneous, supporting a mix of data types
arr1 + arr2
add(arr1, arr2)
arr1.add(arr2)
elementwise_add(arr1, arr2)
axes
degree
cordinate
points
float
integer
string
boolean
What will be the output of the following ?
import numpy as np arr=np.array([1,2,3]) print(arr.shape)
(3,)
(4,)
1
3
numpy.maximum()
numpy.arraymax()
numpy.amax()
numpy.big()
Web development
Machine learning and scientific computing
Game development
Database management
import numpy as np
import numPy
from python import numpy
using numpy
List
Array
Matrix
Set
numpy.array(list)
numpy.array(list, dtype=float)
Both a and b
None of the above
numpy.linspace()
numpy.range()
numpy.arrange()
numpy.spaceline()
What will be the output of the following code?
import numpy as np a=np.array([1,2,3]) print(a.ndim)
2
0
unlimited length
all private members must have leading and trailing underscores
Preferred Installer Program
create()
list()
tuple()
array()
size
dtype
ndim
shape
range()
space()
arange()
linspace()
What will be the output?
import numpy as np a = np.array([[1,2],[3,4]]) print(a.shape)
(2,2)
(2,1)
4
How many values are generated?
import numpy as np print(np.linspace(0, 10, 6))
5
10
6
11
import numpy as np a = np.array([1,2,3]) b = np.array([4,5,6]) print(a+b)
[5 7 9]
[1 2 3 4 5 6]
21
Error
import numpy as npa a=np.array([1,2,3]) print(a*2)
[2 4 6]
[1 2 3 1 2 3]
[3 4 5]