/* Generated by Pyrex 0.9.4.1 on Wed Jun  7 05:44:59 2006 */

#include "Python.h"
#include "structmember.h"
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifdef __cplusplus
#define __PYX_EXTERN_C extern "C"
#else
#define __PYX_EXTERN_C extern
#endif
__PYX_EXTERN_C double pow(double, double);
#include "proj_api.h"


typedef struct {PyObject **p; char *s;} __Pyx_InternTabEntry; /*proto*/
typedef struct {PyObject **p; char *s; long n;} __Pyx_StringTabEntry; /*proto*/
static PyObject *__Pyx_UnpackItem(PyObject *, int); /*proto*/
static int __Pyx_EndUnpack(PyObject *, int); /*proto*/
static int __Pyx_PrintItem(PyObject *); /*proto*/
static int __Pyx_PrintNewline(void); /*proto*/
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
static void __Pyx_ReRaise(void); /*proto*/
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/
static PyObject *__Pyx_GetExcValue(void); /*proto*/
static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, char *name); /*proto*/
static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/
static int __Pyx_GetStarArgs(PyObject **args, PyObject **kwds, char *kwd_list[], int nargs, PyObject **args2, PyObject **kwds2); /*proto*/
static void __Pyx_WriteUnraisable(char *name); /*proto*/
static void __Pyx_AddTraceback(char *funcname); /*proto*/
static PyTypeObject *__Pyx_ImportType(char *module_name, char *class_name, long size);  /*proto*/
static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/
static int __Pyx_GetVtable(PyObject *dict, void *vtabptr); /*proto*/
static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, char *modname); /*proto*/
static int __Pyx_InternStrings(__Pyx_InternTabEntry *t); /*proto*/
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/

static PyObject *__pyx_m;
static PyObject *__pyx_b;
static int __pyx_lineno;
static char *__pyx_filename;
static char **__pyx_f;

static char __pyx_mdoc[] = "\nPyrex wrapper to provide python interfaces to \nPROJ.4 (http://proj.maptools.org) functions.\n\nPerforms cartographic transformations (converts from longitude,latitude\nto native map projection x,y coordinates and vice versa, or from\none map projection coordinate system directly to another).\n\nExample usage:\n\n>>> from pyproj import Proj\n>>> p = Proj(proj=\'utm\',zone=10)\n>>> x,y = p(-120.108, 34.36116666)\n>>> print x,y\n>>> print p(x,y,inverse=True)\n765975.641091 3805993.13406\n(-120.10799999995851, 34.3611.79972767)\n\nInput coordinates can be given as python arrays, lists/tuples, scalars\nor Numeric/numarray/numpy arrays. Optimized for objects that support\nthe Python buffer protocol (regular python, Numeric, numarray and\nnumpy arrays).\n\nDownload: http://www.cdc.noaa.gov/people/jeffrey.s.whitaker/python/pyproj-1.7.2.tar.gz\n\nRequires: PROJ.4 library. Numeric, numarray or numpy required for tests.\n\nInstall:  Set PROJ_DIR environment variable to location\n          of PROJ.4 installation.  Run python setup.py install.\n          If you\'re using Windows with mingw, see README.mingw.\n\nExample scripts are in \'test\' subdirectory of source distribution.\n\nContact:  Jeffrey Whitaker <jeffrey.s.whitaker@noaa.gov\n\ncopyright (c) 2006 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 notice appear in all copies and that\nboth the copyright notice 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";

/* Declarations from pyproj */


struct __pyx_obj_6pyproj_Proj {
  PyObject_HEAD
  projPJ projpj;
  PyObject *projparams;
  PyObject *proj_version;
  char (*pjinitstring);
};

static PyTypeObject *__pyx_ptype_6pyproj_Proj = 0;
static double __pyx_v_6pyproj__rad2dg;
static double __pyx_v_6pyproj__dg2rad;
static int __pyx_v_6pyproj__doublesize;
static PyObject *__pyx_k5;
static PyObject *__pyx_k6;
static PyObject *__pyx_k7;
static PyObject *__pyx_k8;
static PyObject *__pyx_k9;
static PyObject *__pyx_k10;
static PyObject *__pyx_k11;
static PyObject *(__pyx_f_6pyproj__transform(struct __pyx_obj_6pyproj_Proj *,struct __pyx_obj_6pyproj_Proj *,PyObject *,PyObject *,PyObject *,PyObject *)); /*proto*/

/* Implementation of pyproj */

static char (__pyx_k4[]) = "1.7.2";

static PyObject *__pyx_n_math;
static PyObject *__pyx_n_array;
static PyObject *__pyx_n_types;
static PyObject *__pyx_n___version__;
static PyObject *__pyx_n__seqtype;
static PyObject *__pyx_n_transform;
static PyObject *__pyx_n_radians;
static PyObject *__pyx_n_degrees;
static PyObject *__pyx_n_ListType;
static PyObject *__pyx_n_TupleType;
static PyObject *__pyx_n_False;

static PyObject *__pyx_k4p;

static PyObject *__pyx_n_len;
static PyObject *__pyx_n_RuntimeError;
static PyObject *__pyx_n_has_key;
static PyObject *__pyx_n_units;
static PyObject *__pyx_n_m;
static PyObject *__pyx_n_iteritems;
static PyObject *__pyx_n_append;
static PyObject *__pyx_n_str;
static PyObject *__pyx_n_join;

static PyObject *__pyx_k12p;
static PyObject *__pyx_k18p;
static PyObject *__pyx_k21p;
static PyObject *__pyx_k22p;
static PyObject *__pyx_k23p;
static PyObject *__pyx_k24p;
static PyObject *__pyx_k25p;

static char (__pyx_k12[]) = "no projection control parameters specified";
static char (__pyx_k18[]) = "resetting units to meters ...";
static char (__pyx_k21[]) = "+";
static char (__pyx_k22[]) = "=";
static char (__pyx_k23[]) = " ";
static char (__pyx_k24[]) = "";
static char (__pyx_k25[]) = "projection initialization failed.\n try running proj %s\n in a terminal to get a more informative error message";

static int __pyx_f_6pyproj_4Proj___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pyproj_4Proj___new__[] = "\n initialize a Proj class instance.\n\n Proj4 projection control parameters must either be\n given in a dictionary \'projparams\' or as keyword arguments.\n See the proj documentation (http://proj.maptools.org) for more\n information about specifying projection parameters.\n        ";
static int __pyx_f_6pyproj_4Proj___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_projparams = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_v_pjargs;
  PyObject *__pyx_v_key;
  PyObject *__pyx_v_value;
  PyObject *__pyx_v_msg;
  int __pyx_r;
  int __pyx_1;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  int __pyx_5;
  PyObject *__pyx_6 = 0;
  PyObject *__pyx_7 = 0;
  PyObject *__pyx_8 = 0;
  static char *__pyx_argnames[] = {"projparams",0};
  __pyx_v_projparams = __pyx_k5;
  if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 1, 0, &__pyx_v_kwargs) < 0) return -1;
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_projparams)) {
    Py_XDECREF(__pyx_args);
    Py_XDECREF(__pyx_kwds);
    Py_XDECREF(__pyx_v_kwargs);
    return -1;
  }
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_projparams);
  __pyx_v_pjargs = Py_None; Py_INCREF(Py_None);
  __pyx_v_key = Py_None; Py_INCREF(Py_None);
  __pyx_v_value = Py_None; Py_INCREF(Py_None);
  __pyx_v_msg = Py_None; Py_INCREF(Py_None);

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":125 */
  __pyx_1 = __pyx_v_projparams == Py_None;
  if (__pyx_1) {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":126 */
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; goto __pyx_L1;}
    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; goto __pyx_L1;}
    Py_INCREF(__pyx_v_kwargs);
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_kwargs);
    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; goto __pyx_L1;}
    if (PyObject_Cmp(__pyx_4, __pyx_2, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; goto __pyx_L1;}
    __pyx_1 = __pyx_1 == 0;
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    if (__pyx_1) {

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":127 */
      __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_RuntimeError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; goto __pyx_L1;}
      __Pyx_Raise(__pyx_3, __pyx_k12p, 0);
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; goto __pyx_L1;}
      goto __pyx_L3;
    }
    /*else*/ {

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":129 */
      Py_INCREF(__pyx_v_kwargs);
      Py_DECREF(__pyx_v_projparams);
      __pyx_v_projparams = __pyx_v_kwargs;
    }
    __pyx_L3:;
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":131 */
  __pyx_4 = PyObject_GetAttr(__pyx_v_projparams, __pyx_n_has_key); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; goto __pyx_L1;}
  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; goto __pyx_L1;}
  Py_INCREF(__pyx_n_units);
  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_units);
  __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; goto __pyx_L1;}
  Py_DECREF(__pyx_4); __pyx_4 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_1 = PyObject_IsTrue(__pyx_3); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  __pyx_5 = (!__pyx_1);
  if (__pyx_5) {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":132 */
    if (PyObject_SetItem(__pyx_v_projparams, __pyx_n_units, __pyx_n_m) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; goto __pyx_L1;}
    goto __pyx_L4;
  }
  __pyx_4 = PyObject_GetItem(__pyx_v_projparams, __pyx_n_units); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; goto __pyx_L1;}
  if (PyObject_Cmp(__pyx_4, __pyx_n_m, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; goto __pyx_L1;}
  __pyx_1 = __pyx_1 != 0;
  Py_DECREF(__pyx_4); __pyx_4 = 0;
  if (__pyx_1) {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":134 */
    if (__Pyx_PrintItem(__pyx_k18p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; goto __pyx_L1;}
    if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; goto __pyx_L1;}

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":135 */
    if (PyObject_SetItem(__pyx_v_projparams, __pyx_n_units, __pyx_n_m) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; goto __pyx_L1;}
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":137 */
  __pyx_2 = PyList_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; goto __pyx_L1;}
  Py_DECREF(__pyx_v_pjargs);
  __pyx_v_pjargs = __pyx_2;
  __pyx_2 = 0;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":138 */
  __pyx_3 = PyObject_GetAttr(__pyx_v_projparams, __pyx_n_iteritems); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; goto __pyx_L1;}
  __pyx_4 = PyTuple_New(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; goto __pyx_L1;}
  __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  Py_DECREF(__pyx_4); __pyx_4 = 0;
  __pyx_3 = PyObject_GetIter(__pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  for (;;) {
    __pyx_L5:;
    __pyx_4 = PyIter_Next(__pyx_3);
    if (!__pyx_4) {
      if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; goto __pyx_L1;}
      break;
    }
    __pyx_2 = __Pyx_UnpackItem(__pyx_4, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; goto __pyx_L1;}
    Py_DECREF(__pyx_v_key);
    __pyx_v_key = __pyx_2;
    __pyx_2 = 0;
    __pyx_6 = __Pyx_UnpackItem(__pyx_4, 1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; goto __pyx_L1;}
    Py_DECREF(__pyx_v_value);
    __pyx_v_value = __pyx_6;
    __pyx_6 = 0;
    if (__Pyx_EndUnpack(__pyx_4, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; goto __pyx_L1;}
    Py_DECREF(__pyx_4); __pyx_4 = 0;

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":139 */
    __pyx_4 = PyObject_GetAttr(__pyx_v_pjargs, __pyx_n_append); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; goto __pyx_L1;}
    __pyx_2 = PyNumber_Add(__pyx_k21p, __pyx_v_key); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; goto __pyx_L1;}
    __pyx_6 = PyNumber_Add(__pyx_2, __pyx_k22p); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_str); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; goto __pyx_L1;}
    __pyx_7 = PyTuple_New(1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; goto __pyx_L1;}
    Py_INCREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_7, 0, __pyx_v_value);
    __pyx_8 = PyObject_CallObject(__pyx_2, __pyx_7); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_7); __pyx_7 = 0;
    __pyx_2 = PyNumber_Add(__pyx_6, __pyx_8); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; goto __pyx_L1;}
    Py_DECREF(__pyx_6); __pyx_6 = 0;
    Py_DECREF(__pyx_8); __pyx_8 = 0;
    __pyx_7 = PyNumber_Add(__pyx_2, __pyx_k23p); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_6, 0, __pyx_7);
    __pyx_7 = 0;
    __pyx_8 = PyObject_CallObject(__pyx_4, __pyx_6); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; goto __pyx_L1;}
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    Py_DECREF(__pyx_6); __pyx_6 = 0;
    Py_DECREF(__pyx_8); __pyx_8 = 0;
  }
  __pyx_L6:;
  Py_DECREF(__pyx_3); __pyx_3 = 0;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":140 */
  Py_INCREF(__pyx_v_projparams);
  Py_DECREF(((struct __pyx_obj_6pyproj_Proj *)__pyx_v_self)->projparams);
  ((struct __pyx_obj_6pyproj_Proj *)__pyx_v_self)->projparams = __pyx_v_projparams;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":141 */
  __pyx_2 = PyObject_GetAttr(__pyx_k24p, __pyx_n_join); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; goto __pyx_L1;}
  __pyx_7 = PyTuple_New(1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; goto __pyx_L1;}
  Py_INCREF(__pyx_v_pjargs);
  PyTuple_SET_ITEM(__pyx_7, 0, __pyx_v_pjargs);
  __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_7); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_7); __pyx_7 = 0;
  ((struct __pyx_obj_6pyproj_Proj *)__pyx_v_self)->pjinitstring = PyString_AsString(__pyx_4);
  Py_DECREF(__pyx_4); __pyx_4 = 0;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":143 */
  ((struct __pyx_obj_6pyproj_Proj *)__pyx_v_self)->projpj = pj_init_plus(((struct __pyx_obj_6pyproj_Proj *)__pyx_v_self)->pjinitstring);

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":144 */
  __pyx_5 = (((struct __pyx_obj_6pyproj_Proj *)__pyx_v_self)->projpj == 0);
  if (__pyx_5) {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":147 */
    __pyx_6 = PyString_FromString(((struct __pyx_obj_6pyproj_Proj *)__pyx_v_self)->pjinitstring); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; goto __pyx_L1;}
    __pyx_8 = PyNumber_Remainder(__pyx_k25p, __pyx_6); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; goto __pyx_L1;}
    Py_DECREF(__pyx_6); __pyx_6 = 0;
    Py_DECREF(__pyx_v_msg);
    __pyx_v_msg = __pyx_8;
    __pyx_8 = 0;

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":148 */
    __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_RuntimeError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; goto __pyx_L1;}
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; goto __pyx_L1;}
    Py_INCREF(__pyx_v_msg);
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_msg);
    __pyx_7 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __Pyx_Raise(__pyx_7, 0, 0);
    Py_DECREF(__pyx_7); __pyx_7 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; goto __pyx_L1;}
    goto __pyx_L7;
  }
  __pyx_L7:;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":149 */
  __pyx_4 = PyFloat_FromDouble((PJ_VERSION / 100.)); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; goto __pyx_L1;}
  Py_DECREF(((struct __pyx_obj_6pyproj_Proj *)__pyx_v_self)->proj_version);
  ((struct __pyx_obj_6pyproj_Proj *)__pyx_v_self)->proj_version = __pyx_4;
  __pyx_4 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  Py_XDECREF(__pyx_6);
  Py_XDECREF(__pyx_7);
  Py_XDECREF(__pyx_8);
  __Pyx_AddTraceback("pyproj.Proj.__new__");
  __pyx_r = -1;
  __pyx_L0:;
  Py_XDECREF(__pyx_v_kwargs);
  Py_DECREF(__pyx_v_pjargs);
  Py_DECREF(__pyx_v_key);
  Py_DECREF(__pyx_v_value);
  Py_DECREF(__pyx_v_msg);
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_projparams);
  Py_XDECREF(__pyx_args);
  Py_XDECREF(__pyx_kwds);
  return __pyx_r;
}

static void __pyx_f_6pyproj_4Proj___dealloc__(PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_6pyproj_4Proj___dealloc__[] = "destroy projection definition";
static void __pyx_f_6pyproj_4Proj___dealloc__(PyObject *__pyx_v_self) {
  Py_INCREF(__pyx_v_self);

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":153 */
  pj_free(((struct __pyx_obj_6pyproj_Proj *)__pyx_v_self)->projpj);

  goto __pyx_L0;
  __pyx_L1:;
  __Pyx_AddTraceback("pyproj.Proj.__dealloc__");
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
}

static PyObject *__pyx_n___class__;

static PyObject *__pyx_f_6pyproj_4Proj___reduce__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pyproj_4Proj___reduce__[] = "special method that allows pyproj.Proj instance to be pickled";
static PyObject *__pyx_f_6pyproj_4Proj___reduce__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  static char *__pyx_argnames[] = {0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
  Py_INCREF(__pyx_v_self);

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":157 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n___class__); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; goto __pyx_L1;}
  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; goto __pyx_L1;}
  Py_INCREF(((struct __pyx_obj_6pyproj_Proj *)__pyx_v_self)->projparams);
  PyTuple_SET_ITEM(__pyx_2, 0, ((struct __pyx_obj_6pyproj_Proj *)__pyx_v_self)->projparams);
  __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; goto __pyx_L1;}
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1);
  PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2);
  __pyx_1 = 0;
  __pyx_2 = 0;
  __pyx_r = __pyx_3;
  __pyx_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  __Pyx_AddTraceback("pyproj.Proj.__reduce__");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_k26p;

static char (__pyx_k26[]) = "Buffer lengths not the same";

static PyObject *__pyx_f_6pyproj_4Proj__fwd(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pyproj_4Proj__fwd[] = "\n forward transformation - lons,lats to x,y.\n if radians=True, lons/lats are radians instead of degrees.\n        ";
static PyObject *__pyx_f_6pyproj_4Proj__fwd(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_lons = 0;
  PyObject *__pyx_v_lats = 0;
  PyObject *__pyx_v_radians = 0;
  projUV __pyx_v_projxyout;
  projUV __pyx_v_projlonlatin;
  int __pyx_v_ndim;
  int __pyx_v_i;
  int __pyx_v_buflenx;
  int __pyx_v_bufleny;
  double __pyx_v_u;
  double __pyx_v_v;
  double (*__pyx_v_lonsdata);
  double (*__pyx_v_latsdata);
  void (*__pyx_v_londata);
  void (*__pyx_v_latdata);
  PyObject *__pyx_r;
  int __pyx_1;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  static char *__pyx_argnames[] = {"lons","lats","radians",0};
  __pyx_v_radians = __pyx_k6;
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO|O", __pyx_argnames, &__pyx_v_lons, &__pyx_v_lats, &__pyx_v_radians)) return 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_lons);
  Py_INCREF(__pyx_v_lats);
  Py_INCREF(__pyx_v_radians);

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":170 */
  __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lons,(&__pyx_v_londata),(&__pyx_v_buflenx)) != 0);
  if (__pyx_1) {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":171 */
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_RuntimeError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; goto __pyx_L1;}
    __Pyx_Raise(__pyx_2, 0, 0);
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; goto __pyx_L1;}
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":172 */
  __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lats,(&__pyx_v_latdata),(&__pyx_v_bufleny)) != 0);
  if (__pyx_1) {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":173 */
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_RuntimeError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; goto __pyx_L1;}
    __Pyx_Raise(__pyx_2, 0, 0);
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; goto __pyx_L1;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":175 */
  __pyx_1 = (__pyx_v_buflenx != __pyx_v_bufleny);
  if (__pyx_1) {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":176 */
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_RuntimeError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; goto __pyx_L1;}
    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; goto __pyx_L1;}
    Py_INCREF(__pyx_k26p);
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k26p);
    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    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 = 176; goto __pyx_L1;}
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":177 */
  __pyx_v_ndim = (__pyx_v_buflenx / __pyx_v_6pyproj__doublesize);

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":178 */
  __pyx_v_lonsdata = ((double (*))__pyx_v_londata);

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":179 */
  __pyx_v_latsdata = ((double (*))__pyx_v_latdata);

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":180 */
  __pyx_1 = PyObject_IsTrue(__pyx_v_radians); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; goto __pyx_L1;}
  if (__pyx_1) {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":181 */
    for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_ndim; ++__pyx_v_i) {

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":182 */
      __pyx_v_projlonlatin.u = (__pyx_v_lonsdata[__pyx_v_i]);

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":183 */
      __pyx_v_projlonlatin.v = (__pyx_v_latsdata[__pyx_v_i]);

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":184 */
      __pyx_v_projxyout = pj_fwd(__pyx_v_projlonlatin,((struct __pyx_obj_6pyproj_Proj *)__pyx_v_self)->projpj);

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":185 */
      (__pyx_v_lonsdata[__pyx_v_i]) = __pyx_v_projxyout.u;

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":186 */
      (__pyx_v_latsdata[__pyx_v_i]) = __pyx_v_projxyout.v;
      __pyx_L6:;
    }
    __pyx_L7:;
    goto __pyx_L5;
  }
  /*else*/ {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":188 */
    for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_ndim; ++__pyx_v_i) {

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":189 */
      __pyx_v_projlonlatin.u = (__pyx_v_6pyproj__dg2rad * (__pyx_v_lonsdata[__pyx_v_i]));

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":190 */
      __pyx_v_projlonlatin.v = (__pyx_v_6pyproj__dg2rad * (__pyx_v_latsdata[__pyx_v_i]));

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":191 */
      __pyx_v_projxyout = pj_fwd(__pyx_v_projlonlatin,((struct __pyx_obj_6pyproj_Proj *)__pyx_v_self)->projpj);

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":192 */
      (__pyx_v_lonsdata[__pyx_v_i]) = __pyx_v_projxyout.u;

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":193 */
      (__pyx_v_latsdata[__pyx_v_i]) = __pyx_v_projxyout.v;
      __pyx_L8:;
    }
    __pyx_L9:;
  }
  __pyx_L5:;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":194 */
  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; goto __pyx_L1;}
  Py_INCREF(__pyx_v_lons);
  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_lons);
  Py_INCREF(__pyx_v_lats);
  PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_lats);
  __pyx_r = __pyx_2;
  __pyx_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  __Pyx_AddTraceback("pyproj.Proj._fwd");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_lons);
  Py_DECREF(__pyx_v_lats);
  Py_DECREF(__pyx_v_radians);
  return __pyx_r;
}

static PyObject *__pyx_k27p;

static char (__pyx_k27[]) = "Buffer lengths not the same";

static PyObject *__pyx_f_6pyproj_4Proj__inv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pyproj_4Proj__inv[] = "\n inverse transformation - x,y to lons,lats.\n if radians=True, lons/lats are radians instead of degrees.\n        ";
static PyObject *__pyx_f_6pyproj_4Proj__inv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_y = 0;
  PyObject *__pyx_v_radians = 0;
  projUV __pyx_v_projxyin;
  projUV __pyx_v_projlonlatout;
  int __pyx_v_ndim;
  int __pyx_v_i;
  int __pyx_v_buflenx;
  int __pyx_v_bufleny;
  double __pyx_v_u;
  double __pyx_v_v;
  void (*__pyx_v_xdata);
  void (*__pyx_v_ydata);
  double (*__pyx_v_xdatab);
  double (*__pyx_v_ydatab);
  PyObject *__pyx_r;
  int __pyx_1;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  static char *__pyx_argnames[] = {"x","y","radians",0};
  __pyx_v_radians = __pyx_k7;
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO|O", __pyx_argnames, &__pyx_v_x, &__pyx_v_y, &__pyx_v_radians)) return 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_x);
  Py_INCREF(__pyx_v_y);
  Py_INCREF(__pyx_v_radians);

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":207 */
  __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_x,(&__pyx_v_xdata),(&__pyx_v_buflenx)) != 0);
  if (__pyx_1) {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":208 */
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_RuntimeError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; goto __pyx_L1;}
    __Pyx_Raise(__pyx_2, 0, 0);
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; goto __pyx_L1;}
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":209 */
  __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_y,(&__pyx_v_ydata),(&__pyx_v_bufleny)) != 0);
  if (__pyx_1) {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":210 */
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_RuntimeError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; goto __pyx_L1;}
    __Pyx_Raise(__pyx_2, 0, 0);
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; goto __pyx_L1;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":213 */
  __pyx_1 = (__pyx_v_buflenx != __pyx_v_bufleny);
  if (__pyx_1) {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":214 */
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_RuntimeError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; goto __pyx_L1;}
    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; goto __pyx_L1;}
    Py_INCREF(__pyx_k27p);
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k27p);
    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    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 = 214; goto __pyx_L1;}
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":215 */
  __pyx_v_ndim = (__pyx_v_buflenx / __pyx_v_6pyproj__doublesize);

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":216 */
  __pyx_v_xdatab = ((double (*))__pyx_v_xdata);

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":217 */
  __pyx_v_ydatab = ((double (*))__pyx_v_ydata);

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":218 */
  __pyx_1 = PyObject_IsTrue(__pyx_v_radians); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; goto __pyx_L1;}
  if (__pyx_1) {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":219 */
    for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_ndim; ++__pyx_v_i) {

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":220 */
      __pyx_v_projxyin.u = (__pyx_v_xdatab[__pyx_v_i]);

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":221 */
      __pyx_v_projxyin.v = (__pyx_v_ydatab[__pyx_v_i]);

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":222 */
      __pyx_v_projlonlatout = pj_inv(__pyx_v_projxyin,((struct __pyx_obj_6pyproj_Proj *)__pyx_v_self)->projpj);

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":223 */
      (__pyx_v_xdatab[__pyx_v_i]) = __pyx_v_projlonlatout.u;

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":224 */
      (__pyx_v_ydatab[__pyx_v_i]) = __pyx_v_projlonlatout.v;
      __pyx_L6:;
    }
    __pyx_L7:;
    goto __pyx_L5;
  }
  /*else*/ {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":226 */
    for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_ndim; ++__pyx_v_i) {

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":227 */
      __pyx_v_projxyin.u = (__pyx_v_xdatab[__pyx_v_i]);

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":228 */
      __pyx_v_projxyin.v = (__pyx_v_ydatab[__pyx_v_i]);

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":229 */
      __pyx_v_projlonlatout = pj_inv(__pyx_v_projxyin,((struct __pyx_obj_6pyproj_Proj *)__pyx_v_self)->projpj);

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":230 */
      (__pyx_v_xdatab[__pyx_v_i]) = (__pyx_v_6pyproj__rad2dg * __pyx_v_projlonlatout.u);

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":231 */
      (__pyx_v_ydatab[__pyx_v_i]) = (__pyx_v_6pyproj__rad2dg * __pyx_v_projlonlatout.v);
      __pyx_L8:;
    }
    __pyx_L9:;
  }
  __pyx_L5:;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":232 */
  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; goto __pyx_L1;}
  Py_INCREF(__pyx_v_x);
  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_x);
  Py_INCREF(__pyx_v_y);
  PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_y);
  __pyx_r = __pyx_2;
  __pyx_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  __Pyx_AddTraceback("pyproj.Proj._inv");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_x);
  Py_DECREF(__pyx_v_y);
  Py_DECREF(__pyx_v_radians);
  return __pyx_r;
}

static PyObject *__pyx_n_hasattr;
static PyObject *__pyx_n_shape;
static PyObject *__pyx_n_float;
static PyObject *__pyx_n_typecode;
static PyObject *__pyx_n_astype;
static PyObject *__pyx_n_d;
static PyObject *__pyx_n_dtype;
static PyObject *__pyx_n_char;
static PyObject *__pyx_n_type;
static PyObject *__pyx_n_True;
static PyObject *__pyx_n_TypeError;
static PyObject *__pyx_n__inv;
static PyObject *__pyx_n__fwd;
static PyObject *__pyx_n_tolist;

static PyObject *__pyx_k40p;

static char (__pyx_k40[]) = "lon and latmust be arrays, lists/tuples or scalars (and they must all be of the same type)";

static PyObject *__pyx_f_6pyproj_4Proj___call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pyproj_4Proj___call__[] = "\n Calling a Proj class instance with the arguments lon, lat will\n convert lon/lat (in degrees) to x/y native map projection \n coordinates (in meters).  If optional keyword \'inverse\' is\n True (default is False), the inverse transformation from x/y\n to lon/lat is performed.  If optional keyword \'radians\' is\n True (default is False) the units of lon/lat are radians instead\n of degrees.\n\n Inputs should be doubles (they will be cast to doubles\n if they are not, causing a slight performance hit).\n\n Works with Numeric/numarray/numpy/regular python arrays,\n python lists/tuples or scalars (fastest for arrays).\n        ";
static PyObject *__pyx_f_6pyproj_4Proj___call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_lon = 0;
  PyObject *__pyx_v_lat = 0;
  PyObject *__pyx_v_inverse = 0;
  PyObject *__pyx_v_radians = 0;
  PyObject *__pyx_v_isfloat;
  PyObject *__pyx_v_islist;
  PyObject *__pyx_v_inx;
  PyObject *__pyx_v_iny;
  PyObject *__pyx_v_outx;
  PyObject *__pyx_v_outy;
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  int __pyx_4;
  PyObject *__pyx_5 = 0;
  static char *__pyx_argnames[] = {"lon","lat","inverse","radians",0};
  __pyx_v_inverse = __pyx_k8;
  __pyx_v_radians = __pyx_k9;
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO|OO", __pyx_argnames, &__pyx_v_lon, &__pyx_v_lat, &__pyx_v_inverse, &__pyx_v_radians)) return 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_lon);
  Py_INCREF(__pyx_v_lat);
  Py_INCREF(__pyx_v_inverse);
  Py_INCREF(__pyx_v_radians);
  __pyx_v_isfloat = Py_None; Py_INCREF(Py_None);
  __pyx_v_islist = Py_None; Py_INCREF(Py_None);
  __pyx_v_inx = Py_None; Py_INCREF(Py_None);
  __pyx_v_iny = Py_None; Py_INCREF(Py_None);
  __pyx_v_outx = Py_None; Py_INCREF(Py_None);
  __pyx_v_outy = Py_None; Py_INCREF(Py_None);

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":251 */
  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; goto __pyx_L1;}
  Py_DECREF(__pyx_v_isfloat);
  __pyx_v_isfloat = __pyx_1;
  __pyx_1 = 0;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":251 */
  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; goto __pyx_L1;}
  Py_DECREF(__pyx_v_islist);
  __pyx_v_islist = __pyx_1;
  __pyx_1 = 0;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":254 */
  __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_hasattr); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; goto __pyx_L1;}
  __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; goto __pyx_L1;}
  Py_INCREF(__pyx_v_lon);
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_lon);
  Py_INCREF(__pyx_n_shape);
  PyTuple_SET_ITEM(__pyx_3, 1, __pyx_n_shape);
  __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  __pyx_4 = PyObject_IsTrue(__pyx_1); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; goto __pyx_L1;}
  if (__pyx_4) {
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    __pyx_2 = PyObject_GetAttr(__pyx_v_lon, __pyx_n_shape); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; goto __pyx_L1;}
    __pyx_3 = PyTuple_New(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; goto __pyx_L1;}
    if (PyObject_Cmp(__pyx_2, __pyx_3, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; goto __pyx_L1;}
    __pyx_4 = __pyx_4 == 0;
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    __pyx_1 = PyInt_FromLong(__pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; goto __pyx_L1;}
  }
  __pyx_4 = PyObject_IsTrue(__pyx_1); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  if (__pyx_4) {
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_float); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; goto __pyx_L1;}
    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; goto __pyx_L1;}
    Py_INCREF(__pyx_v_lon);
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_lon);
    __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_v_lon);
    __pyx_v_lon = __pyx_1;
    __pyx_1 = 0;
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":255 */
  __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_hasattr); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; goto __pyx_L1;}
  __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; goto __pyx_L1;}
  Py_INCREF(__pyx_v_lat);
  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_lat);
  Py_INCREF(__pyx_n_shape);
  PyTuple_SET_ITEM(__pyx_1, 1, __pyx_n_shape);
  __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_4 = PyObject_IsTrue(__pyx_2); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; goto __pyx_L1;}
  if (__pyx_4) {
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_3 = PyObject_GetAttr(__pyx_v_lat, __pyx_n_shape); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; goto __pyx_L1;}
    __pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; goto __pyx_L1;}
    if (PyObject_Cmp(__pyx_3, __pyx_1, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; goto __pyx_L1;}
    __pyx_4 = __pyx_4 == 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    __pyx_2 = PyInt_FromLong(__pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; goto __pyx_L1;}
  }
  __pyx_4 = PyObject_IsTrue(__pyx_2); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  if (__pyx_4) {
    __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_float); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; goto __pyx_L1;}
    __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; goto __pyx_L1;}
    Py_INCREF(__pyx_v_lat);
    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_lat);
    __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_v_lat);
    __pyx_v_lat = __pyx_2;
    __pyx_2 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":256 */
  /*try:*/ {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":259 */
    __pyx_3 = PyObject_GetAttr(__pyx_v_lon, __pyx_n_typecode); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; goto __pyx_L4;}
    __pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; goto __pyx_L4;}
    __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; goto __pyx_L4;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_2); __pyx_2 = 0;

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":260 */
    __pyx_3 = PyObject_GetAttr(__pyx_v_lat, __pyx_n_typecode); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; goto __pyx_L4;}
    __pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; goto __pyx_L4;}
    __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; goto __pyx_L4;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_2); __pyx_2 = 0;

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":261 */
    __pyx_3 = PyObject_GetAttr(__pyx_v_lon, __pyx_n_astype); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; goto __pyx_L4;}
    __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; goto __pyx_L4;}
    Py_INCREF(__pyx_n_d);
    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_n_d);
    __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; goto __pyx_L4;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_v_inx);
    __pyx_v_inx = __pyx_2;
    __pyx_2 = 0;

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":262 */
    __pyx_3 = PyObject_GetAttr(__pyx_v_lat, __pyx_n_astype); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; goto __pyx_L4;}
    __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; goto __pyx_L4;}
    Py_INCREF(__pyx_n_d);
    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_n_d);
    __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; goto __pyx_L4;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_v_iny);
    __pyx_v_iny = __pyx_2;
    __pyx_2 = 0;
  }
  goto __pyx_L5;
  __pyx_L4:;
  Py_XDECREF(__pyx_3); __pyx_3 = 0;
  Py_XDECREF(__pyx_1); __pyx_1 = 0;
  Py_XDECREF(__pyx_2); __pyx_2 = 0;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":263 */
  /*except:*/ {
    __Pyx_AddTraceback("pyproj.__call__");
    __pyx_3 = __Pyx_GetExcValue(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":264 */
    /*try:*/ {

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":265 */
      __pyx_1 = PyObject_GetAttr(__pyx_v_lon, __pyx_n_dtype); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; goto __pyx_L6;}
      __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_char); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; goto __pyx_L6;}
      Py_DECREF(__pyx_1); __pyx_1 = 0;
      Py_DECREF(__pyx_2); __pyx_2 = 0;

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":266 */
      __pyx_3 = PyObject_GetAttr(__pyx_v_lat, __pyx_n_dtype); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; goto __pyx_L6;}
      __pyx_1 = PyObject_GetAttr(__pyx_3, __pyx_n_char); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; goto __pyx_L6;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      Py_DECREF(__pyx_1); __pyx_1 = 0;

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":267 */
      __pyx_2 = PyObject_GetAttr(__pyx_v_lon, __pyx_n_astype); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; goto __pyx_L6;}
      __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; goto __pyx_L6;}
      Py_INCREF(__pyx_n_d);
      PyTuple_SET_ITEM(__pyx_3, 0, __pyx_n_d);
      __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; goto __pyx_L6;}
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      Py_DECREF(__pyx_v_inx);
      __pyx_v_inx = __pyx_1;
      __pyx_1 = 0;

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":268 */
      __pyx_2 = PyObject_GetAttr(__pyx_v_lat, __pyx_n_astype); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; goto __pyx_L6;}
      __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; goto __pyx_L6;}
      Py_INCREF(__pyx_n_d);
      PyTuple_SET_ITEM(__pyx_3, 0, __pyx_n_d);
      __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; goto __pyx_L6;}
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      Py_DECREF(__pyx_v_iny);
      __pyx_v_iny = __pyx_1;
      __pyx_1 = 0;
    }
    goto __pyx_L7;
    __pyx_L6:;
    Py_XDECREF(__pyx_2); __pyx_2 = 0;
    Py_XDECREF(__pyx_3); __pyx_3 = 0;
    Py_XDECREF(__pyx_1); __pyx_1 = 0;

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":269 */
    /*except:*/ {
      __Pyx_AddTraceback("pyproj.__call__");
      __pyx_2 = __Pyx_GetExcValue(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; goto __pyx_L1;}
      Py_DECREF(__pyx_2); __pyx_2 = 0;

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":271 */
      /*try:*/ {

        /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":272 */
        __pyx_3 = PyObject_GetAttr(__pyx_v_lon, __pyx_n_typecode); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; goto __pyx_L8;}
        Py_DECREF(__pyx_3); __pyx_3 = 0;

        /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":273 */
        __pyx_1 = PyObject_GetAttr(__pyx_v_lat, __pyx_n_typecode); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; goto __pyx_L8;}
        Py_DECREF(__pyx_1); __pyx_1 = 0;

        /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":274 */
        __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_array); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; goto __pyx_L8;}
        __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_array); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; goto __pyx_L8;}
        Py_DECREF(__pyx_2); __pyx_2 = 0;
        __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; goto __pyx_L8;}
        Py_INCREF(__pyx_n_d);
        PyTuple_SET_ITEM(__pyx_1, 0, __pyx_n_d);
        Py_INCREF(__pyx_v_lon);
        PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_lon);
        __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; goto __pyx_L8;}
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        Py_DECREF(__pyx_1); __pyx_1 = 0;
        Py_DECREF(__pyx_v_inx);
        __pyx_v_inx = __pyx_2;
        __pyx_2 = 0;

        /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":275 */
        __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_array); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L8;}
        __pyx_1 = PyObject_GetAttr(__pyx_3, __pyx_n_array); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L8;}
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L8;}
        Py_INCREF(__pyx_n_d);
        PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_d);
        Py_INCREF(__pyx_v_lat);
        PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_lat);
        __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L8;}
        Py_DECREF(__pyx_1); __pyx_1 = 0;
        Py_DECREF(__pyx_2); __pyx_2 = 0;
        Py_DECREF(__pyx_v_iny);
        __pyx_v_iny = __pyx_3;
        __pyx_3 = 0;
      }
      goto __pyx_L9;
      __pyx_L8:;
      Py_XDECREF(__pyx_1); __pyx_1 = 0;
      Py_XDECREF(__pyx_2); __pyx_2 = 0;
      Py_XDECREF(__pyx_3); __pyx_3 = 0;

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":276 */
      /*except:*/ {
        __Pyx_AddTraceback("pyproj.__call__");
        __pyx_1 = __Pyx_GetExcValue(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; goto __pyx_L1;}
        Py_DECREF(__pyx_1); __pyx_1 = 0;

        /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":280 */
        __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_type); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; goto __pyx_L1;}
        __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; goto __pyx_L1;}
        Py_INCREF(__pyx_v_lon);
        PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_lon);
        __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; goto __pyx_L1;}
        Py_DECREF(__pyx_2); __pyx_2 = 0;
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__seqtype); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; goto __pyx_L1;}
        __pyx_4 = PySequence_Contains(__pyx_2, __pyx_1); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; goto __pyx_L1;}
        Py_DECREF(__pyx_1); __pyx_1 = 0;
        Py_DECREF(__pyx_2); __pyx_2 = 0;
        if (__pyx_4) {
          __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_type); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; goto __pyx_L1;}
          __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; goto __pyx_L1;}
          Py_INCREF(__pyx_v_lat);
          PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_lat);
          __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; goto __pyx_L1;}
          Py_DECREF(__pyx_3); __pyx_3 = 0;
          Py_DECREF(__pyx_1); __pyx_1 = 0;
          __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__seqtype); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; goto __pyx_L1;}
          __pyx_4 = PySequence_Contains(__pyx_3, __pyx_2); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; goto __pyx_L1;}
          Py_DECREF(__pyx_2); __pyx_2 = 0;
          Py_DECREF(__pyx_3); __pyx_3 = 0;
        }
        if (__pyx_4) {

          /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":281 */
          __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_array); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; goto __pyx_L1;}
          __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_array); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; goto __pyx_L1;}
          Py_DECREF(__pyx_1); __pyx_1 = 0;
          __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; goto __pyx_L1;}
          Py_INCREF(__pyx_n_d);
          PyTuple_SET_ITEM(__pyx_3, 0, __pyx_n_d);
          Py_INCREF(__pyx_v_lon);
          PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_lon);
          __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; goto __pyx_L1;}
          Py_DECREF(__pyx_2); __pyx_2 = 0;
          Py_DECREF(__pyx_3); __pyx_3 = 0;
          Py_DECREF(__pyx_v_inx);
          __pyx_v_inx = __pyx_1;
          __pyx_1 = 0;

          /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":282 */
          __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_array); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; goto __pyx_L1;}
          __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_array); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; goto __pyx_L1;}
          Py_DECREF(__pyx_2); __pyx_2 = 0;
          __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; goto __pyx_L1;}
          Py_INCREF(__pyx_n_d);
          PyTuple_SET_ITEM(__pyx_1, 0, __pyx_n_d);
          Py_INCREF(__pyx_v_lat);
          PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_lat);
          __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; goto __pyx_L1;}
          Py_DECREF(__pyx_3); __pyx_3 = 0;
          Py_DECREF(__pyx_1); __pyx_1 = 0;
          Py_DECREF(__pyx_v_iny);
          __pyx_v_iny = __pyx_2;
          __pyx_2 = 0;

          /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":283 */
          __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; goto __pyx_L1;}
          Py_DECREF(__pyx_v_islist);
          __pyx_v_islist = __pyx_3;
          __pyx_3 = 0;
          goto __pyx_L10;
        }
        /*else*/ {

          /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":286 */
          /*try:*/ {

            /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":287 */
            __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_float); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; goto __pyx_L11;}
            __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; goto __pyx_L11;}
            Py_INCREF(__pyx_v_lon);
            PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_lon);
            __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; goto __pyx_L11;}
            Py_DECREF(__pyx_1); __pyx_1 = 0;
            Py_DECREF(__pyx_2); __pyx_2 = 0;
            Py_DECREF(__pyx_v_lon);
            __pyx_v_lon = __pyx_3;
            __pyx_3 = 0;

            /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":288 */
            __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_float); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; goto __pyx_L11;}
            __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; goto __pyx_L11;}
            Py_INCREF(__pyx_v_lat);
            PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_lat);
            __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; goto __pyx_L11;}
            Py_DECREF(__pyx_1); __pyx_1 = 0;
            Py_DECREF(__pyx_2); __pyx_2 = 0;
            Py_DECREF(__pyx_v_lat);
            __pyx_v_lat = __pyx_3;
            __pyx_3 = 0;

            /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":289 */
            __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_array); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; goto __pyx_L11;}
            __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_array); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; goto __pyx_L11;}
            Py_DECREF(__pyx_1); __pyx_1 = 0;
            __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; goto __pyx_L11;}
            Py_INCREF(__pyx_v_lon);
            PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_lon);
            __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; goto __pyx_L11;}
            Py_INCREF(__pyx_n_d);
            PyTuple_SET_ITEM(__pyx_1, 0, __pyx_n_d);
            PyTuple_SET_ITEM(__pyx_1, 1, __pyx_3);
            __pyx_3 = 0;
            __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; goto __pyx_L11;}
            Py_DECREF(__pyx_2); __pyx_2 = 0;
            Py_DECREF(__pyx_1); __pyx_1 = 0;
            Py_DECREF(__pyx_v_inx);
            __pyx_v_inx = __pyx_3;
            __pyx_3 = 0;

            /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":290 */
            __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_array); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; goto __pyx_L11;}
            __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_array); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; goto __pyx_L11;}
            Py_DECREF(__pyx_2); __pyx_2 = 0;
            __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; goto __pyx_L11;}
            Py_INCREF(__pyx_v_lat);
            PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_lat);
            __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; goto __pyx_L11;}
            Py_INCREF(__pyx_n_d);
            PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_d);
            PyTuple_SET_ITEM(__pyx_2, 1, __pyx_3);
            __pyx_3 = 0;
            __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; goto __pyx_L11;}
            Py_DECREF(__pyx_1); __pyx_1 = 0;
            Py_DECREF(__pyx_2); __pyx_2 = 0;
            Py_DECREF(__pyx_v_iny);
            __pyx_v_iny = __pyx_3;
            __pyx_3 = 0;

            /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":291 */
            __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; goto __pyx_L11;}
            Py_DECREF(__pyx_v_isfloat);
            __pyx_v_isfloat = __pyx_1;
            __pyx_1 = 0;
          }
          goto __pyx_L12;
          __pyx_L11:;
          Py_XDECREF(__pyx_2); __pyx_2 = 0;
          Py_XDECREF(__pyx_3); __pyx_3 = 0;
          Py_XDECREF(__pyx_1); __pyx_1 = 0;

          /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":292 */
          /*except:*/ {
            __Pyx_AddTraceback("pyproj.__call__");
            __pyx_2 = __Pyx_GetExcValue(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; goto __pyx_L1;}
            Py_DECREF(__pyx_2); __pyx_2 = 0;

            /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":293 */
            __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_TypeError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; goto __pyx_L1;}
            __Pyx_Raise(__pyx_3, __pyx_k40p, 0);
            Py_DECREF(__pyx_3); __pyx_3 = 0;
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; goto __pyx_L1;}
            goto __pyx_L12;
          }
          __pyx_L12:;
        }
        __pyx_L10:;
        goto __pyx_L9;
      }
      __pyx_L9:;
      goto __pyx_L7;
    }
    __pyx_L7:;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":295 */
  __pyx_4 = PyObject_IsTrue(__pyx_v_inverse); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; goto __pyx_L1;}
  if (__pyx_4) {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":296 */
    __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n__inv); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; goto __pyx_L1;}
    __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; goto __pyx_L1;}
    Py_INCREF(__pyx_v_inx);
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_inx);
    Py_INCREF(__pyx_v_iny);
    PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_iny);
    __pyx_3 = PyDict_New(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; goto __pyx_L1;}
    if (PyDict_SetItem(__pyx_3, __pyx_n_radians, __pyx_v_radians) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; goto __pyx_L1;}
    __pyx_5 = PyEval_CallObjectWithKeywords(__pyx_1, __pyx_2, __pyx_3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    __pyx_1 = __Pyx_UnpackItem(__pyx_5, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; goto __pyx_L1;}
    Py_DECREF(__pyx_v_outx);
    __pyx_v_outx = __pyx_1;
    __pyx_1 = 0;
    __pyx_2 = __Pyx_UnpackItem(__pyx_5, 1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; goto __pyx_L1;}
    Py_DECREF(__pyx_v_outy);
    __pyx_v_outy = __pyx_2;
    __pyx_2 = 0;
    if (__Pyx_EndUnpack(__pyx_5, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; goto __pyx_L1;}
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    goto __pyx_L13;
  }
  /*else*/ {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":298 */
    __pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n__fwd); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; goto __pyx_L1;}
    __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; goto __pyx_L1;}
    Py_INCREF(__pyx_v_inx);
    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_inx);
    Py_INCREF(__pyx_v_iny);
    PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_iny);
    __pyx_2 = PyDict_New(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; goto __pyx_L1;}
    if (PyDict_SetItem(__pyx_2, __pyx_n_radians, __pyx_v_radians) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; goto __pyx_L1;}
    __pyx_5 = PyEval_CallObjectWithKeywords(__pyx_3, __pyx_1, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_3 = __Pyx_UnpackItem(__pyx_5, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; goto __pyx_L1;}
    Py_DECREF(__pyx_v_outx);
    __pyx_v_outx = __pyx_3;
    __pyx_3 = 0;
    __pyx_1 = __Pyx_UnpackItem(__pyx_5, 1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; goto __pyx_L1;}
    Py_DECREF(__pyx_v_outy);
    __pyx_v_outy = __pyx_1;
    __pyx_1 = 0;
    if (__Pyx_EndUnpack(__pyx_5, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; goto __pyx_L1;}
    Py_DECREF(__pyx_5); __pyx_5 = 0;
  }
  __pyx_L13:;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":301 */
  __pyx_4 = PyObject_IsTrue(__pyx_v_isfloat); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; goto __pyx_L1;}
  if (__pyx_4) {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":302 */
    __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; goto __pyx_L1;}
    __pyx_3 = PyObject_GetItem(__pyx_v_outx, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; goto __pyx_L1;}
    __pyx_5 = PyObject_GetItem(__pyx_v_outy, __pyx_1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
    PyTuple_SET_ITEM(__pyx_2, 1, __pyx_5);
    __pyx_3 = 0;
    __pyx_5 = 0;
    __pyx_r = __pyx_2;
    __pyx_2 = 0;
    goto __pyx_L0;
    goto __pyx_L14;
  }
  __pyx_4 = PyObject_IsTrue(__pyx_v_islist); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; goto __pyx_L1;}
  if (__pyx_4) {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":305 */
    __pyx_1 = PyObject_GetAttr(__pyx_v_outx, __pyx_n_tolist); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; goto __pyx_L1;}
    __pyx_3 = PyTuple_New(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; goto __pyx_L1;}
    __pyx_5 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    __pyx_2 = PyObject_GetAttr(__pyx_v_outy, __pyx_n_tolist); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; goto __pyx_L1;}
    __pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; goto __pyx_L1;}
    __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_5);
    PyTuple_SET_ITEM(__pyx_2, 1, __pyx_3);
    __pyx_5 = 0;
    __pyx_3 = 0;
    __pyx_r = __pyx_2;
    __pyx_2 = 0;
    goto __pyx_L0;
    goto __pyx_L14;
  }
  /*else*/ {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":307 */
    __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; goto __pyx_L1;}
    Py_INCREF(__pyx_v_outx);
    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_outx);
    Py_INCREF(__pyx_v_outy);
    PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_outy);
    __pyx_r = __pyx_1;
    __pyx_1 = 0;
    goto __pyx_L0;
  }
  __pyx_L14:;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_5);
  __Pyx_AddTraceback("pyproj.Proj.__call__");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_isfloat);
  Py_DECREF(__pyx_v_islist);
  Py_DECREF(__pyx_v_inx);
  Py_DECREF(__pyx_v_iny);
  Py_DECREF(__pyx_v_outx);
  Py_DECREF(__pyx_v_outy);
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_lon);
  Py_DECREF(__pyx_v_lat);
  Py_DECREF(__pyx_v_inverse);
  Py_DECREF(__pyx_v_radians);
  return __pyx_r;
}

static PyObject *__pyx_f_6pyproj_4Proj_is_latlong(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pyproj_4Proj_is_latlong[] = "returns True if projection in geographic (lon/lat) coordinates";
static PyObject *__pyx_f_6pyproj_4Proj_is_latlong(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_i;
  PyObject *__pyx_r;
  int __pyx_1;
  PyObject *__pyx_2 = 0;
  static char *__pyx_argnames[] = {0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
  Py_INCREF(__pyx_v_self);

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":312 */
  __pyx_v_i = pj_is_latlong(((struct __pyx_obj_6pyproj_Proj *)__pyx_v_self)->projpj);

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":313 */
  __pyx_1 = __pyx_v_i;
  if (__pyx_1) {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":314 */
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; goto __pyx_L1;}
    __pyx_r = __pyx_2;
    __pyx_2 = 0;
    goto __pyx_L0;
    goto __pyx_L2;
  }
  /*else*/ {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":316 */
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; goto __pyx_L1;}
    __pyx_r = __pyx_2;
    __pyx_2 = 0;
    goto __pyx_L0;
  }
  __pyx_L2:;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_2);
  __Pyx_AddTraceback("pyproj.Proj.is_latlong");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_f_6pyproj_4Proj_is_geocent(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pyproj_4Proj_is_geocent[] = "returns True if projection in geocentric (x/y) coordinates";
static PyObject *__pyx_f_6pyproj_4Proj_is_geocent(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_i;
  PyObject *__pyx_r;
  int __pyx_1;
  PyObject *__pyx_2 = 0;
  static char *__pyx_argnames[] = {0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
  Py_INCREF(__pyx_v_self);

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":321 */
  __pyx_v_i = pj_is_geocent(((struct __pyx_obj_6pyproj_Proj *)__pyx_v_self)->projpj);

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":322 */
  __pyx_1 = __pyx_v_i;
  if (__pyx_1) {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":323 */
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; goto __pyx_L1;}
    __pyx_r = __pyx_2;
    __pyx_2 = 0;
    goto __pyx_L0;
    goto __pyx_L2;
  }
  /*else*/ {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":325 */
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; goto __pyx_L1;}
    __pyx_r = __pyx_2;
    __pyx_2 = 0;
    goto __pyx_L0;
  }
  __pyx_L2:;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_2);
  __Pyx_AddTraceback("pyproj.Proj.is_geocent");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_k61p;

static char (__pyx_k61[]) = "x, y and z must be arrays, lists/tuples or scalars (and they must all be of the same type)";

static PyObject *__pyx_f_6pyproj_transform(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pyproj_transform[] = "\n x2, y2, z2 = transform(p1, p2, x1, y1, z1, radians=False)\n\n Transform points between two coordinate systems defined\n by the Proj instances p1 and p2.\n\n The points x1,y1,z1 in the coordinate system defined by p1\n are transformed to x2,y2,z2 in the coordinate system defined by p2.\n\n z1 is optional, if it is not set it is assumed to be zero (and \n only x2 and y2 are returned).\n\n In addition to converting between cartographic and geographic\n projection coordinates, this function can take care of datum shifts\n (which cannot be done using the __call__ method of the Proj instances).\n It also allows for one of the coordinate systems to be geographic \n (proj = \'latlong\'). \n\n If optional keyword \'radians\' is True (default is False) and\n p1 is defined in geographic coordinate (pj.is_latlong() is True),\n x1,y1 is interpreted as radians instead of the default degrees.\n Similarly, if p2 is defined in geographic coordinates \n and radians=True, x2, y2 are returned in radians instead of degrees.\n if p1.is_latlong() and p2.is_latlong() both are False, the\n radians keyword has no effect.\n\n x,y and z can be Numeric/numarray/numpy or regular python arrays,\n python lists/tuples or scalars. Arrays are fastest. x,y and z must be\n all of the same type (array, list/tuple or scalar), and have the \n same length (if arrays, lists or tuples).\n For projections in geocentric coordinates, values of\n x and y are given in meters.  z is always meters.\n    ";
static PyObject *__pyx_f_6pyproj_transform(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_6pyproj_Proj *__pyx_v_p1 = 0;
  struct __pyx_obj_6pyproj_Proj *__pyx_v_p2 = 0;
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_y = 0;
  PyObject *__pyx_v_z = 0;
  PyObject *__pyx_v_radians = 0;
  PyObject *__pyx_v_isfloat;
  PyObject *__pyx_v_islist;
  PyObject *__pyx_v_inx;
  PyObject *__pyx_v_iny;
  PyObject *__pyx_v_inz;
  PyObject *__pyx_v_ierr;
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  int __pyx_4;
  PyObject *__pyx_5 = 0;
  PyObject *__pyx_6 = 0;
  static char *__pyx_argnames[] = {"p1","p2","x","y","z","radians",0};
  __pyx_v_z = __pyx_k10;
  __pyx_v_radians = __pyx_k11;
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOOO|OO", __pyx_argnames, &__pyx_v_p1, &__pyx_v_p2, &__pyx_v_x, &__pyx_v_y, &__pyx_v_z, &__pyx_v_radians)) return 0;
  Py_INCREF(__pyx_v_p1);
  Py_INCREF(__pyx_v_p2);
  Py_INCREF(__pyx_v_x);
  Py_INCREF(__pyx_v_y);
  Py_INCREF(__pyx_v_z);
  Py_INCREF(__pyx_v_radians);
  __pyx_v_isfloat = Py_None; Py_INCREF(Py_None);
  __pyx_v_islist = Py_None; Py_INCREF(Py_None);
  __pyx_v_inx = Py_None; Py_INCREF(Py_None);
  __pyx_v_iny = Py_None; Py_INCREF(Py_None);
  __pyx_v_inz = Py_None; Py_INCREF(Py_None);
  __pyx_v_ierr = Py_None; Py_INCREF(Py_None);
  if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_p1), __pyx_ptype_6pyproj_Proj, 1, "p1")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; goto __pyx_L1;}
  if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_p2), __pyx_ptype_6pyproj_Proj, 1, "p2")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; goto __pyx_L1;}

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":362 */
  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; goto __pyx_L1;}
  Py_DECREF(__pyx_v_isfloat);
  __pyx_v_isfloat = __pyx_1;
  __pyx_1 = 0;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":362 */
  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; goto __pyx_L1;}
  Py_DECREF(__pyx_v_islist);
  __pyx_v_islist = __pyx_1;
  __pyx_1 = 0;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":365 */
  __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_hasattr); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; goto __pyx_L1;}
  __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; goto __pyx_L1;}
  Py_INCREF(__pyx_v_x);
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_x);
  Py_INCREF(__pyx_n_shape);
  PyTuple_SET_ITEM(__pyx_3, 1, __pyx_n_shape);
  __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  __pyx_4 = PyObject_IsTrue(__pyx_1); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; goto __pyx_L1;}
  if (__pyx_4) {
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    __pyx_2 = PyObject_GetAttr(__pyx_v_x, __pyx_n_shape); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; goto __pyx_L1;}
    __pyx_3 = PyTuple_New(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; goto __pyx_L1;}
    if (PyObject_Cmp(__pyx_2, __pyx_3, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; goto __pyx_L1;}
    __pyx_4 = __pyx_4 == 0;
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    __pyx_1 = PyInt_FromLong(__pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; goto __pyx_L1;}
  }
  __pyx_4 = PyObject_IsTrue(__pyx_1); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  if (__pyx_4) {
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_float); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; goto __pyx_L1;}
    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; goto __pyx_L1;}
    Py_INCREF(__pyx_v_x);
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_x);
    __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_v_x);
    __pyx_v_x = __pyx_1;
    __pyx_1 = 0;
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":366 */
  __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_hasattr); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; goto __pyx_L1;}
  __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; goto __pyx_L1;}
  Py_INCREF(__pyx_v_y);
  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_y);
  Py_INCREF(__pyx_n_shape);
  PyTuple_SET_ITEM(__pyx_1, 1, __pyx_n_shape);
  __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_4 = PyObject_IsTrue(__pyx_2); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; goto __pyx_L1;}
  if (__pyx_4) {
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_3 = PyObject_GetAttr(__pyx_v_y, __pyx_n_shape); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; goto __pyx_L1;}
    __pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; goto __pyx_L1;}
    if (PyObject_Cmp(__pyx_3, __pyx_1, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; goto __pyx_L1;}
    __pyx_4 = __pyx_4 == 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    __pyx_2 = PyInt_FromLong(__pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; goto __pyx_L1;}
  }
  __pyx_4 = PyObject_IsTrue(__pyx_2); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  if (__pyx_4) {
    __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_float); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; goto __pyx_L1;}
    __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; goto __pyx_L1;}
    Py_INCREF(__pyx_v_y);
    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_y);
    __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_v_y);
    __pyx_v_y = __pyx_2;
    __pyx_2 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":367 */
  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_hasattr); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;}
  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;}
  Py_INCREF(__pyx_v_z);
  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_z);
  Py_INCREF(__pyx_n_shape);
  PyTuple_SET_ITEM(__pyx_2, 1, __pyx_n_shape);
  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_4 = PyObject_IsTrue(__pyx_3); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;}
  if (__pyx_4) {
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    __pyx_1 = PyObject_GetAttr(__pyx_v_z, __pyx_n_shape); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;}
    __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;}
    if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;}
    __pyx_4 = __pyx_4 == 0;
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_3 = PyInt_FromLong(__pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;}
  }
  __pyx_4 = PyObject_IsTrue(__pyx_3); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  if (__pyx_4) {
    __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_float); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;}
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;}
    Py_INCREF(__pyx_v_z);
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_z);
    __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_v_z);
    __pyx_v_z = __pyx_3;
    __pyx_3 = 0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":368 */
  /*try:*/ {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":371 */
    __pyx_1 = PyObject_GetAttr(__pyx_v_x, __pyx_n_typecode); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; goto __pyx_L5;}
    __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; goto __pyx_L5;}
    __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; goto __pyx_L5;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":372 */
    __pyx_1 = PyObject_GetAttr(__pyx_v_y, __pyx_n_typecode); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; goto __pyx_L5;}
    __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; goto __pyx_L5;}
    __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; goto __pyx_L5;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":373 */
    __pyx_4 = __pyx_v_z != Py_None;
    if (__pyx_4) {
      __pyx_1 = PyObject_GetAttr(__pyx_v_z, __pyx_n_typecode); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; goto __pyx_L5;}
      __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; goto __pyx_L5;}
      __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; goto __pyx_L5;}
      Py_DECREF(__pyx_1); __pyx_1 = 0;
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      goto __pyx_L7;
    }
    __pyx_L7:;

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":374 */
    __pyx_1 = PyObject_GetAttr(__pyx_v_x, __pyx_n_astype); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; goto __pyx_L5;}
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; goto __pyx_L5;}
    Py_INCREF(__pyx_n_d);
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_d);
    __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; goto __pyx_L5;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_v_inx);
    __pyx_v_inx = __pyx_3;
    __pyx_3 = 0;

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":375 */
    __pyx_1 = PyObject_GetAttr(__pyx_v_y, __pyx_n_astype); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; goto __pyx_L5;}
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; goto __pyx_L5;}
    Py_INCREF(__pyx_n_d);
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_d);
    __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; goto __pyx_L5;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_v_iny);
    __pyx_v_iny = __pyx_3;
    __pyx_3 = 0;

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":376 */
    __pyx_4 = __pyx_v_z != Py_None;
    if (__pyx_4) {

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":377 */
      __pyx_1 = PyObject_GetAttr(__pyx_v_z, __pyx_n_astype); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; goto __pyx_L5;}
      __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; goto __pyx_L5;}
      Py_INCREF(__pyx_n_d);
      PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_d);
      __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; goto __pyx_L5;}
      Py_DECREF(__pyx_1); __pyx_1 = 0;
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      Py_DECREF(__pyx_v_inz);
      __pyx_v_inz = __pyx_3;
      __pyx_3 = 0;
      goto __pyx_L8;
    }
    __pyx_L8:;
  }
  goto __pyx_L6;
  __pyx_L5:;
  Py_XDECREF(__pyx_1); __pyx_1 = 0;
  Py_XDECREF(__pyx_2); __pyx_2 = 0;
  Py_XDECREF(__pyx_3); __pyx_3 = 0;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":378 */
  /*except:*/ {
    __Pyx_AddTraceback("pyproj.transform");
    __pyx_1 = __Pyx_GetExcValue(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":379 */
    /*try:*/ {

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":380 */
      __pyx_2 = PyObject_GetAttr(__pyx_v_x, __pyx_n_dtype); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; goto __pyx_L9;}
      __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_char); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; goto __pyx_L9;}
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      Py_DECREF(__pyx_3); __pyx_3 = 0;

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":381 */
      __pyx_1 = PyObject_GetAttr(__pyx_v_y, __pyx_n_dtype); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; goto __pyx_L9;}
      __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_char); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; goto __pyx_L9;}
      Py_DECREF(__pyx_1); __pyx_1 = 0;
      Py_DECREF(__pyx_2); __pyx_2 = 0;

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":382 */
      __pyx_4 = __pyx_v_z != Py_None;
      if (__pyx_4) {
        __pyx_3 = PyObject_GetAttr(__pyx_v_z, __pyx_n_dtype); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; goto __pyx_L9;}
        __pyx_1 = PyObject_GetAttr(__pyx_3, __pyx_n_char); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; goto __pyx_L9;}
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        Py_DECREF(__pyx_1); __pyx_1 = 0;
        goto __pyx_L11;
      }
      __pyx_L11:;

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":383 */
      __pyx_2 = PyObject_GetAttr(__pyx_v_x, __pyx_n_astype); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; goto __pyx_L9;}
      __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; goto __pyx_L9;}
      Py_INCREF(__pyx_n_d);
      PyTuple_SET_ITEM(__pyx_3, 0, __pyx_n_d);
      __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; goto __pyx_L9;}
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      Py_DECREF(__pyx_v_inx);
      __pyx_v_inx = __pyx_1;
      __pyx_1 = 0;

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":384 */
      __pyx_2 = PyObject_GetAttr(__pyx_v_y, __pyx_n_astype); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; goto __pyx_L9;}
      __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; goto __pyx_L9;}
      Py_INCREF(__pyx_n_d);
      PyTuple_SET_ITEM(__pyx_3, 0, __pyx_n_d);
      __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; goto __pyx_L9;}
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      Py_DECREF(__pyx_v_iny);
      __pyx_v_iny = __pyx_1;
      __pyx_1 = 0;

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":385 */
      __pyx_4 = __pyx_v_z != Py_None;
      if (__pyx_4) {

        /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":386 */
        __pyx_2 = PyObject_GetAttr(__pyx_v_z, __pyx_n_astype); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; goto __pyx_L9;}
        __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; goto __pyx_L9;}
        Py_INCREF(__pyx_n_d);
        PyTuple_SET_ITEM(__pyx_3, 0, __pyx_n_d);
        __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; goto __pyx_L9;}
        Py_DECREF(__pyx_2); __pyx_2 = 0;
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        Py_DECREF(__pyx_v_inz);
        __pyx_v_inz = __pyx_1;
        __pyx_1 = 0;
        goto __pyx_L12;
      }
      __pyx_L12:;
    }
    goto __pyx_L10;
    __pyx_L9:;
    Py_XDECREF(__pyx_2); __pyx_2 = 0;
    Py_XDECREF(__pyx_3); __pyx_3 = 0;
    Py_XDECREF(__pyx_1); __pyx_1 = 0;

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":387 */
    /*except:*/ {
      __Pyx_AddTraceback("pyproj.transform");
      __pyx_2 = __Pyx_GetExcValue(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; goto __pyx_L1;}
      Py_DECREF(__pyx_2); __pyx_2 = 0;

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":389 */
      /*try:*/ {

        /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":390 */
        __pyx_3 = PyObject_GetAttr(__pyx_v_x, __pyx_n_typecode); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; goto __pyx_L13;}
        Py_DECREF(__pyx_3); __pyx_3 = 0;

        /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":391 */
        __pyx_1 = PyObject_GetAttr(__pyx_v_y, __pyx_n_typecode); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; goto __pyx_L13;}
        Py_DECREF(__pyx_1); __pyx_1 = 0;

        /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":392 */
        __pyx_4 = __pyx_v_z != Py_None;
        if (__pyx_4) {
          __pyx_2 = PyObject_GetAttr(__pyx_v_z, __pyx_n_typecode); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; goto __pyx_L13;}
          Py_DECREF(__pyx_2); __pyx_2 = 0;
          goto __pyx_L15;
        }
        __pyx_L15:;

        /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":393 */
        __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_array); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; goto __pyx_L13;}
        __pyx_1 = PyObject_GetAttr(__pyx_3, __pyx_n_array); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; goto __pyx_L13;}
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; goto __pyx_L13;}
        Py_INCREF(__pyx_n_d);
        PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_d);
        Py_INCREF(__pyx_v_x);
        PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_x);
        __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; goto __pyx_L13;}
        Py_DECREF(__pyx_1); __pyx_1 = 0;
        Py_DECREF(__pyx_2); __pyx_2 = 0;
        Py_DECREF(__pyx_v_inx);
        __pyx_v_inx = __pyx_3;
        __pyx_3 = 0;

        /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":394 */
        __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_array); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; goto __pyx_L13;}
        __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_array); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; goto __pyx_L13;}
        Py_DECREF(__pyx_1); __pyx_1 = 0;
        __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; goto __pyx_L13;}
        Py_INCREF(__pyx_n_d);
        PyTuple_SET_ITEM(__pyx_3, 0, __pyx_n_d);
        Py_INCREF(__pyx_v_y);
        PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_y);
        __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; goto __pyx_L13;}
        Py_DECREF(__pyx_2); __pyx_2 = 0;
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        Py_DECREF(__pyx_v_iny);
        __pyx_v_iny = __pyx_1;
        __pyx_1 = 0;

        /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":395 */
        __pyx_4 = __pyx_v_z != Py_None;
        if (__pyx_4) {

          /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":396 */
          __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_array); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; goto __pyx_L13;}
          __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_array); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; goto __pyx_L13;}
          Py_DECREF(__pyx_2); __pyx_2 = 0;
          __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; goto __pyx_L13;}
          Py_INCREF(__pyx_n_d);
          PyTuple_SET_ITEM(__pyx_1, 0, __pyx_n_d);
          Py_INCREF(__pyx_v_z);
          PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_z);
          __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; goto __pyx_L13;}
          Py_DECREF(__pyx_3); __pyx_3 = 0;
          Py_DECREF(__pyx_1); __pyx_1 = 0;
          Py_DECREF(__pyx_v_inz);
          __pyx_v_inz = __pyx_2;
          __pyx_2 = 0;
          goto __pyx_L16;
        }
        __pyx_L16:;
      }
      goto __pyx_L14;
      __pyx_L13:;
      Py_XDECREF(__pyx_3); __pyx_3 = 0;
      Py_XDECREF(__pyx_1); __pyx_1 = 0;
      Py_XDECREF(__pyx_2); __pyx_2 = 0;

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":397 */
      /*except:*/ {
        __Pyx_AddTraceback("pyproj.transform");
        __pyx_3 = __Pyx_GetExcValue(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; goto __pyx_L1;}
        Py_DECREF(__pyx_3); __pyx_3 = 0;

        /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":400 */
        __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L1;}
        __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L1;}
        Py_INCREF(__pyx_v_x);
        PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_x);
        __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L1;}
        Py_DECREF(__pyx_1); __pyx_1 = 0;
        Py_DECREF(__pyx_2); __pyx_2 = 0;
        __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__seqtype); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L1;}
        __pyx_4 = PySequence_Contains(__pyx_1, __pyx_3); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L1;}
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        Py_DECREF(__pyx_1); __pyx_1 = 0;
        if (__pyx_4) {
          __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_type); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L1;}
          __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L1;}
          Py_INCREF(__pyx_v_y);
          PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_y);
          __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L1;}
          Py_DECREF(__pyx_2); __pyx_2 = 0;
          Py_DECREF(__pyx_3); __pyx_3 = 0;
          __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__seqtype); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L1;}
          __pyx_4 = PySequence_Contains(__pyx_2, __pyx_1); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L1;}
          Py_DECREF(__pyx_1); __pyx_1 = 0;
          Py_DECREF(__pyx_2); __pyx_2 = 0;
          if (__pyx_4) {
            __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_type); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L1;}
            __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L1;}
            Py_INCREF(__pyx_v_z);
            PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_z);
            __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L1;}
            Py_DECREF(__pyx_3); __pyx_3 = 0;
            Py_DECREF(__pyx_1); __pyx_1 = 0;
            __pyx_4 = __pyx_2 == Py_None;
            Py_DECREF(__pyx_2); __pyx_2 = 0;
            if (!__pyx_4) {
              __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_type); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L1;}
              __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L1;}
              Py_INCREF(__pyx_v_z);
              PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_z);
              __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L1;}
              Py_DECREF(__pyx_3); __pyx_3 = 0;
              Py_DECREF(__pyx_1); __pyx_1 = 0;
              __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__seqtype); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L1;}
              __pyx_4 = PySequence_Contains(__pyx_3, __pyx_2); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L1;}
              Py_DECREF(__pyx_2); __pyx_2 = 0;
              Py_DECREF(__pyx_3); __pyx_3 = 0;
            }
          }
        }
        if (__pyx_4) {

          /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":401 */
          __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_array); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; goto __pyx_L1;}
          __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_array); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; goto __pyx_L1;}
          Py_DECREF(__pyx_1); __pyx_1 = 0;
          __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; goto __pyx_L1;}
          Py_INCREF(__pyx_n_d);
          PyTuple_SET_ITEM(__pyx_3, 0, __pyx_n_d);
          Py_INCREF(__pyx_v_x);
          PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_x);
          __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; goto __pyx_L1;}
          Py_DECREF(__pyx_2); __pyx_2 = 0;
          Py_DECREF(__pyx_3); __pyx_3 = 0;
          Py_DECREF(__pyx_v_inx);
          __pyx_v_inx = __pyx_1;
          __pyx_1 = 0;

          /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":402 */
          __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_array); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; goto __pyx_L1;}
          __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_array); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; goto __pyx_L1;}
          Py_DECREF(__pyx_2); __pyx_2 = 0;
          __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; goto __pyx_L1;}
          Py_INCREF(__pyx_n_d);
          PyTuple_SET_ITEM(__pyx_1, 0, __pyx_n_d);
          Py_INCREF(__pyx_v_y);
          PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_y);
          __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; goto __pyx_L1;}
          Py_DECREF(__pyx_3); __pyx_3 = 0;
          Py_DECREF(__pyx_1); __pyx_1 = 0;
          Py_DECREF(__pyx_v_iny);
          __pyx_v_iny = __pyx_2;
          __pyx_2 = 0;

          /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":403 */
          __pyx_4 = __pyx_v_z != Py_None;
          if (__pyx_4) {

            /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":404 */
            __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_array); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; goto __pyx_L1;}
            __pyx_1 = PyObject_GetAttr(__pyx_3, __pyx_n_array); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; goto __pyx_L1;}
            Py_DECREF(__pyx_3); __pyx_3 = 0;
            __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; goto __pyx_L1;}
            Py_INCREF(__pyx_n_d);
            PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_d);
            Py_INCREF(__pyx_v_z);
            PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_z);
            __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; goto __pyx_L1;}
            Py_DECREF(__pyx_1); __pyx_1 = 0;
            Py_DECREF(__pyx_2); __pyx_2 = 0;
            Py_DECREF(__pyx_v_inz);
            __pyx_v_inz = __pyx_3;
            __pyx_3 = 0;
            goto __pyx_L18;
          }
          __pyx_L18:;

          /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":405 */
          __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; goto __pyx_L1;}
          Py_DECREF(__pyx_v_islist);
          __pyx_v_islist = __pyx_1;
          __pyx_1 = 0;
          goto __pyx_L17;
        }
        /*else*/ {

          /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":408 */
          /*try:*/ {

            /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":409 */
            __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_float); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; goto __pyx_L19;}
            __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; goto __pyx_L19;}
            Py_INCREF(__pyx_v_x);
            PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_x);
            __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; goto __pyx_L19;}
            Py_DECREF(__pyx_2); __pyx_2 = 0;
            Py_DECREF(__pyx_3); __pyx_3 = 0;
            Py_DECREF(__pyx_v_x);
            __pyx_v_x = __pyx_1;
            __pyx_1 = 0;

            /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":410 */
            __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_float); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; goto __pyx_L19;}
            __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; goto __pyx_L19;}
            Py_INCREF(__pyx_v_y);
            PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_y);
            __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; goto __pyx_L19;}
            Py_DECREF(__pyx_2); __pyx_2 = 0;
            Py_DECREF(__pyx_3); __pyx_3 = 0;
            Py_DECREF(__pyx_v_y);
            __pyx_v_y = __pyx_1;
            __pyx_1 = 0;

            /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":411 */
            __pyx_4 = __pyx_v_z != Py_None;
            if (__pyx_4) {
              __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_float); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; goto __pyx_L19;}
              __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; goto __pyx_L19;}
              Py_INCREF(__pyx_v_z);
              PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_z);
              __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; goto __pyx_L19;}
              Py_DECREF(__pyx_2); __pyx_2 = 0;
              Py_DECREF(__pyx_3); __pyx_3 = 0;
              Py_DECREF(__pyx_v_z);
              __pyx_v_z = __pyx_1;
              __pyx_1 = 0;
              goto __pyx_L21;
            }
            __pyx_L21:;

            /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":412 */
            __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_array); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; goto __pyx_L19;}
            __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_array); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; goto __pyx_L19;}
            Py_DECREF(__pyx_2); __pyx_2 = 0;
            __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; goto __pyx_L19;}
            Py_INCREF(__pyx_v_x);
            PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_x);
            __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; goto __pyx_L19;}
            Py_INCREF(__pyx_n_d);
            PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_d);
            PyTuple_SET_ITEM(__pyx_2, 1, __pyx_1);
            __pyx_1 = 0;
            __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; goto __pyx_L19;}
            Py_DECREF(__pyx_3); __pyx_3 = 0;
            Py_DECREF(__pyx_2); __pyx_2 = 0;
            Py_DECREF(__pyx_v_inx);
            __pyx_v_inx = __pyx_1;
            __pyx_1 = 0;

            /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":413 */
            __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_array); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; goto __pyx_L19;}
            __pyx_2 = PyObject_GetAttr(__pyx_3, __pyx_n_array); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; goto __pyx_L19;}
            Py_DECREF(__pyx_3); __pyx_3 = 0;
            __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; goto __pyx_L19;}
            Py_INCREF(__pyx_v_y);
            PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_y);
            __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; goto __pyx_L19;}
            Py_INCREF(__pyx_n_d);
            PyTuple_SET_ITEM(__pyx_3, 0, __pyx_n_d);
            PyTuple_SET_ITEM(__pyx_3, 1, __pyx_1);
            __pyx_1 = 0;
            __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; goto __pyx_L19;}
            Py_DECREF(__pyx_2); __pyx_2 = 0;
            Py_DECREF(__pyx_3); __pyx_3 = 0;
            Py_DECREF(__pyx_v_iny);
            __pyx_v_iny = __pyx_1;
            __pyx_1 = 0;

            /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":414 */
            __pyx_4 = __pyx_v_z != Py_None;
            if (__pyx_4) {
              __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_array); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; goto __pyx_L19;}
              __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_array); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; goto __pyx_L19;}
              Py_DECREF(__pyx_2); __pyx_2 = 0;
              __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; goto __pyx_L19;}
              Py_INCREF(__pyx_v_z);
              PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_z);
              __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; goto __pyx_L19;}
              Py_INCREF(__pyx_n_d);
              PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_d);
              PyTuple_SET_ITEM(__pyx_2, 1, __pyx_1);
              __pyx_1 = 0;
              __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; goto __pyx_L19;}
              Py_DECREF(__pyx_3); __pyx_3 = 0;
              Py_DECREF(__pyx_2); __pyx_2 = 0;
              Py_DECREF(__pyx_v_inz);
              __pyx_v_inz = __pyx_1;
              __pyx_1 = 0;
              goto __pyx_L22;
            }
            __pyx_L22:;

            /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":415 */
            __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; goto __pyx_L19;}
            Py_DECREF(__pyx_v_isfloat);
            __pyx_v_isfloat = __pyx_3;
            __pyx_3 = 0;
          }
          goto __pyx_L20;
          __pyx_L19:;
          Py_XDECREF(__pyx_2); __pyx_2 = 0;
          Py_XDECREF(__pyx_1); __pyx_1 = 0;
          Py_XDECREF(__pyx_3); __pyx_3 = 0;

          /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":416 */
          /*except:*/ {
            __Pyx_AddTraceback("pyproj.transform");
            __pyx_2 = __Pyx_GetExcValue(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; goto __pyx_L1;}
            Py_DECREF(__pyx_2); __pyx_2 = 0;

            /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":417 */
            __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_TypeError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; goto __pyx_L1;}
            __Pyx_Raise(__pyx_1, __pyx_k61p, 0);
            Py_DECREF(__pyx_1); __pyx_1 = 0;
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; goto __pyx_L1;}
            goto __pyx_L20;
          }
          __pyx_L20:;
        }
        __pyx_L17:;
        goto __pyx_L14;
      }
      __pyx_L14:;
      goto __pyx_L10;
    }
    __pyx_L10:;
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":418 */
  __pyx_3 = __pyx_f_6pyproj__transform(__pyx_v_p1,__pyx_v_p2,__pyx_v_inx,__pyx_v_iny,__pyx_v_inz,__pyx_v_radians); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; goto __pyx_L1;}
  Py_DECREF(__pyx_v_ierr);
  __pyx_v_ierr = __pyx_3;
  __pyx_3 = 0;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":419 */
  __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; goto __pyx_L1;}
  if (PyObject_Cmp(__pyx_v_ierr, __pyx_2, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; goto __pyx_L1;}
  __pyx_4 = __pyx_4 != 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  if (__pyx_4) {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":420 */
    __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_RuntimeError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; goto __pyx_L1;}
    __pyx_4 = PyInt_AsLong(__pyx_v_ierr); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; goto __pyx_L1;}
    __pyx_3 = PyString_FromString(pj_strerrno(__pyx_4)); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; goto __pyx_L1;}
    __Pyx_Raise(__pyx_1, __pyx_3, 0);
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; goto __pyx_L1;}
    goto __pyx_L23;
  }
  __pyx_L23:;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":422 */
  __pyx_4 = __pyx_v_inz != Py_None;
  if (__pyx_4) {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":423 */
    __pyx_4 = PyObject_IsTrue(__pyx_v_isfloat); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; goto __pyx_L1;}
    if (__pyx_4) {

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":424 */
      __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; goto __pyx_L1;}
      __pyx_1 = PyObject_GetItem(__pyx_v_inx, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; goto __pyx_L1;}
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      __pyx_3 = PyInt_FromLong(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; goto __pyx_L1;}
      __pyx_2 = PyObject_GetItem(__pyx_v_iny, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      __pyx_3 = PyInt_FromLong(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; goto __pyx_L1;}
      __pyx_5 = PyObject_GetItem(__pyx_v_inz, __pyx_3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      __pyx_3 = PyTuple_New(3); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; goto __pyx_L1;}
      PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1);
      PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2);
      PyTuple_SET_ITEM(__pyx_3, 2, __pyx_5);
      __pyx_1 = 0;
      __pyx_2 = 0;
      __pyx_5 = 0;
      __pyx_r = __pyx_3;
      __pyx_3 = 0;
      goto __pyx_L0;
      goto __pyx_L25;
    }
    __pyx_4 = PyObject_IsTrue(__pyx_v_islist); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; goto __pyx_L1;}
    if (__pyx_4) {

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":427 */
      __pyx_1 = PyObject_GetAttr(__pyx_v_inx, __pyx_n_tolist); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; goto __pyx_L1;}
      __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; goto __pyx_L1;}
      __pyx_5 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; goto __pyx_L1;}
      Py_DECREF(__pyx_1); __pyx_1 = 0;
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      __pyx_3 = PyObject_GetAttr(__pyx_v_iny, __pyx_n_tolist); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; goto __pyx_L1;}
      __pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; goto __pyx_L1;}
      __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      Py_DECREF(__pyx_1); __pyx_1 = 0;
      __pyx_3 = PyObject_GetAttr(__pyx_v_inz, __pyx_n_tolist); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; goto __pyx_L1;}
      __pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; goto __pyx_L1;}
      __pyx_6 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      Py_DECREF(__pyx_1); __pyx_1 = 0;
      __pyx_3 = PyTuple_New(3); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; goto __pyx_L1;}
      PyTuple_SET_ITEM(__pyx_3, 0, __pyx_5);
      PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2);
      PyTuple_SET_ITEM(__pyx_3, 2, __pyx_6);
      __pyx_5 = 0;
      __pyx_2 = 0;
      __pyx_6 = 0;
      __pyx_r = __pyx_3;
      __pyx_3 = 0;
      goto __pyx_L0;
      goto __pyx_L25;
    }
    /*else*/ {

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":429 */
      __pyx_1 = PyTuple_New(3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; goto __pyx_L1;}
      Py_INCREF(__pyx_v_inx);
      PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_inx);
      Py_INCREF(__pyx_v_iny);
      PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_iny);
      Py_INCREF(__pyx_v_inz);
      PyTuple_SET_ITEM(__pyx_1, 2, __pyx_v_inz);
      __pyx_r = __pyx_1;
      __pyx_1 = 0;
      goto __pyx_L0;
    }
    __pyx_L25:;
    goto __pyx_L24;
  }
  /*else*/ {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":431 */
    __pyx_4 = PyObject_IsTrue(__pyx_v_isfloat); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; goto __pyx_L1;}
    if (__pyx_4) {

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":432 */
      __pyx_5 = PyInt_FromLong(0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; goto __pyx_L1;}
      __pyx_2 = PyObject_GetItem(__pyx_v_inx, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; goto __pyx_L1;}
      Py_DECREF(__pyx_5); __pyx_5 = 0;
      __pyx_6 = PyInt_FromLong(0); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; goto __pyx_L1;}
      __pyx_3 = PyObject_GetItem(__pyx_v_iny, __pyx_6); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; goto __pyx_L1;}
      Py_DECREF(__pyx_6); __pyx_6 = 0;
      __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; goto __pyx_L1;}
      PyTuple_SET_ITEM(__pyx_1, 0, __pyx_2);
      PyTuple_SET_ITEM(__pyx_1, 1, __pyx_3);
      __pyx_2 = 0;
      __pyx_3 = 0;
      __pyx_r = __pyx_1;
      __pyx_1 = 0;
      goto __pyx_L0;
      goto __pyx_L26;
    }
    __pyx_4 = PyObject_IsTrue(__pyx_v_islist); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; goto __pyx_L1;}
    if (__pyx_4) {

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":435 */
      __pyx_5 = PyObject_GetAttr(__pyx_v_inx, __pyx_n_tolist); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; goto __pyx_L1;}
      __pyx_6 = PyTuple_New(0); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; goto __pyx_L1;}
      __pyx_2 = PyObject_CallObject(__pyx_5, __pyx_6); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; goto __pyx_L1;}
      Py_DECREF(__pyx_5); __pyx_5 = 0;
      Py_DECREF(__pyx_6); __pyx_6 = 0;
      __pyx_3 = PyObject_GetAttr(__pyx_v_iny, __pyx_n_tolist); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; goto __pyx_L1;}
      __pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; goto __pyx_L1;}
      __pyx_5 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      Py_DECREF(__pyx_1); __pyx_1 = 0;
      __pyx_6 = PyTuple_New(2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; goto __pyx_L1;}
      PyTuple_SET_ITEM(__pyx_6, 0, __pyx_2);
      PyTuple_SET_ITEM(__pyx_6, 1, __pyx_5);
      __pyx_2 = 0;
      __pyx_5 = 0;
      __pyx_r = __pyx_6;
      __pyx_6 = 0;
      goto __pyx_L0;
      goto __pyx_L26;
    }
    /*else*/ {

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":437 */
      __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; goto __pyx_L1;}
      Py_INCREF(__pyx_v_inx);
      PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_inx);
      Py_INCREF(__pyx_v_iny);
      PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_iny);
      __pyx_r = __pyx_3;
      __pyx_3 = 0;
      goto __pyx_L0;
    }
    __pyx_L26:;
  }
  __pyx_L24:;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_5);
  Py_XDECREF(__pyx_6);
  __Pyx_AddTraceback("pyproj.transform");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_isfloat);
  Py_DECREF(__pyx_v_islist);
  Py_DECREF(__pyx_v_inx);
  Py_DECREF(__pyx_v_iny);
  Py_DECREF(__pyx_v_inz);
  Py_DECREF(__pyx_v_ierr);
  Py_DECREF(__pyx_v_p1);
  Py_DECREF(__pyx_v_p2);
  Py_DECREF(__pyx_v_x);
  Py_DECREF(__pyx_v_y);
  Py_DECREF(__pyx_v_z);
  Py_DECREF(__pyx_v_radians);
  return __pyx_r;
}

static PyObject *__pyx_n_is_latlong;

static PyObject *__pyx_k63p;

static char (__pyx_k62[]) = "private function to call pj_transform";
static char (__pyx_k63[]) = "x,y and z must be same size";

static PyObject *__pyx_f_6pyproj__transform(struct __pyx_obj_6pyproj_Proj *__pyx_v_p1,struct __pyx_obj_6pyproj_Proj *__pyx_v_p2,PyObject *__pyx_v_inx,PyObject *__pyx_v_iny,PyObject *__pyx_v_inz,PyObject *__pyx_v_radians) {
  void (*__pyx_v_xdata);
  void (*__pyx_v_ydata);
  void (*__pyx_v_zdata);
  double (*__pyx_v_xx);
  double (*__pyx_v_yy);
  double (*__pyx_v_zz);
  int __pyx_v_buflenx;
  int __pyx_v_bufleny;
  int __pyx_v_buflenz;
  int __pyx_v_npts;
  int __pyx_v_i;
  PyObject *__pyx_v_ierr;
  PyObject *__pyx_r;
  int __pyx_1;
  PyObject *__pyx_2 = 0;
  int __pyx_3;
  PyObject *__pyx_4 = 0;
  PyObject *__pyx_5 = 0;
  Py_INCREF(__pyx_v_p1);
  Py_INCREF(__pyx_v_p2);
  Py_INCREF(__pyx_v_inx);
  Py_INCREF(__pyx_v_iny);
  Py_INCREF(__pyx_v_inz);
  Py_INCREF(__pyx_v_radians);
  __pyx_v_ierr = Py_None; Py_INCREF(Py_None);

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":440 */
  __pyx_k62;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":444 */
  __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_inx,(&__pyx_v_xdata),(&__pyx_v_buflenx)) != 0);
  if (__pyx_1) {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":445 */
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_RuntimeError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; goto __pyx_L1;}
    __Pyx_Raise(__pyx_2, 0, 0);
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; goto __pyx_L1;}
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":446 */
  __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_iny,(&__pyx_v_ydata),(&__pyx_v_bufleny)) != 0);
  if (__pyx_1) {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":447 */
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_RuntimeError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; goto __pyx_L1;}
    __Pyx_Raise(__pyx_2, 0, 0);
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; goto __pyx_L1;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":448 */
  __pyx_1 = __pyx_v_inz != Py_None;
  if (__pyx_1) {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":449 */
    __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_inz,(&__pyx_v_zdata),(&__pyx_v_buflenz)) != 0);
    if (__pyx_1) {

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":450 */
      __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_RuntimeError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; goto __pyx_L1;}
      __Pyx_Raise(__pyx_2, 0, 0);
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; goto __pyx_L1;}
      goto __pyx_L5;
    }
    __pyx_L5:;
    goto __pyx_L4;
  }
  /*else*/ {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":452 */
    __pyx_v_buflenz = __pyx_v_bufleny;
  }
  __pyx_L4:;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":453 */
  __pyx_1 = __pyx_v_buflenx == __pyx_v_bufleny;
  if (__pyx_1) {
    __pyx_1 = __pyx_v_bufleny == __pyx_v_buflenz;
  }
  __pyx_3 = (!__pyx_1);
  if (__pyx_3) {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":454 */
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_RuntimeError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; goto __pyx_L1;}
    __Pyx_Raise(__pyx_2, __pyx_k63p, 0);
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; goto __pyx_L1;}
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":455 */
  __pyx_v_xx = ((double (*))__pyx_v_xdata);

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":456 */
  __pyx_v_yy = ((double (*))__pyx_v_ydata);

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":457 */
  __pyx_1 = __pyx_v_inz != Py_None;
  if (__pyx_1) {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":458 */
    __pyx_v_zz = ((double (*))__pyx_v_zdata);
    goto __pyx_L7;
  }
  __pyx_L7:;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":459 */
  __pyx_v_npts = (__pyx_v_buflenx / 8);

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":460 */
  __pyx_3 = PyObject_IsTrue(__pyx_v_radians); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; goto __pyx_L1;}
  __pyx_2 = PyInt_FromLong((!__pyx_3)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; goto __pyx_L1;}
  __pyx_1 = PyObject_IsTrue(__pyx_2); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; goto __pyx_L1;}
  if (__pyx_1) {
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_4 = PyObject_GetAttr(((PyObject *)__pyx_v_p1), __pyx_n_is_latlong); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; goto __pyx_L1;}
    __pyx_5 = PyTuple_New(0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; goto __pyx_L1;}
    __pyx_2 = PyObject_CallObject(__pyx_4, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; goto __pyx_L1;}
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    Py_DECREF(__pyx_5); __pyx_5 = 0;
  }
  __pyx_3 = PyObject_IsTrue(__pyx_2); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  if (__pyx_3) {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":461 */
    for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_npts; ++__pyx_v_i) {

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":462 */
      (__pyx_v_xx[__pyx_v_i]) = ((__pyx_v_xx[__pyx_v_i]) * __pyx_v_6pyproj__dg2rad);

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":463 */
      (__pyx_v_yy[__pyx_v_i]) = ((__pyx_v_yy[__pyx_v_i]) * __pyx_v_6pyproj__dg2rad);
      __pyx_L9:;
    }
    __pyx_L10:;
    goto __pyx_L8;
  }
  __pyx_L8:;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":464 */
  __pyx_1 = __pyx_v_inz != Py_None;
  if (__pyx_1) {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":465 */
    __pyx_4 = PyInt_FromLong(pj_transform(__pyx_v_p1->projpj,__pyx_v_p2->projpj,__pyx_v_npts,0,__pyx_v_xx,__pyx_v_yy,__pyx_v_zz)); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; goto __pyx_L1;}
    Py_DECREF(__pyx_v_ierr);
    __pyx_v_ierr = __pyx_4;
    __pyx_4 = 0;
    goto __pyx_L11;
  }
  /*else*/ {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":467 */
    __pyx_5 = PyInt_FromLong(pj_transform(__pyx_v_p1->projpj,__pyx_v_p2->projpj,__pyx_v_npts,0,__pyx_v_xx,__pyx_v_yy,0)); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; goto __pyx_L1;}
    Py_DECREF(__pyx_v_ierr);
    __pyx_v_ierr = __pyx_5;
    __pyx_5 = 0;
  }
  __pyx_L11:;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":468 */
  __pyx_3 = PyObject_IsTrue(__pyx_v_radians); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; goto __pyx_L1;}
  __pyx_2 = PyInt_FromLong((!__pyx_3)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; goto __pyx_L1;}
  __pyx_1 = PyObject_IsTrue(__pyx_2); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; goto __pyx_L1;}
  if (__pyx_1) {
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_4 = PyObject_GetAttr(((PyObject *)__pyx_v_p2), __pyx_n_is_latlong); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; goto __pyx_L1;}
    __pyx_5 = PyTuple_New(0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; goto __pyx_L1;}
    __pyx_2 = PyObject_CallObject(__pyx_4, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; goto __pyx_L1;}
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    Py_DECREF(__pyx_5); __pyx_5 = 0;
  }
  __pyx_3 = PyObject_IsTrue(__pyx_2); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  if (__pyx_3) {

    /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":469 */
    for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_npts; ++__pyx_v_i) {

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":470 */
      (__pyx_v_xx[__pyx_v_i]) = ((__pyx_v_xx[__pyx_v_i]) * __pyx_v_6pyproj__rad2dg);

      /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":471 */
      (__pyx_v_yy[__pyx_v_i]) = ((__pyx_v_yy[__pyx_v_i]) * __pyx_v_6pyproj__rad2dg);
      __pyx_L13:;
    }
    __pyx_L14:;
    goto __pyx_L12;
  }
  __pyx_L12:;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":472 */
  Py_INCREF(__pyx_v_ierr);
  __pyx_r = __pyx_v_ierr;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_4);
  Py_XDECREF(__pyx_5);
  __Pyx_AddTraceback("pyproj._transform");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_ierr);
  Py_DECREF(__pyx_v_p1);
  Py_DECREF(__pyx_v_p2);
  Py_DECREF(__pyx_v_inx);
  Py_DECREF(__pyx_v_iny);
  Py_DECREF(__pyx_v_inz);
  Py_DECREF(__pyx_v_radians);
  return __pyx_r;
}

static __Pyx_InternTabEntry __pyx_intern_tab[] = {
  {&__pyx_n_False, "False"},
  {&__pyx_n_ListType, "ListType"},
  {&__pyx_n_RuntimeError, "RuntimeError"},
  {&__pyx_n_True, "True"},
  {&__pyx_n_TupleType, "TupleType"},
  {&__pyx_n_TypeError, "TypeError"},
  {&__pyx_n___class__, "__class__"},
  {&__pyx_n___version__, "__version__"},
  {&__pyx_n__fwd, "_fwd"},
  {&__pyx_n__inv, "_inv"},
  {&__pyx_n__seqtype, "_seqtype"},
  {&__pyx_n_append, "append"},
  {&__pyx_n_array, "array"},
  {&__pyx_n_astype, "astype"},
  {&__pyx_n_char, "char"},
  {&__pyx_n_d, "d"},
  {&__pyx_n_degrees, "degrees"},
  {&__pyx_n_dtype, "dtype"},
  {&__pyx_n_float, "float"},
  {&__pyx_n_has_key, "has_key"},
  {&__pyx_n_hasattr, "hasattr"},
  {&__pyx_n_is_latlong, "is_latlong"},
  {&__pyx_n_iteritems, "iteritems"},
  {&__pyx_n_join, "join"},
  {&__pyx_n_len, "len"},
  {&__pyx_n_m, "m"},
  {&__pyx_n_math, "math"},
  {&__pyx_n_radians, "radians"},
  {&__pyx_n_shape, "shape"},
  {&__pyx_n_str, "str"},
  {&__pyx_n_tolist, "tolist"},
  {&__pyx_n_transform, "transform"},
  {&__pyx_n_type, "type"},
  {&__pyx_n_typecode, "typecode"},
  {&__pyx_n_types, "types"},
  {&__pyx_n_units, "units"},
  {0, 0}
};

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_k4p, __pyx_k4, sizeof(__pyx_k4)},
  {&__pyx_k12p, __pyx_k12, sizeof(__pyx_k12)},
  {&__pyx_k18p, __pyx_k18, sizeof(__pyx_k18)},
  {&__pyx_k21p, __pyx_k21, sizeof(__pyx_k21)},
  {&__pyx_k22p, __pyx_k22, sizeof(__pyx_k22)},
  {&__pyx_k23p, __pyx_k23, sizeof(__pyx_k23)},
  {&__pyx_k24p, __pyx_k24, sizeof(__pyx_k24)},
  {&__pyx_k25p, __pyx_k25, sizeof(__pyx_k25)},
  {&__pyx_k26p, __pyx_k26, sizeof(__pyx_k26)},
  {&__pyx_k27p, __pyx_k27, sizeof(__pyx_k27)},
  {&__pyx_k40p, __pyx_k40, sizeof(__pyx_k40)},
  {&__pyx_k61p, __pyx_k61, sizeof(__pyx_k61)},
  {&__pyx_k63p, __pyx_k63, sizeof(__pyx_k63)},
  {0, 0, 0}
};

static PyObject *__pyx_tp_new_6pyproj_Proj(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = (*t->tp_alloc)(t, 0);
  struct __pyx_obj_6pyproj_Proj *p = (struct __pyx_obj_6pyproj_Proj *)o;
  p->projparams = Py_None; Py_INCREF(Py_None);
  p->proj_version = Py_None; Py_INCREF(Py_None);
  if (__pyx_f_6pyproj_4Proj___new__(o, a, k) < 0) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6pyproj_Proj(PyObject *o) {
  struct __pyx_obj_6pyproj_Proj *p = (struct __pyx_obj_6pyproj_Proj *)o;
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++o->ob_refcnt;
    __pyx_f_6pyproj_4Proj___dealloc__(o);
    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
    --o->ob_refcnt;
    PyErr_Restore(etype, eval, etb);
  }
  Py_XDECREF(p->projparams);
  Py_XDECREF(p->proj_version);
  (*o->ob_type->tp_free)(o);
}

static int __pyx_tp_traverse_6pyproj_Proj(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pyproj_Proj *p = (struct __pyx_obj_6pyproj_Proj *)o;
  if (p->projparams) {
    e = (*v)(p->projparams, a); if (e) return e;
  }
  if (p->proj_version) {
    e = (*v)(p->proj_version, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pyproj_Proj(PyObject *o) {
  struct __pyx_obj_6pyproj_Proj *p = (struct __pyx_obj_6pyproj_Proj *)o;
  Py_XDECREF(p->projparams);
  p->projparams = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(p->proj_version);
  p->proj_version = Py_None; Py_INCREF(Py_None);
  return 0;
}

static struct PyMethodDef __pyx_methods_6pyproj_Proj[] = {
  {"__reduce__", (PyCFunction)__pyx_f_6pyproj_4Proj___reduce__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6pyproj_4Proj___reduce__},
  {"_fwd", (PyCFunction)__pyx_f_6pyproj_4Proj__fwd, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6pyproj_4Proj__fwd},
  {"_inv", (PyCFunction)__pyx_f_6pyproj_4Proj__inv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6pyproj_4Proj__inv},
  {"is_latlong", (PyCFunction)__pyx_f_6pyproj_4Proj_is_latlong, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6pyproj_4Proj_is_latlong},
  {"is_geocent", (PyCFunction)__pyx_f_6pyproj_4Proj_is_geocent, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6pyproj_4Proj_is_geocent},
  {0, 0, 0, 0}
};

static struct PyMemberDef __pyx_members_6pyproj_Proj[] = {
  {"projparams", T_OBJECT, offsetof(struct __pyx_obj_6pyproj_Proj, projparams), 0, 0},
  {"proj_version", T_OBJECT, offsetof(struct __pyx_obj_6pyproj_Proj, proj_version), 0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_Proj = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  0, /*nb_divide*/
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  0, /*nb_coerce*/
  0, /*nb_int*/
  0, /*nb_long*/
  0, /*nb_float*/
  0, /*nb_oct*/
  0, /*nb_hex*/
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  0, /*nb_inplace_divide*/
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
};

static PySequenceMethods __pyx_tp_as_sequence_Proj = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_Proj = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_Proj = {
  0, /*bf_getreadbuffer*/
  0, /*bf_getwritebuffer*/
  0, /*bf_getsegcount*/
  0, /*bf_getcharbuffer*/
};

PyTypeObject __pyx_type_6pyproj_Proj = {
  PyObject_HEAD_INIT(0)
  0, /*ob_size*/
  "pyproj.Proj", /*tp_name*/
  sizeof(struct __pyx_obj_6pyproj_Proj), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pyproj_Proj, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_compare*/
  0, /*tp_repr*/
  &__pyx_tp_as_number_Proj, /*tp_as_number*/
  &__pyx_tp_as_sequence_Proj, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_Proj, /*tp_as_mapping*/
  0, /*tp_hash*/
  __pyx_f_6pyproj_4Proj___call__, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_Proj, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n performs cartographic transformations (converts from longitude,latitude\n to native map projection x,y coordinates and vice versa) using proj \n (http://proj.maptools.org/)\n\n A Proj class instance is initialized with \n proj map projection control parameter key/value pairs.\n The key/value pairs can either be passed in a dictionary,\n or as keyword arguments.\n See http://www.remotesensing.org/geotiff/proj_list for\n examples of key/value pairs defining different map projections.\n\n Calling a Proj class instance with the arguments lon, lat will\n convert lon/lat (in degrees) to x/y native map projection \n coordinates (in meters).  If optional keyword \'inverse\' is\n True (default is False), the inverse transformation from x/y\n to lon/lat is performed. If optional keyword \'radians\' is True\n (default is False) lon/lat are interpreted as radians instead\n of degrees. Works with numarray/Numeric/numpy/regular python\n array objects, lists, tuples or scalars (fastest for arrays). lon and\n lat must be of same type (array, list/tuple or scalar) and have the\n same length (if array, list or tuple).\n    ", /*tp_doc*/
  __pyx_tp_traverse_6pyproj_Proj, /*tp_traverse*/
  __pyx_tp_clear_6pyproj_Proj, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pyproj_Proj, /*tp_methods*/
  __pyx_members_6pyproj_Proj, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pyproj_Proj, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
};

static struct PyMethodDef __pyx_methods[] = {
  {"transform", (PyCFunction)__pyx_f_6pyproj_transform, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6pyproj_transform},
  {0, 0, 0, 0}
};

static void __pyx_init_filenames(void); /*proto*/

PyMODINIT_FUNC initpyproj(void); /*proto*/
PyMODINIT_FUNC initpyproj(void) {
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  double __pyx_4;
  PyObject *__pyx_5 = 0;
  PyObject *__pyx_6 = 0;
  __pyx_init_filenames();
  __pyx_m = Py_InitModule4("pyproj", __pyx_methods, __pyx_mdoc, 0, PYTHON_API_VERSION);
  if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
  __pyx_b = PyImport_AddModule("__builtin__");
  if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
  if (__Pyx_InternStrings(__pyx_intern_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
  __pyx_type_6pyproj_Proj.tp_free = _PyObject_GC_Del;
  if (PyType_Ready(&__pyx_type_6pyproj_Proj) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; goto __pyx_L1;}
  if (PyObject_SetAttrString(__pyx_m, "Proj", (PyObject *)&__pyx_type_6pyproj_Proj) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; goto __pyx_L1;}
  __pyx_ptype_6pyproj_Proj = &__pyx_type_6pyproj_Proj;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":54 */
  __pyx_1 = __Pyx_Import(__pyx_n_math, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_math, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":54 */
  __pyx_1 = __Pyx_Import(__pyx_n_array, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_array, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":54 */
  __pyx_1 = __Pyx_Import(__pyx_n_types, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_types, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":58 */
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_math); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; goto __pyx_L1;}
  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_radians); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_1 = PyFloat_FromDouble(1.); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; goto __pyx_L1;}
  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; goto __pyx_L1;}
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1);
  __pyx_1 = 0;
  __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  __pyx_4 = PyFloat_AsDouble(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_v_6pyproj__dg2rad = __pyx_4;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":59 */
  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_math); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; goto __pyx_L1;}
  __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_degrees); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_1 = PyFloat_FromDouble(1.); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; goto __pyx_L1;}
  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; goto __pyx_L1;}
  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_1);
  __pyx_1 = 0;
  __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_4 = PyFloat_AsDouble(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_v_6pyproj__rad2dg = __pyx_4;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":60 */
  __pyx_v_6pyproj__doublesize = (sizeof(double ));

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":61 */
  if (PyObject_SetAttr(__pyx_m, __pyx_n___version__, __pyx_k4p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; goto __pyx_L1;}

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":62 */
  __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_types); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; goto __pyx_L1;}
  __pyx_2 = PyObject_GetAttr(__pyx_3, __pyx_n_ListType); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_types); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; goto __pyx_L1;}
  __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_TupleType); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_1 = PyList_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; goto __pyx_L1;}
  PyList_SET_ITEM(__pyx_1, 0, __pyx_2);
  PyList_SET_ITEM(__pyx_1, 1, __pyx_3);
  __pyx_2 = 0;
  __pyx_3 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n__seqtype, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":115 */
  Py_INCREF(Py_None);
  __pyx_k5 = Py_None;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":159 */
  __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; goto __pyx_L1;}
  __pyx_k6 = __pyx_2;
  __pyx_2 = 0;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":196 */
  __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; goto __pyx_L1;}
  __pyx_k7 = __pyx_3;
  __pyx_3 = 0;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":234 */
  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; goto __pyx_L1;}
  __pyx_k8 = __pyx_1;
  __pyx_1 = 0;
  __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; goto __pyx_L1;}
  __pyx_k9 = __pyx_5;
  __pyx_5 = 0;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":327 */
  Py_INCREF(Py_None);
  __pyx_k10 = Py_None;
  __pyx_6 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; goto __pyx_L1;}
  __pyx_k11 = __pyx_6;
  __pyx_6 = 0;

  /* "/Users/jsw/python/pyproj-1.7.2/pyproj.pyx":439 */
  return;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_5);
  Py_XDECREF(__pyx_6);
  __Pyx_AddTraceback("pyproj");
}

static char *__pyx_filenames[] = {
  "pyproj.pyx",
};

/* Runtime support code */

static void __pyx_init_filenames(void) {
  __pyx_f = __pyx_filenames;
}

static int __Pyx_GetStarArgs(
    PyObject **args, 
    PyObject **kwds,
    char *kwd_list[], 
    int nargs,
    PyObject **args2, 
    PyObject **kwds2)
{
    PyObject *x = 0, *args1 = 0, *kwds1 = 0;
    
    if (args2)
        *args2 = 0;
    if (kwds2)
        *kwds2 = 0;
    
    if (args2) {
        args1 = PyTuple_GetSlice(*args, 0, nargs);
        if (!args1)
            goto bad;
        *args2 = PyTuple_GetSlice(*args, nargs, PyTuple_Size(*args));
        if (!*args2)
            goto bad;
    }
    else {
        args1 = *args;
        Py_INCREF(args1);
    }
    
    if (kwds2) {
        if (*kwds) {
            char **p;
            kwds1 = PyDict_New();
            if (!kwds)
                goto bad;
            *kwds2 = PyDict_Copy(*kwds);
            if (!*kwds2)
                goto bad;
            for (p = kwd_list; *p; p++) {
                x = PyDict_GetItemString(*kwds, *p);
                if (x) {
                    if (PyDict_SetItemString(kwds1, *p, x) < 0)
                        goto bad;
                    if (PyDict_DelItemString(*kwds2, *p) < 0)
                        goto bad;
                }
            }
        }
        else {
            *kwds2 = PyDict_New();
            if (!*kwds2)
                goto bad;
        }
    }
    else {
        kwds1 = *kwds;
        Py_XINCREF(kwds1);
    }
    
    *args = args1;
    *kwds = kwds1;
    return 0;
bad:
    Py_XDECREF(args1);
    Py_XDECREF(kwds1);
    if (*args2)
        Py_XDECREF(*args2);
    if (*kwds2)
        Py_XDECREF(*kwds2);
    return -1;
}

static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, char *name) {
    if (!type) {
        PyErr_Format(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if ((none_allowed && obj == Py_None) || PyObject_TypeCheck(obj, type))
        return 1;
    PyErr_Format(PyExc_TypeError,
        "Argument '%s' has incorrect type (expected %s, got %s)",
        name, type->tp_name, obj->ob_type->tp_name);
    return 0;
}

static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list) {
    PyObject *__import__ = 0;
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    __import__ = PyObject_GetAttrString(__pyx_b, "__import__");
    if (!__import__)
        goto bad;
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    module = PyObject_CallFunction(__import__, "OOOO",
        name, global_dict, empty_dict, list);
bad:
    Py_XDECREF(empty_list);
    Py_XDECREF(__import__);
    Py_XDECREF(empty_dict);
    return module;
}

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
    PyObject *result;
    result = PyObject_GetAttr(dict, name);
    if (!result)
        PyErr_SetObject(PyExc_NameError, name);
    return result;
}

static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
    Py_XINCREF(type);
    Py_XINCREF(value);
    Py_XINCREF(tb);
    /* First, check the traceback argument, replacing None with NULL. */
    if (tb == Py_None) {
        Py_DECREF(tb);
        tb = 0;
    }
    else if (tb != NULL && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto raise_error;
    }
    /* Next, replace a missing value with None */
    if (value == NULL) {
        value = Py_None;
        Py_INCREF(value);
    }
    /* Next, repeatedly, replace a tuple exception with its first item */
    while (PyTuple_Check(type) && PyTuple_Size(type) > 0) {
        PyObject *tmp = type;
        type = PyTuple_GET_ITEM(type, 0);
        Py_INCREF(type);
        Py_DECREF(tmp);
    }
    if (PyString_Check(type))
        ;
    else if (PyClass_Check(type))
        ; /*PyErr_NormalizeException(&type, &value, &tb);*/
    else if (PyInstance_Check(type)) {
        /* Raising an instance.  The value should be a dummy. */
        if (value != Py_None) {
            PyErr_SetString(PyExc_TypeError,
              "instance exception may not have a separate value");
            goto raise_error;
        }
        else {
            /* Normalize to raise <class>, <instance> */
            Py_DECREF(value);
            value = type;
            type = (PyObject*) ((PyInstanceObject*)type)->in_class;
            Py_INCREF(type);
        }
    }
    else {
        /* Not something you can raise.  You get an exception
           anyway, just not what you specified :-) */
        PyErr_Format(PyExc_TypeError,
                 "exceptions must be strings, classes, or "
                 "instances, not %s", type->ob_type->tp_name);
        goto raise_error;
    }
    PyErr_Restore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}

static PyObject *__Pyx_GetStdout(void) {
    PyObject *f = PySys_GetObject("stdout");
    if (!f) {
        PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout");
    }
    return f;
}

static int __Pyx_PrintItem(PyObject *v) {
    PyObject *f;
    
    if (!(f = __Pyx_GetStdout()))
        return -1;
    if (PyFile_SoftSpace(f, 1)) {
        if (PyFile_WriteString(" ", f) < 0)
            return -1;
    }
    if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0)
        return -1;
    if (PyString_Check(v)) {
        char *s = PyString_AsString(v);
        int len = PyString_Size(v);
        if (len > 0 &&
            isspace(Py_CHARMASK(s[len-1])) &&
            s[len-1] != ' ')
                PyFile_SoftSpace(f, 0);
    }
    return 0;
}

static int __Pyx_PrintNewline(void) {
    PyObject *f;
    
    if (!(f = __Pyx_GetStdout()))
        return -1;
    if (PyFile_WriteString("\n", f) < 0)
        return -1;
    PyFile_SoftSpace(f, 0);
    return 0;
}

static void __Pyx_UnpackError(void) {
    PyErr_SetString(PyExc_ValueError, "unpack sequence of wrong size");
}

static PyObject *__Pyx_UnpackItem(PyObject *seq, int i) {
  PyObject *item;
  if (!(item = PySequence_GetItem(seq, i))) {
    if (PyErr_ExceptionMatches(PyExc_IndexError))
    	__Pyx_UnpackError();
  }
  return item;
}

static int __Pyx_EndUnpack(PyObject *seq, int i) {
  PyObject *item;
  if (item = PySequence_GetItem(seq, i)) {
    Py_DECREF(item);
    __Pyx_UnpackError();
    return -1;
  }
  PyErr_Clear();
    return 0;
}

static PyObject *__Pyx_GetExcValue(void) {
    PyObject *type = 0, *value = 0, *tb = 0;
    PyObject *result = 0;
    PyThreadState *tstate = PyThreadState_Get();
    PyErr_Fetch(&type, &value, &tb);
    PyErr_NormalizeException(&type, &value, &tb);
    if (PyErr_Occurred())
        goto bad;
    if (!value) {
        value = Py_None;
        Py_INCREF(value);
    }
    Py_XDECREF(tstate->exc_type);
    Py_XDECREF(tstate->exc_value);
    Py_XDECREF(tstate->exc_traceback);
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    result = value;
    Py_XINCREF(result);
    type = 0;
    value = 0;
    tb = 0;
bad:
    Py_XDECREF(type);
    Py_XDECREF(value);
    Py_XDECREF(tb);
    return result;
}

static int __Pyx_InternStrings(__Pyx_InternTabEntry *t) {
    while (t->p) {
        *t->p = PyString_InternFromString(t->s);
        if (!*t->p)
            return -1;
        ++t;
    }
    return 0;
}

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        if (!*t->p)
            return -1;
        ++t;
    }
    return 0;
}

#include "compile.h"
#include "frameobject.h"
#include "traceback.h"

static void __Pyx_AddTraceback(char *funcname) {
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    PyObject *py_globals = 0;
    PyObject *empty_tuple = 0;
    PyObject *empty_string = 0;
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    
    py_srcfile = PyString_FromString(__pyx_filename);
    if (!py_srcfile) goto bad;
    py_funcname = PyString_FromString(funcname);
    if (!py_funcname) goto bad;
    py_globals = PyModule_GetDict(__pyx_m);
    if (!py_globals) goto bad;
    empty_tuple = PyTuple_New(0);
    if (!empty_tuple) goto bad;
    empty_string = PyString_FromString("");
    if (!empty_string) goto bad;
    py_code = PyCode_New(
        0,            /*int argcount,*/
        0,            /*int nlocals,*/
        0,            /*int stacksize,*/
        0,            /*int flags,*/
        empty_string, /*PyObject *code,*/
        empty_tuple,  /*PyObject *consts,*/
        empty_tuple,  /*PyObject *names,*/
        empty_tuple,  /*PyObject *varnames,*/
        empty_tuple,  /*PyObject *freevars,*/
        empty_tuple,  /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        __pyx_lineno,   /*int firstlineno,*/
        empty_string  /*PyObject *lnotab*/
    );
    if (!py_code) goto bad;
    py_frame = PyFrame_New(
        PyThreadState_Get(), /*PyThreadState *tstate,*/
        py_code,             /*PyCodeObject *code,*/
        py_globals,          /*PyObject *globals,*/
        0                    /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    py_frame->f_lineno = __pyx_lineno;
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    Py_XDECREF(empty_tuple);
    Py_XDECREF(empty_string);
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}
