Creating a NumPy Array - Question 7

Last Updated :
Discuss
Comments

What will be the output of the following code?

Python
import numpy as np
arr = np.array([1, 2, 3, 4])
print(np.ndim(arr))


1

4

None

2

Tags:
Share your thoughts in the comments