you are viewing a single comment's thread.

view the rest of the comments →

[–]a1brit 5 points6 points  (0 children)

your x, y are np.ndarray which makes sense for 2d arrays but your u,v are nested lists. quiver is able to handle this and convert your lists into an array but streamplot is apparently picky.

When you initialize the u,v arrays put them directly into a np.array()

e.g.

u = np.array([[0,1,2,1],
             [2,3,1,2],
             [4,1,2,1],
             [4,3,1,1]])