Learning Scientific Programming with Python (2nd edition)
Q6.1.2: 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?
Learning Scientific Programming with Python (2nd edition)
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?