Which NumPy function creates a range of numbers?
-
A
np.range()
-
B
np.arange()
Correct answer
-
C
np.sequence()
-
D
np.linspace()
Correct answer
B. np.arange()
17 views
Explanation
np.arange() creates arrays with regularly incrementing values within a given interval.
Doubts & discussion
Not sure why the answer is B? Ask here and get an explanation.
Ask a doubt about this MCQ