Skip to content
Browse files

_delaunay.cpp: support [x0:x1:1j] grids even if x1!=x0

  • Loading branch information...
1 parent 7d3d2f4 commit 964a854b4976cd579afa148e869e0ed14c1ecb84 @AmitAronovitch AmitAronovitch committed Nov 14, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/matplotlib/delaunay/_delaunay.cpp
View
4 lib/matplotlib/delaunay/_delaunay.cpp
@@ -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++) {

0 comments on commit 964a854

Please sign in to comment.
Something went wrong with that request. Please try again.