Creating a NumPy array #1

Question Q6.1.2

Why doesn't this create a two-dimensional array?

>>> np.array((1,0,0), (0,1,0), (0,0,1), dtype=float)

What is the correct way?


Solution Q6.1.2