Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Fix issue #6003 #6011
Conversation
mdboom
added the
needs_review
label
Feb 16, 2016
|
Should add a unit test to exercise this case. On Tue, Feb 16, 2016 at 5:49 PM, muahah notifications@github.com wrote:
|
galaunay
commented
Feb 17, 2016
|
Run into another problem while adding a test case : |
tacaswell
added this to the
2.1 (next point release)
milestone
Feb 17, 2016
tacaswell
added needs_revision and removed needs_review
labels
Feb 19, 2016
|
attn @tonysyu |
galaunay
commented
Feb 28, 2016
|
I fixed issue #6003 and added a test case for |
QuLogic
commented on an outdated diff
Feb 29, 2016
| @@ -137,8 +137,14 @@ def streamplot(axes, x, y, u, v, density=1, linewidth=None, color=None, | ||
| # Shift the seed points from the bottom left of the data so that | ||
| # data2grid works properly. | ||
| sp2 = np.asanyarray(start_points, dtype=np.float).copy() | ||
| - sp2[:, 0] += np.abs(x[0]) | ||
| - sp2[:, 1] += np.abs(y[0]) | ||
| + if x.ndim == 1 and y.ndim == 1: | ||
| + sp2[:, 0] += np.abs(x[0]) | ||
| + sp2[:, 1] += np.abs(y[0]) | ||
| + elif x.ndim == 2 and y.ndim == 2: | ||
| + sp2[:, 0] += np.abs(x[0][0]) | ||
| + sp2[:, 1] += np.abs(y[0][0]) | ||
| + else: | ||
| + raise ValueError("'x' and 'y' should have the same dimensions") |
|
|
galaunay
commented
Feb 29, 2016
|
By looking more closely, those checks are redundant because |
|
So is this complete? None of the streamlines in the test image appear to originate at the plotted points. Also, the file names do not need "test_image" in them; it's clear it's a test image from the directory. |
galaunay
commented
Mar 2, 2016
|
I pointed out the fact that streamlines do not exactly originate from starting points in #6002. Regarding the image names, I can change them. |
|
Please do not merge the master branch into your branch. Instead rebase your branch on top of current master and then force-push to your gh repo. |
galaunay
commented
Mar 7, 2016
|
The easiest thing to do is to fix this is to rebase + force push. I just did the rebase locally and there is fortunately no conflicts so (I am going to assume that your upsrteam remote is called 'matplotlib' and the remote pointing at your gh account is called origin # update your computer to know what gh knows
git remote update
# make sure you are one the branch this PR looks at
git checkout master
# rebase onto current master
git rebase matplotlib/master
# check gitk to make sure tis went well
# fail to push to your gh for pedagogical reasons
git push origin master:master
# try again with --force, only use this when you are sure
git push --force origin master:master |
galaunay
commented
Mar 19, 2016
|
Thank you, this is better now. |
|
It looks like you added some new test images and then modified them in later commits. Can you squash these down into a single commit so that the repository does not carry around the (wrong) intermediary results? |
galaunay
commented
Mar 19, 2016
|
I rebased the whole thing to have clean an explicit commits (and no intermediary results). |
|
Thanks! The lower left point in the start point test does fall exactly on the stream line. Is that expected? |
galaunay
commented
Mar 20, 2016
|
The streamline do not originate from this point but from the point in the very corner (-3; -3). |
|
Ah, I missed that point was there. |
tacaswell
added a commit
that referenced
this pull request
Mar 20, 2016
|
|
tacaswell |
9110be0
|
galaunay commentedFeb 16, 2016
#6003
In
streamplot, skipstart_pointsthat are on an existing streamline instead of raisingInvalidIndexError.