@@ -69,7 +69,7 @@ static PyObject *Py_points_in_path(PyObject *self, PyObject *args, PyObject *kwd
6969
7070 if (!PyArg_ParseTuple (args,
7171 " O&dO&O&:points_in_path" ,
72- &points. converter ,
72+ &convert_points ,
7373 &points,
7474 &r,
7575 &convert_path,
@@ -79,7 +79,7 @@ static PyObject *Py_points_in_path(PyObject *self, PyObject *args, PyObject *kwd
7979 return NULL ;
8080 }
8181
82- npy_intp dims[] = { points.dim ( 0 ) };
82+ npy_intp dims[] = { points.size ( ) };
8383 numpy::array_view<bool , 1 > results (dims);
8484
8585 CALL_CPP (" points_in_path" , (points_in_path (points, r, path, trans, results)));
@@ -128,7 +128,7 @@ static PyObject *Py_points_on_path(PyObject *self, PyObject *args, PyObject *kwd
128128
129129 if (!PyArg_ParseTuple (args,
130130 " O&dO&O&:points_on_path" ,
131- &points. converter ,
131+ &convert_points ,
132132 &points,
133133 &r,
134134 &convert_path,
@@ -138,7 +138,7 @@ static PyObject *Py_points_on_path(PyObject *self, PyObject *args, PyObject *kwd
138138 return NULL ;
139139 }
140140
141- npy_intp dims[] = { points.dim ( 0 ) };
141+ npy_intp dims[] = { points.size ( ) };
142142 numpy::array_view<bool , 1 > results (dims);
143143
144144 CALL_CPP (" points_on_path" , (points_on_path (points, r, path, trans, results)));
@@ -200,7 +200,10 @@ static PyObject *Py_update_path_extents(PyObject *self, PyObject *args, PyObject
200200 }
201201
202202 if (minpos.dim (0 ) != 2 ) {
203- PyErr_SetString (PyExc_ValueError, " minpos must be of length 2" );
203+ PyErr_Format (PyExc_ValueError,
204+ " minpos must be of length 2, got %d" ,
205+ minpos.dim (0 ));
206+ return NULL ;
204207 }
205208
206209 extent_limits e;
@@ -263,9 +266,9 @@ static PyObject *Py_get_path_collection_extents(PyObject *self, PyObject *args,
263266 &convert_trans_affine,
264267 &master_transform,
265268 &pathsobj,
266- &transforms. converter ,
269+ &convert_transforms ,
267270 &transforms,
268- &offsets. converter ,
271+ &convert_points ,
269272 &offsets,
270273 &convert_trans_affine,
271274 &offset_trans)) {
@@ -319,9 +322,9 @@ static PyObject *Py_point_in_path_collection(PyObject *self, PyObject *args, PyO
319322 &convert_trans_affine,
320323 &master_transform,
321324 &pathsobj,
322- &transforms. converter ,
325+ &convert_transforms ,
323326 &transforms,
324- &offsets. converter ,
327+ &convert_points ,
325328 &offsets,
326329 &convert_trans_affine,
327330 &offset_trans,
@@ -434,15 +437,15 @@ static PyObject *Py_affine_transform(PyObject *self, PyObject *args, PyObject *k
434437
435438 try {
436439 numpy::array_view<double , 2 > vertices (vertices_obj);
437- npy_intp dims[] = { vertices.dim ( 0 ), 2 };
440+ npy_intp dims[] = { vertices.size ( ), 2 };
438441 numpy::array_view<double , 2 > result (dims);
439442 CALL_CPP (" affine_transform" , (affine_transform_2d (vertices, trans, result)));
440443 return result.pyobj ();
441444 } catch (py::exception) {
442445 PyErr_Clear ();
443446 try {
444447 numpy::array_view<double , 1 > vertices (vertices_obj);
445- npy_intp dims[] = { vertices.dim ( 0 ) };
448+ npy_intp dims[] = { vertices.size ( ) };
446449 numpy::array_view<double , 1 > result (dims);
447450 CALL_CPP (" affine_transform" , (affine_transform_1d (vertices, trans, result)));
448451 return result.pyobj ();
@@ -464,7 +467,7 @@ static PyObject *Py_count_bboxes_overlapping_bbox(PyObject *self, PyObject *args
464467 " O&O&:count_bboxes_overlapping_bbox" ,
465468 &convert_rect,
466469 &bbox,
467- &bboxes. converter ,
470+ &convert_bboxes ,
468471 &bboxes)) {
469472 return NULL ;
470473 }
0 commit comments