You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(115) |
Aug
(120) |
Sep
(137) |
Oct
(170) |
Nov
(461) |
Dec
(263) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(120) |
Feb
(74) |
Mar
(35) |
Apr
(74) |
May
(245) |
Jun
(356) |
Jul
(240) |
Aug
(115) |
Sep
(78) |
Oct
(225) |
Nov
(98) |
Dec
(271) |
2009 |
Jan
(132) |
Feb
(84) |
Mar
(74) |
Apr
(56) |
May
(90) |
Jun
(79) |
Jul
(83) |
Aug
(296) |
Sep
(214) |
Oct
(76) |
Nov
(82) |
Dec
(66) |
2010 |
Jan
(46) |
Feb
(58) |
Mar
(51) |
Apr
(77) |
May
(58) |
Jun
(126) |
Jul
(128) |
Aug
(64) |
Sep
(50) |
Oct
(44) |
Nov
(48) |
Dec
(54) |
2011 |
Jan
(68) |
Feb
(52) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <md...@us...> - 2007-11-14 18:44:56
|
Revision: 4286 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4286&view=rev Author: mdboom Date: 2007-11-14 10:44:39 -0800 (Wed, 14 Nov 2007) Log Message: ----------- New path-related utilities (used for an aborted attempt at fixing contouring -- may be useful in other contexts in the future). Modified Paths: -------------- branches/transforms/lib/matplotlib/patches.py branches/transforms/lib/matplotlib/path.py branches/transforms/src/_path.cpp Modified: branches/transforms/lib/matplotlib/patches.py =================================================================== --- branches/transforms/lib/matplotlib/patches.py 2007-11-14 18:43:35 UTC (rev 4285) +++ branches/transforms/lib/matplotlib/patches.py 2007-11-14 18:44:39 UTC (rev 4286) @@ -152,7 +152,7 @@ ACCEPTS: any matplotlib color """ self._facecolor = color - + def set_linewidth(self, w): """ Set the patch linewidth in points @@ -522,6 +522,28 @@ def get_patch_transform(self): return self._poly_transform +class PathPatch(Patch): + """ + A general polycurve path patch. + """ + def __str__(self): + return "Poly((%g, %g) ...)" % tuple(self._path.vertices[0]) + + def __init__(self, path, **kwargs): + """ + path is a Path object + + Valid kwargs are: + %(Patch)s + See Patch documentation for additional kwargs + """ + Patch.__init__(self, **kwargs) + self._path = path + __init__.__doc__ = cbook.dedent(__init__.__doc__) % artist.kwdocd + + def get_path(self): + return self._path + class Polygon(Patch): """ A general polygon patch. @@ -549,7 +571,7 @@ def _set_xy(self, vertices): self._path = Path(vertices) xy = property(_get_xy, _set_xy) - + class Wedge(Patch): def __str__(self): return "Wedge(%g,%g)"%self.xy[0] Modified: branches/transforms/lib/matplotlib/path.py =================================================================== --- branches/transforms/lib/matplotlib/path.py 2007-11-14 18:43:35 UTC (rev 4285) +++ branches/transforms/lib/matplotlib/path.py 2007-11-14 18:44:39 UTC (rev 4286) @@ -11,8 +11,8 @@ from matplotlib.numerix import npyma as ma from matplotlib._path import point_in_path, get_path_extents, \ - point_in_path_collection -import matplotlib._path as _path + point_in_path_collection, get_path_collection_extents, \ + path_in_path from matplotlib.cbook import simple_linear_interpolation KAPPA = 4.0 * (npy.sqrt(2) - 1) / 3.0 @@ -128,6 +128,30 @@ self.codes = codes self.vertices = vertices + #@staticmethod + def make_compound_path(*args): + """ + Make a compound path from a list of Path objects. Only + polygons (not curves) are supported. + """ + for p in args: + assert p.codes is None + + lengths = [len(x) for x in args] + total_length = sum(lengths) + + vertices = npy.vstack([x.vertices for x in args]) + vertices.reshape((total_length, 2)) + + codes = Path.LINETO * npy.ones(total_length) + i = 0 + for length in lengths: + codes[i] = Path.MOVETO + i += length + + return Path(vertices, codes) + make_compound_path = staticmethod(make_compound_path) + def __repr__(self): return "Path(%s, %s)" % (self.vertices, self.codes) @@ -186,9 +210,18 @@ """ if transform is None: from transforms import IdentityTransform - transform = IdentityTransform + transform = IdentityTransform() return point_in_path(point[0], point[1], self, transform.frozen()) + def contains_path(self, path, transform=None): + """ + Returns True if this path completely contains the given path. + """ + if transform is None: + from transforms import IdentityTransform + transform = IdentityTransform() + return path_in_path(self, IdentityTransform(), path, transform) + def get_extents(self, transform=None): """ Returns the extents (xmin, ymin, xmax, ymax) of the path. @@ -408,8 +441,9 @@ return cls.arc(theta1, theta2, True) wedge = classmethod(wedge) +_get_path_collection_extents = get_path_collection_extents def get_path_collection_extents(*args): from transforms import Bbox if len(args[1]) == 0: raise ValueError("No paths provided") - return Bbox.from_extents(*_path.get_path_collection_extents(*args)) + return Bbox.from_extents(*_get_path_collection_extents(*args)) Modified: branches/transforms/src/_path.cpp =================================================================== --- branches/transforms/src/_path.cpp 2007-11-14 18:43:35 UTC (rev 4285) +++ branches/transforms/src/_path.cpp 2007-11-14 18:44:39 UTC (rev 4286) @@ -9,6 +9,8 @@ #include "agg_path_storage.h" #include "agg_trans_affine.h" +// MGDTODO: Un-CXX-ify this module + // the extension module class _path_module : public Py::ExtensionModule<_path_module> { @@ -26,6 +28,10 @@ "get_path_collection_extents(trans, paths, transforms, offsets, offsetTrans)"); add_varargs_method("point_in_path_collection", &_path_module::point_in_path_collection, "point_in_path_collection(x, y, r, trans, paths, transforms, offsets, offsetTrans, filled)"); + add_varargs_method("path_in_path", &_path_module::path_in_path, + "point_in_path_collection(a, atrans, b, btrans)"); + add_varargs_method("clip_path_to_rect", &_path_module::clip_path_to_rect, + "clip_path_to_rect(path, bbox, inside)"); initialize("Helper functions for paths"); } @@ -39,6 +45,8 @@ Py::Object get_path_extents(const Py::Tuple& args); Py::Object get_path_collection_extents(const Py::Tuple& args); Py::Object point_in_path_collection(const Py::Tuple& args); + Py::Object path_in_path(const Py::Tuple& args); + Py::Object clip_path_to_rect(const Py::Tuple& args); }; // @@ -85,11 +93,14 @@ double x, y; path.rewind(0); - unsigned code = path.vertex(&x, &y); - if (code == agg::path_cmd_stop) - return false; + inside_flag = 0; + + unsigned code = 0; while (true) { + if (code != agg::path_cmd_move_to) + code = path.vertex(&x, &y); + sx = vtx0 = x; sy = vty0 = y; @@ -104,11 +115,11 @@ code = path.vertex(&x, &y); // The following cases denote the beginning on a new subpath - if ((code & agg::path_cmd_end_poly) == agg::path_cmd_end_poly) { + if (code == agg::path_cmd_stop || (code & agg::path_cmd_end_poly) == agg::path_cmd_end_poly) { x = sx; y = sy; } else if (code == agg::path_cmd_move_to) break; - + yflag1 = (vty1 >= ty); // Check if endpoints straddle (are on opposite sides) of X axis // (i.e. the Y's differ); if so, +X ray could intersect this edge. @@ -146,26 +157,37 @@ break; } + yflag1 = (vty1 >= ty); + if (yflag0 != yflag1) { + if ( ((vty1-ty) * (vtx0-vtx1) >= + (vtx1-tx) * (vty0-vty1)) == yflag1 ) { + inside_flag ^= 1; + } + } + if (inside_flag != 0) return true; if (code == agg::path_cmd_stop) - return false; + break; } - return false; + return (inside_flag != 0); } -bool point_in_path(double x, double y, PathIterator& path, agg::trans_affine& trans) { +inline bool point_in_path(double x, double y, PathIterator& path, const agg::trans_affine& trans) { typedef agg::conv_transform<PathIterator> transformed_path_t; typedef agg::conv_curve<transformed_path_t> curve_t; + if (path.total_vertices() < 3) + return false; + transformed_path_t trans_path(path, trans); curve_t curved_path(trans_path); return point_in_path_impl(x, y, curved_path); } -bool point_on_path(double x, double y, double r, PathIterator& path, agg::trans_affine& trans) { +inline bool point_on_path(double x, double y, double r, PathIterator& path, const agg::trans_affine& trans) { typedef agg::conv_transform<PathIterator> transformed_path_t; typedef agg::conv_curve<transformed_path_t> curve_t; typedef agg::conv_stroke<curve_t> stroke_t; @@ -204,7 +226,7 @@ return Py::Int(0); } -void get_path_extents(PathIterator& path, agg::trans_affine& trans, +void get_path_extents(PathIterator& path, const agg::trans_affine& trans, double* x0, double* y0, double* x1, double* y1) { typedef agg::conv_transform<PathIterator> transformed_path_t; typedef agg::conv_curve<transformed_path_t> curve_t; @@ -393,6 +415,248 @@ return result; } +bool path_in_path(PathIterator& a, const agg::trans_affine& atrans, + PathIterator& b, const agg::trans_affine& btrans) { + typedef agg::conv_transform<PathIterator> transformed_path_t; + typedef agg::conv_curve<transformed_path_t> curve_t; + + if (a.total_vertices() < 3) + return false; + + transformed_path_t b_path_trans(b, btrans); + curve_t b_curved(b_path_trans); + + double x, y; + b_curved.rewind(0); + while (b_curved.vertex(&x, &y) != agg::path_cmd_stop) { + if (!::point_in_path(x, y, a, atrans)) + return false; + } + + return true; +} + +Py::Object _path_module::path_in_path(const Py::Tuple& args) { + args.verify_length(4); + + PathIterator a(args[0]); + agg::trans_affine atrans = py_to_agg_transformation_matrix(args[1]); + PathIterator b(args[2]); + agg::trans_affine btrans = py_to_agg_transformation_matrix(args[3]); + + return Py::Int(::path_in_path(a, atrans, b, btrans)); +} + +/** The clip_path_to_rect code here is a clean-room implementation of the + Sutherland-Hodgman clipping algorithm described here: + + http://en.wikipedia.org/wiki/Sutherland-Hodgman_clipping_algorithm +*/ + +typedef std::vector<std::pair<double, double> > Polygon; + +namespace clip_to_rect_filters { + /* There are four different passes needed to create/remove vertices + (one for each side of the rectangle). The differences between those + passes are encapsulated in these functor classes. + */ + struct bisectx { + double m_x; + + bisectx(double x) : m_x(x) {} + + void bisect(double sx, double sy, double px, double py, double* bx, double* by) const { + *bx = m_x; + double dx = px - sx; + double dy = py - sy; + *by = sy + dy * ((m_x - sx) / dx); + } + }; + + struct xlt : public bisectx { + xlt(double x) : bisectx(x) {} + + bool operator()(double x, double y) const { + return x <= m_x; + } + }; + + struct xgt : public bisectx { + xgt(double x) : bisectx(x) {} + + bool operator()(double x, double y) const { + return x >= m_x; + } + }; + + struct bisecty { + double m_y; + + bisecty(double y) : m_y(y) {} + + void bisect(double sx, double sy, double px, double py, double* bx, double* by) const { + *by = m_y; + double dx = px - sx; + double dy = py - sy; + *bx = sx + dx * ((m_y - sy) / dy); + } + }; + + struct ylt : public bisecty { + ylt(double y) : bisecty(y) {} + + bool operator()(double x, double y) const { + return y <= m_y; + } + }; + + struct ygt : public bisecty { + ygt(double y) : bisecty(y) {} + + bool operator()(double x, double y) const { + return y >= m_y; + } + }; +} + +template<class Filter> +void clip_to_rect_one_step(const Polygon& polygon, Polygon& result, const Filter& filter) { + double sx, sy, px, py, bx, by; + bool sinside, pinside; + result.clear(); + + if (polygon.size() == 0) + return; + + sx = polygon.back().first; + sy = polygon.back().second; + for (Polygon::const_iterator i = polygon.begin(); i != polygon.end(); ++i) { + px = i->first; + py = i->second; + + sinside = filter(sx, sy); + pinside = filter(px, py); + + if (sinside) { + if (pinside) { + result.push_back(std::make_pair(px, py)); + } else { + filter.bisect(sx, sy, px, py, &bx, &by); + result.push_back(std::make_pair(bx, by)); + } + } else { + if (pinside) { + filter.bisect(sx, sy, px, py, &bx, &by); + result.push_back(std::make_pair(bx, by)); + result.push_back(std::make_pair(px, py)); + } + } + + sx = px; sy = py; + } +} + +void clip_to_rect(PathIterator& path, + double x0, double y0, double x1, double y1, + bool inside, std::vector<Polygon>& results) { + double xmin, ymin, xmax, ymax; + if (x0 < x1) { + xmin = x0; xmax = x1; + } else { + xmin = x1; xmax = x0; + } + + if (y0 < y1) { + ymin = y0; ymax = y1; + } else { + ymin = y1; ymax = y0; + } + + if (!inside) { + std::swap(xmin, xmax); + std::swap(ymin, ymax); + } + + Polygon polygon1, polygon2; + double x, y; + unsigned code = 0; + path.rewind(0); + + while (true) { + polygon1.clear(); + while (true) { + if (code == agg::path_cmd_move_to) + polygon1.push_back(std::make_pair(x, y)); + + code = path.vertex(&x, &y); + + if (code == agg::path_cmd_stop) + break; + + if (code != agg::path_cmd_move_to) + polygon1.push_back(std::make_pair(x, y)); + + if ((code & agg::path_cmd_end_poly) == agg::path_cmd_end_poly) { + break; + } else if (code == agg::path_cmd_move_to) { + break; + } + } + + // The result of each step is fed into the next (note the + // swapping of polygon1 and polygon2 at each step). + clip_to_rect_one_step(polygon1, polygon2, clip_to_rect_filters::xlt(xmax)); + clip_to_rect_one_step(polygon2, polygon1, clip_to_rect_filters::xgt(xmin)); + clip_to_rect_one_step(polygon1, polygon2, clip_to_rect_filters::ylt(ymax)); + clip_to_rect_one_step(polygon2, polygon1, clip_to_rect_filters::ygt(ymin)); + + if (polygon1.size()) + results.push_back(polygon1); + + if (code == agg::path_cmd_stop) + break; + } +} + +Py::Object _path_module::clip_path_to_rect(const Py::Tuple &args) { + args.verify_length(3); + + PathIterator path(args[0]); + Py::Object bbox_obj = args[1]; + bool inside = Py::Int(args[2]); + + double x0, y0, x1, y1; + if (!py_convert_bbox(bbox_obj.ptr(), x0, y0, x1, y1)) + throw Py::TypeError("Argument 2 to clip_to_rect must be a Bbox object."); + + std::vector<Polygon> results; + + ::clip_to_rect(path, x0, y0, x1, y1, inside, results); + + // MGDTODO: Not exception safe + int dims[2]; + dims[1] = 2; + PyObject* py_results = PyList_New(results.size()); + for (std::vector<Polygon>::const_iterator p = results.begin(); p != results.end(); ++p) { + size_t size = p->size(); + dims[0] = p->size(); + PyArrayObject* pyarray = (PyArrayObject*)PyArray_FromDims(2, dims, PyArray_DOUBLE); + for (size_t i = 0; i < size; ++i) { + ((double *)pyarray->data)[2*i] = (*p)[i].first; + ((double *)pyarray->data)[2*i+1] = (*p)[i].second; + } + // MGDTODO: Error check + PyList_SetItem(py_results, p - results.begin(), (PyObject *)pyarray); + } + + return Py::Object(py_results, true); +} + +struct XY { + double x; + double y; +}; + extern "C" DL_EXPORT(void) init_path(void) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <md...@us...> - 2007-11-14 18:43:41
|
Revision: 4284 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4284&view=rev Author: mdboom Date: 2007-11-14 10:42:52 -0800 (Wed, 14 Nov 2007) Log Message: ----------- Update to use new numpy macros. Modified Paths: -------------- branches/transforms/src/agg_py_path_iterator.h branches/transforms/src/agg_py_transforms.h Modified: branches/transforms/src/agg_py_path_iterator.h =================================================================== --- branches/transforms/src/agg_py_path_iterator.h 2007-11-14 18:38:05 UTC (rev 4283) +++ branches/transforms/src/agg_py_path_iterator.h 2007-11-14 18:42:52 UTC (rev 4284) @@ -20,7 +20,7 @@ m_vertices = (PyArrayObject*)PyArray_FromObject (vertices_obj.ptr(), PyArray_DOUBLE, 2, 2); - if (!m_vertices || m_vertices->nd != 2 || m_vertices->dimensions[1] != 2) + if (!m_vertices || PyArray_NDIM(m_vertices) != 2 || PyArray_DIM(m_vertices, 1) != 2) throw Py::ValueError("Invalid vertices array."); if (codes_obj.ptr() != Py_None) { Modified: branches/transforms/src/agg_py_transforms.h =================================================================== --- branches/transforms/src/agg_py_transforms.h 2007-11-14 18:38:05 UTC (rev 4283) +++ branches/transforms/src/agg_py_transforms.h 2007-11-14 18:42:52 UTC (rev 4284) @@ -63,7 +63,7 @@ try { bbox = (PyArrayObject*) PyArray_FromObject(bbox_obj, PyArray_DOUBLE, 2, 2); - if (!bbox || bbox->nd != 2 || bbox->dimensions[0] != 2 || bbox->dimensions[1] != 2) { + if (!bbox || PyArray_NDIM(bbox) != 2 || PyArray_DIM(bbox, 0) != 2 || PyArray_DIM(bbox, 1) != 2) { throw Py::TypeError ("Argument 3 to agg_to_gtk_drawable must be a Bbox object."); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <md...@us...> - 2007-11-14 18:43:37
|
Revision: 4285 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4285&view=rev Author: mdboom Date: 2007-11-14 10:43:35 -0800 (Wed, 14 Nov 2007) Log Message: ----------- Build the path module (inadvertently removed during a merge). Modified Paths: -------------- branches/transforms/setup.py Modified: branches/transforms/setup.py =================================================================== --- branches/transforms/setup.py 2007-11-14 18:42:52 UTC (rev 4284) +++ branches/transforms/setup.py 2007-11-14 18:43:35 UTC (rev 4285) @@ -126,6 +126,7 @@ build_ttconv(ext_modules, packages) build_contour(ext_modules, packages) build_nxutils(ext_modules, packages) +build_path(ext_modules, packages) build_swigagg(ext_modules, packages) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <md...@us...> - 2007-11-14 18:38:58
|
Revision: 4283 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4283&view=rev Author: mdboom Date: 2007-11-14 10:38:05 -0800 (Wed, 14 Nov 2007) Log Message: ----------- Fix alignment of clipping rectangles. Modified Paths: -------------- branches/transforms/src/_backend_agg.cpp Modified: branches/transforms/src/_backend_agg.cpp =================================================================== --- branches/transforms/src/_backend_agg.cpp 2007-11-14 18:36:45 UTC (rev 4282) +++ branches/transforms/src/_backend_agg.cpp 2007-11-14 18:38:05 UTC (rev 4283) @@ -282,7 +282,8 @@ double l, b, r, t; if (py_convert_bbox(cliprect.ptr(), l, b, r, t)) { - rasterizer->clip_box((int)l + 1, height - (int)(b + 1), (int)r + 1, height - (int)(t + 1)); + rasterizer->clip_box(int(round(l)) + 1, height - int(round(b)) + 1, + int(round(r)) + 1, height - int(round(t)) + 1); } _VERBOSE("RendererAgg::set_clipbox done"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <md...@us...> - 2007-11-14 18:36:47
|
Revision: 4282 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4282&view=rev Author: mdboom Date: 2007-11-14 10:36:45 -0800 (Wed, 14 Nov 2007) Log Message: ----------- Fix bug in PDF backend. Modified Paths: -------------- branches/transforms/lib/matplotlib/backends/backend_pdf.py Modified: branches/transforms/lib/matplotlib/backends/backend_pdf.py =================================================================== --- branches/transforms/lib/matplotlib/backends/backend_pdf.py 2007-11-14 18:31:35 UTC (rev 4281) +++ branches/transforms/lib/matplotlib/backends/backend_pdf.py 2007-11-14 18:36:45 UTC (rev 4282) @@ -1758,6 +1758,8 @@ try: different = bool(ours != theirs) except ValueError: + ours = npy.asarray(ours) + theirs = npy.asarray(theirs) different = ours.shape != theirs.shape or npy.any(ours != theirs) if different: break This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-14 18:31:37
|
Revision: 4281 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4281&view=rev Author: jswhit Date: 2007-11-14 10:31:35 -0800 (Wed, 14 Nov 2007) Log Message: ----------- further refinement of GEOS library version checking Modified Paths: -------------- trunk/toolkits/basemap-testing/setup.py Modified: trunk/toolkits/basemap-testing/setup.py =================================================================== --- trunk/toolkits/basemap-testing/setup.py 2007-11-14 18:22:01 UTC (rev 4280) +++ trunk/toolkits/basemap-testing/setup.py 2007-11-14 18:31:35 UTC (rev 4281) @@ -5,7 +5,7 @@ # package_data try: import setuptools except ImportError: - raise SystemExit("""\ + raise SystemExit(""" matplotlib requires setuptools for installation. Please download http://peak.telecommunity.com/dist/ez_setup.py and run it (as su if you are doing a system wide install) to install the proper version of @@ -36,12 +36,10 @@ try: f = open(os.path.join(GEOS_dir,'include/geos_c.h')) except: - msg = """ + raise SystemExit(""" Cannot find geos header file (geos_c.h) in %s/include. Please check your geos installation and make sure the GEOS_DIR environment -variable is set correctly""" %GEOS_dir - print msg - raise SystemExit(1) +variable is set correctly.""" %GEOS_dir) geos_version = None for line in f: if line.startswith('#define GEOS_VERSION'): @@ -51,24 +49,20 @@ # get location of geos lib from environment variable. GEOS_dir = os.environ.get('GEOS_DIR') if GEOS_dir is None: - msg = """\ + raise SystemExit(""" please specify the location of geos library and headers with the GEOS_DIR environment variable. For example if libgeos_c is installed in /usr/local/lib, and geos_c.h is installed in -/usr/local/include, set GEOS_DIR to /usr/local.""" - print msg - raise SystemExit(1) +/usr/local/include, set GEOS_DIR to /usr/local.""") # check that header geos_c.h is in GEOS_dir/include, # and that the version number in the header file is 2.2.3. geos_version = check_geosversion(GEOS_dir) if geos_version != '"2.2.3"': - msg = """\ + raise SystemExit(""" geos library version 2.2.3 is required, you have version %s installed in %s. Please change the GEOS_DIR environment variable to point to the location where geos 2.2.3 is installed, or -download and install 2.2.3 from http://geos.refractions.net.""" % (geos_version, GEOS_dir) - print msg - raise SystemExit(1) +download and install 2.2.3 from http://geos.refractions.net.""" % (geos_version, GEOS_dir)) else: geos_include_dirs=[os.path.join(GEOS_dir,'include'),numpy.get_include()] geos_library_dirs=[os.path.join(GEOS_dir,'lib')] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-14 18:22:04
|
Revision: 4280 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4280&view=rev Author: jswhit Date: 2007-11-14 10:22:01 -0800 (Wed, 14 Nov 2007) Log Message: ----------- more tweaking of error messages. Modified Paths: -------------- trunk/toolkits/basemap-testing/setup.py Modified: trunk/toolkits/basemap-testing/setup.py =================================================================== --- trunk/toolkits/basemap-testing/setup.py 2007-11-14 18:11:07 UTC (rev 4279) +++ trunk/toolkits/basemap-testing/setup.py 2007-11-14 18:22:01 UTC (rev 4280) @@ -36,7 +36,12 @@ try: f = open(os.path.join(GEOS_dir,'include/geos_c.h')) except: - raise IOError('cannot find geos header file in %s/include'%GEOS_dir) + msg = """ +Cannot find geos header file (geos_c.h) in %s/include. Please check +your geos installation and make sure the GEOS_DIR environment +variable is set correctly""" %GEOS_dir + print msg + raise SystemExit(1) geos_version = None for line in f: if line.startswith('#define GEOS_VERSION'): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-14 18:11:13
|
Revision: 4279 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4279&view=rev Author: jswhit Date: 2007-11-14 10:11:07 -0800 (Wed, 14 Nov 2007) Log Message: ----------- clearer error message if wrong version of GEOS found. Modified Paths: -------------- trunk/toolkits/basemap-testing/setup.py Modified: trunk/toolkits/basemap-testing/setup.py =================================================================== --- trunk/toolkits/basemap-testing/setup.py 2007-11-14 18:10:00 UTC (rev 4278) +++ trunk/toolkits/basemap-testing/setup.py 2007-11-14 18:11:07 UTC (rev 4279) @@ -58,8 +58,10 @@ geos_version = check_geosversion(GEOS_dir) if geos_version != '"2.2.3"': msg = """\ -geos library version 2.2.3 is required, you have version %s. -Please download and install 2.2.3 from http://geos.refractions.net.""" % geos_version +geos library version 2.2.3 is required, you have version %s +installed in %s. Please change the GEOS_DIR environment variable +to point to the location where geos 2.2.3 is installed, or +download and install 2.2.3 from http://geos.refractions.net.""" % (geos_version, GEOS_dir) print msg raise SystemExit(1) else: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ef...@us...> - 2007-11-14 18:10:05
|
Revision: 4278 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4278&view=rev Author: efiring Date: 2007-11-14 10:10:00 -0800 (Wed, 14 Nov 2007) Log Message: ----------- Use mpl standard import idiom in image.py Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/image.py Modified: trunk/matplotlib/lib/matplotlib/image.py =================================================================== --- trunk/matplotlib/lib/matplotlib/image.py 2007-11-14 18:08:07 UTC (rev 4277) +++ trunk/matplotlib/lib/matplotlib/image.py 2007-11-14 18:10:00 UTC (rev 4278) @@ -7,18 +7,23 @@ import sys, os import numpy as npy -import numerix.ma as ma +import matplotlib.numerix.npyma as ma + from matplotlib import rcParams -from artist import Artist -from colors import colorConverter -import cm -import _image +from matplotlib import artist as martist +from matplotlib import colors as mcolors +from matplotlib import cm +# For clarity, names from _image are given explicitly in this module: +from matplotlib import _image -from _image import * -class AxesImage(Artist, cm.ScalarMappable): +# For user convenience, the names from _image are also imported into +# the image namespace: +from matplotlib._image import * +class AxesImage(martist.Artist, cm.ScalarMappable): + def __init__(self, ax, cmap = None, norm = None, @@ -43,7 +48,7 @@ Additional kwargs are matplotlib.artist properties """ - Artist.__init__(self) + martist.Artist.__init__(self) cm.ScalarMappable.__init__(self, norm, cmap) if origin is None: origin = rcParams['image.origin'] @@ -101,7 +106,7 @@ ACCEPTS: float """ - Artist.set_alpha(self, alpha) + martist.Artist.set_alpha(self, alpha) self._imcache = None def changed(self): @@ -135,7 +140,8 @@ else: im = self._imcache - bg = colorConverter.to_rgba(self.axes.get_frame().get_facecolor(), 0) + fc = self.axes.get_frame().get_facecolor() + bg = mcolors.colorConverter.to_rgba(fc, 0) im.set_bg( *bg) # image input dimensions @@ -236,12 +242,12 @@ # by mistake. self.set_data(A) - + def set_extent(self, extent): """extent is data axes (left, right, bottom, top) for making image plots """ self._extent = extent - + xmin, xmax, ymin, ymax = extent corners = (xmin, ymin), (xmax, ymax) self.axes.update_datalim(corners) @@ -338,10 +344,9 @@ height *= magnification im = _image.pcolor(self._Ax, self._Ay, self._A, height, width, - (x0, x0+v_width, y0, y0+v_height), - ) - - bg = colorConverter.to_rgba(self.axes.get_frame().get_facecolor(), 0) + (x0, x0+v_width, y0, y0+v_height)) + fc = self.axes.get_frame().get_facecolor() + bg = mcolors.colorConverter.to_rgba(fc, 0) im.set_bg(*bg) return im @@ -408,7 +413,7 @@ -class FigureImage(Artist, cm.ScalarMappable): +class FigureImage(martist.Artist, cm.ScalarMappable): def __init__(self, fig, cmap = None, norm = None, @@ -422,7 +427,7 @@ norm is a colors.Normalize instance to map luminance to 0-1 """ - Artist.__init__(self) + martist.Artist.__init__(self) cm.ScalarMappable.__init__(self, norm, cmap) if origin is None: origin = rcParams['image.origin'] self.origin = origin @@ -470,7 +475,8 @@ x = self.to_rgba(self._A, self._alpha) im = _image.fromarray(x, 1) - im.set_bg( *colorConverter.to_rgba(self.figure.get_facecolor(), 0) ) + fc = self.figure.get_facecolor() + im.set_bg( *mcolors.colorConverter.to_rgba(fc, 0) ) im.is_grayscale = (self.cmap.name == "gray" and len(self._A.shape) == 2) if self.origin=='upper': This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-14 18:08:10
|
Revision: 4277 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4277&view=rev Author: jswhit Date: 2007-11-14 10:08:07 -0800 (Wed, 14 Nov 2007) Log Message: ----------- regenerated with Cython 0.9.6.8 Modified Paths: -------------- trunk/toolkits/basemap-testing/src/_geod.c trunk/toolkits/basemap-testing/src/_geos.c trunk/toolkits/basemap-testing/src/_proj.c Modified: trunk/toolkits/basemap-testing/src/_geod.c =================================================================== --- trunk/toolkits/basemap-testing/src/_geod.c 2007-11-14 16:47:09 UTC (rev 4276) +++ trunk/toolkits/basemap-testing/src/_geod.c 2007-11-14 18:08:07 UTC (rev 4277) @@ -1,4 +1,4 @@ -/* Generated by Cython 0.9.6.7 on Wed Oct 31 21:20:49 2007 */ +/* Generated by Cython 0.9.6.8 on Wed Nov 14 11:06:42 2007 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -15,12 +15,16 @@ #define PyNumber_Index(o) PyNumber_Int(o) #define PyIndex_Check(o) PyNumber_Check(o) #endif +#ifndef WIN32 + #define __stdcall + #define __cdecl +#endif #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif -__PYX_EXTERN_C double pow(double, double); +#include <math.h> #include "stdlib.h" #include "math.h" #include "geodesic.h" @@ -35,11 +39,17 @@ #define INLINE #endif -typedef struct {const char *s; const void **p;} __Pyx_CApiTabEntry; /*proto*/ typedef struct {PyObject **p; char *s;} __Pyx_InternTabEntry; /*proto*/ typedef struct {PyObject **p; char *s; long n; int is_unicode;} __Pyx_StringTabEntry; /*proto*/ -#define __pyx_PyIndex_AsSsize_t(b) PyInt_AsSsize_t(PyNumber_Index(b)) +static INLINE Py_ssize_t __pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject* x = PyNumber_Index(b); + if (!x) return -1; + ival = PyInt_AsSsize_t(x); + Py_DECREF(x); + return ival; +} #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) static INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { @@ -49,6 +59,10 @@ } + +static int __pyx_skip_dispatch = 0; + + #ifdef __GNUC__ /* Test for GCC > 2.95 */ #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) @@ -69,6 +83,8 @@ static char *__pyx_filename; static char **__pyx_f; +static char __pyx_mdoc[] = "\ncopyright (c) 2007 by Jeffrey Whitaker.\n\nPermission to use, copy, modify, and distribute this software and its\ndocumentation for any purpose and without fee is hereby granted,\nprovided that the above copyright notices appear in all copies and that\nboth the copyright notices and this permission notice appear in\nsupporting documentation.\nTHE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,\nINCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO\nEVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR\nCONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF\nUSE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n"; + static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/ static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ @@ -84,17 +100,23 @@ static void __Pyx_AddTraceback(char *funcname); /*proto*/ -/* Declarations from _geod */ +static PyObject *__Pyx_ImportModule(char *name); /*proto*/ +static int __Pyx_RegisterCleanup(); /*proto*/ +static PyObject* cleanup(PyObject *self, PyObject *unused); /*proto*/ +static PyMethodDef cleanup_def = {"__cleanup", (PyCFunction)&cleanup, METH_NOARGS, 0}; +/* Declarations from _geod */ + struct __pyx_obj_5_geod_Geod { PyObject_HEAD GEODESIC_T geodesic_t; PyObject *geodparams; PyObject *proj_version; - char (*geodinitstring); + char *geodinitstring; }; + static PyTypeObject *__pyx_ptype_5_geod_Geod = 0; static PyObject *__pyx_k3; static PyObject *__pyx_k4; @@ -103,20 +125,20 @@ /* Implementation of _geod */ -static char (__pyx_k2[]) = "1.8.3"; +static char __pyx_k2[] = "1.8.3"; -static PyObject *__pyx_n_math; -static PyObject *__pyx_n__dg2rad; -static PyObject *__pyx_n__rad2dg; -static PyObject *__pyx_n__doublesize; -static PyObject *__pyx_n___version__; -static PyObject *__pyx_n___new__; +static PyObject *__pyx_n___cinit__; static PyObject *__pyx_n___reduce__; static PyObject *__pyx_n__fwd; static PyObject *__pyx_n__inv; static PyObject *__pyx_n__npts; +static PyObject *__pyx_n_math; static PyObject *__pyx_n_radians; +static PyObject *__pyx_n__dg2rad; static PyObject *__pyx_n_degrees; +static PyObject *__pyx_n__rad2dg; +static PyObject *__pyx_n__doublesize; +static PyObject *__pyx_n___version__; static PyObject *__pyx_k2p; @@ -132,13 +154,13 @@ static PyObject *__pyx_builtin_RuntimeError; -static char (__pyx_k6[]) = "+"; -static char (__pyx_k7[]) = "="; -static char (__pyx_k8[]) = " "; -static char (__pyx_k9[]) = ""; +static char __pyx_k6[] = "+"; +static char __pyx_k7[] = "="; +static char __pyx_k8[] = " "; +static char __pyx_k9[] = ""; -static int __pyx_f_py_5_geod_4Geod___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_f_py_5_geod_4Geod___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static int __pyx_pf_5_geod_4Geod___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pf_5_geod_4Geod___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_geodparams = 0; GEODESIC_T __pyx_v_GEOD_T; PyObject *__pyx_v_geodargs; @@ -160,7 +182,7 @@ __pyx_v_key = Py_None; Py_INCREF(Py_None); __pyx_v_value = Py_None; Py_INCREF(Py_None); - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":13 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":29 * def __new__(self, geodparams): * cdef GEODESIC_T GEOD_T * self.geodparams = geodparams # <<<<<<<<<<<<<< @@ -171,30 +193,30 @@ Py_DECREF(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodparams); ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodparams = __pyx_v_geodparams; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":15 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":31 * self.geodparams = geodparams * # setup proj initialization string. * geodargs = [] # <<<<<<<<<<<<<< * for key,value in geodparams.iteritems(): * geodargs.append('+'+key+"="+str(value)+' ') */ - __pyx_1 = PyList_New(0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; goto __pyx_L1;} + __pyx_1 = PyList_New(0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; goto __pyx_L1;} Py_DECREF(__pyx_v_geodargs); __pyx_v_geodargs = __pyx_1; __pyx_1 = 0; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":16 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":32 * # setup proj initialization string. * geodargs = [] * for key,value in geodparams.iteritems(): # <<<<<<<<<<<<<< * geodargs.append('+'+key+"="+str(value)+' ') * self.geodinitstring = PyString_AsString(''.join(geodargs)) */ - __pyx_1 = PyObject_GetAttr(__pyx_v_geodparams, __pyx_n_iteritems); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; goto __pyx_L1;} - __pyx_3 = PyObject_CallObject(__pyx_1, 0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; goto __pyx_L1;} + __pyx_1 = PyObject_GetAttr(__pyx_v_geodparams, __pyx_n_iteritems); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(__pyx_1, 0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; if (PyList_CheckExact(__pyx_3)) { __pyx_2 = 0; __pyx_1 = __pyx_3; Py_INCREF(__pyx_1); } - else { __pyx_1 = PyObject_GetIter(__pyx_3); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; goto __pyx_L1;} } + else { __pyx_1 = PyObject_GetIter(__pyx_3); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; goto __pyx_L1;} } Py_DECREF(__pyx_3); __pyx_3 = 0; for (;;) { if (PyList_CheckExact(__pyx_1)) { if (__pyx_2 >= PyList_GET_SIZE(__pyx_1)) break; __pyx_3 = PyList_GET_ITEM(__pyx_1, __pyx_2++); Py_INCREF(__pyx_3); } @@ -218,69 +240,61 @@ Py_DECREF(__pyx_3); __pyx_3 = 0; } else { - __pyx_4 = PyObject_GetIter(__pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; goto __pyx_L1;} + __pyx_4 = PyObject_GetIter(__pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = __Pyx_UnpackItem(__pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; goto __pyx_L1;} + __pyx_5 = __Pyx_UnpackItem(__pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; goto __pyx_L1;} Py_DECREF(__pyx_v_key); __pyx_v_key = __pyx_5; __pyx_5 = 0; - __pyx_5 = __Pyx_UnpackItem(__pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; goto __pyx_L1;} + __pyx_5 = __Pyx_UnpackItem(__pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; goto __pyx_L1;} Py_DECREF(__pyx_v_value); __pyx_v_value = __pyx_5; __pyx_5 = 0; - if (__Pyx_EndUnpack(__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; goto __pyx_L1;} + if (__Pyx_EndUnpack(__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; } - - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":17 - * geodargs = [] - * for key,value in geodparams.iteritems(): - * geodargs.append('+'+key+"="+str(value)+' ') # <<<<<<<<<<<<<< - * self.geodinitstring = PyString_AsString(''.join(geodargs)) - * # initialize projection - */ - __pyx_5 = PyObject_GetAttr(__pyx_v_geodargs, __pyx_n_append); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;} - __pyx_3 = PyNumber_Add(__pyx_k6p, __pyx_v_key); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;} - __pyx_4 = PyNumber_Add(__pyx_3, __pyx_k7p); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;} + __pyx_5 = PyObject_GetAttr(__pyx_v_geodargs, __pyx_n_append); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; goto __pyx_L1;} + __pyx_3 = PyNumber_Add(__pyx_k6p, __pyx_v_key); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; goto __pyx_L1;} + __pyx_4 = PyNumber_Add(__pyx_3, __pyx_k7p); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; goto __pyx_L1;} Py_INCREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_value); - __pyx_6 = PyObject_CallObject(((PyObject*)&PyString_Type), __pyx_3); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;} + __pyx_6 = PyObject_CallObject(((PyObject*)&PyString_Type), __pyx_3); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_3 = PyNumber_Add(__pyx_4, __pyx_6); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;} + __pyx_3 = PyNumber_Add(__pyx_4, __pyx_6); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_6); __pyx_6 = 0; - __pyx_4 = PyNumber_Add(__pyx_3, __pyx_k8p); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;} + __pyx_4 = PyNumber_Add(__pyx_3, __pyx_k8p); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_6 = PyTuple_New(1); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;} + __pyx_6 = PyTuple_New(1); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_6, 0, __pyx_4); __pyx_4 = 0; - __pyx_3 = PyObject_CallObject(__pyx_5, __pyx_6); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(__pyx_5, __pyx_6); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; Py_DECREF(__pyx_6); __pyx_6 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; } Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":18 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":34 * for key,value in geodparams.iteritems(): * geodargs.append('+'+key+"="+str(value)+' ') * self.geodinitstring = PyString_AsString(''.join(geodargs)) # <<<<<<<<<<<<<< * # initialize projection * self.geodesic_t = GEOD_init_plus(self.geodinitstring, &GEOD_T)[0] */ - __pyx_4 = PyObject_GetAttr(__pyx_k9p, __pyx_n_join); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; goto __pyx_L1;} - __pyx_5 = PyTuple_New(1); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; goto __pyx_L1;} + __pyx_4 = PyObject_GetAttr(__pyx_k9p, __pyx_n_join); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; goto __pyx_L1;} + __pyx_5 = PyTuple_New(1); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; goto __pyx_L1;} Py_INCREF(__pyx_v_geodargs); PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_geodargs); - __pyx_6 = PyObject_CallObject(__pyx_4, __pyx_5); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; goto __pyx_L1;} + __pyx_6 = PyObject_CallObject(__pyx_4, __pyx_5); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_5); __pyx_5 = 0; ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodinitstring = PyString_AsString(__pyx_6); Py_DECREF(__pyx_6); __pyx_6 = 0; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":20 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":36 * self.geodinitstring = PyString_AsString(''.join(geodargs)) * # initialize projection * self.geodesic_t = GEOD_init_plus(self.geodinitstring, &GEOD_T)[0] # <<<<<<<<<<<<<< @@ -289,7 +303,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t = (GEOD_init_plus(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodinitstring,(&__pyx_v_GEOD_T))[0]); - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":21 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":37 * # initialize projection * self.geodesic_t = GEOD_init_plus(self.geodinitstring, &GEOD_T)[0] * if pj_errno != 0: # <<<<<<<<<<<<<< @@ -298,35 +312,27 @@ */ __pyx_7 = (pj_errno != 0); if (__pyx_7) { - - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":22 - * self.geodesic_t = GEOD_init_plus(self.geodinitstring, &GEOD_T)[0] - * if pj_errno != 0: - * raise RuntimeError(pj_strerrno(pj_errno)) # <<<<<<<<<<<<<< - * self.proj_version = PJ_VERSION/100. - * - */ - __pyx_3 = PyString_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;} - __pyx_1 = PyTuple_New(1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;} + __pyx_3 = PyString_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; goto __pyx_L1;} + __pyx_1 = PyTuple_New(1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_1, 0, __pyx_3); __pyx_3 = 0; - __pyx_4 = PyObject_CallObject(__pyx_builtin_RuntimeError, __pyx_1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;} + __pyx_4 = PyObject_CallObject(__pyx_builtin_RuntimeError, __pyx_1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __Pyx_Raise(__pyx_4, 0, 0); Py_DECREF(__pyx_4); __pyx_4 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; goto __pyx_L1;} goto __pyx_L4; } __pyx_L4:; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":23 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":39 * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) * self.proj_version = PJ_VERSION/100. # <<<<<<<<<<<<<< * * def __reduce__(self): */ - __pyx_5 = PyFloat_FromDouble((PJ_VERSION / 100.)); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; goto __pyx_L1;} + __pyx_5 = PyFloat_FromDouble((PJ_VERSION / 100.)); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; goto __pyx_L1;} Py_DECREF(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->proj_version); ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->proj_version = __pyx_5; __pyx_5 = 0; @@ -339,7 +345,7 @@ Py_XDECREF(__pyx_4); Py_XDECREF(__pyx_5); Py_XDECREF(__pyx_6); - __Pyx_AddTraceback("_geod.Geod.__new__"); + __Pyx_AddTraceback("_geod.Geod.__cinit__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_geodargs); @@ -352,27 +358,19 @@ static PyObject *__pyx_n___class__; -static PyObject *__pyx_f_py_5_geod_4Geod___reduce__(PyObject *__pyx_v_self, PyObject *unused); /*proto*/ +static PyObject *__pyx_pf_5_geod_4Geod___reduce__(PyObject *__pyx_v_self, PyObject *unused); /*proto*/ static char __pyx_doc_5_geod_4Geod___reduce__[] = "special method that allows pyproj.Geod instance to be pickled"; -static PyObject *__pyx_f_py_5_geod_4Geod___reduce__(PyObject *__pyx_v_self, PyObject *unused) { +static PyObject *__pyx_pf_5_geod_4Geod___reduce__(PyObject *__pyx_v_self, PyObject *unused) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; Py_INCREF(__pyx_v_self); - - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":27 - * def __reduce__(self): - * """special method that allows pyproj.Geod instance to be pickled""" - * return (self.__class__,(self.geodparams,)) # <<<<<<<<<<<<<< - * - * def _fwd(self, object lons, object lats, object az, object dist, radians=False): - */ - __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n___class__); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; goto __pyx_L1;} + __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n___class__); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; goto __pyx_L1;} Py_INCREF(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodparams); PyTuple_SET_ITEM(__pyx_2, 0, ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodparams); - __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; goto __pyx_L1;} + __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2); __pyx_1 = 0; @@ -388,7 +386,7 @@ Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("_geod.Geod.__reduce__"); - __pyx_r = 0; + __pyx_r = NULL; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; @@ -401,12 +399,12 @@ static PyObject *__pyx_builtin_ValueError; -static char (__pyx_k10[]) = "Buffer lengths not the same"; -static char (__pyx_k11[]) = "undefined forward geodesic (may be an equatorial arc)"; +static char __pyx_k10[] = "Buffer lengths not the same"; +static char __pyx_k11[] = "undefined forward geodesic (may be an equatorial arc)"; -static PyObject *__pyx_f_py_5_geod_4Geod__fwd(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pf_5_geod_4Geod__fwd(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_5_geod_4Geod__fwd[] = "\n forward transformation - determine longitude, latitude and back azimuth \n of a terminus point given an initial point longitude and latitude, plus\n forward azimuth and distance.\n if radians=True, lons/lats are radians instead of degrees.\n "; -static PyObject *__pyx_f_py_5_geod_4Geod__fwd(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pf_5_geod_4Geod__fwd(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_lons = 0; PyObject *__pyx_v_lats = 0; PyObject *__pyx_v_az = 0; @@ -418,14 +416,14 @@ Py_ssize_t __pyx_v_buflend; Py_ssize_t __pyx_v_ndim; Py_ssize_t __pyx_v_i; - double (*__pyx_v_lonsdata); - double (*__pyx_v_latsdata); - double (*__pyx_v_azdata); - double (*__pyx_v_distdata); - void (*__pyx_v_londata); - void (*__pyx_v_latdata); - void (*__pyx_v_azdat); - void (*__pyx_v_distdat); + double *__pyx_v_lonsdata; + double *__pyx_v_latsdata; + double *__pyx_v_azdata; + double *__pyx_v_distdata; + void *__pyx_v_londata; + void *__pyx_v_latdata; + void *__pyx_v_azdat; + void *__pyx_v_distdat; PyObject *__pyx_r; int __pyx_1; int __pyx_2; @@ -437,7 +435,7 @@ int __pyx_8; static char *__pyx_argnames[] = {"lons","lats","az","dist","radians",0}; __pyx_v_radians = __pyx_k3; - if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOOO|O", __pyx_argnames, &__pyx_v_lons, &__pyx_v_lats, &__pyx_v_az, &__pyx_v_dist, &__pyx_v_radians))) return 0; + if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOOO|O", __pyx_argnames, &__pyx_v_lons, &__pyx_v_lats, &__pyx_v_az, &__pyx_v_dist, &__pyx_v_radians))) return NULL; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_lons); Py_INCREF(__pyx_v_lats); @@ -445,7 +443,7 @@ Py_INCREF(__pyx_v_dist); Py_INCREF(__pyx_v_radians); - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":40 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":56 * cdef void *londata, *latdata, *azdat, *distdat * # if buffer api is supported, get pointer to data buffers. * if PyObject_AsWriteBuffer(lons, &londata, &buflenlons) <> 0: # <<<<<<<<<<<<<< @@ -454,21 +452,13 @@ */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lons,(&__pyx_v_londata),(&__pyx_v_buflenlons)) != 0); if (__pyx_1) { - - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":41 - * # if buffer api is supported, get pointer to data buffers. - * if PyObject_AsWriteBuffer(lons, &londata, &buflenlons) <> 0: - * raise RuntimeError # <<<<<<<<<<<<<< - * if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0: - * raise RuntimeError - */ __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":42 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":58 * if PyObject_AsWriteBuffer(lons, &londata, &buflenlons) <> 0: * raise RuntimeError * if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0: # <<<<<<<<<<<<<< @@ -477,21 +467,13 @@ */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lats,(&__pyx_v_latdata),(&__pyx_v_buflenlats)) != 0); if (__pyx_1) { - - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":43 - * raise RuntimeError - * if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0: - * raise RuntimeError # <<<<<<<<<<<<<< - * if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0: - * raise RuntimeError - */ __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; goto __pyx_L1;} goto __pyx_L3; } __pyx_L3:; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":44 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":60 * if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0: * raise RuntimeError * if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0: # <<<<<<<<<<<<<< @@ -500,21 +482,13 @@ */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_az,(&__pyx_v_azdat),(&__pyx_v_buflenaz)) != 0); if (__pyx_1) { - - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":45 - * raise RuntimeError - * if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0: - * raise RuntimeError # <<<<<<<<<<<<<< - * if PyObject_AsWriteBuffer(dist, &distdat, &buflend) <> 0: - * raise RuntimeError - */ __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; goto __pyx_L1;} goto __pyx_L4; } __pyx_L4:; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":46 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":62 * if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0: * raise RuntimeError * if PyObject_AsWriteBuffer(dist, &distdat, &buflend) <> 0: # <<<<<<<<<<<<<< @@ -523,21 +497,13 @@ */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_dist,(&__pyx_v_distdat),(&__pyx_v_buflend)) != 0); if (__pyx_1) { - - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":47 - * raise RuntimeError - * if PyObject_AsWriteBuffer(dist, &distdat, &buflend) <> 0: - * raise RuntimeError # <<<<<<<<<<<<<< - * # process data in buffer - * if not buflenlons == buflenlats == buflenaz == buflend: - */ __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; goto __pyx_L1;} goto __pyx_L5; } __pyx_L5:; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":49 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":65 * raise RuntimeError * # process data in buffer * if not buflenlons == buflenlats == buflenaz == buflend: # <<<<<<<<<<<<<< @@ -553,79 +519,71 @@ } __pyx_2 = (!__pyx_1); if (__pyx_2) { - - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":50 - * # process data in buffer - * if not buflenlons == buflenlats == buflenaz == buflend: - * raise RuntimeError("Buffer lengths not the same") # <<<<<<<<<<<<<< - * ndim = buflenlons/_doublesize - * lonsdata = <double *>londata - */ - __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; goto __pyx_L1;} Py_INCREF(__pyx_k10p); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k10p); - __pyx_4 = PyObject_CallObject(__pyx_builtin_RuntimeError, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; goto __pyx_L1;} + __pyx_4 = PyObject_CallObject(__pyx_builtin_RuntimeError, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; __Pyx_Raise(__pyx_4, 0, 0); Py_DECREF(__pyx_4); __pyx_4 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; goto __pyx_L1;} goto __pyx_L6; } __pyx_L6:; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":51 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":67 * if not buflenlons == buflenlats == buflenaz == buflend: * raise RuntimeError("Buffer lengths not the same") * ndim = buflenlons/_doublesize # <<<<<<<<<<<<<< * lonsdata = <double *>londata * latsdata = <double *>latdata */ - __pyx_3 = PyInt_FromSsize_t(__pyx_v_buflenlons); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; goto __pyx_L1;} - __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__doublesize); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; goto __pyx_L1;} - __pyx_5 = PyNumber_Divide(__pyx_3, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; goto __pyx_L1;} + __pyx_3 = PyInt_FromSsize_t(__pyx_v_buflenlons); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; goto __pyx_L1;} + __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__doublesize); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; goto __pyx_L1;} + __pyx_5 = PyNumber_Divide(__pyx_3, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_6 = __pyx_PyIndex_AsSsize_t(__pyx_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; goto __pyx_L1;} + __pyx_6 = __pyx_PyIndex_AsSsize_t(__pyx_5); if (unlikely((__pyx_6 == -1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; __pyx_v_ndim = __pyx_6; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":52 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":68 * raise RuntimeError("Buffer lengths not the same") * ndim = buflenlons/_doublesize * lonsdata = <double *>londata # <<<<<<<<<<<<<< * latsdata = <double *>latdata * azdata = <double *>azdat */ - __pyx_v_lonsdata = ((double (*))__pyx_v_londata); + __pyx_v_lonsdata = ((double *)__pyx_v_londata); - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":53 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":69 * ndim = buflenlons/_doublesize * lonsdata = <double *>londata * latsdata = <double *>latdata # <<<<<<<<<<<<<< * azdata = <double *>azdat * distdata = <double *>distdat */ - __pyx_v_latsdata = ((double (*))__pyx_v_latdata); + __pyx_v_latsdata = ((double *)__pyx_v_latdata); - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":54 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":70 * lonsdata = <double *>londata * latsdata = <double *>latdata * azdata = <double *>azdat # <<<<<<<<<<<<<< * distdata = <double *>distdat * for i from 0 <= i < ndim: */ - __pyx_v_azdata = ((double (*))__pyx_v_azdat); + __pyx_v_azdata = ((double *)__pyx_v_azdat); - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":55 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":71 * latsdata = <double *>latdata * azdata = <double *>azdat * distdata = <double *>distdat # <<<<<<<<<<<<<< * for i from 0 <= i < ndim: * if radians: */ - __pyx_v_distdata = ((double (*))__pyx_v_distdat); + __pyx_v_distdata = ((double *)__pyx_v_distdat); - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":56 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":72 * azdata = <double *>azdat * distdata = <double *>distdat * for i from 0 <= i < ndim: # <<<<<<<<<<<<<< @@ -634,17 +592,17 @@ */ for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_ndim; __pyx_v_i++) { - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":57 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":73 * distdata = <double *>distdat * for i from 0 <= i < ndim: * if radians: # <<<<<<<<<<<<<< * self.geodesic_t.p1.v = lonsdata[i] * self.geodesic_t.p1.u = latsdata[i] */ - __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; goto __pyx_L1;} + __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; goto __pyx_L1;} if (__pyx_1) { - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":58 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":74 * for i from 0 <= i < ndim: * if radians: * self.geodesic_t.p1.v = lonsdata[i] # <<<<<<<<<<<<<< @@ -653,7 +611,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.v = (__pyx_v_lonsdata[__pyx_v_i]); - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":59 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":75 * if radians: * self.geodesic_t.p1.v = lonsdata[i] * self.geodesic_t.p1.u = latsdata[i] # <<<<<<<<<<<<<< @@ -662,7 +620,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.u = (__pyx_v_latsdata[__pyx_v_i]); - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":60 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":76 * self.geodesic_t.p1.v = lonsdata[i] * self.geodesic_t.p1.u = latsdata[i] * self.geodesic_t.ALPHA12 = azdata[i] # <<<<<<<<<<<<<< @@ -671,7 +629,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA12 = (__pyx_v_azdata[__pyx_v_i]); - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":61 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":77 * self.geodesic_t.p1.u = latsdata[i] * self.geodesic_t.ALPHA12 = azdata[i] * self.geodesic_t.DIST = distdata[i] # <<<<<<<<<<<<<< @@ -683,55 +641,55 @@ } /*else*/ { - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":63 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":79 * self.geodesic_t.DIST = distdata[i] * else: * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] # <<<<<<<<<<<<<< * self.geodesic_t.p1.u = _dg2rad*latsdata[i] * self.geodesic_t.ALPHA12 = _dg2rad*azdata[i] */ - __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__dg2rad); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; goto __pyx_L1;} - __pyx_4 = PyFloat_FromDouble((__pyx_v_lonsdata[__pyx_v_i])); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; goto __pyx_L1;} - __pyx_5 = PyNumber_Multiply(__pyx_3, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; goto __pyx_L1;} + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__dg2rad); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; goto __pyx_L1;} + __pyx_4 = PyFloat_FromDouble((__pyx_v_lonsdata[__pyx_v_i])); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; goto __pyx_L1;} + __pyx_5 = PyNumber_Multiply(__pyx_3, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_7 = PyFloat_AsDouble(__pyx_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; goto __pyx_L1;} + __pyx_7 = PyFloat_AsDouble(__pyx_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.v = __pyx_7; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":64 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":80 * else: * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] * self.geodesic_t.p1.u = _dg2rad*latsdata[i] # <<<<<<<<<<<<<< * self.geodesic_t.ALPHA12 = _dg2rad*azdata[i] * self.geodesic_t.DIST = distdata[i] */ - __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__dg2rad); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; goto __pyx_L1;} - __pyx_4 = PyFloat_FromDouble((__pyx_v_latsdata[__pyx_v_i])); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; goto __pyx_L1;} - __pyx_5 = PyNumber_Multiply(__pyx_3, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; goto __pyx_L1;} + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__dg2rad); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; goto __pyx_L1;} + __pyx_4 = PyFloat_FromDouble((__pyx_v_latsdata[__pyx_v_i])); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; goto __pyx_L1;} + __pyx_5 = PyNumber_Multiply(__pyx_3, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_7 = PyFloat_AsDouble(__pyx_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; goto __pyx_L1;} + __pyx_7 = PyFloat_AsDouble(__pyx_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.u = __pyx_7; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":65 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":81 * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] * self.geodesic_t.p1.u = _dg2rad*latsdata[i] * self.geodesic_t.ALPHA12 = _dg2rad*azdata[i] # <<<<<<<<<<<<<< * self.geodesic_t.DIST = distdata[i] * geod_pre(&self.geodesic_t) */ - __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__dg2rad); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; goto __pyx_L1;} - __pyx_4 = PyFloat_FromDouble((__pyx_v_azdata[__pyx_v_i])); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; goto __pyx_L1;} - __pyx_5 = PyNumber_Multiply(__pyx_3, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; goto __pyx_L1;} + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__dg2rad); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; goto __pyx_L1;} + __pyx_4 = PyFloat_FromDouble((__pyx_v_azdata[__pyx_v_i])); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; goto __pyx_L1;} + __pyx_5 = PyNumber_Multiply(__pyx_3, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_7 = PyFloat_AsDouble(__pyx_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; goto __pyx_L1;} + __pyx_7 = PyFloat_AsDouble(__pyx_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA12 = __pyx_7; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":66 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":82 * self.geodesic_t.p1.u = _dg2rad*latsdata[i] * self.geodesic_t.ALPHA12 = _dg2rad*azdata[i] * self.geodesic_t.DIST = distdata[i] # <<<<<<<<<<<<<< @@ -742,7 +700,7 @@ } __pyx_L9:; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":67 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":83 * self.geodesic_t.ALPHA12 = _dg2rad*azdata[i] * self.geodesic_t.DIST = distdata[i] * geod_pre(&self.geodesic_t) # <<<<<<<<<<<<<< @@ -751,7 +709,7 @@ */ geod_pre((&((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t)); - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":68 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":84 * self.geodesic_t.DIST = distdata[i] * geod_pre(&self.geodesic_t) * if pj_errno != 0: # <<<<<<<<<<<<<< @@ -760,28 +718,20 @@ */ __pyx_2 = (pj_errno != 0); if (__pyx_2) { - - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":69 - * geod_pre(&self.geodesic_t) - * if pj_errno != 0: - * raise RuntimeError(pj_strerrno(pj_errno)) # <<<<<<<<<<<<<< - * geod_for(&self.geodesic_t) - * if pj_errno != 0: - */ - __pyx_3 = PyString_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; goto __pyx_L1;} - __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; goto __pyx_L1;} + __pyx_3 = PyString_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; goto __pyx_L1;} + __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_CallObject(__pyx_builtin_RuntimeError, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; goto __pyx_L1;} + __pyx_5 = PyObject_CallObject(__pyx_builtin_RuntimeError, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __Pyx_Raise(__pyx_5, 0, 0); Py_DECREF(__pyx_5); __pyx_5 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; goto __pyx_L1;} goto __pyx_L10; } __pyx_L10:; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":70 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":86 * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) * geod_for(&self.geodesic_t) # <<<<<<<<<<<<<< @@ -790,7 +740,7 @@ */ geod_for((&((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t)); - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":71 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":87 * raise RuntimeError(pj_strerrno(pj_errno)) * geod_for(&self.geodesic_t) * if pj_errno != 0: # <<<<<<<<<<<<<< @@ -799,28 +749,20 @@ */ __pyx_1 = (pj_errno != 0); if (__pyx_1) { - - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":72 - * geod_for(&self.geodesic_t) - * if pj_errno != 0: - * raise RuntimeError(pj_strerrno(pj_errno)) # <<<<<<<<<<<<<< - * if isnan(self.geodesic_t.ALPHA21): - * raise ValueError('undefined forward geodesic (may be an equatorial arc)') - */ - __pyx_3 = PyString_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; goto __pyx_L1;} - __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; goto __pyx_L1;} + __pyx_3 = PyString_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; goto __pyx_L1;} + __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_CallObject(__pyx_builtin_RuntimeError, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; goto __pyx_L1;} + __pyx_5 = PyObject_CallObject(__pyx_builtin_RuntimeError, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __Pyx_Raise(__pyx_5, 0, 0); Py_DECREF(__pyx_5); __pyx_5 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; goto __pyx_L1;} goto __pyx_L11; } __pyx_L11:; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":73 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":89 * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) * if isnan(self.geodesic_t.ALPHA21): # <<<<<<<<<<<<<< @@ -829,37 +771,29 @@ */ __pyx_8 = isnan(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA21); if (__pyx_8) { - - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":74 - * raise RuntimeError(pj_strerrno(pj_errno)) - * if isnan(self.geodesic_t.ALPHA21): - * raise ValueError('undefined forward geodesic (may be an equatorial arc)') # <<<<<<<<<<<<<< - * if radians: - * lonsdata[i] = self.geodesic_t.p2.v - */ - __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; goto __pyx_L1;} Py_INCREF(__pyx_k11p); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k11p); - __pyx_4 = PyObject_CallObject(__pyx_builtin_ValueError, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; goto __pyx_L1;} + __pyx_4 = PyObject_CallObject(__pyx_builtin_ValueError, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; __Pyx_Raise(__pyx_4, 0, 0); Py_DECREF(__pyx_4); __pyx_4 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; goto __pyx_L1;} goto __pyx_L12; } __pyx_L12:; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":75 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":91 * if isnan(self.geodesic_t.ALPHA21): * raise ValueError('undefined forward geodesic (may be an equatorial arc)') * if radians: # <<<<<<<<<<<<<< * lonsdata[i] = self.geodesic_t.p2.v * latsdata[i] = self.geodesic_t.p2.u */ - __pyx_2 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; goto __pyx_L1;} + __pyx_2 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; goto __pyx_L1;} if (__pyx_2) { - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":76 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":92 * raise ValueError('undefined forward geodesic (may be an equatorial arc)') * if radians: * lonsdata[i] = self.geodesic_t.p2.v # <<<<<<<<<<<<<< @@ -868,7 +802,7 @@ */ (__pyx_v_lonsdata[__pyx_v_i]) = ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.v; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":77 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":93 * if radians: * lonsdata[i] = self.geodesic_t.p2.v * latsdata[i] = self.geodesic_t.p2.u # <<<<<<<<<<<<<< @@ -877,7 +811,7 @@ */ (__pyx_v_latsdata[__pyx_v_i]) = ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.u; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":78 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":94 * lonsdata[i] = self.geodesic_t.p2.v * latsdata[i] = self.geodesic_t.p2.u * azdata[i] = self.geodesic_t.ALPHA21 # <<<<<<<<<<<<<< @@ -889,51 +823,51 @@ } /*else*/ { - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":80 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":96 * azdata[i] = self.geodesic_t.ALPHA21 * else: * lonsdata[i] = _rad2dg*self.geodesic_t.p2.v # <<<<<<<<<<<<<< * latsdata[i] = _rad2dg*self.geodesic_t.p2.u * azdata[i] = _rad2dg*self.geodesic_t.ALPHA21 */ - __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n__rad2dg); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; goto __pyx_L1;} - __pyx_3 = PyFloat_FromDouble(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.v); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; goto __pyx_L1;} - __pyx_4 = PyNumber_Multiply(__pyx_5, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; goto __pyx_L1;} + __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n__rad2dg); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; goto __pyx_L1;} + __pyx_3 = PyFloat_FromDouble(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.v); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; goto __pyx_L1;} + __pyx_4 = PyNumber_Multiply(__pyx_5, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_7 = PyFloat_AsDouble(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; goto __pyx_L1;} + __pyx_7 = PyFloat_AsDouble(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; (__pyx_v_lonsdata[__pyx_v_i]) = __pyx_7; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":81 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":97 * else: * lonsdata[i] = _rad2dg*self.geodesic_t.p2.v * latsdata[i] = _rad2dg*self.geodesic_t.p2.u # <<<<<<<<<<<<<< * azdata[i] = _rad2dg*self.geodesic_t.ALPHA21 * */ - __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n__rad2dg); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; goto __pyx_L1;} - __pyx_3 = PyFloat_FromDouble(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.u); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; goto __pyx_L1;} - __pyx_4 = PyNumber_Multiply(__pyx_5, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; goto __pyx_L1;} + __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n__rad2dg); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L1;} + __pyx_3 = PyFloat_FromDouble(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.u); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L1;} + __pyx_4 = PyNumber_Multiply(__pyx_5, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_7 = PyFloat_AsDouble(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; goto __pyx_L1;} + __pyx_7 = PyFloat_AsDouble(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; (__pyx_v_latsdata[__pyx_v_i]) = __pyx_7; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":82 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":98 * lonsdata[i] = _rad2dg*self.geodesic_t.p2.v * latsdata[i] = _rad2dg*self.geodesic_t.p2.u * azdata[i] = _rad2dg*self.geodesic_t.ALPHA21 # <<<<<<<<<<<<<< * * def _inv(self, object lons1, object lats1, object lons2, object lats2, radians=False): */ - __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n__rad2dg); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; goto __pyx_L1;} - __pyx_3 = PyFloat_FromDouble(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA21); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; goto __pyx_L1;} - __pyx_4 = PyNumber_Multiply(__pyx_5, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; goto __pyx_L1;} + __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n__rad2dg); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; goto __pyx_L1;} + __pyx_3 = PyFloat_FromDouble(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA21); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; goto __pyx_L1;} + __pyx_4 = PyNumber_Multiply(__pyx_5, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_7 = PyFloat_AsDouble(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; goto __pyx_L1;} + __pyx_7 = PyFloat_AsDouble(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; (__pyx_v_azdata[__pyx_v_i]) = __pyx_7; } @@ -947,7 +881,7 @@ Py_XDECREF(__pyx_4); Py_XDECREF(__pyx_5); __Pyx_AddTraceback("_geod.Geod._fwd"); - __pyx_r = 0; + __pyx_r = NULL; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_lons); @@ -961,12 +895,12 @@ static PyObject *__pyx_k12p; static PyObject *__pyx_k13p; -static char (__pyx_k12[]) = "Buffer lengths not the same"; -static char (__pyx_k13[]) = "undefined inverse geodesic (may be an antipodal point)"; +static char __pyx_k12[] = "Buffer lengths not the same"; +static char __pyx_k13[] = "undefined inverse geodesic (may be an antipodal point)"; -static PyObject *__pyx_f_py_5_geod_4Geod__inv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pf_5_geod_4Geod__inv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_5_geod_4Geod__inv[] = "\n inverse transformation - return forward and back azimuths, plus distance\n between an initial and terminus lat/lon pair.\n if radians=True, lons/lats are radians instead of degrees.\n "; -static PyObject *__pyx_f_py_5_geod_4Geod__inv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pf_5_geod_4Geod__inv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_lons1 = 0; PyObject *__pyx_v_lats1 = 0; PyObject *__pyx_v_lons2 = 0; @@ -978,14 +912,14 @@ Py_ssize_t __pyx_v_buflend; Py_ssize_t __pyx_v_ndim; Py_ssize_t __pyx_v_i; - double (*__pyx_v_lonsdata); - double (*__pyx_v_latsdata); - double (*__pyx_v_azdata); - double (*__pyx_v_distdata); - void (*__pyx_v_londata); - void (*__pyx_v_latdata); - void (*__pyx_v_azdat); - void (*__pyx_v_distdat); + double *__pyx_v_lonsdata; + double *__pyx_v_latsdata; + double *__pyx_v_azdata; + double *__pyx_v_distdata; + void *__pyx_v_londata; + void *__pyx_v_latdata; + void *__pyx_v_azdat; + void *__pyx_v_distdat; PyObject *__pyx_r; int __pyx_1; int __pyx_2; @@ -997,7 +931,7 @@ int __pyx_8; static char *__pyx_argnames[] = {"lons1","lats1","lons2","lats2","radians",0}; __pyx_v_radians = __pyx_k4; - if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOOO|O", __pyx_argnames, &__pyx_v_lons1, &__pyx_v_lats1, &__pyx_v_lons2, &__pyx_v_lats2, &__pyx_v_radians))) return 0; + if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOOO|O", __pyx_argnames, &__pyx_v_lons1, &__pyx_v_lats1, &__pyx_v_lons2, &__pyx_v_lats2, &__pyx_v_radians))) return NULL; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_lons1); Py_INCREF(__pyx_v_lats1); @@ -1005,7 +939,7 @@ Py_INCREF(__pyx_v_lats2); Py_INCREF(__pyx_v_radians); - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":94 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":110 * cdef void *londata, *latdata, *azdat, *distdat * # if buffer api is supported, get pointer to data buffers. * if PyObject_AsWriteBuffer(lons1, &londata, &buflenlons) <> 0: # <<<<<<<<<<<<<< @@ -1014,21 +948,13 @@ */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lons1,(&__pyx_v_londata),(&__pyx_v_buflenlons)) != 0); if (__pyx_1) { - - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":95 - * # if buffer api is supported, get pointer to data buffers. - * if PyObject_AsWriteBuffer(lons1, &londata, &buflenlons) <> 0: - * raise RuntimeError # <<<<<<<<<<<<<< - * if PyObject_AsWriteBuffer(lats1, &latdata, &buflenlats) <> 0: - * raise RuntimeError - */ __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":96 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":112 * if PyObject_AsWriteBuffer(lons1, &londata, &buflenlons) <> 0: * raise RuntimeError * if PyObject_AsWriteBuffer(lats1, &latdata, &buflenlats) <> 0: # <<<<<<<<<<<<<< @@ -1037,21 +963,13 @@ */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lats1,(&__pyx_v_latdata),(&__pyx_v_buflenlats)) != 0); if (__pyx_1) { - - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":97 - * raise RuntimeError - * if PyObject_AsWriteBuffer(lats1, &latdata, &buflenlats) <> 0: - * raise RuntimeError # <<<<<<<<<<<<<< - * if PyObject_AsWriteBuffer(lons2, &azdat, &buflen... [truncated message content] |
From: <js...@us...> - 2007-11-14 16:47:21
|
Revision: 4276 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4276&view=rev Author: jswhit Date: 2007-11-14 08:47:09 -0800 (Wed, 14 Nov 2007) Log Message: ----------- install full res coastlines if they are available Modified Paths: -------------- trunk/toolkits/basemap-testing/setup.py Modified: trunk/toolkits/basemap-testing/setup.py =================================================================== --- trunk/toolkits/basemap-testing/setup.py 2007-11-14 16:39:47 UTC (rev 4275) +++ trunk/toolkits/basemap-testing/setup.py 2007-11-14 16:47:09 UTC (rev 4276) @@ -112,7 +112,7 @@ # Specify all the required mpl data pyproj_datafiles = ['data/epsg', 'data/esri', 'data/esri.extra', 'data/GL27', 'data/nad.lst', 'data/nad27', 'data/nad83', 'data/ntv2_out.dist', 'data/other.extra', 'data/pj_out27.dist', 'data/pj_out83.dist', 'data/proj_def.dat', 'data/README', 'data/td_out.dist', 'data/test27', 'data/test83', 'data/testntv2', 'data/testvarious', 'data/world'] boundaryfiles = [] -for resolution in ['c','l','i','h']: +for resolution in ['c','l','i','h','f']: boundaryfiles = boundaryfiles + glob.glob("lib/matplotlib/toolkits/basemap/data/*_"+resolution+".dat") boundaryfiles = [os.path.join('data',os.path.basename(bfile)) for bfile in boundaryfiles] basemap_datafiles = boundaryfiles + ['data/5minmask.bin'] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jd...@us...> - 2007-11-14 16:40:40
|
Revision: 4275 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4275&view=rev Author: jdh2358 Date: 2007-11-14 08:39:47 -0800 (Wed, 14 Nov 2007) Log Message: ----------- added glen's Fc specteal patch Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/__init__.py trunk/matplotlib/lib/matplotlib/axes.py trunk/matplotlib/lib/matplotlib/backends/backend_agg.py trunk/matplotlib/lib/matplotlib/cbook.py trunk/matplotlib/lib/matplotlib/cm.py trunk/matplotlib/lib/matplotlib/collections.py trunk/matplotlib/lib/matplotlib/colorbar.py trunk/matplotlib/lib/matplotlib/config/matplotlib.conf.default trunk/matplotlib/lib/matplotlib/config/mplconfig.py trunk/matplotlib/lib/matplotlib/image.py trunk/matplotlib/lib/matplotlib/lines.py trunk/matplotlib/lib/matplotlib/mlab.py trunk/matplotlib/lib/matplotlib/numerix/__init__.py trunk/matplotlib/lib/matplotlib/pylab.py trunk/matplotlib/setup.py Modified: trunk/matplotlib/lib/matplotlib/__init__.py =================================================================== --- trunk/matplotlib/lib/matplotlib/__init__.py 2007-11-14 16:29:24 UTC (rev 4274) +++ trunk/matplotlib/lib/matplotlib/__init__.py 2007-11-14 16:39:47 UTC (rev 4275) @@ -118,8 +118,6 @@ def is_string_like(obj): - if hasattr(obj, 'shape'): return 0 # this is a workaround - # for a bug in numeric<23.1 try: obj + '' except (TypeError, ValueError): return 0 return 1 Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2007-11-14 16:29:24 UTC (rev 4274) +++ trunk/matplotlib/lib/matplotlib/axes.py 2007-11-14 16:39:47 UTC (rev 4275) @@ -4338,7 +4338,7 @@ alpha=1.0, vmin=None, vmax=None, origin=None, extent=None) IMSHOW(X) - plot image X to current axes, resampling to scale to axes - size (X may be numarray/Numeric array or PIL image) + size (X may be numpy array or PIL image) IMSHOW(X, **kwargs) - Use keyword args to control image scaling, colormapping etc. See below for details @@ -4888,10 +4888,10 @@ return n, bins, cbook.silent_list('Patch', patches) hist.__doc__ = cbook.dedent(hist.__doc__) % martist.kwdocd - def psd(self, x, NFFT=256, Fs=2, detrend=mlab.detrend_none, + def psd(self, x, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, window=mlab.window_hanning, noverlap=0, **kwargs): """ - PSD(x, NFFT=256, Fs=2, detrend=mlab.detrend_none, + PSD(x, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, window=mlab.window_hanning, noverlap=0, **kwargs) The power spectral density by Welches average periodogram method. The @@ -4902,22 +4902,27 @@ with a scaling to correct for power loss due to windowing. Fs is the sampling frequency. - NFFT is the length of the fft segment; must be a power of 2 + * NFFT is the length of the fft segment; must be a power of 2 - Fs is the sampling frequency. + * Fs is the sampling frequency. - detrend - the function applied to each segment before fft-ing, + * Fc is the center frequency of x (defaults to 0), which offsets + the yextents of the image to reflect the frequency range used + when a signal is acquired and then filtered and downsampled to + baseband. + + * detrend - the function applied to each segment before fft-ing, designed to remove the mean or linear trend. Unlike in matlab, where the detrend parameter is a vector, in matplotlib is it a function. The mlab module defines detrend_none, detrend_mean, detrend_linear, but you can use a custom function as well. - window - the function used to window the segments. window is a + * window - the function used to window the segments. window is a function, unlike in matlab(TM) where it is a vector. mlab defines window_none, window_hanning, but you can use a custom function as well. - noverlap gives the length of the overlap between segments. + * noverlap gives the length of the overlap between segments. Returns the tuple Pxx, freqs @@ -4935,6 +4940,7 @@ if not self._hold: self.cla() pxx, freqs = mlab.psd(x, NFFT, Fs, detrend, window, noverlap) pxx.shape = len(freqs), + freqs += Fc self.plot(freqs, 10*npy.log10(pxx), **kwargs) self.set_xlabel('Frequency') @@ -4952,10 +4958,10 @@ return pxx, freqs psd.__doc__ = cbook.dedent(psd.__doc__) % martist.kwdocd - def csd(self, x, y, NFFT=256, Fs=2, detrend=mlab.detrend_none, + def csd(self, x, y, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, window=mlab.window_hanning, noverlap=0, **kwargs): """ - CSD(x, y, NFFT=256, Fs=2, detrend=mlab.detrend_none, + CSD(x, y, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, window=window_hanning, noverlap=0, **kwargs) The cross spectral density Pxy by Welches average periodogram method. @@ -4981,6 +4987,7 @@ pxy, freqs = mlab.csd(x, y, NFFT, Fs, detrend, window, noverlap) pxy.shape = len(freqs), # pxy is complex + freqs += Fc self.plot(freqs, 10*npy.log10(npy.absolute(pxy)), **kwargs) self.set_xlabel('Frequency') @@ -4997,11 +5004,10 @@ return pxy, freqs csd.__doc__ = cbook.dedent(csd.__doc__) % martist.kwdocd - def cohere(self, x, y, NFFT=256, Fs=2, detrend=mlab.detrend_none, + def cohere(self, x, y, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, window=mlab.window_hanning, noverlap=0, **kwargs): """ - COHERE(x, y, NFFT=256, Fs=2, - detrend = mlab.detrend_none, + COHERE(x, y, NFFT=256, Fs=2, Fc=0, detrend = mlab.detrend_none, window = mlab.window_hanning, noverlap=0, **kwargs) cohere the coherence between x and y. Coherence is the normalized @@ -5026,6 +5032,7 @@ """ if not self._hold: self.cla() cxy, freqs = mlab.cohere(x, y, NFFT, Fs, detrend, window, noverlap) + freqs += Fc self.plot(freqs, cxy, **kwargs) self.set_xlabel('Frequency') @@ -5035,11 +5042,11 @@ return cxy, freqs cohere.__doc__ = cbook.dedent(cohere.__doc__) % martist.kwdocd - def specgram(self, x, NFFT=256, Fs=2, detrend=mlab.detrend_none, + def specgram(self, x, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, window=mlab.window_hanning, noverlap=128, cmap = None, xextent=None): """ - SPECGRAM(x, NFFT=256, Fs=2, detrend=mlab.detrend_none, + SPECGRAM(x, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, window = mlab.window_hanning, noverlap=128, cmap=None, xextent=None) @@ -5081,7 +5088,8 @@ if xextent is None: xextent = 0, npy.amax(bins) xmin, xmax = xextent - extent = xmin, xmax, npy.amin(freqs), npy.amax(freqs) + freqs += Fc + extent = xmin, xmax, freqs[0], freqs[-1] im = self.imshow(Z, cmap, extent=extent) self.axis('auto') Modified: trunk/matplotlib/lib/matplotlib/backends/backend_agg.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backends/backend_agg.py 2007-11-14 16:29:24 UTC (rev 4274) +++ trunk/matplotlib/lib/matplotlib/backends/backend_agg.py 2007-11-14 16:39:47 UTC (rev 4275) @@ -26,8 +26,9 @@ REQUIREMENTs - python2.2+ - Numeric 22+ + python2.3+ + numpy 1.0 + + agg2 (see below) freetype 2 libpng Modified: trunk/matplotlib/lib/matplotlib/cbook.py =================================================================== --- trunk/matplotlib/lib/matplotlib/cbook.py 2007-11-14 16:29:24 UTC (rev 4274) +++ trunk/matplotlib/lib/matplotlib/cbook.py 2007-11-14 16:39:47 UTC (rev 4275) @@ -208,16 +208,12 @@ def is_string_like(obj): - if hasattr(obj, 'shape'): return 0 # this is a workaround - # for a bug in numeric<23.1 try: obj + '' except (TypeError, ValueError): return 0 return 1 def is_file_like(obj): - if hasattr(obj, 'shape'): return 0 # this is a workaround - # for a bug in numeric<23.1 try: obj + '' except (TypeError, ValueError): return 0 return 1 Modified: trunk/matplotlib/lib/matplotlib/cm.py =================================================================== --- trunk/matplotlib/lib/matplotlib/cm.py 2007-11-14 16:29:24 UTC (rev 4274) +++ trunk/matplotlib/lib/matplotlib/cm.py 2007-11-14 16:39:47 UTC (rev 4275) @@ -56,7 +56,7 @@ return x def set_array(self, A): - 'Set the image array from numeric/numarray A' + 'Set the image array from numpy array A' self._A = A def get_array(self): Modified: trunk/matplotlib/lib/matplotlib/collections.py =================================================================== --- trunk/matplotlib/lib/matplotlib/collections.py 2007-11-14 16:29:24 UTC (rev 4274) +++ trunk/matplotlib/lib/matplotlib/collections.py 2007-11-14 16:39:47 UTC (rev 4275) @@ -299,7 +299,7 @@ thus (meshWidth * meshHeight) quadrilaterals in the mesh. The mesh need not be regular and the polygons need not be convex. A quadrilateral mesh is represented by a - (2 x ((meshWidth + 1) * (meshHeight + 1))) Numeric array + (2 x ((meshWidth + 1) * (meshHeight + 1))) numpy array 'coordinates' where each row is the X and Y coordinates of one of the vertices. To define the function that maps from a data point to Modified: trunk/matplotlib/lib/matplotlib/colorbar.py =================================================================== --- trunk/matplotlib/lib/matplotlib/colorbar.py 2007-11-14 16:29:24 UTC (rev 4274) +++ trunk/matplotlib/lib/matplotlib/colorbar.py 2007-11-14 16:39:47 UTC (rev 4275) @@ -509,7 +509,7 @@ N = len(b) ii = npy.minimum(npy.searchsorted(b, xn), N-1) i0 = npy.maximum(ii - 1, 0) - #db = b[ii] - b[i0] (does not work with Numeric) + #db = b[ii] - b[i0] db = npy.take(b, ii) - npy.take(b, i0) db = npy.where(i0==ii, 1.0, db) #dy = y[ii] - y[i0] Modified: trunk/matplotlib/lib/matplotlib/config/matplotlib.conf.default =================================================================== --- trunk/matplotlib/lib/matplotlib/config/matplotlib.conf.default 2007-11-14 16:29:24 UTC (rev 4274) +++ trunk/matplotlib/lib/matplotlib/config/matplotlib.conf.default 2007-11-14 16:39:47 UTC (rev 4275) @@ -1,7 +1,7 @@ # MPLConfig - plaintext (in .conf format) # This is a sample matplotlib configuration file. It should be placed -# in HOME/.matplotlib/matplotlibrc (unix/linux like systems) and +# in HOME/.matplotlib (unix/linux like systems) and # C:\Documents and Settings\yourname\.matplotlib (win32 systems) # # By default, the installer will overwrite the existing file in the install Modified: trunk/matplotlib/lib/matplotlib/config/mplconfig.py =================================================================== --- trunk/matplotlib/lib/matplotlib/config/mplconfig.py 2007-11-14 16:29:24 UTC (rev 4274) +++ trunk/matplotlib/lib/matplotlib/config/mplconfig.py 2007-11-14 16:39:47 UTC (rev 4275) @@ -23,7 +23,7 @@ class MPLConfig(TConfig): """ This is a sample matplotlib configuration file. It should be placed - in HOME/.matplotlib/matplotlibrc (unix/linux like systems) and + in HOME/.matplotlib (unix/linux like systems) and C:\Documents and Settings\yourname\.matplotlib (win32 systems) By default, the installer will overwrite the existing file in the install Modified: trunk/matplotlib/lib/matplotlib/image.py =================================================================== --- trunk/matplotlib/lib/matplotlib/image.py 2007-11-14 16:29:24 UTC (rev 4274) +++ trunk/matplotlib/lib/matplotlib/image.py 2007-11-14 16:39:47 UTC (rev 4275) @@ -230,7 +230,7 @@ """ retained for backwards compatibility - use set_data instead - ACCEPTS: numeric/numarray/PIL Image A""" + ACCEPTS: numpy array A or PIL Image""" # This also needs to be here to override the inherited # cm.ScalarMappable.set_array method so it is not invoked # by mistake. Modified: trunk/matplotlib/lib/matplotlib/lines.py =================================================================== --- trunk/matplotlib/lib/matplotlib/lines.py 2007-11-14 16:29:24 UTC (rev 4274) +++ trunk/matplotlib/lib/matplotlib/lines.py 2007-11-14 16:39:47 UTC (rev 4275) @@ -227,7 +227,7 @@ """ Artist.__init__(self) - #convert sequences to numeric arrays + #convert sequences to numpy arrays if not iterable(xdata): raise RuntimeError('xdata must be a sequence') if not iterable(ydata): Modified: trunk/matplotlib/lib/matplotlib/mlab.py =================================================================== --- trunk/matplotlib/lib/matplotlib/mlab.py 2007-11-14 16:29:24 UTC (rev 4274) +++ trunk/matplotlib/lib/matplotlib/mlab.py 2007-11-14 16:39:47 UTC (rev 4275) @@ -533,7 +533,7 @@ Cxy, Phase, freqs = cohere_pairs( X, ij, ...) Compute the coherence for all pairs in ij. X is a - numSamples,numCols Numeric array. ij is a list of tuples (i,j). + numSamples,numCols numpy array. ij is a list of tuples (i,j). Each tuple is a pair of indexes into the columns of X for which you want to compute coherence. For example, if X has 64 columns, and you want to compute all nonredundant pairs, define ij as @@ -894,7 +894,7 @@ Example 1 : ## 2D system - # Numeric solution + def derivs6(x,t): d1 = x[0] + 2*x[1] d2 = -3*x[0] + 4*x[1] @@ -1480,8 +1480,7 @@ """ A set of convenient utilities for numerical work. -Most of this module requires Numerical Python or is meant to be used with it. -See http://www.pfdubois.com/numpy for details. +Most of this module requires numpy or is meant to be used with it. Copyright (c) 2001-2004, Fernando Perez. <Fer...@co...> All rights reserved. @@ -1754,7 +1753,7 @@ #from numpy import fromfunction as fromfunction_kw def fromfunction_kw(function, dimensions, **kwargs): - """Drop-in replacement for fromfunction() from Numerical Python. + """Drop-in replacement for fromfunction() from numpy Allows passing keyword arguments to the desired function. @@ -1938,12 +1937,8 @@ ### end mlab2 functions -#Classes for manipulating and viewing numpy record arrays +#helpers for loading, saving, manipulating and viewing numpy record arrays - - - - def safe_isnan(x): 'isnan for arbitrary types' try: b = npy.isnan(x) @@ -2236,10 +2231,10 @@ # a series of classes for describing the format intentions of various rec views class FormatObj: def tostr(self, x): - return str(self.toval(x)) + return self.toval(x) def toval(self, x): - return x + return str(x) class FormatString(FormatObj): Modified: trunk/matplotlib/lib/matplotlib/numerix/__init__.py =================================================================== --- trunk/matplotlib/lib/matplotlib/numerix/__init__.py 2007-11-14 16:29:24 UTC (rev 4274) +++ trunk/matplotlib/lib/matplotlib/numerix/__init__.py 2007-11-14 16:39:47 UTC (rev 4275) @@ -35,8 +35,10 @@ use_maskedarray = True if a == "--ma": use_maskedarray = False -del a +try: del a +except NameError: pass + if which[0] is None: try: # In theory, rcParams always has *some* value for numerix. which = rcParams['numerix'], "rc" Modified: trunk/matplotlib/lib/matplotlib/pylab.py =================================================================== --- trunk/matplotlib/lib/matplotlib/pylab.py 2007-11-14 16:29:24 UTC (rev 4274) +++ trunk/matplotlib/lib/matplotlib/pylab.py 2007-11-14 16:39:47 UTC (rev 4275) @@ -191,11 +191,6 @@ __end -Credits: The plotting commands were provided by -John D. Hunter <jdh...@ac...> - -Most of the other commands are from Numeric, MLab and FFT, with the -exception of those in mlab.py provided by matplotlib. """ import sys, warnings Modified: trunk/matplotlib/setup.py =================================================================== --- trunk/matplotlib/setup.py 2007-11-14 16:29:24 UTC (rev 4274) +++ trunk/matplotlib/setup.py 2007-11-14 16:39:47 UTC (rev 4275) @@ -263,15 +263,16 @@ distrib = setup(name="matplotlib", version= __version__, - description = "Matlab(TM) style python plotting package", + description = "Python plotting package", author = "John D. Hunter", author_email="jd...@gm...", url = "http://matplotlib.sourceforge.net", long_description = """ matplotlib strives to produce publication quality 2D graphics - using matlab plotting for inspiration. Although the main lib is - object oriented, there is a functional interface "pylab" - for people coming from Matlab. + for interactive graphing, scientific publishing, user interface + development and web application servers targeting multiple user + interfaces and hardcopy output formats. There is a 'pylab' mode + which emulates matlab graphics """, packages = packages, platforms='any', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-14 16:29:26
|
Revision: 4274 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4274&view=rev Author: jswhit Date: 2007-11-14 08:29:24 -0800 (Wed, 14 Nov 2007) Log Message: ----------- support for full-res datasets. Modified Paths: -------------- trunk/toolkits/basemap-testing/utils/dumpbounds.sh trunk/toolkits/basemap-testing/utils/readboundaries.py Modified: trunk/toolkits/basemap-testing/utils/dumpbounds.sh =================================================================== --- trunk/toolkits/basemap-testing/utils/dumpbounds.sh 2007-11-14 16:27:55 UTC (rev 4273) +++ trunk/toolkits/basemap-testing/utils/dumpbounds.sh 2007-11-14 16:29:24 UTC (rev 4274) @@ -10,7 +10,9 @@ pscoast -M -Dh -R0/360/-90/90 -N2 -JQ180/4.5i -W -A${area} > states_h.txt pscoast -M -Df -R0/360/-90/90 -N1 -JQ180/4.5i -W -A${area} > countries_f.txt pscoast -M -Df -R0/360/-90/90 -N2 -JQ180/4.5i -W -A${area} > states_f.txt +pscoast -M -Dh -R0/360/-90/90 -N2 -JQ180/4.5i -W -A${area} > states_h.txt pscoast -M -Dc -R0/360/-90/90 -Ir -JQ180/4.5i -W -A${area} > rivers_c.txt pscoast -M -Dl -R0/360/-90/90 -Ir -JQ180/4.5i -W -A${area} > rivers_l.txt pscoast -M -Di -R0/360/-90/90 -Ir -JQ180/4.5i -W -A${area} > rivers_i.txt pscoast -M -Dh -R0/360/-90/90 -Ir -JQ180/4.5i -W -A${area} > rivers_h.txt +pscoast -M -Dh -R0/360/-90/90 -Ir -JQ180/4.5i -W -A${area} > rivers_f.txt Modified: trunk/toolkits/basemap-testing/utils/readboundaries.py =================================================================== --- trunk/toolkits/basemap-testing/utils/readboundaries.py 2007-11-14 16:27:55 UTC (rev 4273) +++ trunk/toolkits/basemap-testing/utils/readboundaries.py 2007-11-14 16:29:24 UTC (rev 4274) @@ -93,7 +93,7 @@ return polybounds2, polymeta # read in coastline data (only those polygons whose area > area_thresh). -for resolution in ['c','l','i','h']: +for resolution in ['c','l','i','h','f']: coastlons = []; coastlats = []; coastsegind = []; coastsegtype = [] coastfile = 'gshhs_'+resolution+'.txt' countryfile = 'countries_'+resolution+'.txt' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-14 16:28:00
|
Revision: 4273 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4273&view=rev Author: jswhit Date: 2007-11-14 08:27:55 -0800 (Wed, 14 Nov 2007) Log Message: ----------- support for full resolution datasets. Modified Paths: -------------- trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py Modified: trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py =================================================================== --- trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py 2007-11-14 16:17:55 UTC (rev 4272) +++ trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py 2007-11-14 16:27:55 UTC (rev 4273) @@ -139,7 +139,7 @@ but if they are not, the entire globe is plotted. resolution - resolution of boundary database to use. Can be 'c' (crude), - 'l' (low), 'i' (intermediate), 'h' (high), or None. Default is 'c'. + 'l' (low), 'i' (intermediate), 'h' (high), 'f' (full) or None. If None, no boundary data will be read in (and class methods such as drawcoastlines will raise an exception if invoked). Resolution drops off by roughly 80% @@ -150,8 +150,8 @@ Tools (http://gmt.soest.hawaii.edu). area_thresh - coastline or lake with an area smaller than area_thresh - in km^2 will not be plotted. Default 10000,1000,100,10 for resolution - 'c','l','i','h'. + in km^2 will not be plotted. Default 10000,1000,100,10,1 for resolution + 'c','l','i','h','f'. rsphere - radius of the sphere used to define map projection (default 6370997 meters, close to the arithmetic mean radius of the earth). If @@ -671,7 +671,7 @@ elif resolution == 'f': area_thresh = 1. else: - raise ValueError, "boundary resolution must be one of 'c','l','i' or 'h'" + raise ValueError, "boundary resolution must be one of 'c','l','i','h' or 'f'" self.area_thresh = area_thresh # define map boundary polygon (in lat/lon coordinates) self._boundarypolyll, self._boundarypolyxy = self._getmapboundary() @@ -733,10 +733,10 @@ def _readboundarydata(self,name): msg = """ -Unable to open boundary dataset file. Only the 'crude', 'low' -and 'intermediate' resolution datasets are installed by default. If you -are requesting a 'high' resolution dataset, you need to download -and install those files manually (see the basemap README for details).""" +Unable to open boundary dataset file. Only the 'crude', 'low', +'intermediate' and 'high' resolution datasets are installed by default. If you +are requesting a 'full' resolution dataset, you need to download +and install those files separately(see the basemap README for details).""" try: bdatfile = open(os.path.join(basemap_datadir,name+'_'+self.resolution+'.dat'),'rb') bdatmetafile = open(os.path.join(basemap_datadir,name+'meta_'+self.resolution+'.dat'),'r') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-14 16:17:57
|
Revision: 4272 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4272&view=rev Author: jswhit Date: 2007-11-14 08:17:55 -0800 (Wed, 14 Nov 2007) Log Message: ----------- just raise a SystemExit instead of ValueError if geos lib not found. Modified Paths: -------------- trunk/toolkits/basemap-testing/setup.py Modified: trunk/toolkits/basemap-testing/setup.py =================================================================== --- trunk/toolkits/basemap-testing/setup.py 2007-11-14 16:16:30 UTC (rev 4271) +++ trunk/toolkits/basemap-testing/setup.py 2007-11-14 16:17:55 UTC (rev 4272) @@ -51,7 +51,8 @@ the GEOS_DIR environment variable. For example if libgeos_c is installed in /usr/local/lib, and geos_c.h is installed in /usr/local/include, set GEOS_DIR to /usr/local.""" - raise ValueError(msg) + print msg + raise SystemExit(1) # check that header geos_c.h is in GEOS_dir/include, # and that the version number in the header file is 2.2.3. geos_version = check_geosversion(GEOS_dir) @@ -59,7 +60,8 @@ msg = """\ geos library version 2.2.3 is required, you have version %s. Please download and install 2.2.3 from http://geos.refractions.net.""" % geos_version - raise ValueError(msg) + print msg + raise SystemExit(1) else: geos_include_dirs=[os.path.join(GEOS_dir,'include'),numpy.get_include()] geos_library_dirs=[os.path.join(GEOS_dir,'lib')] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-14 16:16:36
|
Revision: 4271 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4271&view=rev Author: jswhit Date: 2007-11-14 08:16:30 -0800 (Wed, 14 Nov 2007) Log Message: ----------- clarify error messages. Modified Paths: -------------- trunk/toolkits/basemap-testing/setup.py Modified: trunk/toolkits/basemap-testing/setup.py =================================================================== --- trunk/toolkits/basemap-testing/setup.py 2007-11-14 15:55:43 UTC (rev 4270) +++ trunk/toolkits/basemap-testing/setup.py 2007-11-14 16:16:30 UTC (rev 4271) @@ -46,14 +46,20 @@ # get location of geos lib from environment variable. GEOS_dir = os.environ.get('GEOS_DIR') if GEOS_dir is None: - raise KeyError('please specify the location of geos library and headers with GEOS_DIR environment variable') + msg = """\ +please specify the location of geos library and headers with +the GEOS_DIR environment variable. For example if libgeos_c +is installed in /usr/local/lib, and geos_c.h is installed in +/usr/local/include, set GEOS_DIR to /usr/local.""" + raise ValueError(msg) # check that header geos_c.h is in GEOS_dir/include, # and that the version number in the header file is 2.2.3. geos_version = check_geosversion(GEOS_dir) if geos_version != '"2.2.3"': - raise ValueError(""" + msg = """\ geos library version 2.2.3 is required, you have version %s. -Please download and install 2.2.3 from http://geos.refractions.net.""" % geos_version) +Please download and install 2.2.3 from http://geos.refractions.net.""" % geos_version + raise ValueError(msg) else: geos_include_dirs=[os.path.join(GEOS_dir,'include'),numpy.get_include()] geos_library_dirs=[os.path.join(GEOS_dir,'lib')] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-14 15:55:55
|
Revision: 4270 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4270&view=rev Author: jswhit Date: 2007-11-14 07:55:43 -0800 (Wed, 14 Nov 2007) Log Message: ----------- check for existence of geos_c.h, make sure GEOS_VERSION is "2.2.3" Modified Paths: -------------- trunk/toolkits/basemap-testing/setup.py Modified: trunk/toolkits/basemap-testing/setup.py =================================================================== --- trunk/toolkits/basemap-testing/setup.py 2007-11-14 15:42:30 UTC (rev 4269) +++ trunk/toolkits/basemap-testing/setup.py 2007-11-14 15:55:43 UTC (rev 4270) @@ -31,11 +31,32 @@ else: return [("HAVE_UPDATE_HEADER", "0")] +def check_geosversion(GEOS_dir): + """check geos C-API header file (geos_c.h)""" + try: + f = open(os.path.join(GEOS_dir,'include/geos_c.h')) + except: + raise IOError('cannot find geos header file in %s/include'%GEOS_dir) + geos_version = None + for line in f: + if line.startswith('#define GEOS_VERSION'): + geos_version = line.split()[2] + return geos_version + +# get location of geos lib from environment variable. GEOS_dir = os.environ.get('GEOS_DIR') if GEOS_dir is None: - raise KeyError, 'please specify the location of geos library and headers with GEOS_DIR environment variable' -geos_include_dirs=[os.path.join(GEOS_dir,'include'),numpy.get_include()] -geos_library_dirs=[os.path.join(GEOS_dir,'lib')] + raise KeyError('please specify the location of geos library and headers with GEOS_DIR environment variable') +# check that header geos_c.h is in GEOS_dir/include, +# and that the version number in the header file is 2.2.3. +geos_version = check_geosversion(GEOS_dir) +if geos_version != '"2.2.3"': + raise ValueError(""" +geos library version 2.2.3 is required, you have version %s. +Please download and install 2.2.3 from http://geos.refractions.net.""" % geos_version) +else: + geos_include_dirs=[os.path.join(GEOS_dir,'include'),numpy.get_include()] + geos_library_dirs=[os.path.join(GEOS_dir,'lib')] # proj4 and geos extensions. deps = glob.glob('src/*.c') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-14 15:42:35
|
Revision: 4269 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4269&view=rev Author: jswhit Date: 2007-11-14 07:42:30 -0800 (Wed, 14 Nov 2007) Log Message: ----------- check library version Modified Paths: -------------- trunk/toolkits/basemap-testing/src/_geos.c trunk/toolkits/basemap-testing/src/_geos.pyx Modified: trunk/toolkits/basemap-testing/src/_geos.c =================================================================== --- trunk/toolkits/basemap-testing/src/_geos.c 2007-11-14 14:00:56 UTC (rev 4268) +++ trunk/toolkits/basemap-testing/src/_geos.c 2007-11-14 15:42:30 UTC (rev 4269) @@ -1,4 +1,4 @@ -/* Generated by Cython 0.9.6.7 on Wed Nov 14 06:04:45 2007 */ +/* Generated by Cython 0.9.6.6 on Wed Nov 14 08:42:18 2007 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -35,7 +35,7 @@ typedef struct {const char *s; const void **p;} __Pyx_CApiTabEntry; /*proto*/ typedef struct {PyObject **p; char *s;} __Pyx_InternTabEntry; /*proto*/ -typedef struct {PyObject **p; char *s; long n; int is_unicode;} __Pyx_StringTabEntry; /*proto*/ +typedef struct {PyObject **p; char *s; long n;} __Pyx_StringTabEntry; /*proto*/ #define __pyx_PyIndex_AsSsize_t(b) PyInt_AsSsize_t(PyNumber_Index(b)) @@ -71,14 +71,14 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/ +static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ + +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ + static PyObject *__Pyx_GetExcValue(void); /*proto*/ -static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ - static void __Pyx_WriteUnraisable(char *name); /*proto*/ -static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ - static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ static int __Pyx_InternStrings(__Pyx_InternTabEntry *t); /*proto*/ @@ -129,31 +129,27 @@ /* Implementation of _geos */ static char (__pyx_k3[]) = "0.1"; +static char (__pyx_k4[]) = "version 2.2.3 of the geos library is required"; static PyObject *__pyx_n_sys; static PyObject *__pyx_n_numpy; static PyObject *__pyx_n___version__; -static PyObject *__pyx_n_is_valid; -static PyObject *__pyx_n_geom_type; -static PyObject *__pyx_n_within; -static PyObject *__pyx_n_intersects; -static PyObject *__pyx_n_intersection; -static PyObject *__pyx_n_get_coords; -static PyObject *__pyx_n___dealloc__; -static PyObject *__pyx_n___reduce__; -static PyObject *__pyx_n___init__; -static PyObject *__pyx_n_area; +static PyObject *__pyx_n_geos_version; +static PyObject *__pyx_n_ValueError; static PyObject *__pyx_k3p; +static PyObject *__pyx_k4p; +static PyObject *__pyx_builtin_ValueError; + static PyObject *__pyx_n_stdout; static PyObject *__pyx_n_write; -static PyObject *__pyx_k4p; +static PyObject *__pyx_k5p; -static char (__pyx_k4[]) = "GEOS_NOTICE: %s\n"; +static char (__pyx_k5[]) = "GEOS_NOTICE: %s\n"; -static void __pyx_f_5_geos_notice_h(char (*__pyx_v_fmt),char (*__pyx_v_msg)) { +static void __pyx_f_5_geos_notice_h(char (*__pyx_v_fmt),char (*__pyx_v_msg)) { PyObject *__pyx_v_format; PyObject *__pyx_v_message; PyObject *__pyx_v_warn_msg; @@ -164,31 +160,31 @@ __pyx_v_message = Py_None; Py_INCREF(Py_None); __pyx_v_warn_msg = Py_None; Py_INCREF(Py_None); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":100 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":103 * * cdef void notice_h(char *fmt, char*msg): * format = PyString_FromString(fmt) # <<<<<<<<<<<<<< * message = PyString_FromString(msg) * try: */ - __pyx_1 = PyString_FromString(__pyx_v_fmt); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; goto __pyx_L1;} + __pyx_1 = PyString_FromString(__pyx_v_fmt); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; goto __pyx_L1;} Py_DECREF(__pyx_v_format); __pyx_v_format = __pyx_1; __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":101 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":104 * cdef void notice_h(char *fmt, char*msg): * format = PyString_FromString(fmt) * message = PyString_FromString(msg) # <<<<<<<<<<<<<< * try: * warn_msg = format % message */ - __pyx_1 = PyString_FromString(__pyx_v_msg); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; goto __pyx_L1;} + __pyx_1 = PyString_FromString(__pyx_v_msg); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; goto __pyx_L1;} Py_DECREF(__pyx_v_message); __pyx_v_message = __pyx_1; __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":102 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":105 * format = PyString_FromString(fmt) * message = PyString_FromString(msg) * try: # <<<<<<<<<<<<<< @@ -197,14 +193,14 @@ */ /*try:*/ { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":103 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":106 * message = PyString_FromString(msg) * try: * warn_msg = format % message # <<<<<<<<<<<<<< * except: * warn_msg = format */ - __pyx_1 = PyNumber_Remainder(__pyx_v_format, __pyx_v_message); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; goto __pyx_L2;} + __pyx_1 = PyNumber_Remainder(__pyx_v_format, __pyx_v_message); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; goto __pyx_L2;} Py_DECREF(__pyx_v_warn_msg); __pyx_v_warn_msg = __pyx_1; __pyx_1 = 0; @@ -213,7 +209,7 @@ __pyx_L2:; Py_XDECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":104 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":107 * try: * warn_msg = format % message * except: # <<<<<<<<<<<<<< @@ -222,10 +218,10 @@ */ /*except:*/ { __Pyx_AddTraceback("_geos.notice_h"); - __pyx_1 = __Pyx_GetExcValue(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; goto __pyx_L1;} + __pyx_1 = __Pyx_GetExcValue(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":105 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":108 * warn_msg = format % message * except: * warn_msg = format # <<<<<<<<<<<<<< @@ -239,23 +235,23 @@ } __pyx_L3:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":106 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":109 * except: * warn_msg = format * sys.stdout.write('GEOS_NOTICE: %s\n' % warn_msg) # <<<<<<<<<<<<<< * * cdef void error_h(char *fmt, char*msg): */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_sys); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_stdout); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; goto __pyx_L1;} + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_sys); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_stdout); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_write); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; goto __pyx_L1;} + __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_write); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_2 = PyNumber_Remainder(__pyx_k4p, __pyx_v_warn_msg); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; goto __pyx_L1;} - __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; goto __pyx_L1;} + __pyx_2 = PyNumber_Remainder(__pyx_k5p, __pyx_v_warn_msg); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); __pyx_2 = 0; - __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; @@ -274,11 +270,11 @@ static PyObject *__pyx_n_stderr; -static PyObject *__pyx_k5p; +static PyObject *__pyx_k6p; -static char (__pyx_k5[]) = "GEOS_ERROR: %s\n"; +static char (__pyx_k6[]) = "GEOS_ERROR: %s\n"; -static void __pyx_f_5_geos_error_h(char (*__pyx_v_fmt),char (*__pyx_v_msg)) { +static void __pyx_f_5_geos_error_h(char (*__pyx_v_fmt),char (*__pyx_v_msg)) { PyObject *__pyx_v_format; PyObject *__pyx_v_message; PyObject *__pyx_v_warn_msg; @@ -289,31 +285,31 @@ __pyx_v_message = Py_None; Py_INCREF(Py_None); __pyx_v_warn_msg = Py_None; Py_INCREF(Py_None); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":109 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":112 * * cdef void error_h(char *fmt, char*msg): * format = PyString_FromString(fmt) # <<<<<<<<<<<<<< * message = PyString_FromString(msg) * try: */ - __pyx_1 = PyString_FromString(__pyx_v_fmt); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; goto __pyx_L1;} + __pyx_1 = PyString_FromString(__pyx_v_fmt); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; goto __pyx_L1;} Py_DECREF(__pyx_v_format); __pyx_v_format = __pyx_1; __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":110 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":113 * cdef void error_h(char *fmt, char*msg): * format = PyString_FromString(fmt) * message = PyString_FromString(msg) # <<<<<<<<<<<<<< * try: * warn_msg = format % message */ - __pyx_1 = PyString_FromString(__pyx_v_msg); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; goto __pyx_L1;} + __pyx_1 = PyString_FromString(__pyx_v_msg); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; goto __pyx_L1;} Py_DECREF(__pyx_v_message); __pyx_v_message = __pyx_1; __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":111 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":114 * format = PyString_FromString(fmt) * message = PyString_FromString(msg) * try: # <<<<<<<<<<<<<< @@ -322,14 +318,14 @@ */ /*try:*/ { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":112 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":115 * message = PyString_FromString(msg) * try: * warn_msg = format % message # <<<<<<<<<<<<<< * except: * warn_msg = format */ - __pyx_1 = PyNumber_Remainder(__pyx_v_format, __pyx_v_message); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; goto __pyx_L2;} + __pyx_1 = PyNumber_Remainder(__pyx_v_format, __pyx_v_message); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; goto __pyx_L2;} Py_DECREF(__pyx_v_warn_msg); __pyx_v_warn_msg = __pyx_1; __pyx_1 = 0; @@ -338,7 +334,7 @@ __pyx_L2:; Py_XDECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":113 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":116 * try: * warn_msg = format % message * except: # <<<<<<<<<<<<<< @@ -347,10 +343,10 @@ */ /*except:*/ { __Pyx_AddTraceback("_geos.error_h"); - __pyx_1 = __Pyx_GetExcValue(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; goto __pyx_L1;} + __pyx_1 = __Pyx_GetExcValue(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":114 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":117 * warn_msg = format % message * except: * warn_msg = format # <<<<<<<<<<<<<< @@ -364,23 +360,23 @@ } __pyx_L3:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":115 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":118 * except: * warn_msg = format * sys.stderr.write('GEOS_ERROR: %s\n' % warn_msg) # <<<<<<<<<<<<<< * - * # intialize GEOS (parameters are notice and error function callbacks). + * # check library version */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_sys); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_stderr); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; goto __pyx_L1;} + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_sys); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_stderr); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_write); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; goto __pyx_L1;} + __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_write); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_2 = PyNumber_Remainder(__pyx_k5p, __pyx_v_warn_msg); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; goto __pyx_L1;} - __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; goto __pyx_L1;} + __pyx_2 = PyNumber_Remainder(__pyx_k6p, __pyx_v_warn_msg); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); __pyx_2 = 0; - __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; @@ -397,14 +393,14 @@ Py_DECREF(__pyx_v_warn_msg); } -static PyObject *__pyx_f_py_5_geos_12BaseGeometry_is_valid(PyObject *__pyx_v_self, PyObject *unused); /*proto*/ -static PyObject *__pyx_f_py_5_geos_12BaseGeometry_is_valid(PyObject *__pyx_v_self, PyObject *unused) { +static PyObject *__pyx_f_5_geos_12BaseGeometry_is_valid(PyObject *__pyx_v_self, PyObject *unused); /*proto*/ +static PyObject *__pyx_f_5_geos_12BaseGeometry_is_valid(PyObject *__pyx_v_self, PyObject *unused) { char __pyx_v_valid; PyObject *__pyx_r; char __pyx_1; Py_INCREF(__pyx_v_self); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":127 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":134 * def is_valid(self): * cdef char valid * valid = GEOSisValid(self._geom) # <<<<<<<<<<<<<< @@ -413,7 +409,7 @@ */ __pyx_v_valid = GEOSisValid(((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_self)->_geom); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":128 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":135 * cdef char valid * valid = GEOSisValid(self._geom) * if valid: # <<<<<<<<<<<<<< @@ -423,7 +419,7 @@ __pyx_1 = __pyx_v_valid; if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":129 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":136 * valid = GEOSisValid(self._geom) * if valid: * return True # <<<<<<<<<<<<<< @@ -437,7 +433,7 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":131 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":138 * return True * else: * return False # <<<<<<<<<<<<<< @@ -456,20 +452,20 @@ return __pyx_r; } -static PyObject *__pyx_f_py_5_geos_12BaseGeometry_geom_type(PyObject *__pyx_v_self, PyObject *unused); /*proto*/ -static PyObject *__pyx_f_py_5_geos_12BaseGeometry_geom_type(PyObject *__pyx_v_self, PyObject *unused) { +static PyObject *__pyx_f_5_geos_12BaseGeometry_geom_type(PyObject *__pyx_v_self, PyObject *unused); /*proto*/ +static PyObject *__pyx_f_5_geos_12BaseGeometry_geom_type(PyObject *__pyx_v_self, PyObject *unused) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; Py_INCREF(__pyx_v_self); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":134 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":141 * * def geom_type(self): * return PyString_FromString(GEOSGeomType(self._geom)) # <<<<<<<<<<<<<< * * def within(self, BaseGeometry geom): */ - __pyx_1 = PyString_FromString(GEOSGeomType(((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_self)->_geom)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; goto __pyx_L1;} + __pyx_1 = PyString_FromString(GEOSGeomType(((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_self)->_geom)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; @@ -485,8 +481,8 @@ return __pyx_r; } -static PyObject *__pyx_f_py_5_geos_12BaseGeometry_within(PyObject *__pyx_v_self, PyObject *__pyx_v_geom); /*proto*/ -static PyObject *__pyx_f_py_5_geos_12BaseGeometry_within(PyObject *__pyx_v_self, PyObject *__pyx_v_geom) { +static PyObject *__pyx_f_5_geos_12BaseGeometry_within(PyObject *__pyx_v_self, PyObject *__pyx_v_geom); /*proto*/ +static PyObject *__pyx_f_5_geos_12BaseGeometry_within(PyObject *__pyx_v_self, PyObject *__pyx_v_geom) { GEOSGeom (*__pyx_v_g1); GEOSGeom (*__pyx_v_g2); char __pyx_v_answer; @@ -494,9 +490,9 @@ char __pyx_1; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_geom); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geom), __pyx_ptype_5_geos_BaseGeometry, 1, "geom"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; goto __pyx_L1;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geom), __pyx_ptype_5_geos_BaseGeometry, 1, "geom"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":139 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":146 * cdef GEOSGeom *g1, *g2 * cdef char answer * g1 = self._geom # <<<<<<<<<<<<<< @@ -505,7 +501,7 @@ */ __pyx_v_g1 = ((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_self)->_geom; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":140 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":147 * cdef char answer * g1 = self._geom * g2 = geom._geom # <<<<<<<<<<<<<< @@ -514,7 +510,7 @@ */ __pyx_v_g2 = ((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_geom)->_geom; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":141 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":148 * g1 = self._geom * g2 = geom._geom * answer = GEOSWithin(g1, g2) # <<<<<<<<<<<<<< @@ -523,7 +519,7 @@ */ __pyx_v_answer = GEOSWithin(__pyx_v_g1,__pyx_v_g2); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":142 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":149 * g2 = geom._geom * answer = GEOSWithin(g1, g2) * if answer: # <<<<<<<<<<<<<< @@ -533,7 +529,7 @@ __pyx_1 = __pyx_v_answer; if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":143 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":150 * answer = GEOSWithin(g1, g2) * if answer: * return True # <<<<<<<<<<<<<< @@ -547,7 +543,7 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":145 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":152 * return True * else: * return False # <<<<<<<<<<<<<< @@ -571,8 +567,8 @@ return __pyx_r; } -static PyObject *__pyx_f_py_5_geos_12BaseGeometry_intersects(PyObject *__pyx_v_self, PyObject *__pyx_v_geom); /*proto*/ -static PyObject *__pyx_f_py_5_geos_12BaseGeometry_intersects(PyObject *__pyx_v_self, PyObject *__pyx_v_geom) { +static PyObject *__pyx_f_5_geos_12BaseGeometry_intersects(PyObject *__pyx_v_self, PyObject *__pyx_v_geom); /*proto*/ +static PyObject *__pyx_f_5_geos_12BaseGeometry_intersects(PyObject *__pyx_v_self, PyObject *__pyx_v_geom) { GEOSGeom (*__pyx_v_g1); GEOSGeom (*__pyx_v_g2); char __pyx_v_answer; @@ -580,9 +576,9 @@ char __pyx_1; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_geom); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geom), __pyx_ptype_5_geos_BaseGeometry, 1, "geom"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; goto __pyx_L1;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geom), __pyx_ptype_5_geos_BaseGeometry, 1, "geom"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":150 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":157 * cdef GEOSGeom *g1, *g2 * cdef char answer * g1 = self._geom # <<<<<<<<<<<<<< @@ -591,7 +587,7 @@ */ __pyx_v_g1 = ((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_self)->_geom; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":151 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":158 * cdef char answer * g1 = self._geom * g2 = geom._geom # <<<<<<<<<<<<<< @@ -600,7 +596,7 @@ */ __pyx_v_g2 = ((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_geom)->_geom; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":152 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":159 * g1 = self._geom * g2 = geom._geom * answer = GEOSIntersects(g1, g2) # <<<<<<<<<<<<<< @@ -609,7 +605,7 @@ */ __pyx_v_answer = GEOSIntersects(__pyx_v_g1,__pyx_v_g2); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":153 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":160 * g2 = geom._geom * answer = GEOSIntersects(g1, g2) * if answer: # <<<<<<<<<<<<<< @@ -619,7 +615,7 @@ __pyx_1 = __pyx_v_answer; if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":154 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":161 * answer = GEOSIntersects(g1, g2) * if answer: * return True # <<<<<<<<<<<<<< @@ -633,7 +629,7 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":156 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":163 * return True * else: * return False # <<<<<<<<<<<<<< @@ -660,14 +656,14 @@ static PyObject *__pyx_n_append; static PyObject *__pyx_n_NotImplementedError; -static PyObject *__pyx_k6p; +static PyObject *__pyx_k7p; static PyObject *__pyx_builtin_NotImplementedError; -static char (__pyx_k6[]) = "intersections of type '%s' not yet implemented"; +static char (__pyx_k7[]) = "intersections of type '%s' not yet implemented"; -static PyObject *__pyx_f_py_5_geos_12BaseGeometry_intersection(PyObject *__pyx_v_self, PyObject *__pyx_v_geom); /*proto*/ -static PyObject *__pyx_f_py_5_geos_12BaseGeometry_intersection(PyObject *__pyx_v_self, PyObject *__pyx_v_geom) { +static PyObject *__pyx_f_5_geos_12BaseGeometry_intersection(PyObject *__pyx_v_self, PyObject *__pyx_v_geom); /*proto*/ +static PyObject *__pyx_f_5_geos_12BaseGeometry_intersection(PyObject *__pyx_v_self, PyObject *__pyx_v_geom) { GEOSGeom (*__pyx_v_g1); GEOSGeom (*__pyx_v_g2); GEOSGeom (*__pyx_v_g3); @@ -690,9 +686,9 @@ __pyx_v_p = Py_None; Py_INCREF(Py_None); __pyx_v_pout = Py_None; Py_INCREF(Py_None); __pyx_v_type = Py_None; Py_INCREF(Py_None); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geom), __pyx_ptype_5_geos_BaseGeometry, 1, "geom"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; goto __pyx_L1;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geom), __pyx_ptype_5_geos_BaseGeometry, 1, "geom"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":162 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":169 * cdef char answer * cdef int numgeoms, i, typeid * g1 = self._geom # <<<<<<<<<<<<<< @@ -701,7 +697,7 @@ */ __pyx_v_g1 = ((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_self)->_geom; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":163 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":170 * cdef int numgeoms, i, typeid * g1 = self._geom * g2 = geom._geom # <<<<<<<<<<<<<< @@ -710,7 +706,7 @@ */ __pyx_v_g2 = ((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_geom)->_geom; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":164 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":171 * g1 = self._geom * g2 = geom._geom * g3 = GEOSIntersection(g1, g2) # <<<<<<<<<<<<<< @@ -719,7 +715,7 @@ */ __pyx_v_g3 = GEOSIntersection(__pyx_v_g1,__pyx_v_g2); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":165 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":172 * g2 = geom._geom * g3 = GEOSIntersection(g1, g2) * typeid = GEOSGeomTypeId(g3) # <<<<<<<<<<<<<< @@ -728,7 +724,7 @@ */ __pyx_v_typeid = GEOSGeomTypeId(__pyx_v_g3); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":166 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":173 * g3 = GEOSIntersection(g1, g2) * typeid = GEOSGeomTypeId(g3) * if typeid == GEOS_POLYGON: # <<<<<<<<<<<<<< @@ -738,42 +734,42 @@ __pyx_1 = (__pyx_v_typeid == GEOS_POLYGON); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":167 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":174 * typeid = GEOSGeomTypeId(g3) * if typeid == GEOS_POLYGON: * b = _get_coords(g3) # <<<<<<<<<<<<<< * p = Polygon(b) * pout = [p] */ - __pyx_2 = __pyx_f_5_geos__get_coords(__pyx_v_g3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; goto __pyx_L1;} + __pyx_2 = __pyx_f_5_geos__get_coords(__pyx_v_g3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; goto __pyx_L1;} Py_DECREF(__pyx_v_b); __pyx_v_b = __pyx_2; __pyx_2 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":168 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":175 * if typeid == GEOS_POLYGON: * b = _get_coords(g3) * p = Polygon(b) # <<<<<<<<<<<<<< * pout = [p] * elif typeid == GEOS_LINESTRING: */ - __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; goto __pyx_L1;} Py_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_b); - __pyx_3 = PyObject_CallObject(((PyObject*)__pyx_ptype_5_geos_Polygon), __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(((PyObject*)__pyx_ptype_5_geos_Polygon), __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_v_p); __pyx_v_p = __pyx_3; __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":169 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":176 * b = _get_coords(g3) * p = Polygon(b) * pout = [p] # <<<<<<<<<<<<<< * elif typeid == GEOS_LINESTRING: * b = _get_coords(g3) */ - __pyx_2 = PyList_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; goto __pyx_L1;} + __pyx_2 = PyList_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; goto __pyx_L1;} Py_INCREF(__pyx_v_p); PyList_SET_ITEM(__pyx_2, 0, __pyx_v_p); Py_DECREF(__pyx_v_pout); @@ -784,42 +780,42 @@ __pyx_1 = (__pyx_v_typeid == GEOS_LINESTRING); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":171 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":178 * pout = [p] * elif typeid == GEOS_LINESTRING: * b = _get_coords(g3) # <<<<<<<<<<<<<< * p = LineString(b) * pout = [p] */ - __pyx_3 = __pyx_f_5_geos__get_coords(__pyx_v_g3); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; goto __pyx_L1;} + __pyx_3 = __pyx_f_5_geos__get_coords(__pyx_v_g3); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; goto __pyx_L1;} Py_DECREF(__pyx_v_b); __pyx_v_b = __pyx_3; __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":172 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":179 * elif typeid == GEOS_LINESTRING: * b = _get_coords(g3) * p = LineString(b) # <<<<<<<<<<<<<< * pout = [p] * elif typeid == GEOS_MULTIPOLYGON: */ - __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; goto __pyx_L1;} Py_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_b); - __pyx_3 = PyObject_CallObject(((PyObject*)__pyx_ptype_5_geos_LineString), __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(((PyObject*)__pyx_ptype_5_geos_LineString), __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_v_p); __pyx_v_p = __pyx_3; __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":173 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":180 * b = _get_coords(g3) * p = LineString(b) * pout = [p] # <<<<<<<<<<<<<< * elif typeid == GEOS_MULTIPOLYGON: * numgeoms = GEOSGetNumGeometries(g3) */ - __pyx_2 = PyList_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; goto __pyx_L1;} + __pyx_2 = PyList_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; goto __pyx_L1;} Py_INCREF(__pyx_v_p); PyList_SET_ITEM(__pyx_2, 0, __pyx_v_p); Py_DECREF(__pyx_v_pout); @@ -830,7 +826,7 @@ __pyx_1 = (__pyx_v_typeid == GEOS_MULTIPOLYGON); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":175 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":182 * pout = [p] * elif typeid == GEOS_MULTIPOLYGON: * numgeoms = GEOSGetNumGeometries(g3) # <<<<<<<<<<<<<< @@ -839,19 +835,19 @@ */ __pyx_v_numgeoms = GEOSGetNumGeometries(__pyx_v_g3); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":176 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":183 * elif typeid == GEOS_MULTIPOLYGON: * numgeoms = GEOSGetNumGeometries(g3) * pout = [] # <<<<<<<<<<<<<< * for i from 0 <= i < numgeoms: * gout = GEOSGetGeometryN(g3, i) */ - __pyx_3 = PyList_New(0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; goto __pyx_L1;} + __pyx_3 = PyList_New(0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; goto __pyx_L1;} Py_DECREF(__pyx_v_pout); __pyx_v_pout = __pyx_3; __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":177 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":184 * numgeoms = GEOSGetNumGeometries(g3) * pout = [] * for i from 0 <= i < numgeoms: # <<<<<<<<<<<<<< @@ -860,7 +856,7 @@ */ for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_numgeoms; __pyx_v_i++) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":178 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":185 * pout = [] * for i from 0 <= i < numgeoms: * gout = GEOSGetGeometryN(g3, i) # <<<<<<<<<<<<<< @@ -869,46 +865,46 @@ */ __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3,__pyx_v_i); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":179 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":186 * for i from 0 <= i < numgeoms: * gout = GEOSGetGeometryN(g3, i) * b = _get_coords(gout) # <<<<<<<<<<<<<< * p = Polygon(b) * pout.append(p) */ - __pyx_2 = __pyx_f_5_geos__get_coords(__pyx_v_gout); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; goto __pyx_L1;} + __pyx_2 = __pyx_f_5_geos__get_coords(__pyx_v_gout); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; goto __pyx_L1;} Py_DECREF(__pyx_v_b); __pyx_v_b = __pyx_2; __pyx_2 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":180 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":187 * gout = GEOSGetGeometryN(g3, i) * b = _get_coords(gout) * p = Polygon(b) # <<<<<<<<<<<<<< * pout.append(p) * elif typeid == GEOS_MULTILINESTRING: */ - __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; goto __pyx_L1;} Py_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_b); - __pyx_2 = PyObject_CallObject(((PyObject*)__pyx_ptype_5_geos_Polygon), __pyx_3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(((PyObject*)__pyx_ptype_5_geos_Polygon), __pyx_3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_v_p); __pyx_v_p = __pyx_2; __pyx_2 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":181 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":188 * b = _get_coords(gout) * p = Polygon(b) * pout.append(p) # <<<<<<<<<<<<<< * elif typeid == GEOS_MULTILINESTRING: * numgeoms = GEOSGetNumGeometries(g3) */ - __pyx_3 = PyObject_GetAttr(__pyx_v_pout, __pyx_n_append); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_v_pout, __pyx_n_append); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; goto __pyx_L1;} Py_INCREF(__pyx_v_p); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_p); - __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; goto __pyx_L1;} + __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; @@ -918,7 +914,7 @@ __pyx_1 = (__pyx_v_typeid == GEOS_MULTILINESTRING); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":183 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":190 * pout.append(p) * elif typeid == GEOS_MULTILINESTRING: * numgeoms = GEOSGetNumGeometries(g3) # <<<<<<<<<<<<<< @@ -927,19 +923,19 @@ */ __pyx_v_numgeoms = GEOSGetNumGeometries(__pyx_v_g3); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":184 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":191 * elif typeid == GEOS_MULTILINESTRING: * numgeoms = GEOSGetNumGeometries(g3) * pout = [] # <<<<<<<<<<<<<< * for i from 0 <= i < numgeoms: * gout = GEOSGetGeometryN(g3, i) */ - __pyx_3 = PyList_New(0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; goto __pyx_L1;} + __pyx_3 = PyList_New(0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; goto __pyx_L1;} Py_DECREF(__pyx_v_pout); __pyx_v_pout = __pyx_3; __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":185 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":192 * numgeoms = GEOSGetNumGeometries(g3) * pout = [] * for i from 0 <= i < numgeoms: # <<<<<<<<<<<<<< @@ -948,7 +944,7 @@ */ for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_numgeoms; __pyx_v_i++) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":186 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":193 * pout = [] * for i from 0 <= i < numgeoms: * gout = GEOSGetGeometryN(g3, i) # <<<<<<<<<<<<<< @@ -957,46 +953,46 @@ */ __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3,__pyx_v_i); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":187 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":194 * for i from 0 <= i < numgeoms: * gout = GEOSGetGeometryN(g3, i) * b = _get_coords(gout) # <<<<<<<<<<<<<< * p = LineString(b) * pout.append(p) */ - __pyx_2 = __pyx_f_5_geos__get_coords(__pyx_v_gout); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; goto __pyx_L1;} + __pyx_2 = __pyx_f_5_geos__get_coords(__pyx_v_gout); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; goto __pyx_L1;} Py_DECREF(__pyx_v_b); __pyx_v_b = __pyx_2; __pyx_2 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":188 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":195 * gout = GEOSGetGeometryN(g3, i) * b = _get_coords(gout) * p = LineString(b) # <<<<<<<<<<<<<< * pout.append(p) * else: */ - __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; goto __pyx_L1;} + __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; goto __pyx_L1;} Py_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_b); - __pyx_3 = PyObject_CallObject(((PyObject*)__pyx_ptype_5_geos_LineString), __pyx_4); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(((PyObject*)__pyx_ptype_5_geos_LineString), __pyx_4); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_v_p); __pyx_v_p = __pyx_3; __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":189 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":196 * b = _get_coords(gout) * p = LineString(b) * pout.append(p) # <<<<<<<<<<<<<< * else: * type = PyString_FromString(GEOSGeomType(g3)) */ - __pyx_2 = PyObject_GetAttr(__pyx_v_pout, __pyx_n_append); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; goto __pyx_L1;} - __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_v_pout, __pyx_n_append); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; goto __pyx_L1;} + __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; goto __pyx_L1;} Py_INCREF(__pyx_v_p); PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_p); - __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; @@ -1005,38 +1001,38 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":191 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":198 * pout.append(p) * else: * type = PyString_FromString(GEOSGeomType(g3)) # <<<<<<<<<<<<<< * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) * GEOSGeom_destroy(g3) */ - __pyx_2 = PyString_FromString(GEOSGeomType(__pyx_v_g3)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; goto __pyx_L1;} + __pyx_2 = PyString_FromString(GEOSGeomType(__pyx_v_g3)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; goto __pyx_L1;} Py_DECREF(__pyx_v_type); __pyx_v_type = __pyx_2; __pyx_2 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":192 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":199 * else: * type = PyString_FromString(GEOSGeomType(g3)) * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) # <<<<<<<<<<<<<< * GEOSGeom_destroy(g3) * return pout */ - __pyx_4 = PyNumber_Remainder(__pyx_k6p, __pyx_v_type); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; goto __pyx_L1;} - __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; goto __pyx_L1;} + __pyx_4 = PyNumber_Remainder(__pyx_k7p, __pyx_v_type); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_4); __pyx_4 = 0; - __pyx_2 = PyObject_CallObject(__pyx_builtin_NotImplementedError, __pyx_3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(__pyx_builtin_NotImplementedError, __pyx_3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; __Pyx_Raise(__pyx_2, 0, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; goto __pyx_L1;} } __pyx_L2:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":193 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":200 * type = PyString_FromString(GEOSGeomType(g3)) * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) * GEOSGeom_destroy(g3) # <<<<<<<<<<<<<< @@ -1045,7 +1041,7 @@ */ GEOSGeom_destroy(__pyx_v_g3); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":194 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":201 * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) * GEOSGeom_destroy(g3) * return pout # <<<<<<<<<<<<<< @@ -1074,20 +1070,20 @@ return __pyx_r; } -static PyObject *__pyx_f_py_5_geos_12BaseGeometry_get_coords(PyObject *__pyx_v_self, PyObject *unused); /*proto*/ -static PyObject *__pyx_f_py_5_geos_12BaseGeometry_get_coords(PyObject *__pyx_v_self, PyObject *unused) { +static PyObject *__pyx_f_5_geos_12BaseGeometry_get_coords(PyObject *__pyx_v_self, PyObject *unused); /*proto*/ +static PyObject *__pyx_f_5_geos_12BaseGeometry_get_coords(PyObject *__pyx_v_self, PyObject *unused) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; Py_INCREF(__pyx_v_self); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":197 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":204 * * def get_coords(self): * return _get_coords(self._geom) # <<<<<<<<<<<<<< * * def __dealloc__(self): */ - __pyx_1 = __pyx_f_5_geos__get_coords(((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_self)->_geom); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; goto __pyx_L1;} + __pyx_1 = __pyx_f_5_geos__get_coords(((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_self)->_geom); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; @@ -1103,12 +1099,12 @@ return __pyx_r; } -static void __pyx_f_py_5_geos_12BaseGeometry___dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_f_5_geos_12BaseGeometry___dealloc__(PyObject *__pyx_v_self); /*proto*/ static char __pyx_doc_5_geos_12BaseGeometry___dealloc__[] = "destroy GEOS geometry"; -static void __pyx_f_py_5_geos_12BaseGeometry___dealloc__(PyObject *__pyx_v_self) { +static void __pyx_f_5_geos_12BaseGeometry___dealloc__(PyObject *__pyx_v_self) { Py_INCREF(__pyx_v_self); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":201 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":208 * def __dealloc__(self): * """destroy GEOS geometry""" * GEOSGeom_destroy(self._geom) # <<<<<<<<<<<<<< @@ -1122,27 +1118,27 @@ static PyObject *__pyx_n___class__; -static PyObject *__pyx_f_py_5_geos_12BaseGeometry___reduce__(PyObject *__pyx_v_self, PyObject *unused); /*proto*/ +static PyObject *__pyx_f_5_geos_12BaseGeometry___reduce__(PyObject *__pyx_v_self, PyObject *unused); /*proto*/ static char __pyx_doc_5_geos_12BaseGeometry___reduce__[] = "special method that allows geos instance to be pickled"; -static PyObject *__pyx_f_py_5_geos_12BaseGeometry___reduce__(PyObject *__pyx_v_self, PyObject *unused) { +static PyObject *__pyx_f_5_geos_12BaseGeometry___reduce__(PyObject *__pyx_v_self, PyObject *unused) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; Py_INCREF(__pyx_v_self); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":205 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":212 * def __reduce__(self): * """special method that allows geos instance to be pickled""" * return (self.__class__,(self.boundary,)) # <<<<<<<<<<<<<< * * cdef class Polygon(BaseGeometry): */ - __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n___class__); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; goto __pyx_L1;} + __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n___class__); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; goto __pyx_L1;} Py_INCREF(((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_self)->boundary); PyTuple_SET_ITEM(__pyx_2, 0, ((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_self)->boundary); - __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; goto __pyx_L1;} + __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2); __pyx_1 = 0; @@ -1164,15 +1160,11 @@ return __pyx_r; } -static PyObject *__pyx_num_neg_1; -static PyObject *__pyx_num_0; -static PyObject *__pyx_num_1; - static PyObject *__pyx_n_copy; static PyObject *__pyx_n_shape; -static int __pyx_f_py_5_geos_7Polygon___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_f_py_5_geos_7Polygon___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static int __pyx_f_5_geos_7Polygon___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_f_5_geos_7Polygon___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_b = 0; unsigned int __pyx_v_M; unsigned int __pyx_v_m; @@ -1193,9 +1185,9 @@ if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_b))) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_b); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_5_geos_ndarray, 1, "b"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; goto __pyx_L1;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_5_geos_ndarray, 1, "b"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":218 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":225 * # make sure data is contiguous. * # if not, make a local copy. * if not PyArray_ISCONTIGUOUS(b): # <<<<<<<<<<<<<< @@ -1205,17 +1197,17 @@ __pyx_1 = (!PyArray_ISCONTIGUOUS(__pyx_v_b)); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":219 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":226 * # if not, make a local copy. * if not PyArray_ISCONTIGUOUS(b): * b = b.copy() # <<<<<<<<<<<<<< * * m = b.shape[0] */ - __pyx_2 = PyObject_GetAttr(((PyObject *)__pyx_v_b), __pyx_n_copy); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; goto __pyx_L1;} - __pyx_3 = PyObject_CallObject(__pyx_2, 0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(((PyObject *)__pyx_v_b), __pyx_n_copy); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(__pyx_2, 0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_5_geos_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; goto __pyx_L1;} + if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_5_geos_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_v_b)); __pyx_v_b = ((PyArrayObject *)__pyx_3); __pyx_3 = 0; @@ -1223,78 +1215,84 @@ } __pyx_L2:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":221 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":228 * b = b.copy() * * m = b.shape[0] # <<<<<<<<<<<<<< * * # Add closing coordinates to sequence? */ - __pyx_2 = PyObject_GetAttr(((PyObject *)__pyx_v_b), __pyx_n_shape); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(((PyObject *)__pyx_v_b), __pyx_n_shape); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;} if (PyList_CheckExact(__pyx_2) && 0 <= 0 && 0 < PyList_GET_SIZE(__pyx_2)) { __pyx_4 = PyList_GET_ITEM(__pyx_2, 0); Py_INCREF(__pyx_4); } else if (PyTuple_CheckExact(__pyx_2) && 0 <= 0 && 0 < PyTuple_GET_SIZE(__pyx_2)) { __pyx_4 = PyTuple_GET_ITEM(__pyx_2, 0); Py_INCREF(__pyx_4); } else { - __pyx_3 = PyInt_FromLong(0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; goto __pyx_L1;} - __pyx_4 = PyObject_GetItem(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; goto __pyx_L1;} + __pyx_3 = PyInt_FromLong(0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;} + __pyx_4 = PyObject_GetItem(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; } Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_5 = PyInt_AsUnsignedLongMask(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; goto __pyx_L1;} + __pyx_5 = PyInt_AsUnsignedLongMask(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_v_m = __pyx_5; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":224 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":231 * * # Add closing coordinates to sequence? * if b[-1,0] != b[0,0] or b[-1,1] != b[0,1]: # <<<<<<<<<<<<<< * M = m + 1 * else: */ - __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;} - Py_INCREF(__pyx_num_neg_1); - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_num_neg_1); - Py_INCREF(__pyx_num_0); - PyTuple_SET_ITEM(__pyx_3, 1, __pyx_num_0); - __pyx_4 = PyObject_GetItem(((PyObject *)__pyx_v_b), __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;} - Py_INCREF(__pyx_num_0); - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_num_0); - Py_INCREF(__pyx_num_0); - PyTuple_SET_ITEM(__pyx_3, 1, __pyx_num_0); - __pyx_6 = PyObject_GetItem(((PyObject *)__pyx_v_b), __pyx_3); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_2 = PyObject_RichCompare(__pyx_4, __pyx_6, Py_NE); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;} + __pyx_2 = PyInt_FromLong((-1)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; goto __pyx_L1;} + __pyx_3 = PyInt_FromLong(0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; goto __pyx_L1;} + __pyx_4 = PyTuple_New(2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_4, 0, __pyx_2); + PyTuple_SET_ITEM(__pyx_4, 1, __pyx_3); + __pyx_2 = 0; + __pyx_3 = 0; + __pyx_2 = PyObject_GetItem(((PyObject *)__pyx_v_b), __pyx_4); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_3 = PyInt_FromLong(0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; goto __pyx_L1;} + __pyx_4 = PyInt_FromLong(0); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; goto __pyx_L1;} + __pyx_6 = PyTuple_New(2); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_6, 0, __pyx_3); + PyTuple_SET_ITEM(__pyx_6, 1, __pyx_4); + __pyx_3 = 0; + __pyx_4 = 0; + __pyx_3 = PyObject_GetItem(((PyObject *)__pyx_v_b), __pyx_6); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; - __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_2); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;} + if (PyObject_Cmp(__pyx_2, __pyx_3, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; goto __pyx_L1;} + __pyx_1 = __pyx_1 != 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; if (!__pyx_1) { + __pyx_4 = PyInt_FromLong((-1)); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; goto __pyx_L1;} + __pyx_6 = PyInt_FromLong(1); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; _... [truncated message content] |
From: <md...@us...> - 2007-11-14 14:00:59
|
Revision: 4268 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4268&view=rev Author: mdboom Date: 2007-11-14 06:00:56 -0800 (Wed, 14 Nov 2007) Log Message: ----------- Fix bug in specgram. (Thanks Glen W. Mabey!) Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/mlab.py Modified: trunk/matplotlib/lib/matplotlib/mlab.py =================================================================== --- trunk/matplotlib/lib/matplotlib/mlab.py 2007-11-14 13:58:08 UTC (rev 4267) +++ trunk/matplotlib/lib/matplotlib/mlab.py 2007-11-14 14:00:56 UTC (rev 4268) @@ -353,7 +353,7 @@ # zero pad x up to NFFT if it is shorter than NFFT if len(x)<NFFT: n = len(x) - x = resize(x, (NFFT,)) + x = npy.resize(x, (NFFT,)) x[n:] = 0 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <md...@us...> - 2007-11-14 13:58:13
|
Revision: 4267 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4267&view=rev Author: mdboom Date: 2007-11-14 05:58:08 -0800 (Wed, 14 Nov 2007) Log Message: ----------- Fix bug when clicking "Cancel" in the save dialog in TkAgg backend. (Thanks Michael Zell). Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py Modified: trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py 2007-11-14 13:09:14 UTC (rev 4266) +++ trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py 2007-11-14 13:58:08 UTC (rev 4267) @@ -680,7 +680,7 @@ defaultextension = self.canvas.get_default_filetype() ) - if fname == "" : + if fname == "" or fname == (): return else: try: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-14 13:09:16
|
Revision: 4266 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4266&view=rev Author: jswhit Date: 2007-11-14 05:09:14 -0800 (Wed, 14 Nov 2007) Log Message: ----------- updated install instructions. Modified Paths: -------------- trunk/toolkits/basemap-testing/README Modified: trunk/toolkits/basemap-testing/README =================================================================== --- trunk/toolkits/basemap-testing/README 2007-11-14 13:05:06 UTC (rev 4265) +++ trunk/toolkits/basemap-testing/README 2007-11-14 13:09:14 UTC (rev 4266) @@ -60,8 +60,11 @@ First, install pre-requisites (see **Requirements** above). Then download basemap-X.Y.Z.tar.gz from -the sourceforge download site, unpack, -cd to basemap-X.Y.Z and run 'python setup.py install'. +the sourceforge download site, unpack and cd to basemap-X.Y.Z. +Set the environment variable GEOS_DIR to point to the location +of libgeos_c and geos_c.h (if libgeos_c is in /usr/local/lib and +geos_c.h is in /usr/local/include, set GEOS_DIR to /usr/local). +Then run 'python setup.py install'. **Contact** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-14 13:05:13
|
Revision: 4265 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4265&view=rev Author: jswhit Date: 2007-11-14 05:05:06 -0800 (Wed, 14 Nov 2007) Log Message: ----------- fix one last memory leak Modified Paths: -------------- trunk/toolkits/basemap-testing/src/_geos.c trunk/toolkits/basemap-testing/src/_geos.pyx Modified: trunk/toolkits/basemap-testing/src/_geos.c =================================================================== --- trunk/toolkits/basemap-testing/src/_geos.c 2007-11-14 07:45:12 UTC (rev 4264) +++ trunk/toolkits/basemap-testing/src/_geos.c 2007-11-14 13:05:06 UTC (rev 4265) @@ -1,4 +1,4 @@ -/* Generated by Cython 0.9.6.7 on Tue Nov 13 21:03:25 2007 */ +/* Generated by Cython 0.9.6.7 on Wed Nov 14 06:04:45 2007 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -1010,7 +1010,7 @@ * else: * type = PyString_FromString(GEOSGeomType(g3)) # <<<<<<<<<<<<<< * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) - * return pout + * GEOSGeom_destroy(g3) */ __pyx_2 = PyString_FromString(GEOSGeomType(__pyx_v_g3)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; goto __pyx_L1;} Py_DECREF(__pyx_v_type); @@ -1021,8 +1021,8 @@ * else: * type = PyString_FromString(GEOSGeomType(g3)) * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) # <<<<<<<<<<<<<< + * GEOSGeom_destroy(g3) * return pout - * */ __pyx_4 = PyNumber_Remainder(__pyx_k6p, __pyx_v_type); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; goto __pyx_L1;} @@ -1039,6 +1039,15 @@ /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":193 * type = PyString_FromString(GEOSGeomType(g3)) * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) + * GEOSGeom_destroy(g3) # <<<<<<<<<<<<<< + * return pout + * + */ + GEOSGeom_destroy(__pyx_v_g3); + + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":194 + * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) + * GEOSGeom_destroy(g3) * return pout # <<<<<<<<<<<<<< * * def get_coords(self): @@ -1071,14 +1080,14 @@ PyObject *__pyx_1 = 0; Py_INCREF(__pyx_v_self); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":196 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":197 * * def get_coords(self): * return _get_coords(self._geom) # <<<<<<<<<<<<<< * * def __dealloc__(self): */ - __pyx_1 = __pyx_f_5_geos__get_coords(((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_self)->_geom); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; goto __pyx_L1;} + __pyx_1 = __pyx_f_5_geos__get_coords(((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_self)->_geom); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; @@ -1099,7 +1108,7 @@ static void __pyx_f_py_5_geos_12BaseGeometry___dealloc__(PyObject *__pyx_v_self) { Py_INCREF(__pyx_v_self); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":200 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":201 * def __dealloc__(self): * """destroy GEOS geometry""" * GEOSGeom_destroy(self._geom) # <<<<<<<<<<<<<< @@ -1122,18 +1131,18 @@ PyObject *__pyx_3 = 0; Py_INCREF(__pyx_v_self); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":204 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":205 * def __reduce__(self): * """special method that allows geos instance to be pickled""" * return (self.__class__,(self.boundary,)) # <<<<<<<<<<<<<< * * cdef class Polygon(BaseGeometry): */ - __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n___class__); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; goto __pyx_L1;} + __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n___class__); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; goto __pyx_L1;} Py_INCREF(((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_self)->boundary); PyTuple_SET_ITEM(__pyx_2, 0, ((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_self)->boundary); - __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; goto __pyx_L1;} + __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2); __pyx_1 = 0; @@ -1184,9 +1193,9 @@ if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_b))) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_b); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_5_geos_ndarray, 1, "b"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; goto __pyx_L1;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_5_geos_ndarray, 1, "b"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":217 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":218 * # make sure data is contiguous. * # if not, make a local copy. * if not PyArray_ISCONTIGUOUS(b): # <<<<<<<<<<<<<< @@ -1196,17 +1205,17 @@ __pyx_1 = (!PyArray_ISCONTIGUOUS(__pyx_v_b)); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":218 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":219 * # if not, make a local copy. * if not PyArray_ISCONTIGUOUS(b): * b = b.copy() # <<<<<<<<<<<<<< * * m = b.shape[0] */ - __pyx_2 = PyObject_GetAttr(((PyObject *)__pyx_v_b), __pyx_n_copy); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; goto __pyx_L1;} - __pyx_3 = PyObject_CallObject(__pyx_2, 0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(((PyObject *)__pyx_v_b), __pyx_n_copy); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(__pyx_2, 0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_5_geos_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; goto __pyx_L1;} + if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_5_geos_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_v_b)); __pyx_v_b = ((PyArrayObject *)__pyx_3); __pyx_3 = 0; @@ -1214,78 +1223,78 @@ } __pyx_L2:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":220 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":221 * b = b.copy() * * m = b.shape[0] # <<<<<<<<<<<<<< * * # Add closing coordinates to sequence? */ - __pyx_2 = PyObject_GetAttr(((PyObject *)__pyx_v_b), __pyx_n_shape); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(((PyObject *)__pyx_v_b), __pyx_n_shape); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; goto __pyx_L1;} if (PyList_CheckExact(__pyx_2) && 0 <= 0 && 0 < PyList_GET_SIZE(__pyx_2)) { __pyx_4 = PyList_GET_ITEM(__pyx_2, 0); Py_INCREF(__pyx_4); } else if (PyTuple_CheckExact(__pyx_2) && 0 <= 0 && 0 < PyTuple_GET_SIZE(__pyx_2)) { __pyx_4 = PyTuple_GET_ITEM(__pyx_2, 0); Py_INCREF(__pyx_4); } else { - __pyx_3 = PyInt_FromLong(0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; goto __pyx_L1;} - __pyx_4 = PyObject_GetItem(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; goto __pyx_L1;} + __pyx_3 = PyInt_FromLong(0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; goto __pyx_L1;} + __pyx_4 = PyObject_GetItem(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; } Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_5 = PyInt_AsUnsignedLongMask(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; goto __pyx_L1;} + __pyx_5 = PyInt_AsUnsignedLongMask(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_v_m = __pyx_5; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":223 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":224 * * # Add closing coordinates to sequence? * if b[-1,0] != b[0,0] or b[-1,1] != b[0,1]: # <<<<<<<<<<<<<< * M = m + 1 * else: */ - __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; goto __pyx_L1;} + __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;} Py_INCREF(__pyx_num_neg_1); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_num_neg_1); Py_INCREF(__pyx_num_0); PyTuple_SET_ITEM(__pyx_3, 1, __pyx_num_0); - __pyx_4 = PyObject_GetItem(((PyObject *)__pyx_v_b), __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; goto __pyx_L1;} + __pyx_4 = PyObject_GetItem(((PyObject *)__pyx_v_b), __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; goto __pyx_L1;} + __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;} Py_INCREF(__pyx_num_0); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_num_0); Py_INCREF(__pyx_num_0); PyTuple_SET_ITEM(__pyx_3, 1, __pyx_num_0); - __pyx_6 = PyObject_GetItem(((PyObject *)__pyx_v_b), __pyx_3); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; goto __pyx_L1;} + __pyx_6 = PyObject_GetItem(((PyObject *)__pyx_v_b), __pyx_3); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_2 = PyObject_RichCompare(__pyx_4, __pyx_6, Py_NE); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; goto __pyx_L1;} + __pyx_2 = PyObject_RichCompare(__pyx_4, __pyx_6, Py_NE); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_6); __pyx_6 = 0; - __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_2); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; goto __pyx_L1;} + __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_2); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;} if (!__pyx_1) { Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; goto __pyx_L1;} + __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;} Py_INCREF(__pyx_num_neg_1); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_num_neg_1); Py_INCREF(__pyx_num_1); PyTuple_SET_ITEM(__pyx_3, 1, __pyx_num_1); - __pyx_4 = PyObject_GetItem(((PyObject *)__pyx_v_b), __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; goto __pyx_L1;} + __pyx_4 = PyObject_GetItem(((PyObject *)__pyx_v_b), __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_6 = PyTuple_New(2); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; goto __pyx_L1;} + __pyx_6 = PyTuple_New(2); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;} Py_INCREF(__pyx_num_0); PyTuple_SET_ITEM(__pyx_6, 0, __pyx_num_0); Py_INCREF(__pyx_num_1); PyTuple_SET_ITEM(__pyx_6, 1, __pyx_num_1); - __pyx_3 = PyObject_GetItem(((PyObject *)__pyx_v_b), __pyx_6); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; goto __pyx_L1;} + __pyx_3 = PyObject_GetItem(((PyObject *)__pyx_v_b), __pyx_6); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; - __pyx_2 = PyObject_RichCompare(__pyx_4, __pyx_3, Py_NE); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; goto __pyx_L1;} + __pyx_2 = PyObject_RichCompare(__pyx_4, __pyx_3, Py_NE); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; } - __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_2); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; goto __pyx_L1;} + __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_2); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":224 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":225 * # Add closing coordinates to sequence? * if b[-1,0] != b[0,0] or b[-1,1] != b[0,1]: * M = m + 1 # <<<<<<<<<<<<<< @@ -1297,7 +1306,7 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":226 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":227 * M = m + 1 * else: * M = m # <<<<<<<<<<<<<< @@ -1308,7 +1317,7 @@ } __pyx_L3:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":227 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":228 * else: * M = m * self._npts = M # <<<<<<<<<<<<<< @@ -1317,7 +1326,7 @@ */ ((struct __pyx_obj_5_geos_Polygon *)__pyx_v_self)->__pyx_base._npts = __pyx_v_M; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":230 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":231 * * # Create a coordinate sequence * cs = GEOSCoordSeq_create(M, 2) # <<<<<<<<<<<<<< @@ -1326,7 +1335,7 @@ */ __pyx_v_cs = GEOSCoordSeq_create(__pyx_v_M,2); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":233 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":234 * * # add to coordinate sequence * bbuffer = <double *>b.data # <<<<<<<<<<<<<< @@ -1335,7 +1344,7 @@ */ __pyx_v_bbuffer = ((double (*))__pyx_v_b->data); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":234 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":235 * # add to coordinate sequence * bbuffer = <double *>b.data * for i from 0 <= i < m: # <<<<<<<<<<<<<< @@ -1344,7 +1353,7 @@ */ for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_m; __pyx_v_i++) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":235 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":236 * bbuffer = <double *>b.data * for i from 0 <= i < m: * dx = bbuffer[2*i] # <<<<<<<<<<<<<< @@ -1353,7 +1362,7 @@ */ __pyx_v_dx = (__pyx_v_bbuffer[(2 * __pyx_v_i)]); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":236 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":237 * for i from 0 <= i < m: * dx = bbuffer[2*i] * dy = bbuffer[2*i+1] # <<<<<<<<<<<<<< @@ -1362,7 +1371,7 @@ */ __pyx_v_dy = (__pyx_v_bbuffer[((2 * __pyx_v_i) + 1)]); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":239 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":240 * # Because of a bug in the GEOS C API, * # always set X before Y * GEOSCoordSeq_setX(cs, i, dx) # <<<<<<<<<<<<<< @@ -1371,7 +1380,7 @@ */ GEOSCoordSeq_setX(__pyx_v_cs,__pyx_v_i,__pyx_v_dx); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":240 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":241 * # always set X before Y * GEOSCoordSeq_setX(cs, i, dx) * GEOSCoordSeq_setY(cs, i, dy) # <<<<<<<<<<<<<< @@ -1381,7 +1390,7 @@ GEOSCoordSeq_setY(__pyx_v_cs,__pyx_v_i,__pyx_v_dy); } - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":243 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":244 * * # Add closing coordinates to sequence? * if M > m: # <<<<<<<<<<<<<< @@ -1391,7 +1400,7 @@ __pyx_1 = (__pyx_v_M > __pyx_v_m); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":244 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":245 * # Add closing coordinates to sequence? * if M > m: * dx = bbuffer[0] # <<<<<<<<<<<<<< @@ -1400,7 +1409,7 @@ */ __pyx_v_dx = (__pyx_v_bbuffer[0]); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":245 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":246 * if M > m: * dx = bbuffer[0] * dy = bbuffer[1] # <<<<<<<<<<<<<< @@ -1409,7 +1418,7 @@ */ __pyx_v_dy = (__pyx_v_bbuffer[1]); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":246 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":247 * dx = bbuffer[0] * dy = bbuffer[1] * GEOSCoordSeq_setX(cs, M-1, dx) # <<<<<<<<<<<<<< @@ -1418,7 +1427,7 @@ */ GEOSCoordSeq_setX(__pyx_v_cs,(__pyx_v_M - 1),__pyx_v_dx); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":247 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":248 * dy = bbuffer[1] * GEOSCoordSeq_setX(cs, M-1, dx) * GEOSCoordSeq_setY(cs, M-1, dy) # <<<<<<<<<<<<<< @@ -1430,7 +1439,7 @@ } __pyx_L6:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":250 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":251 * * # create LinearRing * lr = GEOSGeom_createLinearRing(cs) # <<<<<<<<<<<<<< @@ -1439,7 +1448,7 @@ */ __pyx_v_lr = GEOSGeom_createLinearRing(__pyx_v_cs); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":253 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":254 * * # create Polygon from LinearRing (assuming no holes) * self._geom = GEOSGeom_createPolygon(lr,NULL,0) # <<<<<<<<<<<<<< @@ -1448,7 +1457,7 @@ */ ((struct __pyx_obj_5_geos_Polygon *)__pyx_v_self)->__pyx_base._geom = GEOSGeom_createPolygon(__pyx_v_lr,NULL,0); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":254 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":255 * # create Polygon from LinearRing (assuming no holes) * self._geom = GEOSGeom_createPolygon(lr,NULL,0) * self.boundary = b # <<<<<<<<<<<<<< @@ -1481,7 +1490,7 @@ PyObject *__pyx_1 = 0; Py_INCREF((PyObject *)__pyx_v_self); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":259 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":260 * def area(self): * cdef double area * GEOSArea(self._geom, &area) # <<<<<<<<<<<<<< @@ -1490,14 +1499,14 @@ */ GEOSArea(((struct __pyx_obj_5_geos_Polygon *)__pyx_v_self)->__pyx_base._geom,(&__pyx_v_area)); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":260 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":261 * cdef double area * GEOSArea(self._geom, &area) * return area # <<<<<<<<<<<<<< * * cdef _get_coords(GEOSGeom *geom): */ - __pyx_1 = PyFloat_FromDouble(__pyx_v_area); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; goto __pyx_L1;} + __pyx_1 = PyFloat_FromDouble(__pyx_v_area); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; @@ -1535,7 +1544,7 @@ PyObject *__pyx_5 = 0; __pyx_v_b = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":269 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":270 * cdef ndarray b * cdef double *bbuffer * if GEOSGeomTypeId(geom) == GEOS_POLYGON: # <<<<<<<<<<<<<< @@ -1545,7 +1554,7 @@ __pyx_1 = (GEOSGeomTypeId(__pyx_v_geom) == GEOS_POLYGON); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":270 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":271 * cdef double *bbuffer * if GEOSGeomTypeId(geom) == GEOS_POLYGON: * lr = GEOSGetExteriorRing(geom) # <<<<<<<<<<<<<< @@ -1554,7 +1563,7 @@ */ __pyx_v_lr = GEOSGetExteriorRing(__pyx_v_geom); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":271 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":272 * if GEOSGeomTypeId(geom) == GEOS_POLYGON: * lr = GEOSGetExteriorRing(geom) * cs = GEOSGeom_getCoordSeq(lr) # <<<<<<<<<<<<<< @@ -1566,7 +1575,7 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":273 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":274 * cs = GEOSGeom_getCoordSeq(lr) * else: * cs = GEOSGeom_getCoordSeq(geom) # <<<<<<<<<<<<<< @@ -1577,7 +1586,7 @@ } __pyx_L2:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":274 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":275 * else: * cs = GEOSGeom_getCoordSeq(geom) * GEOSCoordSeq_getSize(cs, &M) # <<<<<<<<<<<<<< @@ -1586,39 +1595,39 @@ */ GEOSCoordSeq_getSize(__pyx_v_cs,(&__pyx_v_M)); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":275 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":276 * cs = GEOSGeom_getCoordSeq(geom) * GEOSCoordSeq_getSize(cs, &M) * b = numpy.empty((M,2), numpy.float64) # <<<<<<<<<<<<<< * bbuffer = <double *>b.data * for i from 0 <= i < M: */ - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_empty); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;} + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_empty); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_2 = PyLong_FromUnsignedLong(__pyx_v_M); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;} - __pyx_4 = PyTuple_New(2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;} + __pyx_2 = PyLong_FromUnsignedLong(__pyx_v_M); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; goto __pyx_L1;} + __pyx_4 = PyTuple_New(2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_2); Py_INCREF(__pyx_num_2); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_num_2); __pyx_2 = 0; - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;} - __pyx_5 = PyObject_GetAttr(__pyx_2, __pyx_n_float64); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;} + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; goto __pyx_L1;} + __pyx_5 = PyObject_GetAttr(__pyx_2, __pyx_n_float64); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_2 = PyTuple_New(2); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;} + __pyx_2 = PyTuple_New(2); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_2, 0, __pyx_4); PyTuple_SET_ITEM(__pyx_2, 1, __pyx_5); __pyx_4 = 0; __pyx_5 = 0; - __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;} + __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - if (!__Pyx_TypeTest(__pyx_4, __pyx_ptype_5_geos_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;} + if (!__Pyx_TypeTest(__pyx_4, __pyx_ptype_5_geos_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_v_b)); __pyx_v_b = ((PyArrayObject *)__pyx_4); __pyx_4 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":276 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":277 * GEOSCoordSeq_getSize(cs, &M) * b = numpy.empty((M,2), numpy.float64) * bbuffer = <double *>b.data # <<<<<<<<<<<<<< @@ -1627,7 +1636,7 @@ */ __pyx_v_bbuffer = ((double (*))__pyx_v_b->data); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":277 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":278 * b = numpy.empty((M,2), numpy.float64) * bbuffer = <double *>b.data * for i from 0 <= i < M: # <<<<<<<<<<<<<< @@ -1636,7 +1645,7 @@ */ for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_M; __pyx_v_i++) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":278 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":279 * bbuffer = <double *>b.data * for i from 0 <= i < M: * GEOSCoordSeq_getX(cs, i, &dx) # <<<<<<<<<<<<<< @@ -1645,7 +1654,7 @@ */ GEOSCoordSeq_getX(__pyx_v_cs,__pyx_v_i,(&__pyx_v_dx)); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":279 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":280 * for i from 0 <= i < M: * GEOSCoordSeq_getX(cs, i, &dx) * GEOSCoordSeq_getY(cs, i, &dy) # <<<<<<<<<<<<<< @@ -1654,37 +1663,28 @@ */ GEOSCoordSeq_getY(__pyx_v_cs,__pyx_v_i,(&__pyx_v_dy)); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":280 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":281 * GEOSCoordSeq_getX(cs, i, &dx) * GEOSCoordSeq_getY(cs, i, &dy) * bbuffer[2*i] = dx # <<<<<<<<<<<<<< * bbuffer[2*i+1] = dy - * GEOSCoordSeq_destroy(cs) + * return b */ (__pyx_v_bbuffer[(2 * __pyx_v_i)]) = __pyx_v_dx; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":281 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":282 * GEOSCoordSeq_getY(cs, i, &dy) * bbuffer[2*i] = dx * bbuffer[2*i+1] = dy # <<<<<<<<<<<<<< - * GEOSCoordSeq_destroy(cs) * return b + * */ (__pyx_v_bbuffer[((2 * __pyx_v_i) + 1)]) = __pyx_v_dy; } - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":282 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":283 * bbuffer[2*i] = dx * bbuffer[2*i+1] = dy - * GEOSCoordSeq_destroy(cs) # <<<<<<<<<<<<<< - * return b - * - */ - GEOSCoordSeq_destroy(__pyx_v_cs); - - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":283 - * bbuffer[2*i+1] = dy - * GEOSCoordSeq_destroy(cs) * return b # <<<<<<<<<<<<<< * * cdef class LineString(BaseGeometry): @@ -2696,8 +2696,8 @@ if (PyObject_SetAttrString(__pyx_m, "BaseGeometry", (PyObject *)&__pyx_type_5_geos_BaseGeometry) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; goto __pyx_L1;} __pyx_ptype_5_geos_BaseGeometry = &__pyx_type_5_geos_BaseGeometry; __pyx_type_5_geos_Polygon.tp_base = __pyx_ptype_5_geos_BaseGeometry; - if (PyType_Ready(&__pyx_type_5_geos_Polygon) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; goto __pyx_L1;} - if (PyObject_SetAttrString(__pyx_m, "Polygon", (PyObject *)&__pyx_type_5_geos_Polygon) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; goto __pyx_L1;} + if (PyType_Ready(&__pyx_type_5_geos_Polygon) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; goto __pyx_L1;} + if (PyObject_SetAttrString(__pyx_m, "Polygon", (PyObject *)&__pyx_type_5_geos_Polygon) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; goto __pyx_L1;} __pyx_ptype_5_geos_Polygon = &__pyx_type_5_geos_Polygon; __pyx_type_5_geos_LineString.tp_base = __pyx_ptype_5_geos_BaseGeometry; if (PyType_Ready(&__pyx_type_5_geos_LineString) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; goto __pyx_L1;} Modified: trunk/toolkits/basemap-testing/src/_geos.pyx =================================================================== --- trunk/toolkits/basemap-testing/src/_geos.pyx 2007-11-14 07:45:12 UTC (rev 4264) +++ trunk/toolkits/basemap-testing/src/_geos.pyx 2007-11-14 13:05:06 UTC (rev 4265) @@ -190,6 +190,7 @@ else: type = PyString_FromString(GEOSGeomType(g3)) raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) + GEOSGeom_destroy(g3) return pout def get_coords(self): @@ -206,7 +207,7 @@ cdef class Polygon(BaseGeometry): def __init__(self, ndarray b): - cdef unsigned int M, m, n, i + cdef unsigned int M, m, i cdef double dx, dy cdef double *bbuffer cdef GEOSCoordSeq *cs @@ -279,7 +280,6 @@ GEOSCoordSeq_getY(cs, i, &dy) bbuffer[2*i] = dx bbuffer[2*i+1] = dy - GEOSCoordSeq_destroy(cs) return b cdef class LineString(BaseGeometry): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ef...@us...> - 2007-11-14 07:45:13
|
Revision: 4264 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4264&view=rev Author: efiring Date: 2007-11-13 23:45:12 -0800 (Tue, 13 Nov 2007) Log Message: ----------- A step towards a fast rectilinear pcolor version Modified Paths: -------------- trunk/matplotlib/src/_image.cpp trunk/matplotlib/src/_image.h Modified: trunk/matplotlib/src/_image.cpp =================================================================== --- trunk/matplotlib/src/_image.cpp 2007-11-14 04:03:46 UTC (rev 4263) +++ trunk/matplotlib/src/_image.cpp 2007-11-14 07:45:12 UTC (rev 4264) @@ -1403,8 +1403,8 @@ // Create output Image* imo = new Image; imo->rowsIn = rows; + imo->colsIn = cols; imo->rowsOut = rows; - imo->colsIn = cols; imo->colsOut = cols; size_t NUMBYTES(rows * cols * 4); agg::int8u *buffer = new agg::int8u[NUMBYTES]; @@ -1499,6 +1499,227 @@ return Py::asObject(imo); } +void _bin_indices(int *irows, int nrows, double *y, int ny, + double sc, double offs) +{ + int i; + if (sc*(y[ny-1] - y[0]) > 0) + { + int ii = 0; + int iilast = ny-1; + int iy0 = (int)floor(sc * (y[ii] - offs)); + int iy1 = (int)floor(sc * (y[ii+1] - offs)); + for (i=0; i<nrows && i<iy0; i++) { + irows[i] = -1; + } + for (; i<nrows; i++) { + while (i > iy1 && ii < iilast) { + ii++; + iy0 = iy1; + iy1 = (int)floor(sc * (y[ii+1] - offs)); + } + if (i >= iy0 && i <= iy1) irows[i] = ii; + else break; + } + for (; i<nrows; i++) { + irows[i] = -1; + } + } + else + { + int iilast = ny-1; + int ii = iilast; + int iy0 = (int)floor(sc * (y[ii] - offs)); + int iy1 = (int)floor(sc * (y[ii-1] - offs)); + for (i=0; i<nrows && i<iy0; i++) { + irows[i] = -1; + } + for (; i<nrows; i++) { + while (i > iy1 && ii > 1) { + ii--; + iy0 = iy1; + iy1 = (int)floor(sc * (y[ii-1] - offs)); + } + if (i >= iy0 && i <= iy1) irows[i] = ii-1; + else break; + } + for (; i<nrows; i++) { + irows[i] = -1; + } + } +} + +char __image_module_pcolor2__doc__[] = +"pcolor2(x, y, data, rows, cols, bounds, bg)\n" +"\n" +"Generate a pseudo-color image from data on a non-uniform grid\n" +"specified by its cell boundaries.\n" +"bounds = (x_left, x_right, y_bot, y_top)\n" +"bg = ndarray of 4 uint8 representing background rgba\n" +; +Py::Object +_image_module::pcolor2(const Py::Tuple& args) { + _VERBOSE("_image_module::pcolor2"); + + if (args.length() != 7) + throw Py::TypeError("Incorrect number of arguments (6 expected)"); + + Py::Object xp = args[0]; + Py::Object yp = args[1]; + Py::Object dp = args[2]; + int rows = Py::Int(args[3]); + int cols = Py::Int(args[4]); + Py::Tuple bounds = args[5]; + Py::Object bgp = args[6]; + + if (bounds.length() !=4) + throw Py::TypeError("Incorrect number of bounds (4 expected)"); + double x_left = Py::Float(bounds[0]); + double x_right = Py::Float(bounds[1]); + double y_bot = Py::Float(bounds[2]); + double y_top = Py::Float(bounds[3]); + + // Check we have something to output to + if (rows == 0 || cols ==0) + throw Py::ValueError("rows or cols is zero; there are no pixels"); + + // Get numpy arrays + PyArrayObject *x = (PyArrayObject *) PyArray_ContiguousFromObject(xp.ptr(), + PyArray_DOUBLE, 1, 1); + if (x == NULL) + throw Py::ValueError("x is of incorrect type (wanted 1D double)"); + PyArrayObject *y = (PyArrayObject *) PyArray_ContiguousFromObject(yp.ptr(), + PyArray_DOUBLE, 1, 1); + if (y == NULL) { + Py_XDECREF(x); + throw Py::ValueError("y is of incorrect type (wanted 1D double)"); + } + PyArrayObject *d = (PyArrayObject *) PyArray_ContiguousFromObject(dp.ptr(), + PyArray_UBYTE, 3, 3); + if (d == NULL) { + Py_XDECREF(x); + Py_XDECREF(y); + throw Py::ValueError("data is of incorrect type (wanted 3D uint8)"); + } + if (d->dimensions[2] != 4) { + Py_XDECREF(x); + Py_XDECREF(y); + Py_XDECREF(d); + throw Py::ValueError("data must be in RGBA format"); + } + + // Check dimensions match + int nx = x->dimensions[0]; + int ny = y->dimensions[0]; + if (nx != d->dimensions[1]+1 || ny != d->dimensions[0]+1) { + Py_XDECREF(x); + Py_XDECREF(y); + Py_XDECREF(d); + throw Py::ValueError("data and axis bin boundary dimensions are incompatible"); + } + + PyArrayObject *bg = (PyArrayObject *) PyArray_ContiguousFromObject(bgp.ptr(), + PyArray_UBYTE, 1, 1); + if (bg == NULL) { + Py_XDECREF(x); + Py_XDECREF(y); + Py_XDECREF(d); + throw Py::ValueError("bg is of incorrect type (wanted 1D uint8)"); + } + if (bg->dimensions[0] != 4) { + Py_XDECREF(x); + Py_XDECREF(y); + Py_XDECREF(d); + Py_XDECREF(bg); + throw Py::ValueError("bg must be in RGBA format"); + } + + + // Allocate memory for pointer arrays + int * irows = reinterpret_cast<int*>(PyMem_Malloc(sizeof(int)*rows)); + if (irows == NULL) { + Py_XDECREF(x); + Py_XDECREF(y); + Py_XDECREF(d); + Py_XDECREF(bg); + throw Py::MemoryError("Cannot allocate memory for lookup table"); + } + int * jcols = reinterpret_cast<int*>(PyMem_Malloc(sizeof(int*)*cols)); + if (jcols == NULL) { + Py_XDECREF(x); + Py_XDECREF(y); + Py_XDECREF(d); + Py_XDECREF(bg); + PyMem_Free(irows); + throw Py::MemoryError("Cannot allocate memory for lookup table"); + } + + // Create output + Image* imo = new Image; + imo->rowsIn = rows; + imo->rowsOut = rows; + imo->colsIn = cols; + imo->colsOut = cols; + size_t NUMBYTES(rows * cols * 4); + agg::int8u *buffer = new agg::int8u[NUMBYTES]; + if (buffer == NULL) { + Py_XDECREF(x); + Py_XDECREF(y); + Py_XDECREF(d); + Py_XDECREF(bg); + PyMem_Free(irows); + PyMem_Free(jcols); + throw Py::MemoryError("Could not allocate memory for image"); + } + + // Calculate the pointer arrays to map input x to output x + int i, j; + double *x0 = reinterpret_cast<double*>(x->data); + double *y0 = reinterpret_cast<double*>(y->data); + double sx = cols/(x_right - x_left); + double sy = rows/(y_top - y_bot); + _bin_indices(jcols, cols, x0, nx, sx, x_left); + _bin_indices(irows, rows, y0, ny, sy, y_bot); + + // Copy data to output buffer + agg::int8u * position = buffer; + unsigned char *start = reinterpret_cast<unsigned char*>(d->data); + unsigned char *bgptr = reinterpret_cast<unsigned char*>(bg->data); + int s0 = d->strides[0]; + int s1 = d->strides[1]; + + for (i=0; i<rows; i++) + { + for (j=0; j<cols; j++) + { + if (irows[i] == -1 || jcols[j] == -1) { + memcpy(position, bgptr, 4*sizeof(agg::int8u)); + } + else { + memcpy(position, (start + s0*irows[i] + s1*jcols[j]), + 4*sizeof(agg::int8u)); + } + position += 4; + } + } + + // Attach output buffer to output buffer + imo->rbufOut = new agg::rendering_buffer; + imo->bufferOut = buffer; + imo->rbufOut->attach(imo->bufferOut, imo->colsOut, imo->rowsOut, imo->colsOut * imo->BPP); + + Py_XDECREF(x); + Py_XDECREF(y); + Py_XDECREF(d); + Py_XDECREF(bg); + PyMem_Free(irows); + PyMem_Free(jcols); + + return Py::asObject(imo); +} + + + #if defined(_MSC_VER) DL_EXPORT(void) #elif defined(__cplusplus) @@ -1532,7 +1753,7 @@ d["SINC"] = Py::Int(Image::SINC); d["LANCZOS"] = Py::Int(Image::LANCZOS); d["BLACKMAN"] = Py::Int(Image::BLACKMAN); - + d["ASPECT_FREE"] = Py::Int(Image::ASPECT_FREE); d["ASPECT_PRESERVE"] = Py::Int(Image::ASPECT_PRESERVE); Modified: trunk/matplotlib/src/_image.h =================================================================== --- trunk/matplotlib/src/_image.h 2007-11-14 04:03:46 UTC (rev 4263) +++ trunk/matplotlib/src/_image.h 2007-11-14 07:45:12 UTC (rev 4264) @@ -134,6 +134,8 @@ "from_images"); add_varargs_method("pcolor", &_image_module::pcolor, "pcolor"); + add_varargs_method("pcolor2", &_image_module::pcolor2, + "pcolor2"); initialize( "The _image module" ); } @@ -145,11 +147,13 @@ Py::Object fromarray (const Py::Tuple &args); Py::Object fromarray2 (const Py::Tuple &args); Py::Object pcolor (const Py::Tuple &args); + Py::Object pcolor2 (const Py::Tuple &args); Py::Object readpng (const Py::Tuple &args); Py::Object from_images (const Py::Tuple &args); static char _image_module_fromarray__doc__[]; static char _image_module_pcolor__doc__[]; + static char _image_module_pcolor2__doc__[]; static char _image_module_fromarray2__doc__[]; static char _image_module_frombyte__doc__[]; static char _image_module_frombuffer__doc__[]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-14 04:03:47
|
Revision: 4263 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4263&view=rev Author: jswhit Date: 2007-11-13 20:03:46 -0800 (Tue, 13 Nov 2007) Log Message: ----------- squash another mem leak. Modified Paths: -------------- trunk/toolkits/basemap-testing/src/_geos.c trunk/toolkits/basemap-testing/src/_geos.pyx Modified: trunk/toolkits/basemap-testing/src/_geos.c =================================================================== --- trunk/toolkits/basemap-testing/src/_geos.c 2007-11-13 23:29:42 UTC (rev 4262) +++ trunk/toolkits/basemap-testing/src/_geos.c 2007-11-14 04:03:46 UTC (rev 4263) @@ -1,4 +1,4 @@ -/* Generated by Cython 0.9.6.7 on Tue Nov 13 16:03:26 2007 */ +/* Generated by Cython 0.9.6.7 on Tue Nov 13 21:03:25 2007 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -1659,7 +1659,7 @@ * GEOSCoordSeq_getY(cs, i, &dy) * bbuffer[2*i] = dx # <<<<<<<<<<<<<< * bbuffer[2*i+1] = dy - * return b + * GEOSCoordSeq_destroy(cs) */ (__pyx_v_bbuffer[(2 * __pyx_v_i)]) = __pyx_v_dx; @@ -1667,8 +1667,8 @@ * GEOSCoordSeq_getY(cs, i, &dy) * bbuffer[2*i] = dx * bbuffer[2*i+1] = dy # <<<<<<<<<<<<<< + * GEOSCoordSeq_destroy(cs) * return b - * */ (__pyx_v_bbuffer[((2 * __pyx_v_i) + 1)]) = __pyx_v_dy; } @@ -1676,6 +1676,15 @@ /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":282 * bbuffer[2*i] = dx * bbuffer[2*i+1] = dy + * GEOSCoordSeq_destroy(cs) # <<<<<<<<<<<<<< + * return b + * + */ + GEOSCoordSeq_destroy(__pyx_v_cs); + + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":283 + * bbuffer[2*i+1] = dy + * GEOSCoordSeq_destroy(cs) * return b # <<<<<<<<<<<<<< * * cdef class LineString(BaseGeometry): @@ -1717,9 +1726,9 @@ if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_b))) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_b); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_5_geos_ndarray, 1, "b"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; goto __pyx_L1;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_5_geos_ndarray, 1, "b"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":293 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":294 * # make sure data is contiguous. * # if not, make a local copy. * if not PyArray_ISCONTIGUOUS(b): # <<<<<<<<<<<<<< @@ -1729,17 +1738,17 @@ __pyx_1 = (!PyArray_ISCONTIGUOUS(__pyx_v_b)); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":294 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":295 * # if not, make a local copy. * if not PyArray_ISCONTIGUOUS(b): * b = b.copy() # <<<<<<<<<<<<<< * * M = b.shape[0] */ - __pyx_2 = PyObject_GetAttr(((PyObject *)__pyx_v_b), __pyx_n_copy); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; goto __pyx_L1;} - __pyx_3 = PyObject_CallObject(__pyx_2, 0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(((PyObject *)__pyx_v_b), __pyx_n_copy); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(__pyx_2, 0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_5_geos_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; goto __pyx_L1;} + if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_5_geos_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_v_b)); __pyx_v_b = ((PyArrayObject *)__pyx_3); __pyx_3 = 0; @@ -1747,29 +1756,29 @@ } __pyx_L2:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":296 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":297 * b = b.copy() * * M = b.shape[0] # <<<<<<<<<<<<<< * self._npts = M * */ - __pyx_2 = PyObject_GetAttr(((PyObject *)__pyx_v_b), __pyx_n_shape); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(((PyObject *)__pyx_v_b), __pyx_n_shape); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; goto __pyx_L1;} if (PyList_CheckExact(__pyx_2) && 0 <= 0 && 0 < PyList_GET_SIZE(__pyx_2)) { __pyx_4 = PyList_GET_ITEM(__pyx_2, 0); Py_INCREF(__pyx_4); } else if (PyTuple_CheckExact(__pyx_2) && 0 <= 0 && 0 < PyTuple_GET_SIZE(__pyx_2)) { __pyx_4 = PyTuple_GET_ITEM(__pyx_2, 0); Py_INCREF(__pyx_4); } else { - __pyx_3 = PyInt_FromLong(0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; goto __pyx_L1;} - __pyx_4 = PyObject_GetItem(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; goto __pyx_L1;} + __pyx_3 = PyInt_FromLong(0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; goto __pyx_L1;} + __pyx_4 = PyObject_GetItem(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; } Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_5 = PyInt_AsLong(__pyx_4); if (unlikely((__pyx_5 == -1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; goto __pyx_L1;} + __pyx_5 = PyInt_AsLong(__pyx_4); if (unlikely((__pyx_5 == -1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_v_M = __pyx_5; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":297 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":298 * * M = b.shape[0] * self._npts = M # <<<<<<<<<<<<<< @@ -1778,7 +1787,7 @@ */ ((struct __pyx_obj_5_geos_LineString *)__pyx_v_self)->__pyx_base._npts = __pyx_v_M; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":300 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":301 * * # Create a coordinate sequence * cs = GEOSCoordSeq_create(M, 2) # <<<<<<<<<<<<<< @@ -1787,7 +1796,7 @@ */ __pyx_v_cs = GEOSCoordSeq_create(__pyx_v_M,2); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":303 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":304 * * # add to coordinate sequence * bbuffer = <double *>b.data # <<<<<<<<<<<<<< @@ -1796,7 +1805,7 @@ */ __pyx_v_bbuffer = ((double (*))__pyx_v_b->data); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":304 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":305 * # add to coordinate sequence * bbuffer = <double *>b.data * for i from 0 <= i < M: # <<<<<<<<<<<<<< @@ -1805,7 +1814,7 @@ */ for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_M; __pyx_v_i++) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":305 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":306 * bbuffer = <double *>b.data * for i from 0 <= i < M: * dx = bbuffer[2*i] # <<<<<<<<<<<<<< @@ -1814,7 +1823,7 @@ */ __pyx_v_dx = (__pyx_v_bbuffer[(2 * __pyx_v_i)]); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":306 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":307 * for i from 0 <= i < M: * dx = bbuffer[2*i] * dy = bbuffer[2*i+1] # <<<<<<<<<<<<<< @@ -1823,7 +1832,7 @@ */ __pyx_v_dy = (__pyx_v_bbuffer[((2 * __pyx_v_i) + 1)]); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":309 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":310 * # Because of a bug in the GEOS C API, * # always set X before Y * GEOSCoordSeq_setX(cs, i, dx) # <<<<<<<<<<<<<< @@ -1832,7 +1841,7 @@ */ GEOSCoordSeq_setX(__pyx_v_cs,__pyx_v_i,__pyx_v_dx); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":310 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":311 * # always set X before Y * GEOSCoordSeq_setX(cs, i, dx) * GEOSCoordSeq_setY(cs, i, dy) # <<<<<<<<<<<<<< @@ -1842,7 +1851,7 @@ GEOSCoordSeq_setY(__pyx_v_cs,__pyx_v_i,__pyx_v_dy); } - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":313 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":314 * * # create LineString * self._geom = GEOSGeom_createLineString(cs) # <<<<<<<<<<<<<< @@ -1851,7 +1860,7 @@ */ ((struct __pyx_obj_5_geos_LineString *)__pyx_v_self)->__pyx_base._geom = GEOSGeom_createLineString(__pyx_v_cs); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":314 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":315 * # create LineString * self._geom = GEOSGeom_createLineString(cs) * self.boundary = b # <<<<<<<<<<<<<< @@ -1891,7 +1900,7 @@ Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_b); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":322 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":323 * cdef GEOSCoordSeq *cs * # Create a coordinate sequence * cs = GEOSCoordSeq_create(1, 2) # <<<<<<<<<<<<<< @@ -1900,7 +1909,7 @@ */ __pyx_v_cs = GEOSCoordSeq_create(1,2); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":323 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":324 * # Create a coordinate sequence * cs = GEOSCoordSeq_create(1, 2) * dx = b[0]; dy = b[1] # <<<<<<<<<<<<<< @@ -1912,15 +1921,15 @@ } else if (PyTuple_CheckExact(__pyx_v_b) && 0 <= 0 && 0 < PyTuple_GET_SIZE(__pyx_v_b)) { __pyx_2 = PyTuple_GET_ITEM(__pyx_v_b, 0); Py_INCREF(__pyx_2); } else { - __pyx_1 = PyInt_FromLong(0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; goto __pyx_L1;} - __pyx_2 = PyObject_GetItem(__pyx_v_b, __pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; goto __pyx_L1;} + __pyx_1 = PyInt_FromLong(0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; goto __pyx_L1;} + __pyx_2 = PyObject_GetItem(__pyx_v_b, __pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; } - __pyx_3 = PyFloat_AsDouble(__pyx_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; goto __pyx_L1;} + __pyx_3 = PyFloat_AsDouble(__pyx_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_v_dx = __pyx_3; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":323 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":324 * # Create a coordinate sequence * cs = GEOSCoordSeq_create(1, 2) * dx = b[0]; dy = b[1] # <<<<<<<<<<<<<< @@ -1932,15 +1941,15 @@ } else if (PyTuple_CheckExact(__pyx_v_b) && 0 <= 1 && 1 < PyTuple_GET_SIZE(__pyx_v_b)) { __pyx_2 = PyTuple_GET_ITEM(__pyx_v_b, 1); Py_INCREF(__pyx_2); } else { - __pyx_1 = PyInt_FromLong(1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; goto __pyx_L1;} - __pyx_2 = PyObject_GetItem(__pyx_v_b, __pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; goto __pyx_L1;} + __pyx_1 = PyInt_FromLong(1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; goto __pyx_L1;} + __pyx_2 = PyObject_GetItem(__pyx_v_b, __pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; } - __pyx_3 = PyFloat_AsDouble(__pyx_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; goto __pyx_L1;} + __pyx_3 = PyFloat_AsDouble(__pyx_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_v_dy = __pyx_3; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":324 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":325 * cs = GEOSCoordSeq_create(1, 2) * dx = b[0]; dy = b[1] * GEOSCoordSeq_setX(cs, 0, dx) # <<<<<<<<<<<<<< @@ -1949,7 +1958,7 @@ */ GEOSCoordSeq_setX(__pyx_v_cs,0,__pyx_v_dx); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":325 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":326 * dx = b[0]; dy = b[1] * GEOSCoordSeq_setX(cs, 0, dx) * GEOSCoordSeq_setY(cs, 0, dy) # <<<<<<<<<<<<<< @@ -1958,7 +1967,7 @@ */ GEOSCoordSeq_setY(__pyx_v_cs,0,__pyx_v_dy); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":326 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":327 * GEOSCoordSeq_setX(cs, 0, dx) * GEOSCoordSeq_setY(cs, 0, dy) * self._geom = GEOSGeom_createPoint(cs) # <<<<<<<<<<<<<< @@ -1967,7 +1976,7 @@ */ ((struct __pyx_obj_5_geos_Point *)__pyx_v_self)->__pyx_base._geom = GEOSGeom_createPoint(__pyx_v_cs); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":327 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":328 * GEOSCoordSeq_setY(cs, 0, dy) * self._geom = GEOSGeom_createPoint(cs) * self._npts = 1 # <<<<<<<<<<<<<< @@ -1975,7 +1984,7 @@ */ ((struct __pyx_obj_5_geos_Point *)__pyx_v_self)->__pyx_base._npts = 1; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":328 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":329 * self._geom = GEOSGeom_createPoint(cs) * self._npts = 1 * self.boundary = b # <<<<<<<<<<<<<< @@ -2691,13 +2700,13 @@ if (PyObject_SetAttrString(__pyx_m, "Polygon", (PyObject *)&__pyx_type_5_geos_Polygon) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; goto __pyx_L1;} __pyx_ptype_5_geos_Polygon = &__pyx_type_5_geos_Polygon; __pyx_type_5_geos_LineString.tp_base = __pyx_ptype_5_geos_BaseGeometry; - if (PyType_Ready(&__pyx_type_5_geos_LineString) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; goto __pyx_L1;} - if (PyObject_SetAttrString(__pyx_m, "LineString", (PyObject *)&__pyx_type_5_geos_LineString) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; goto __pyx_L1;} + if (PyType_Ready(&__pyx_type_5_geos_LineString) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; goto __pyx_L1;} + if (PyObject_SetAttrString(__pyx_m, "LineString", (PyObject *)&__pyx_type_5_geos_LineString) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; goto __pyx_L1;} __pyx_ptype_5_geos_LineString = &__pyx_type_5_geos_LineString; __pyx_type_5_geos_Point.tp_base = __pyx_ptype_5_geos_BaseGeometry; __pyx_type_5_geos_Point.tp_free = _PyObject_GC_Del; - if (PyType_Ready(&__pyx_type_5_geos_Point) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; goto __pyx_L1;} - if (PyObject_SetAttrString(__pyx_m, "Point", (PyObject *)&__pyx_type_5_geos_Point) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; goto __pyx_L1;} + if (PyType_Ready(&__pyx_type_5_geos_Point) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; goto __pyx_L1;} + if (PyObject_SetAttrString(__pyx_m, "Point", (PyObject *)&__pyx_type_5_geos_Point) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; goto __pyx_L1;} __pyx_ptype_5_geos_Point = &__pyx_type_5_geos_Point; /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":1 @@ -2746,7 +2755,7 @@ */ initGEOS(__pyx_f_5_geos_notice_h,__pyx_f_5_geos_error_h); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":318 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":319 * cdef class Point(BaseGeometry): * cdef public x,y * def __init__(self, b): # <<<<<<<<<<<<<< Modified: trunk/toolkits/basemap-testing/src/_geos.pyx =================================================================== --- trunk/toolkits/basemap-testing/src/_geos.pyx 2007-11-13 23:29:42 UTC (rev 4262) +++ trunk/toolkits/basemap-testing/src/_geos.pyx 2007-11-14 04:03:46 UTC (rev 4263) @@ -279,6 +279,7 @@ GEOSCoordSeq_getY(cs, i, &dy) bbuffer[2*i] = dx bbuffer[2*i+1] = dy + GEOSCoordSeq_destroy(cs) return b cdef class LineString(BaseGeometry): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-13 23:29:43
|
Revision: 4262 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4262&view=rev Author: jswhit Date: 2007-11-13 15:29:42 -0800 (Tue, 13 Nov 2007) Log Message: ----------- fix deleterious effects of global search and replace Modified Paths: -------------- trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py Modified: trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py =================================================================== --- trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py 2007-11-13 23:11:28 UTC (rev 4261) +++ trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py 2007-11-13 23:29:42 UTC (rev 4262) @@ -29,7 +29,7 @@ transverse mercator, miller cylindrical, lambert conformal conic, azimuthal equidistant, equidistant conic, lambert azimuthal equal area, albers equal area conic, gnomonic, orthographic, sinusoidal, mollweide, - _geostationary, robinson, cassini-soldner or stereographic). + geostationary, robinson, cassini-soldner or stereographic). Doesn't actually draw anything, but sets up the map projection class and creates the coastline, lake river and political boundary data structures in native map projection coordinates. @@ -40,7 +40,7 @@ projection - map projection ('cyl','merc','mill','lcc','eqdc','aea', 'laea', 'nplaea', 'splaea', 'tmerc', 'omerc', 'cass', 'gnom', 'poly', 'sinu', 'moll', 'ortho', 'robin', 'aeqd', 'npaeqd', 'spaeqd', 'stere', - '_geos', 'npstere' or 'spstere') + 'geos', 'npstere' or 'spstere') (projections prefixed with 'np' or 'sp' are special case polar-centric versions of the parent projection) aspect - map aspect ratio (size of y dimension / size of x dimension). @@ -110,7 +110,7 @@ 'cass' - cassini-soldner (transverse cylindrical equidistant), 'poly' - polyconic, 'omerc' - oblique mercator, 'ortho' - orthographic, 'sinu' - sinusoidal, 'moll' - mollweide, 'robin' - robinson, - '_geos' - _geostationary, and 'gnom' - gnomonic are currently available. + 'geos' - geostationary, and 'gnom' - gnomonic are currently available. Default is 'cyl'. The map projection region can either be specified by setting these keywords: @@ -133,9 +133,9 @@ either they are computed internally, or entire globe is always plotted). For the cylindrical projections ('cyl','merc' and 'mill'), the default is to use llcrnrlon=-180,llcrnrlat=-90, urcrnrlon=180 and urcrnrlat=90). For all other - projections except 'ortho' and '_geos', either the lat/lon values of the + projections except 'ortho' and 'geos', either the lat/lon values of the corners or width and height must be specified by the user. - For 'ortho' and '_geos', the lat/lon values of the corners may be specified, + For 'ortho' and 'geos', the lat/lon values of the corners may be specified, but if they are not, the entire globe is plotted. resolution - resolution of boundary database to use. Can be 'c' (crude), @@ -208,7 +208,7 @@ on the north or south pole. The longitude lon_0 is at 6-o'clock, and the latitude circle boundinglat is tangent to the edge of the map at lon_0. satellite_height - height of satellite (in m) above equator - - only relevant for _geostationary projections ('_geos'). + only relevant for geostationary projections ('geos'). """ @@ -502,7 +502,7 @@ # FIXME: won't work for points exactly on equator?? if npy.abs(lat_0) < 1.e-2: lat_0 = 1.e-2 projparams['lat_0'] = lat_0 - elif projection == '_geos': + elif projection == 'geos': if lon_0 is None and satellite_height is None: raise ValueError, 'must specify lon_0 and satellite_height for Geostationary basemap' if width is not None or height is not None: @@ -591,7 +591,7 @@ 'splaea' - lambert azimuthal, special case centered on south pole, 'cass' - cassini-soldner (transverse cylindrical equidistant), 'poly' - polyconic, 'omerc' - oblique mercator, 'ortho' - orthographic, - '_geos' - _geostationary, 'sinu' - sinusoidal, 'moll' - mollweide, + 'geos' - geostationary, 'sinu' - sinusoidal, 'moll' - mollweide, 'robin' - robinson, or 'gnom' - gnomonic. You tried '%s'""" % projection # initialize proj4 @@ -606,7 +606,7 @@ atts = ['rmajor','rminor','esq','flattening','ellipsoid','projparams'] for att in atts: self.__dict__[att] = proj.__dict__[att] - # these only exist for _geostationary projection. + # these only exist for geostationary projection. if hasattr(proj,'_width'): self.__dict__['_width'] = proj.__dict__['_width'] if hasattr(proj,'_height'): @@ -645,7 +645,7 @@ if projection in ['mill','cyl','merc']: self.latmin = self.llcrnrlat self.latmax = self.urcrnrlat - elif projection in ['ortho','_geos','moll','robin','sinu']: + elif projection in ['ortho','geos','moll','robin','sinu']: self.latmin = -90. self.latmax = 90. else: @@ -759,7 +759,7 @@ containsPole = hasNP or hasSP # these projections cannot cross pole. if containsPole and\ - self.projection in ['tmerc','cass','omerc','merc','mill','cyl','robin','moll','sinu','_geos']: + self.projection in ['tmerc','cass','omerc','merc','mill','cyl','robin','moll','sinu','geos']: raise ValueError('%s projection cannot cross pole'%(self.projection)) # make sure orthographic projection has containsPole=True @@ -932,7 +932,7 @@ nx = 100 ny = 100 maptran = self - if self.projection in ['ortho','_geos']: + if self.projection in ['ortho','geos']: # circular region. thetas = linspace(0.,2.*npy.pi,2*nx*ny)[:-1] if self.projection == 'ortho': @@ -1065,7 +1065,7 @@ circle.set_edgecolor(color) circle.set_linewidth(linewidth) circle.set_clip_on(False) - elif self.projection == '_geos' and self._fulldisk: # elliptical region + elif self.projection == 'geos' and self._fulldisk: # elliptical region # define an Ellipse patch, add it to axes instance. ellps = Ellipse((self._width,self._height),2.*self._width,2.*self._height) ax.add_patch(ellps) @@ -1507,8 +1507,8 @@ l.set_zorder(zorder) ax.add_line(l) # draw labels for parallels - # parallels not labelled for fulldisk orthographic or _geostationary - if self.projection in ['ortho','_geos'] and max(labels): + # parallels not labelled for fulldisk orthographic or geostationary + if self.projection in ['ortho','geos'] and max(labels): if self._fulldisk: print 'Warning: Cannot label parallels on full-disk Orthographic or Geostationary basemap' labels = [0,0,0,0] @@ -1714,11 +1714,11 @@ ax.add_line(l) # draw labels for meridians. # meridians not labelled for sinusoidal, mollweide, or - # or full-disk orthographic/_geostationary. + # or full-disk orthographic/geostationary. if self.projection in ['sinu','moll'] and max(labels): print 'Warning: Cannot label meridians on Sinusoidal or Mollweide basemap' labels = [0,0,0,0] - if self.projection in ['ortho','_geos'] and max(labels): + if self.projection in ['ortho','geos'] and max(labels): if self._fulldisk: print 'Warning: Cannot label meridians on full-disk Geostationary or Orthographic basemap' labels = [0,0,0,0] @@ -2072,7 +2072,7 @@ # turn off axes frame for non-rectangular projections. if self.projection in ['moll','robin','sinu']: ax.set_frame_on(False) - if self.projection in ['ortho','_geos'] and self._fulldisk: + if self.projection in ['ortho','geos'] and self._fulldisk: ax.set_frame_on(False) # make sure aspect ratio of map preserved. # plot is re-centered in bounding rectangle. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |