From: <js...@us...> - 2009-08-05 15:47:38
|
Revision: 7376 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7376&view=rev Author: jswhit Date: 2009-08-05 15:47:20 +0000 (Wed, 05 Aug 2009) Log Message: ----------- apply sf patch 2831704, regnerate c source files with cython 0.11.2 Modified Paths: -------------- trunk/toolkits/basemap/src/_geod.c trunk/toolkits/basemap/src/_geoslib.c trunk/toolkits/basemap/src/_proj.c trunk/toolkits/basemap/src/geod_set.c Modified: trunk/toolkits/basemap/src/_geod.c =================================================================== --- trunk/toolkits/basemap/src/_geod.c 2009-08-05 15:43:54 UTC (rev 7375) +++ trunk/toolkits/basemap/src/_geod.c 2009-08-05 15:47:20 UTC (rev 7376) @@ -1,8 +1,11 @@ -/* Generated by Cython 0.10.3 on Wed Dec 17 15:57:33 2008 */ +/* Generated by Cython 0.11.2 on Wed Aug 5 09:35:57 2009 */ #define PY_SSIZE_T_CLEAN #include "Python.h" #include "structmember.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif @@ -11,11 +14,13 @@ #endif #if PY_VERSION_HEX < 0x02040000 #define METH_COEXIST 0 + #define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type) #endif #if PY_VERSION_HEX < 0x02050000 typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX #define PY_SSIZE_T_MIN INT_MIN + #define PY_FORMAT_SIZE_T "" #define PyInt_FromSsize_t(z) PyInt_FromLong(z) #define PyInt_AsSsize_t(o) PyInt_AsLong(o) #define PyNumber_Index(o) PyNumber_Int(o) @@ -45,7 +50,6 @@ #define PyBUF_SIMPLE 0 #define PyBUF_WRITABLE 0x0001 - #define PyBUF_LOCK 0x0002 #define PyBUF_FORMAT 0x0004 #define PyBUF_ND 0x0008 #define PyBUF_STRIDES (0x0010 | PyBUF_ND) @@ -70,6 +74,7 @@ #if PY_MAJOR_VERSION >= 3 #define PyBaseString_Type PyUnicode_Type #define PyString_Type PyBytes_Type + #define PyString_CheckExact PyBytes_CheckExact #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) @@ -98,9 +103,29 @@ #ifndef __cdecl #define __cdecl #endif + #ifndef __fastcall + #define __fastcall + #endif #else + #define isnan _isnan #define _USE_MATH_DEFINES #endif +#if PY_VERSION_HEX < 0x02050000 + #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n))) + #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a)) + #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),((char *)(n))) +#else + #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),(n)) + #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a)) + #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n)) +#endif +#if PY_VERSION_HEX < 0x02050000 + #define __Pyx_NAMESTR(n) ((char *)(n)) + #define __Pyx_DOCSTR(n) ((char *)(n)) +#else + #define __Pyx_NAMESTR(n) (n) + #define __Pyx_DOCSTR(n) (n) +#endif #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else @@ -112,6 +137,7 @@ #include "math.h" #include "geodesic.h" #include "proj_api.h" +#define __PYX_USE_C99_COMPLEX defined(_Complex_I) #ifdef __GNUC__ @@ -132,33 +158,54 @@ /* Type Conversion Predeclarations */ #if PY_MAJOR_VERSION < 3 -#define __Pyx_PyBytes_FromString PyString_FromString -#define __Pyx_PyBytes_AsString PyString_AsString +#define __Pyx_PyBytes_FromString PyString_FromString +#define __Pyx_PyBytes_FromStringAndSize PyString_FromStringAndSize +#define __Pyx_PyBytes_AsString PyString_AsString #else -#define __Pyx_PyBytes_FromString PyBytes_FromString -#define __Pyx_PyBytes_AsString PyBytes_AsString +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +#define __Pyx_PyBytes_AsString PyBytes_AsString #endif #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); -static INLINE PY_LONG_LONG __pyx_PyInt_AsLongLong(PyObject* x); -static INLINE unsigned PY_LONG_LONG __pyx_PyInt_AsUnsignedLongLong(PyObject* x); -static INLINE Py_ssize_t __pyx_PyIndex_AsSsize_t(PyObject* b); +static INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); -#define __pyx_PyInt_AsLong(x) (PyInt_CheckExact(x) ? PyInt_AS_LONG(x) : PyInt_AsLong(x)) +#if !defined(T_PYSSIZET) +#if PY_VERSION_HEX < 0x02050000 +#define T_PYSSIZET T_INT +#elif !defined(T_LONGLONG) +#define T_PYSSIZET \ + ((sizeof(Py_ssize_t) == sizeof(int)) ? T_INT : \ + ((sizeof(Py_ssize_t) == sizeof(long)) ? T_LONG : -1)) +#else +#define T_PYSSIZET \ + ((sizeof(Py_ssize_t) == sizeof(int)) ? T_INT : \ + ((sizeof(Py_ssize_t) == sizeof(long)) ? T_LONG : \ + ((sizeof(Py_ssize_t) == sizeof(PY_LONG_LONG)) ? T_LONGLONG : -1))) +#endif +#endif + +#if !defined(T_SIZET) +#if !defined(T_ULONGLONG) +#define T_SIZET \ + ((sizeof(size_t) == sizeof(unsigned int)) ? T_UINT : \ + ((sizeof(size_t) == sizeof(unsigned long)) ? T_ULONG : -1)) +#else +#define T_SIZET \ + ((sizeof(size_t) == sizeof(unsigned int)) ? T_UINT : \ + ((sizeof(size_t) == sizeof(unsigned long)) ? T_ULONG : \ + ((sizeof(size_t) == sizeof(unsigned PY_LONG_LONG)) ? T_ULONGLONG : -1))) +#endif +#endif + +static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); +static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); + #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) -static INLINE unsigned char __pyx_PyInt_unsigned_char(PyObject* x); -static INLINE unsigned short __pyx_PyInt_unsigned_short(PyObject* x); -static INLINE char __pyx_PyInt_char(PyObject* x); -static INLINE short __pyx_PyInt_short(PyObject* x); -static INLINE int __pyx_PyInt_int(PyObject* x); -static INLINE long __pyx_PyInt_long(PyObject* x); -static INLINE signed char __pyx_PyInt_signed_char(PyObject* x); -static INLINE signed short __pyx_PyInt_signed_short(PyObject* x); -static INLINE signed int __pyx_PyInt_signed_int(PyObject* x); -static INLINE signed long __pyx_PyInt_signed_long(PyObject* x); -static INLINE long double __pyx_PyInt_long_double(PyObject* x); + #ifdef __GNUC__ /* Test for GCC > 2.95 */ #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) @@ -182,6 +229,37 @@ static const char *__pyx_filename; static const char **__pyx_f; + +#ifdef CYTHON_REFNANNY +typedef struct { + void (*INCREF)(void*, PyObject*, int); + void (*DECREF)(void*, PyObject*, int); + void (*GOTREF)(void*, PyObject*, int); + void (*GIVEREF)(void*, PyObject*, int); + void* (*NewContext)(const char*, int, const char*); + void (*FinishContext)(void**); +} __Pyx_RefnannyAPIStruct; +static __Pyx_RefnannyAPIStruct *__Pyx_Refnanny = NULL; +#define __Pyx_ImportRefcountAPI(name) (__Pyx_RefnannyAPIStruct *) PyCObject_Import((char *)name, (char *)"RefnannyAPI") +#define __Pyx_INCREF(r) __Pyx_Refnanny->INCREF(__pyx_refchk, (PyObject *)(r), __LINE__) +#define __Pyx_DECREF(r) __Pyx_Refnanny->DECREF(__pyx_refchk, (PyObject *)(r), __LINE__) +#define __Pyx_GOTREF(r) __Pyx_Refnanny->GOTREF(__pyx_refchk, (PyObject *)(r), __LINE__) +#define __Pyx_GIVEREF(r) __Pyx_Refnanny->GIVEREF(__pyx_refchk, (PyObject *)(r), __LINE__) +#define __Pyx_XDECREF(r) if((r) == NULL) ; else __Pyx_DECREF(r) +#define __Pyx_SetupRefcountContext(name) void* __pyx_refchk = __Pyx_Refnanny->NewContext((name), __LINE__, __FILE__) +#define __Pyx_FinishRefcountContext() __Pyx_Refnanny->FinishContext(&__pyx_refchk) +#else +#define __Pyx_INCREF(r) Py_INCREF(r) +#define __Pyx_DECREF(r) Py_DECREF(r) +#define __Pyx_GOTREF(r) +#define __Pyx_GIVEREF(r) +#define __Pyx_XDECREF(r) Py_XDECREF(r) +#define __Pyx_SetupRefcountContext(name) +#define __Pyx_FinishRefcountContext() +#endif /* CYTHON_REFNANNY */ +#define __Pyx_XGIVEREF(r) if((r) == NULL) ; else __Pyx_GIVEREF(r) +#define __Pyx_XGOTREF(r) if((r) == NULL) ; else __Pyx_GOTREF(r) + static void __Pyx_RaiseDoubleKeywordsError( const char* func_name, PyObject* kw_name); /*proto*/ @@ -199,6 +277,38 @@ static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ +static INLINE int __Pyx_StrEq(const char *, const char *); /*proto*/ + +static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *); + +static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *); + +static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *); + +static INLINE char __Pyx_PyInt_AsChar(PyObject *); + +static INLINE short __Pyx_PyInt_AsShort(PyObject *); + +static INLINE int __Pyx_PyInt_AsInt(PyObject *); + +static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *); + +static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *); + +static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *); + +static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *); + +static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *); + +static INLINE long __Pyx_PyInt_AsLong(PyObject *); + +static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *); + +static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *); + +static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *); + static void __Pyx_AddTraceback(const char *funcname); /*proto*/ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ @@ -223,13 +333,16 @@ /* Module declarations from _geod */ static PyTypeObject *__pyx_ptype_5_geod_Geod = 0; -static PyObject *__pyx_k_12; -static PyObject *__pyx_k_13; -static PyObject *__pyx_k_14; +static PyObject *__pyx_k_12 = 0; +static PyObject *__pyx_k_13 = 0; +static PyObject *__pyx_k_14 = 0; +#define __Pyx_MODULE_NAME "_geod" +int __pyx_module_is_main__geod = 0; - /* Implementation of _geod */ static char __pyx_k_11[] = "1.8.6"; +static char __pyx_k___main__[] = "__main__"; +static PyObject *__pyx_kp___main__; static char __pyx_k___cinit__[] = "__cinit__"; static PyObject *__pyx_kp___cinit__; static char __pyx_k___reduce__[] = "__reduce__"; @@ -313,13 +426,14 @@ PyObject *__pyx_v_geodstring = 0; GEODESIC_T __pyx_v_GEOD_T; int __pyx_r; - int __pyx_1; - PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; static PyObject **__pyx_pyargnames[] = {&__pyx_kp_geodstring,0}; + __Pyx_SetupRefcountContext("__cinit__"); if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args = PyDict_Size(__pyx_kwds); PyObject* values[1] = {0}; - Py_ssize_t kw_args = PyDict_Size(__pyx_kwds); switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; @@ -355,8 +469,10 @@ * self.geodinitstring = PyString_AsString(self.geodstring) * # initialize projection */ - Py_INCREF(__pyx_v_geodstring); - Py_DECREF(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodstring); + __Pyx_INCREF(__pyx_v_geodstring); + __Pyx_GIVEREF(__pyx_v_geodstring); + __Pyx_GOTREF(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodstring); + __Pyx_DECREF(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodstring); ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodstring = __pyx_v_geodstring; /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":15 @@ -384,8 +500,8 @@ * raise RuntimeError(pj_strerrno(pj_errno)) * self.proj_version = PJ_VERSION/100. */ - __pyx_1 = (pj_errno != 0); - if (__pyx_1) { + __pyx_t_1 = (pj_errno != 0); + if (__pyx_t_1) { /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":19 * self.geodesic_t = GEOD_init_plus(self.geodinitstring, &GEOD_T)[0] @@ -394,14 +510,18 @@ * self.proj_version = PJ_VERSION/100. * */ - __pyx_2 = __Pyx_PyBytes_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); - __pyx_2 = 0; - __pyx_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0; - __Pyx_Raise(__pyx_2, 0, 0); - Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_t_2 = __Pyx_PyBytes_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } @@ -414,19 +534,23 @@ * * def __reduce__(self): */ - __pyx_3 = PyFloat_FromDouble((PJ_VERSION / 100.)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - 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_3; - __pyx_3 = 0; + __pyx_t_2 = PyFloat_FromDouble((PJ_VERSION / 100.0)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->proj_version); + __Pyx_DECREF(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->proj_version); + ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->proj_version = __pyx_t_2; + __pyx_t_2 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; - Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_3); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("_geod.Geod.__cinit__"); __pyx_r = -1; __pyx_L0:; + __Pyx_FinishRefcountContext(); return __pyx_r; } @@ -441,10 +565,11 @@ 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_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; + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_SetupRefcountContext("__reduce__"); /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":24 * def __reduce__(self): @@ -453,28 +578,37 @@ * * def _fwd(self, object lons, object lats, object az, object dist, radians=False): */ - __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_kp___class__); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_INCREF(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodstring); - PyTuple_SET_ITEM(__pyx_2, 0, ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodstring); - __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); - PyTuple_SET_ITEM(__pyx_3, 1, ((PyObject *)__pyx_2)); - __pyx_1 = 0; - __pyx_2 = 0; - __pyx_r = ((PyObject *)__pyx_3); - __pyx_3 = 0; + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_kp___class__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_INCREF(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodstring); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodstring); + __Pyx_GIVEREF(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodstring); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_t_2)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_r = ((PyObject *)__pyx_t_3); + __pyx_t_3 = 0; goto __pyx_L0; - __pyx_r = Py_None; Py_INCREF(Py_None); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_3); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("_geod.Geod.__reduce__"); __pyx_r = NULL; __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_FinishRefcountContext(); return __pyx_r; } @@ -508,20 +642,21 @@ void *__pyx_v_latdata; void *__pyx_v_azdat; void *__pyx_v_distdat; - PyObject *__pyx_r; - int __pyx_1; - int __pyx_2; - PyObject *__pyx_3 = 0; - PyObject *__pyx_4 = 0; - Py_ssize_t __pyx_5 = 0; - double __pyx_6; - int __pyx_7; - PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_r = NULL; + PyObject *__pyx_1 = 0; + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_5; + double __pyx_t_6; + int __pyx_t_7; static PyObject **__pyx_pyargnames[] = {&__pyx_kp_lons,&__pyx_kp_lats,&__pyx_kp_az,&__pyx_kp_dist,&__pyx_kp_radians,0}; - __pyx_v_radians = __pyx_k_12; + __Pyx_SetupRefcountContext("_fwd"); if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args = PyDict_Size(__pyx_kwds); PyObject* values[5] = {0,0,0,0,0}; - Py_ssize_t kw_args = PyDict_Size(__pyx_kwds); + values[4] = __pyx_k_12; switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); @@ -554,6 +689,11 @@ else { __Pyx_RaiseArgtupleInvalid("_fwd", 0, 4, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } + case 4: + if (kw_args > 1) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_kp_radians); + if (unlikely(value)) { values[4] = value; kw_args--; } + } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "_fwd") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L3_error;} @@ -562,10 +702,9 @@ __pyx_v_lats = values[1]; __pyx_v_az = values[2]; __pyx_v_dist = values[3]; - if (values[4]) { - __pyx_v_radians = values[4]; - } + __pyx_v_radians = values[4]; } else { + __pyx_v_radians = __pyx_k_12; switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: __pyx_v_radians = PyTuple_GET_ITEM(__pyx_args, 4); @@ -593,8 +732,8 @@ * raise RuntimeError * if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0: */ - __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lons, (&__pyx_v_londata), (&__pyx_v_buflenlons)) != 0); - if (__pyx_1) { + __pyx_t_1 = (PyObject_AsWriteBuffer(__pyx_v_lons, (&__pyx_v_londata), (&__pyx_v_buflenlons)) != 0); + if (__pyx_t_1) { /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":38 * # if buffer api is supported, get pointer to data buffers. @@ -616,8 +755,8 @@ * raise RuntimeError * if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0: */ - __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lats, (&__pyx_v_latdata), (&__pyx_v_buflenlats)) != 0); - if (__pyx_1) { + __pyx_t_1 = (PyObject_AsWriteBuffer(__pyx_v_lats, (&__pyx_v_latdata), (&__pyx_v_buflenlats)) != 0); + if (__pyx_t_1) { /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":40 * raise RuntimeError @@ -639,8 +778,8 @@ * raise RuntimeError * if PyObject_AsWriteBuffer(dist, &distdat, &buflend) <> 0: */ - __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_az, (&__pyx_v_azdat), (&__pyx_v_buflenaz)) != 0); - if (__pyx_1) { + __pyx_t_1 = (PyObject_AsWriteBuffer(__pyx_v_az, (&__pyx_v_azdat), (&__pyx_v_buflenaz)) != 0); + if (__pyx_t_1) { /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":42 * raise RuntimeError @@ -662,8 +801,8 @@ * raise RuntimeError * # process data in buffer */ - __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_dist, (&__pyx_v_distdat), (&__pyx_v_buflend)) != 0); - if (__pyx_1) { + __pyx_t_1 = (PyObject_AsWriteBuffer(__pyx_v_dist, (&__pyx_v_distdat), (&__pyx_v_buflend)) != 0); + if (__pyx_t_1) { /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":44 * raise RuntimeError @@ -685,15 +824,15 @@ * raise RuntimeError("Buffer lengths not the same") * ndim = buflenlons/_doublesize */ - __pyx_1 = (__pyx_v_buflenlons == __pyx_v_buflenlats); - if (__pyx_1) { - __pyx_1 = (__pyx_v_buflenlats == __pyx_v_buflenaz); - if (__pyx_1) { - __pyx_1 = (__pyx_v_buflenaz == __pyx_v_buflend); + __pyx_t_1 = (__pyx_v_buflenlons == __pyx_v_buflenlats); + if (__pyx_t_1) { + __pyx_t_1 = (__pyx_v_buflenlats == __pyx_v_buflenaz); + if (__pyx_t_1) { + __pyx_t_1 = (__pyx_v_buflenaz == __pyx_v_buflend); } } - __pyx_2 = (!__pyx_1); - if (__pyx_2) { + __pyx_t_2 = (!__pyx_t_1); + if (__pyx_t_2) { /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":47 * # process data in buffer @@ -702,13 +841,16 @@ * ndim = buflenlons/_doublesize * lonsdata = <double *>londata */ - __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_INCREF(__pyx_kp_15); - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_kp_15); - __pyx_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0; - __Pyx_Raise(__pyx_4, 0, 0); - Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_INCREF(__pyx_kp_15); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_15); + __Pyx_GIVEREF(__pyx_kp_15); + __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L10; } @@ -721,14 +863,17 @@ * 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 = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_kp__doublesize); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_3, __pyx_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_5 = __pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_ndim = __pyx_5; + __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_buflenlons); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp__doublesize); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_1); + __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_4, __pyx_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_ndim = __pyx_t_5; /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":49 * raise RuntimeError("Buffer lengths not the same") @@ -773,7 +918,8 @@ * if radians: * self.geodesic_t.p1.v = lonsdata[i] */ - for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_ndim; __pyx_v_i++) { + __pyx_t_5 = __pyx_v_ndim; + for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_5; __pyx_v_i++) { /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":54 * distdata = <double *>distdat @@ -782,8 +928,8 @@ * 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 = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__pyx_1) { + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_2) { /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":55 * for i from 0 <= i < ndim: @@ -831,14 +977,17 @@ * self.geodesic_t.p1.u = _dg2rad*latsdata[i] * self.geodesic_t.ALPHA12 = _dg2rad*azdata[i] */ - __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_9); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_4 = PyFloat_FromDouble((__pyx_v_lonsdata[__pyx_v_i])); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = PyNumber_Multiply(__pyx_3, __pyx_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_6 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.v = __pyx_6; + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_9); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_1); + __pyx_t_3 = PyFloat_FromDouble((__pyx_v_lonsdata[__pyx_v_i])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyNumber_Multiply(__pyx_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_1); __pyx_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.v = __pyx_t_6; /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":61 * else: @@ -847,14 +996,17 @@ * self.geodesic_t.ALPHA12 = _dg2rad*azdata[i] * self.geodesic_t.DIST = distdata[i] */ - __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_9); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_4 = PyFloat_FromDouble((__pyx_v_latsdata[__pyx_v_i])); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = PyNumber_Multiply(__pyx_3, __pyx_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_6 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.u = __pyx_6; + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_9); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_1); + __pyx_t_4 = PyFloat_FromDouble((__pyx_v_latsdata[__pyx_v_i])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyNumber_Multiply(__pyx_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_1); __pyx_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.u = __pyx_t_6; /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":62 * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] @@ -863,14 +1015,17 @@ * self.geodesic_t.DIST = distdata[i] * geod_pre(&self.geodesic_t) */ - __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_9); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_4 = PyFloat_FromDouble((__pyx_v_azdata[__pyx_v_i])); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = PyNumber_Multiply(__pyx_3, __pyx_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_6 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA12 = __pyx_6; + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_9); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_1); + __pyx_t_3 = PyFloat_FromDouble((__pyx_v_azdata[__pyx_v_i])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyNumber_Multiply(__pyx_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_1); __pyx_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA12 = __pyx_t_6; /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":63 * self.geodesic_t.p1.u = _dg2rad*latsdata[i] @@ -899,8 +1054,8 @@ * raise RuntimeError(pj_strerrno(pj_errno)) * geod_for(&self.geodesic_t) */ - __pyx_2 = (pj_errno != 0); - if (__pyx_2) { + __pyx_t_2 = (pj_errno != 0); + if (__pyx_t_2) { /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":66 * geod_pre(&self.geodesic_t) @@ -909,14 +1064,18 @@ * geod_for(&self.geodesic_t) * if pj_errno != 0: */ - __pyx_3 = __Pyx_PyBytes_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); - __pyx_3 = 0; - __pyx_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_4), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_4)); __pyx_4 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_t_4 = __Pyx_PyBytes_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L14; } @@ -938,8 +1097,8 @@ * raise RuntimeError(pj_strerrno(pj_errno)) * if isnan(self.geodesic_t.ALPHA21): */ - __pyx_1 = (pj_errno != 0); - if (__pyx_1) { + __pyx_t_2 = (pj_errno != 0); + if (__pyx_t_2) { /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":69 * geod_for(&self.geodesic_t) @@ -948,14 +1107,18 @@ * if isnan(self.geodesic_t.ALPHA21): * raise ValueError('undefined forward geodesic (may be an equatorial arc)') */ - __pyx_4 = __Pyx_PyBytes_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_4); - __pyx_4 = 0; - __pyx_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0; - __Pyx_Raise(__pyx_4, 0, 0); - Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_t_4 = __Pyx_PyBytes_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L15; } @@ -968,8 +1131,8 @@ * raise ValueError('undefined forward geodesic (may be an equatorial arc)') * if radians: */ - __pyx_7 = isnan(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA21); - if (__pyx_7) { + __pyx_t_7 = isnan(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA21); + if (__pyx_t_7) { /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":71 * raise RuntimeError(pj_strerrno(pj_errno)) @@ -978,13 +1141,16 @@ * 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 = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_INCREF(__pyx_kp_16); - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_kp_16); - __pyx_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0; - __Pyx_Raise(__pyx_4, 0, 0); - Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __Pyx_INCREF(__pyx_kp_16); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_16); + __Pyx_GIVEREF(__pyx_kp_16); + __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L16; } @@ -997,8 +1163,8 @@ * 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 = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__pyx_2) { + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_2) { /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":73 * raise ValueError('undefined forward geodesic (may be an equatorial arc)') @@ -1037,14 +1203,17 @@ * latsdata[i] = _rad2dg*self.geodesic_t.p2.u * azdata[i] = _rad2dg*self.geodesic_t.ALPHA21 */ - __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_10); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_4 = PyFloat_FromDouble(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.v); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = PyNumber_Multiply(__pyx_3, __pyx_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_6 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - (__pyx_v_lonsdata[__pyx_v_i]) = __pyx_6; + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_10); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_1); + __pyx_t_3 = PyFloat_FromDouble(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.v); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyNumber_Multiply(__pyx_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_1); __pyx_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + (__pyx_v_lonsdata[__pyx_v_i]) = __pyx_t_6; /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":78 * else: @@ -1053,14 +1222,17 @@ * azdata[i] = _rad2dg*self.geodesic_t.ALPHA21 * */ - __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_10); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_4 = PyFloat_FromDouble(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.u); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = PyNumber_Multiply(__pyx_3, __pyx_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_6 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - (__pyx_v_latsdata[__pyx_v_i]) = __pyx_6; + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_10); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_1); + __pyx_t_4 = PyFloat_FromDouble(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.u); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyNumber_Multiply(__pyx_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_1); __pyx_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + (__pyx_v_latsdata[__pyx_v_i]) = __pyx_t_6; /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":79 * lonsdata[i] = _rad2dg*self.geodesic_t.p2.v @@ -1069,26 +1241,32 @@ * * def _inv(self, object lons1, object lats1, object lons2, object lats2, radians=False): */ - __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_10); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_4 = PyFloat_FromDouble(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA21); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = PyNumber_Multiply(__pyx_3, __pyx_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_6 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - (__pyx_v_azdata[__pyx_v_i]) = __pyx_6; + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_10); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_1); + __pyx_t_3 = PyFloat_FromDouble(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA21); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyNumber_Multiply(__pyx_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_1); __pyx_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + (__pyx_v_azdata[__pyx_v_i]) = __pyx_t_6; } __pyx_L17:; } - __pyx_r = Py_None; Py_INCREF(Py_None); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - Py_XDECREF(__pyx_3); - Py_XDECREF(__pyx_4); + __Pyx_XDECREF(__pyx_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("_geod.Geod._fwd"); __pyx_r = NULL; __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_FinishRefcountContext(); return __pyx_r; } @@ -1122,20 +1300,21 @@ void *__pyx_v_latdata; void *__pyx_v_azdat; void *__pyx_v_distdat; - PyObject *__pyx_r; - int __pyx_1; - int __pyx_2; - PyObject *__pyx_3 = 0; - PyObject *__pyx_4 = 0; - Py_ssize_t __pyx_5 = 0; - double __pyx_6; - int __pyx_7; - PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_r = NULL; + PyObject *__pyx_1 = 0; + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_5; + double __pyx_t_6; + int __pyx_t_7; static PyObject **__pyx_pyargnames[] = {&__pyx_kp_1,&__pyx_kp_2,&__pyx_kp_3,&__pyx_kp_4,&__pyx_kp_radians,0}; - __pyx_v_radians = __pyx_k_13; + __Pyx_SetupRefcountContext("_inv"); if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args = PyDict_Size(__pyx_kwds); PyObject* values[5] = {0,0,0,0,0}; - Py_ssize_t kw_args = PyDict_Size(__pyx_kwds); + values[4] = __pyx_k_13; switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); @@ -1168,6 +1347,11 @@ else { __Pyx_RaiseArgtupleInvalid("_inv", 0, 4, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } + case 4: + if (kw_args > 1) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_kp_radians); + if (unlikely(value)) { values[4] = value; kw_args--; } + } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "_inv") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L3_error;} @@ -1176,10 +1360,9 @@ __pyx_v_lats1 = values[1]; __pyx_v_lons2 = values[2]; __pyx_v_lats2 = values[3]; - if (values[4]) { - __pyx_v_radians = values[4]; - } + __pyx_v_radians = values[4]; } else { + __pyx_v_radians = __pyx_k_13; switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: __pyx_v_radians = PyTuple_GET_ITEM(__pyx_args, 4); @@ -1207,8 +1390,8 @@ * raise RuntimeError * if PyObject_AsWriteBuffer(lats1, &latdata, &buflenlats) <> 0: */ - __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lons1, (&__pyx_v_londata), (&__pyx_v_buflenlons)) != 0); - if (__pyx_1) { + __pyx_t_1 = (PyObject_AsWriteBuffer(__pyx_v_lons1, (&__pyx_v_londata), (&__pyx_v_buflenlons)) != 0); + if (__pyx_t_1) { /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":92 * # if buffer api is supported, get pointer to data buffers. @@ -1230,8 +1413,8 @@ * raise RuntimeError * if PyObject_AsWriteBuffer(lons2, &azdat, &buflenaz) <> 0: */ - __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lats1, (&__pyx_v_latdata), (&__pyx_v_buflenlats)) != 0); - if (__pyx_1) { + __pyx_t_1 = (PyObject_AsWriteBuffer(__pyx_v_lats1, (&__pyx_v_latdata), (&__pyx_v_buflenlats)) != 0); + if (__pyx_t_1) { /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":94 * raise RuntimeError @@ -1253,8 +1436,8 @@ * raise RuntimeError * if PyObject_AsWriteBuffer(lats2, &distdat, &buflend) <> 0: */ - __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lons2, (&__pyx_v_azdat), (&__pyx_v_buflenaz)) != 0); - if (__pyx_1) { + __pyx_t_1 = (PyObject_AsWriteBuffer(__pyx_v_lons2, (&__pyx_v_azdat), (&__pyx_v_buflenaz)) != 0); + if (__pyx_t_1) { /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":96 * raise RuntimeError @@ -1276,8 +1459,8 @@ * raise RuntimeError * # process data in buffer */ - __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lats2, (&__pyx_v_distdat), (&__pyx_v_buflend)) != 0); - if (__pyx_1) { + __pyx_t_1 = (PyObject_AsWriteBuffer(__pyx_v_lats2, (&__pyx_v_distdat), (&__pyx_v_buflend)) != 0); + if (__pyx_t_1) { /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":98 * raise RuntimeError @@ -1299,15 +1482,15 @@ * raise RuntimeError("Buffer lengths not the same") * ndim = buflenlons/_doublesize */ - __pyx_1 = (__pyx_v_buflenlons == __pyx_v_buflenlats); - if (__pyx_1) { - __pyx_1 = (__pyx_v_buflenlats == __pyx_v_buflenaz); - if (__pyx_1) { - __pyx_1 = (__pyx_v_buflenaz == __pyx_v_buflend); + __pyx_t_1 = (__pyx_v_buflenlons == __pyx_v_buflenlats); + if (__pyx_t_1) { + __pyx_t_1 = (__pyx_v_buflenlats == __pyx_v_buflenaz); + if (__pyx_t_1) { + __pyx_t_1 = (__pyx_v_buflenaz == __pyx_v_buflend); } } - __pyx_2 = (!__pyx_1); - if (__pyx_2) { + __pyx_t_2 = (!__pyx_t_1); + if (__pyx_t_2) { /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":101 * # process data in buffer @@ -1316,13 +1499,16 @@ * ndim = buflenlons/_doublesize * lonsdata = <double *>londata */ - __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_INCREF(__pyx_kp_17); - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_kp_17); - __pyx_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0; - __Pyx_Raise(__pyx_4, 0, 0); - Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_INCREF(__pyx_kp_17); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_17); + __Pyx_GIVEREF(__pyx_kp_17); + __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L10; } @@ -1335,14 +1521,17 @@ * 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 = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_kp__doublesize); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_3, __pyx_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_5 = __pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_ndim = __pyx_5; + __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_buflenlons); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp__doublesize); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_1); + __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_4, __pyx_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_ndim = __pyx_t_5; /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":103 * raise RuntimeError("Buffer lengths not the same") @@ -1387,7 +1576,8 @@ * if radians: * self.geodesic_t.p1.v = lonsdata[i] */ - for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_ndim; __pyx_v_i++) { + __pyx_t_5 = __pyx_v_ndim; + for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_5; __pyx_v_i++) { /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":108 * distdata = <double *>distdat @@ -1396,8 +1586,8 @@ * 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 = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__pyx_1) { + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_2) { /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":109 * for i from 0 <= i < ndim: @@ -1445,14 +1635,17 @@ * self.geodesic_t.p1.u = _dg2rad*latsdata[i] * self.geodesic_t.p2.v = _dg2rad*azdata[i] */ - __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_9); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_4 = PyFloat_FromDouble((__pyx_v_lonsdata[__pyx_v_i])); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = PyNumber_Multiply(__pyx_3, __pyx_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_6 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.v = __pyx_6; + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_9); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_1); + __pyx_t_3 = PyFloat_FromDouble((__pyx_v_lonsdata[__pyx_v_i])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyNumber_Multiply(__pyx_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_1); __pyx_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.v = __pyx_t_6; /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":115 * else: @@ -1461,14 +1654,17 @@ * ... [truncated message content] |