Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4d5f20d

Browse files
committed
Improve docstrings in nxutils
svn path=/trunk/matplotlib/; revision=6192
1 parent 0b5a6e3 commit 4d5f20d

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

src/nxutils.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,19 @@ points_inside_poly(PyObject *self, PyObject *args)
219219

220220
static PyMethodDef module_methods[] = {
221221
{"pnpoly", pnpoly, METH_VARARGS,
222-
"inside = pnpoly(x, y, xyverts)\nreturn 1 if x,y is inside the polygon defined by the sequence of x,y vertices in xyverts"},
222+
"inside = pnpoly(x, y, xyverts)\n\n"
223+
"Return 1 if x,y is inside the polygon, 0 otherwise.\n\n"
224+
"xyverts is a sequence of x,y vertices.\n\n"
225+
"A point on the boundary may be treated as inside or outside.\n"
226+
"See http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html"},
223227
{"points_inside_poly", points_inside_poly, METH_VARARGS,
224-
"mask = points_inside_poly(xypoints, xyverts)\nreturn a mask of length xypoints indicating whether each x,y point is inside the polygon defined by the sequence of x,y vertices in xyverts"},
228+
"mask = points_inside_poly(xypoints, xyverts)\n\n"
229+
"Return a boolean ndarray, True for points inside the polygon.\n\n"
230+
"xypoints is a sequence of N x,y pairs.\n"
231+
"xyverts is a sequence of x,y vertices of the polygon.\n"
232+
"mask is an ndarray of length N.\n\n"
233+
"A point on the boundary may be treated as inside or outside.\n"
234+
"See http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html"},
225235
{NULL} /* Sentinel */
226236
};
227237

0 commit comments

Comments
 (0)