Skip to content

Commit

Permalink
_delaunay.cpp: support [x0:x1:1j] grids even if x1!=x0
Browse files Browse the repository at this point in the history
  • Loading branch information
AmitAronovitch committed Nov 13, 2012
1 parent 7d3d2f4 commit 964a854
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/matplotlib/delaunay/_delaunay.cpp
Expand Up @@ -289,8 +289,8 @@ static PyObject *linear_interpolate_grid(double x0, double x1, int xsteps,
if (!z) return NULL;
z_ptr = (double*)PyArray_DATA(z);

dx = ( x1==x0 ? 0 : (x1 - x0) / (xsteps-1) );
dy = ( y1==y0 ? 0 : (y1 - y0) / (ysteps-1) );
dx = ( xsteps==1 ? 0 : (x1 - x0) / (xsteps-1) );
dy = ( ysteps==1 ? 0 : (y1 - y0) / (ysteps-1) );

rowtri = 0;
for (iy=0; iy<ysteps; iy++) {
Expand Down

1 comment on commit 964a854

@AmitAronovitch
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This diff made the previous one disappear (as "outdated diff"), along with the discussion leading to this patch.

I do wish reviewers to read the long comment at the end of that discussion, in which I explain the implications (the patch has some effect which might be positive, but I do not think it was intended by the people who proposed it).

The item appears as "@WeatherGod discussed an outdated diff", and you should be able to expand it and see discussion below.

Please sign in to comment.