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
1
2
3
what will be output for the following code?
import numpy as np a=np.array([1,2,3,5,8]) print(a.ndim)
full
empty
init
None of these
Shape
Array
both a) and b)
None of the above.
all_like
ones_like
one_alike
all of the mentioned
A machine learning library
A web development framework
A numerical computing library in Python
A data visualization tool
List
Matrix
Tuple
import numpy
import np
from math import numpy
import numPy as np
It creates a new Python list.
It creates a NumPy array.
It performs element-wise addition.
It calculates the mean of an array.
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,)
numpy.maximum()
numpy.arraymax()
numpy.amax()
numpy.big()
Web development
Machine learning and scientific computing
Game development
Database management
import numPy
from python import numpy
using numpy
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()