Creating a NumPy Array - Question 3

Last Updated :
Discuss
Comments

Given the following code, what will be the output?

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


[1 2 3 4]

[1. 2. 3. 4]

[1.0 2.0 3.0 4.0]

Error

Tags:
Share your thoughts in the comments