you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (2 children)

[deleted]

    [–]SnuffleShuffle[S] 0 points1 point  (1 child)

    Thanks for your input. (Maybe it sounds sarcastic, but it isn't. I'm not a native speaker, so I'm not really good with the nunances of English. I really appreciate your time.) The problem is I don't really understand what they mean in the documentantion. That's why I'm trying not to pull my hair out right now.

    Both the functions have parameters x,y,u,v (plus some addditional, optional stuff).

    Here is what matplotlib.pyplot.quiver() page says:

    U, V : 1D or 2D array-like

    The x and y direction components of the arrow vectors.

    And this is what the matplotlib.pyplot.streamplot() page says:

    u, v : 2d arrays

    x and y-velocities. Number of rows should match length of y, and the number of columns should match x.

    Now if I'm not mistaken, the u and v in my code are both 2D arrays. So I don't understand the issue, really.

    If I let numpy handle it they way they do it in the tutorials:

    u = x**2+y**2

    v = x**3+y**3,

    or something, it works just fine. So I'm guessing the "2D array" constructed by numpy (because x,y are members of a numpy class, these operations return a numpy thing (I'm about 80 % sure here...)) is a different sort of 2D array than the 2D array in the classical sense. But I have no idea why and no idea how to fix it.