/* Generated by Cython 0.19.1 on Thu Jul  4 15:51:35 2013 */

#define PY_SSIZE_T_CLEAN
#ifndef CYTHON_USE_PYLONG_INTERNALS
#ifdef PYLONG_BITS_IN_DIGIT
#define CYTHON_USE_PYLONG_INTERNALS 0
#else
#include "pyconfig.h"
#ifdef PYLONG_BITS_IN_DIGIT
#define CYTHON_USE_PYLONG_INTERNALS 1
#else
#define CYTHON_USE_PYLONG_INTERNALS 0
#endif
#endif
#endif
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02040000
    #error Cython requires Python 2.4+.
#else
#include <stddef.h> /* For offsetof */
#ifndef offsetof
#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
#define CYTHON_COMPILING_IN_PYPY 1
#define CYTHON_COMPILING_IN_CPYTHON 0
#else
#define CYTHON_COMPILING_IN_PYPY 0
#define CYTHON_COMPILING_IN_CPYTHON 1
#endif
#if PY_VERSION_HEX < 0x02050000
  typedef int Py_ssize_t;
  #define PY_SSIZE_T_MAX INT_MAX
  #define PY_SSIZE_T_MIN INT_MIN
  #define PY_FORMAT_SIZE_T ""
  #define CYTHON_FORMAT_SSIZE_T ""
  #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
  #define PyInt_AsSsize_t(o)   __Pyx_PyInt_AsInt(o)
  #define PyNumber_Index(o)    ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \
                                (PyErr_Format(PyExc_TypeError, \
                                              "expected index value, got %.200s", Py_TYPE(o)->tp_name), \
                                 (PyObject*)0))
  #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \
                                  !PyComplex_Check(o))
  #define PyIndex_Check __Pyx_PyIndex_Check
  #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
  #define __PYX_BUILD_PY_SSIZE_T "i"
#else
  #define __PYX_BUILD_PY_SSIZE_T "n"
  #define CYTHON_FORMAT_SSIZE_T "z"
  #define __Pyx_PyIndex_Check PyIndex_Check
#endif
#if PY_VERSION_HEX < 0x02060000
  #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
  #define Py_TYPE(ob)   (((PyObject*)(ob))->ob_type)
  #define Py_SIZE(ob)   (((PyVarObject*)(ob))->ob_size)
  #define PyVarObject_HEAD_INIT(type, size) \
          PyObject_HEAD_INIT(type) size,
  #define PyType_Modified(t)
  typedef struct {
     void *buf;
     PyObject *obj;
     Py_ssize_t len;
     Py_ssize_t itemsize;
     int readonly;
     int ndim;
     char *format;
     Py_ssize_t *shape;
     Py_ssize_t *strides;
     Py_ssize_t *suboffsets;
     void *internal;
  } Py_buffer;
  #define PyBUF_SIMPLE 0
  #define PyBUF_WRITABLE 0x0001
  #define PyBUF_FORMAT 0x0004
  #define PyBUF_ND 0x0008
  #define PyBUF_STRIDES (0x0010 | PyBUF_ND)
  #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
  #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
  #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
  #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
  #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE)
  #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE)
  typedef int (*getbufferproc)(PyObject *, Py_buffer *, int);
  typedef void (*releasebufferproc)(PyObject *, Py_buffer *);
#endif
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
          PyCode_New(a, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#endif
#if PY_MAJOR_VERSION < 3 && PY_MINOR_VERSION < 6
  #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict")
#endif
#if PY_MAJOR_VERSION >= 3
  #define Py_TPFLAGS_CHECKTYPES 0
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#if PY_VERSION_HEX < 0x02060000
  #define Py_TPFLAGS_HAVE_VERSION_TAG 0
#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ? \
                                              0 : _PyUnicode_Ready((PyObject *)(op)))
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
#else
  #define CYTHON_PEP393_ENABLED 0
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((k=k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#endif
#if PY_VERSION_HEX < 0x02060000
  #define PyBytesObject                PyStringObject
  #define PyBytes_Type                 PyString_Type
  #define PyBytes_Check                PyString_Check
  #define PyBytes_CheckExact           PyString_CheckExact
  #define PyBytes_FromString           PyString_FromString
  #define PyBytes_FromStringAndSize    PyString_FromStringAndSize
  #define PyBytes_FromFormat           PyString_FromFormat
  #define PyBytes_DecodeEscape         PyString_DecodeEscape
  #define PyBytes_AsString             PyString_AsString
  #define PyBytes_AsStringAndSize      PyString_AsStringAndSize
  #define PyBytes_Size                 PyString_Size
  #define PyBytes_AS_STRING            PyString_AS_STRING
  #define PyBytes_GET_SIZE             PyString_GET_SIZE
  #define PyBytes_Repr                 PyString_Repr
  #define PyBytes_Concat               PyString_Concat
  #define PyBytes_ConcatAndDel         PyString_ConcatAndDel
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj) || \
                                         PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (Py_TYPE(obj) == &PyBaseString_Type)
#endif
#if PY_VERSION_HEX < 0x02060000
  #define PySet_Check(obj)             PyObject_TypeCheck(obj, &PySet_Type)
  #define PyFrozenSet_Check(obj)       PyObject_TypeCheck(obj, &PyFrozenSet_Type)
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_VERSION_HEX < 0x03020000
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
#endif
#if (PY_MAJOR_VERSION < 3) || (PY_VERSION_HEX >= 0x03010300)
  #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b)
  #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value)
  #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b)
#else
  #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0)))
  #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1)))
  #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1)))
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
#endif
#if PY_VERSION_HEX < 0x02050000
  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),((char *)(n)))
  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),((char *)(n)))
#else
  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),(n))
  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),(n))
#endif
#if PY_VERSION_HEX < 0x02050000
  #define __Pyx_NAMESTR(n) ((char *)(n))
  #define __Pyx_DOCSTR(n)  ((char *)(n))
#else
  #define __Pyx_NAMESTR(n) (n)
  #define __Pyx_DOCSTR(n)  (n)
#endif
#ifndef CYTHON_INLINE
  #if defined(__GNUC__)
    #define CYTHON_INLINE __inline__
  #elif defined(_MSC_VER)
    #define CYTHON_INLINE __inline
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_INLINE inline
  #else
    #define CYTHON_INLINE
  #endif
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER)
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
  /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and
   a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is
   a quiet NaN. */
  float value;
  memset(&value, 0xFF, sizeof(value));
  return value;
}
#endif


#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif

#ifndef __PYX_EXTERN_C
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#if defined(WIN32) || defined(MS_WINDOWS)
#define _USE_MATH_DEFINES
#endif
#include <math.h>
#define __PYX_HAVE__vcfnp
#define __PYX_HAVE_API__vcfnp
#include "string.h"
#include "stdio.h"
#include "stdlib.h"
#include "numpy/arrayobject.h"
#include "numpy/ufuncobject.h"
#include <string>
#include "ios"
#include "new"
#include "stdexcept"
#include "typeinfo"
#include <vector>
#include <utility>
#include <map>
#include "split.h"
#include "Variant.h"
#include "convert.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#ifdef PYREX_WITHOUT_ASSERTIONS
#define CYTHON_WITHOUT_ASSERTIONS
#endif

#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding;
                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyObject_AsUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromUString(s)  __Pyx_PyObject_FromString((char*)s)
#define __Pyx_PyBytes_FromUString(s)   __Pyx_PyBytes_FromString((char*)s)
#define __Pyx_PyStr_FromUString(s)     __Pyx_PyStr_FromString((char*)s)
#define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((char*)s)
#if PY_MAJOR_VERSION < 3
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
{
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return u_end - u - 1;
}
#else
#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
#endif
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None)
#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
#if CYTHON_COMPILING_IN_CPYTHON
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params() {
    PyObject* sys = NULL;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    sys = PyImport_ImportModule("sys");
    if (sys == NULL) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    if (default_encoding == NULL) goto bad;
    if (strcmp(PyBytes_AsString(default_encoding), "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        const char* default_encoding_c = PyBytes_AS_STRING(default_encoding);
        char ascii_chars[128];
        int c;
        for (c = 0; c < 128; c++) {
            ascii_chars[c] = c;
        }
        __Pyx_sys_getdefaultencoding_not_ascii = 1;
        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
        if (ascii_chars_u == NULL) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (ascii_chars_b == NULL || strncmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
            PyErr_Format(
                PyExc_ValueError,
                "This module compiled with c_string_encoding=ascii, but default encoding '%s' is not a superset of ascii.",
                default_encoding_c);
            goto bad;
        }
    }
    Py_XDECREF(sys);
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return 0;
bad:
    Py_XDECREF(sys);
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params() {
    PyObject* sys = NULL;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (sys == NULL) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    if (default_encoding == NULL) goto bad;
    default_encoding_c = PyBytes_AS_STRING(default_encoding);
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(sys);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(sys);
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


#ifdef __GNUC__
  /* Test for GCC > 2.95 */
  #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
    #define likely(x)   __builtin_expect(!!(x), 1)
    #define unlikely(x) __builtin_expect(!!(x), 0)
  #else /* __GNUC__ > 2 ... */
    #define likely(x)   (x)
    #define unlikely(x) (x)
  #endif /* __GNUC__ > 2 ... */
#else /* __GNUC__ */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */

static PyObject *__pyx_m;
static PyObject *__pyx_d;
static PyObject *__pyx_b;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;

#if !defined(CYTHON_CCOMPLEX)
  #if defined(__cplusplus)
    #define CYTHON_CCOMPLEX 1
  #elif defined(_Complex_I)
    #define CYTHON_CCOMPLEX 1
  #else
    #define CYTHON_CCOMPLEX 0
  #endif
#endif
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    #include <complex>
  #else
    #include <complex.h>
  #endif
#endif
#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
  #undef _Complex_I
  #define _Complex_I 1.0fj
#endif


static const char *__pyx_f[] = {
  "vcfnp.pyx",
  "numpy.pxd",
  "stringsource",
  "stringsource",
  "stringsource",
  "stringsource",
  "stringsource",
  "stringsource",
  "type.pxd",
  "vcflib.pxd",
};

/* "numpy.pxd":723
 * # in Cython to enable them only on the right systems.
 * 
 * ctypedef npy_int8       int8_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t
 */
typedef npy_int8 __pyx_t_5numpy_int8_t;

/* "numpy.pxd":724
 * 
 * ctypedef npy_int8       int8_t
 * ctypedef npy_int16      int16_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int32      int32_t
 * ctypedef npy_int64      int64_t
 */
typedef npy_int16 __pyx_t_5numpy_int16_t;

/* "numpy.pxd":725
 * ctypedef npy_int8       int8_t
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int64      int64_t
 * #ctypedef npy_int96      int96_t
 */
typedef npy_int32 __pyx_t_5numpy_int32_t;

/* "numpy.pxd":726
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t
 * ctypedef npy_int64      int64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_int96      int96_t
 * #ctypedef npy_int128     int128_t
 */
typedef npy_int64 __pyx_t_5numpy_int64_t;

/* "numpy.pxd":730
 * #ctypedef npy_int128     int128_t
 * 
 * ctypedef npy_uint8      uint8_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t
 */
typedef npy_uint8 __pyx_t_5numpy_uint8_t;

/* "numpy.pxd":731
 * 
 * ctypedef npy_uint8      uint8_t
 * ctypedef npy_uint16     uint16_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint32     uint32_t
 * ctypedef npy_uint64     uint64_t
 */
typedef npy_uint16 __pyx_t_5numpy_uint16_t;

/* "numpy.pxd":732
 * ctypedef npy_uint8      uint8_t
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint64     uint64_t
 * #ctypedef npy_uint96     uint96_t
 */
typedef npy_uint32 __pyx_t_5numpy_uint32_t;

/* "numpy.pxd":733
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t
 * ctypedef npy_uint64     uint64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_uint96     uint96_t
 * #ctypedef npy_uint128    uint128_t
 */
typedef npy_uint64 __pyx_t_5numpy_uint64_t;

/* "numpy.pxd":737
 * #ctypedef npy_uint128    uint128_t
 * 
 * ctypedef npy_float32    float32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_float64    float64_t
 * #ctypedef npy_float80    float80_t
 */
typedef npy_float32 __pyx_t_5numpy_float32_t;

/* "numpy.pxd":738
 * 
 * ctypedef npy_float32    float32_t
 * ctypedef npy_float64    float64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_float80    float80_t
 * #ctypedef npy_float128   float128_t
 */
typedef npy_float64 __pyx_t_5numpy_float64_t;

/* "numpy.pxd":747
 * # The int types are mapped a bit surprising --
 * # numpy.int corresponds to 'l' and numpy.long to 'q'
 * ctypedef npy_long       int_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longlong   long_t
 * ctypedef npy_longlong   longlong_t
 */
typedef npy_long __pyx_t_5numpy_int_t;

/* "numpy.pxd":748
 * # numpy.int corresponds to 'l' and numpy.long to 'q'
 * ctypedef npy_long       int_t
 * ctypedef npy_longlong   long_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longlong   longlong_t
 * 
 */
typedef npy_longlong __pyx_t_5numpy_long_t;

/* "numpy.pxd":749
 * ctypedef npy_long       int_t
 * ctypedef npy_longlong   long_t
 * ctypedef npy_longlong   longlong_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_ulong      uint_t
 */
typedef npy_longlong __pyx_t_5numpy_longlong_t;

/* "numpy.pxd":751
 * ctypedef npy_longlong   longlong_t
 * 
 * ctypedef npy_ulong      uint_t             # <<<<<<<<<<<<<<
 * ctypedef npy_ulonglong  ulong_t
 * ctypedef npy_ulonglong  ulonglong_t
 */
typedef npy_ulong __pyx_t_5numpy_uint_t;

/* "numpy.pxd":752
 * 
 * ctypedef npy_ulong      uint_t
 * ctypedef npy_ulonglong  ulong_t             # <<<<<<<<<<<<<<
 * ctypedef npy_ulonglong  ulonglong_t
 * 
 */
typedef npy_ulonglong __pyx_t_5numpy_ulong_t;

/* "numpy.pxd":753
 * ctypedef npy_ulong      uint_t
 * ctypedef npy_ulonglong  ulong_t
 * ctypedef npy_ulonglong  ulonglong_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_intp       intp_t
 */
typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;

/* "numpy.pxd":755
 * ctypedef npy_ulonglong  ulonglong_t
 * 
 * ctypedef npy_intp       intp_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uintp      uintp_t
 * 
 */
typedef npy_intp __pyx_t_5numpy_intp_t;

/* "numpy.pxd":756
 * 
 * ctypedef npy_intp       intp_t
 * ctypedef npy_uintp      uintp_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_double     float_t
 */
typedef npy_uintp __pyx_t_5numpy_uintp_t;

/* "numpy.pxd":758
 * ctypedef npy_uintp      uintp_t
 * 
 * ctypedef npy_double     float_t             # <<<<<<<<<<<<<<
 * ctypedef npy_double     double_t
 * ctypedef npy_longdouble longdouble_t
 */
typedef npy_double __pyx_t_5numpy_float_t;

/* "numpy.pxd":759
 * 
 * ctypedef npy_double     float_t
 * ctypedef npy_double     double_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longdouble longdouble_t
 * 
 */
typedef npy_double __pyx_t_5numpy_double_t;

/* "numpy.pxd":760
 * ctypedef npy_double     float_t
 * ctypedef npy_double     double_t
 * ctypedef npy_longdouble longdouble_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_cfloat      cfloat_t
 */
typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    typedef ::std::complex< float > __pyx_t_float_complex;
  #else
    typedef float _Complex __pyx_t_float_complex;
  #endif
#else
    typedef struct { float real, imag; } __pyx_t_float_complex;
#endif

#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    typedef ::std::complex< double > __pyx_t_double_complex;
  #else
    typedef double _Complex __pyx_t_double_complex;
  #endif
#else
    typedef struct { double real, imag; } __pyx_t_double_complex;
#endif


/*--- Type declarations ---*/
struct __pyx_obj_5vcfnp___pyx_scope_struct_7_eff_default_transformer;
struct __pyx_obj_5vcfnp___pyx_scope_struct___iter_withprogress;
struct __pyx_obj_5vcfnp___pyx_scope_struct_1__itervariants;
struct __pyx_obj_5vcfnp___pyx_scope_struct_9_genexpr;
struct __pyx_obj_5vcfnp___pyx_scope_struct_5__itercalldata;
struct __pyx_obj_6vcflib_PyVariantCallFile;
struct __pyx_obj_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition;
struct __pyx_obj_5vcfnp___pyx_scope_struct_2__itervariants_with_condition;
struct __pyx_obj_5vcfnp___pyx_scope_struct_3__iterinfo;
struct __pyx_obj_5vcfnp___pyx_scope_struct_8__transformer;
struct __pyx_obj_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition;

/* "numpy.pxd":762
 * ctypedef npy_longdouble longdouble_t
 * 
 * ctypedef npy_cfloat      cfloat_t             # <<<<<<<<<<<<<<
 * ctypedef npy_cdouble     cdouble_t
 * ctypedef npy_clongdouble clongdouble_t
 */
typedef npy_cfloat __pyx_t_5numpy_cfloat_t;

/* "numpy.pxd":763
 * 
 * ctypedef npy_cfloat      cfloat_t
 * ctypedef npy_cdouble     cdouble_t             # <<<<<<<<<<<<<<
 * ctypedef npy_clongdouble clongdouble_t
 * 
 */
typedef npy_cdouble __pyx_t_5numpy_cdouble_t;

/* "numpy.pxd":764
 * ctypedef npy_cfloat      cfloat_t
 * ctypedef npy_cdouble     cdouble_t
 * ctypedef npy_clongdouble clongdouble_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_cdouble     complex_t
 */
typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;

/* "numpy.pxd":766
 * ctypedef npy_clongdouble clongdouble_t
 * 
 * ctypedef npy_cdouble     complex_t             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew1(a):
 */
typedef npy_cdouble __pyx_t_5numpy_complex_t;

/* "vcfnp.pyx":1333
 * 
 * 
 * def eff_default_transformer(fills=EFF_DEFAULT_FILLS):             # <<<<<<<<<<<<<<
 *     """
 *     Return a simple transformer function for parsing EFF annotations. N.B.,
 */
struct __pyx_obj_5vcfnp___pyx_scope_struct_7_eff_default_transformer {
  PyObject_HEAD
  PyObject *__pyx_v_fills;
  PyObject *__pyx_v_prog_eff_main;
};


/* "vcfnp.pyx":333
 * 
 * 
 * def _iter_withprogress(iterable, int progress, logstream):             # <<<<<<<<<<<<<<
 *     cdef int i
 *     before_all = time.time()
 */
struct __pyx_obj_5vcfnp___pyx_scope_struct___iter_withprogress {
  PyObject_HEAD
  PyObject *__pyx_v_after;
  PyObject *__pyx_v_after_all;
  PyObject *__pyx_v_before;
  PyObject *__pyx_v_before_all;
  int __pyx_v_i;
  PyObject *__pyx_v_iterable;
  PyObject *__pyx_v_logstream;
  PyObject *__pyx_v_o;
  int __pyx_v_progress;
  PyObject *__pyx_t_0;
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
};


/* "vcfnp.pyx":348
 * 
 * 
 * def _itervariants(filenames,             # <<<<<<<<<<<<<<
 *                  region,
 *                  vector[string] fields,
 */
struct __pyx_obj_5vcfnp___pyx_scope_struct_1__itervariants {
  PyObject_HEAD
  std::map<std::string,int> __pyx_v_arities;
  PyObject *__pyx_v_current_filename;
  std::vector<std::string> __pyx_v_fields;
  PyObject *__pyx_v_filenames;
  PyObject *__pyx_v_fills;
  std::vector<std::string> __pyx_v_filterIds;
  PyObject *__pyx_v_region;
  vcf::Variant *__pyx_v_var;
  vcf::VariantCallFile *__pyx_v_variantFile;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "vcfnp.pyx":1347
 *             eff = [match_eff_main.group(1)] + match_eff_main.group(2).split('|')
 *             result = tuple(
 *                 fill if v == ''             # <<<<<<<<<<<<<<
 *                 else int(v) if i == 5 or i == 10
 *                 else (1 if v == 'CODING' else 0) if i == 8
 */
struct __pyx_obj_5vcfnp___pyx_scope_struct_9_genexpr {
  PyObject_HEAD
  struct __pyx_obj_5vcfnp___pyx_scope_struct_8__transformer *__pyx_outer_scope;
  PyObject *__pyx_v_fill;
  PyObject *__pyx_v_i;
  PyObject *__pyx_v_v;
  PyObject *__pyx_t_0;
  PyObject *__pyx_t_1;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
};


/* "vcfnp.pyx":1044
 * 
 * 
 * def _itercalldata(filenames,             # <<<<<<<<<<<<<<
 *                   region,
 *                   vector[string] samples,
 */
struct __pyx_obj_5vcfnp___pyx_scope_struct_5__itercalldata {
  PyObject_HEAD
  std::map<std::string,int> __pyx_v_arities;
  PyObject *__pyx_v_current_filename;
  std::vector<std::string> __pyx_v_fields;
  PyObject *__pyx_v_filenames;
  PyObject *__pyx_v_fills;
  int __pyx_v_ploidy;
  PyObject *__pyx_v_region;
  std::vector<std::string> __pyx_v_samples;
  vcf::Variant *__pyx_v_var;
  vcf::VariantCallFile *__pyx_v_variantFile;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "vcflib.pxd":142
 * 
 * 
 * cdef class PyVariantCallFile:             # <<<<<<<<<<<<<<
 * 
 *     cdef VariantCallFile *thisptr
 */
struct __pyx_obj_6vcflib_PyVariantCallFile {
  PyObject_HEAD
  vcf::VariantCallFile *thisptr;
};


/* "vcfnp.pyx":1071
 * 
 * 
 * def _itercalldata_with_condition(filenames,             # <<<<<<<<<<<<<<
 *                                  region,
 *                                  vector[string] samples,
 */
struct __pyx_obj_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition {
  PyObject_HEAD
  std::map<std::string,int> __pyx_v_arities;
  PyObject *__pyx_v_condition;
  PyObject *__pyx_v_current_filename;
  std::vector<std::string> __pyx_v_fields;
  PyObject *__pyx_v_filenames;
  PyObject *__pyx_v_fills;
  int __pyx_v_i;
  int __pyx_v_n;
  int __pyx_v_ploidy;
  PyObject *__pyx_v_region;
  std::vector<std::string> __pyx_v_samples;
  vcf::Variant *__pyx_v_var;
  vcf::VariantCallFile *__pyx_v_variantFile;
  Py_ssize_t __pyx_t_0;
  PyObject *__pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "vcfnp.pyx":374
 * 
 * 
 * def _itervariants_with_condition(filenames,             # <<<<<<<<<<<<<<
 *                                  region,
 *                                  vector[string] fields,
 */
struct __pyx_obj_5vcfnp___pyx_scope_struct_2__itervariants_with_condition {
  PyObject_HEAD
  std::map<std::string,int> __pyx_v_arities;
  PyObject *__pyx_v_condition;
  PyObject *__pyx_v_current_filename;
  std::vector<std::string> __pyx_v_fields;
  PyObject *__pyx_v_filenames;
  PyObject *__pyx_v_fills;
  std::vector<std::string> __pyx_v_filterIds;
  int __pyx_v_i;
  int __pyx_v_n;
  PyObject *__pyx_v_region;
  vcf::Variant *__pyx_v_var;
  vcf::VariantCallFile *__pyx_v_variantFile;
  Py_ssize_t __pyx_t_0;
  PyObject *__pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "vcfnp.pyx":657
 * 
 * 
 * def _iterinfo(filenames,             # <<<<<<<<<<<<<<
 *              region,
 *              vector[string] fields,
 */
struct __pyx_obj_5vcfnp___pyx_scope_struct_3__iterinfo {
  PyObject_HEAD
  std::map<std::string,int> __pyx_v_arities;
  PyObject *__pyx_v_current_filename;
  std::vector<std::string> __pyx_v_fields;
  PyObject *__pyx_v_filenames;
  PyObject *__pyx_v_fills;
  PyObject *__pyx_v_infoTypes;
  PyObject *__pyx_v_region;
  PyObject *__pyx_v_transformers;
  vcf::Variant *__pyx_v_var;
  vcf::VariantCallFile *__pyx_v_variantFile;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "vcfnp.pyx":1340
 *     """
 *     prog_eff_main = re.compile(r'([^(]+)\(([^)]+)\)')
 *     def _transformer(vals):             # <<<<<<<<<<<<<<
 *         if len(vals) == 0:
 *             return fills
 */
struct __pyx_obj_5vcfnp___pyx_scope_struct_8__transformer {
  PyObject_HEAD
  struct __pyx_obj_5vcfnp___pyx_scope_struct_7_eff_default_transformer *__pyx_outer_scope;
  PyObject *__pyx_v_eff;
};


/* "vcfnp.pyx":682
 * 
 * 
 * def _iterinfo_with_condition(filenames,             # <<<<<<<<<<<<<<
 *                              region,
 *                              vector[string] fields,
 */
struct __pyx_obj_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition {
  PyObject_HEAD
  std::map<std::string,int> __pyx_v_arities;
  PyObject *__pyx_v_condition;
  PyObject *__pyx_v_current_filename;
  std::vector<std::string> __pyx_v_fields;
  PyObject *__pyx_v_filenames;
  PyObject *__pyx_v_fills;
  int __pyx_v_i;
  PyObject *__pyx_v_infoTypes;
  int __pyx_v_n;
  PyObject *__pyx_v_region;
  PyObject *__pyx_v_transformers;
  vcf::Variant *__pyx_v_var;
  vcf::VariantCallFile *__pyx_v_variantFile;
  Py_ssize_t __pyx_t_0;
  PyObject *__pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};

#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, int);
    void (*DECREF)(void*, PyObject*, int);
    void (*GOTREF)(void*, PyObject*, int);
    void (*GIVEREF)(void*, PyObject*, int);
    void* (*SetupContext)(const char*, int, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); /*proto*/
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
          if (acquire_gil) { \
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); \
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
              PyGILState_Release(__pyx_gilstate_save); \
          } else { \
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
          }
#else
  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
#endif
  #define __Pyx_RefNannyFinishContext() \
          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif /* CYTHON_REFNANNY */
#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*proto*/

static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/

static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \
    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \
    const char* function_name); /*proto*/

static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/

static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/

static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/

static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/

static CYTHON_INLINE int __Pyx_PySequence_Contains(PyObject* item, PyObject* seq, int eq) {
    int result = PySequence_Contains(seq, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len)) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        Py_SIZE(list) = len+1;
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
#endif

#define __Pyx_GetItemInt(o, i, size, to_py_func, is_list, wraparound, boundscheck) \
    (((size) <= sizeof(Py_ssize_t)) ? \
    __Pyx_GetItemInt_Fast(o, i, is_list, wraparound, boundscheck) : \
    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
#define __Pyx_GetItemInt_List(o, i, size, to_py_func, is_list, wraparound, boundscheck) \
    (((size) <= sizeof(Py_ssize_t)) ? \
    __Pyx_GetItemInt_List_Fast(o, i, wraparound, boundscheck) : \
    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func, is_list, wraparound, boundscheck) \
    (((size) <= sizeof(Py_ssize_t)) ? \
    __Pyx_GetItemInt_Tuple_Fast(o, i, wraparound, boundscheck) : \
    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck);

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        Py_SIZE(list) = len+1;
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

static CYTHON_INLINE int __Pyx_mod_int(int, int); /* proto */

#ifndef __PYX_FORCE_INIT_THREADS
  #define __PYX_FORCE_INIT_THREADS 0
#endif

static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
    const char *name, int exact); /*proto*/

#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (!PyErr_Occurred()) {
            PyObject* args = PyTuple_Pack(1, key);
            if (likely(args))
                PyErr_SetObject(PyExc_KeyError, args);
            Py_XDECREF(args);
        }
        return NULL;
    }
    Py_INCREF(value);
    return value;
}
#else
    #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
#endif

static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
        PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
        int has_cstart, int has_cstop, int wraparound);

#include <string.h>

static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/

static void __Pyx_WriteUnraisable(const char *name, int clineno,
                                  int lineno, const char *filename); /*proto*/

static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);

static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/

static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/

#define __Pyx_CyFunction_USED 1
#include <structmember.h>
#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
#define __Pyx_CYFUNCTION_CCLASS        0x04
#define __Pyx_CyFunction_GetClosure(f) \
    (((__pyx_CyFunctionObject *) (f))->func_closure)
#define __Pyx_CyFunction_GetClassObj(f) \
    (((__pyx_CyFunctionObject *) (f))->func_classobj)
#define __Pyx_CyFunction_Defaults(type, f) \
    ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
#define __Pyx_CyFunction_SetDefaultsGetter(f, g) \
    ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
typedef struct {
    PyCFunctionObject func;
    int flags;
    PyObject *func_dict;
    PyObject *func_weakreflist;
    PyObject *func_name;
    PyObject *func_qualname;
    PyObject *func_doc;
    PyObject *func_code;
    PyObject *func_closure;
    PyObject *func_classobj; /* No-args super() class cell */
    void *defaults;
    int defaults_pyobjects;
    PyObject *defaults_tuple;   /* Const defaults tuple */
    PyObject *defaults_kwdict;  /* Const kwonly defaults dict */
    PyObject *(*defaults_getter)(PyObject *);
    PyObject *func_annotations; /* function annotations dict */
} __pyx_CyFunctionObject;
static PyTypeObject *__pyx_CyFunctionType = 0;
#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, code) \
    __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, code)
static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *self, PyObject *module,
                                      PyObject* code);
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
                                                         size_t size,
                                                         int pyobjects);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
                                                            PyObject *tuple);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
                                                             PyObject *dict);
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
                                                              PyObject *dict);
static int __Pyx_CyFunction_init(void);

static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);

static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/

static PyObject* __Pyx_PyObject_CallMethodTuple(PyObject* obj, PyObject* method_name, PyObject* args) {
    PyObject *method, *result = NULL;
    if (unlikely(!args)) return NULL;
    method = __Pyx_PyObject_GetAttrStr(obj, method_name);
    if (unlikely(!method)) goto bad;
    result = PyObject_Call(method, args, NULL);
    Py_DECREF(method);
bad:
    Py_DECREF(args);
    return result;
}
#define __Pyx_PyObject_CallMethod3(obj, name, arg1, arg2, arg3) \
    __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(3, arg1, arg2, arg3))
#define __Pyx_PyObject_CallMethod2(obj, name, arg1, arg2) \
    __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(2, arg1, arg2))
#define __Pyx_PyObject_CallMethod1(obj, name, arg1) \
    __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(1, arg1))
#define __Pyx_PyObject_CallMethod0(obj, name) \
    __Pyx_PyObject_CallMethodTuple(obj, name, (Py_INCREF(__pyx_empty_tuple), __pyx_empty_tuple))

static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); /*proto*/

static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** value1, PyObject** value2,
                                             int is_tuple, int has_known_size, int decref_tuple);

static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_is_dict);
static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos,
                                              PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict);

static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /*proto*/

static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/

static int __Pyx_Print(PyObject*, PyObject *, int); /*proto*/
#if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3
static PyObject* __pyx_print = 0;
static PyObject* __pyx_print_kwargs = 0;
#endif

static int __Pyx_PrintOne(PyObject* stream, PyObject *o); /*proto*/

#ifndef __Pyx_CppExn2PyErr
#include <new>
#include <typeinfo>
#include <stdexcept>
#include <ios>
static void __Pyx_CppExn2PyErr() {
  try {
    if (PyErr_Occurred())
      ; // let the latest Python exn pass through and ignore the current one
    else
      throw;
  } catch (const std::bad_alloc& exn) {
    PyErr_SetString(PyExc_MemoryError, exn.what());
  } catch (const std::bad_cast& exn) {
    PyErr_SetString(PyExc_TypeError, exn.what());
  } catch (const std::domain_error& exn) {
    PyErr_SetString(PyExc_ValueError, exn.what());
  } catch (const std::invalid_argument& exn) {
    PyErr_SetString(PyExc_ValueError, exn.what());
  } catch (const std::ios_base::failure& exn) {
    PyErr_SetString(PyExc_IOError, exn.what());
  } catch (const std::out_of_range& exn) {
    PyErr_SetString(PyExc_IndexError, exn.what());
  } catch (const std::overflow_error& exn) {
    PyErr_SetString(PyExc_OverflowError, exn.what());
  } catch (const std::range_error& exn) {
    PyErr_SetString(PyExc_ArithmeticError, exn.what());
  } catch (const std::underflow_error& exn) {
    PyErr_SetString(PyExc_ArithmeticError, exn.what());
  } catch (const std::exception& exn) {
    PyErr_SetString(PyExc_RuntimeError, exn.what());
  }
  catch (...)
  {
    PyErr_SetString(PyExc_RuntimeError, "Unknown exception");
  }
}
#endif

#include <new>

#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    #define __Pyx_CREAL(z) ((z).real())
    #define __Pyx_CIMAG(z) ((z).imag())
  #else
    #define __Pyx_CREAL(z) (__real__(z))
    #define __Pyx_CIMAG(z) (__imag__(z))
  #endif
#else
    #define __Pyx_CREAL(z) ((z).real)
    #define __Pyx_CIMAG(z) ((z).imag)
#endif
#if defined(_WIN32) && defined(__cplusplus) && CYTHON_CCOMPLEX
    #define __Pyx_SET_CREAL(z,x) ((z).real(x))
    #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
#else
    #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
    #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
#endif

static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);

#if CYTHON_CCOMPLEX
    #define __Pyx_c_eqf(a, b)   ((a)==(b))
    #define __Pyx_c_sumf(a, b)  ((a)+(b))
    #define __Pyx_c_difff(a, b) ((a)-(b))
    #define __Pyx_c_prodf(a, b) ((a)*(b))
    #define __Pyx_c_quotf(a, b) ((a)/(b))
    #define __Pyx_c_negf(a)     (-(a))
  #ifdef __cplusplus
    #define __Pyx_c_is_zerof(z) ((z)==(float)0)
    #define __Pyx_c_conjf(z)    (::std::conj(z))
    #if 1
        #define __Pyx_c_absf(z)     (::std::abs(z))
        #define __Pyx_c_powf(a, b)  (::std::pow(a, b))
    #endif
  #else
    #define __Pyx_c_is_zerof(z) ((z)==0)
    #define __Pyx_c_conjf(z)    (conjf(z))
    #if 1
        #define __Pyx_c_absf(z)     (cabsf(z))
        #define __Pyx_c_powf(a, b)  (cpowf(a, b))
    #endif
 #endif
#else
    static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex);
    static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex);
    #if 1
        static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex);
        static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex, __pyx_t_float_complex);
    #endif
#endif

static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);

#if CYTHON_CCOMPLEX
    #define __Pyx_c_eq(a, b)   ((a)==(b))
    #define __Pyx_c_sum(a, b)  ((a)+(b))
    #define __Pyx_c_diff(a, b) ((a)-(b))
    #define __Pyx_c_prod(a, b) ((a)*(b))
    #define __Pyx_c_quot(a, b) ((a)/(b))
    #define __Pyx_c_neg(a)     (-(a))
  #ifdef __cplusplus
    #define __Pyx_c_is_zero(z) ((z)==(double)0)
    #define __Pyx_c_conj(z)    (::std::conj(z))
    #if 1
        #define __Pyx_c_abs(z)     (::std::abs(z))
        #define __Pyx_c_pow(a, b)  (::std::pow(a, b))
    #endif
  #else
    #define __Pyx_c_is_zero(z) ((z)==0)
    #define __Pyx_c_conj(z)    (conj(z))
    #if 1
        #define __Pyx_c_abs(z)     (cabs(z))
        #define __Pyx_c_pow(a, b)  (cpow(a, b))
    #endif
 #endif
#else
    static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex);
    static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex);
    #if 1
        static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex);
        static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex, __pyx_t_double_complex);
    #endif
#endif

static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);

static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);

static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);

static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *);

static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *);

static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *);

static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);

static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);

static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);

static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *);

static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);

static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);

static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *);

static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);

static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);

static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);

static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); /*proto*/

#define __Pyx_Generator_USED
#include <structmember.h>
#include <frameobject.h>
typedef PyObject *(*__pyx_generator_body_t)(PyObject *, PyObject *);
typedef struct {
    PyObject_HEAD
    __pyx_generator_body_t body;
    PyObject *closure;
    PyObject *exc_type;
    PyObject *exc_value;
    PyObject *exc_traceback;
    PyObject *gi_weakreflist;
    PyObject *classobj;
    PyObject *yieldfrom;
    int resume_label;
    char is_running;  // using T_BOOL for property below requires char value
} __pyx_GeneratorObject;
static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
                                                  PyObject *closure);
static int __pyx_Generator_init(void);
static int __Pyx_Generator_clear(PyObject* self);
#if 1 || PY_VERSION_HEX < 0x030300B0
static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue);
#else
#define __Pyx_PyGen_FetchStopIterationValue(pvalue) PyGen_FetchStopIterationValue(pvalue)
#endif

static int __Pyx_check_binary_version(void);

#if !defined(__Pyx_PyIdentifier_FromString)
#if PY_MAJOR_VERSION < 3
  #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
#else
  #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s)
#endif
#endif

static PyObject *__Pyx_ImportModule(const char *name); /*proto*/

static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict);  /*proto*/

typedef struct {
    int code_line;
    PyCodeObject* code_object;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
};
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static PyCodeObject *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);

static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename); /*proto*/

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/


/* Module declarations from 'cpython.buffer' */

/* Module declarations from 'cpython.ref' */

/* Module declarations from 'libc.string' */

/* Module declarations from 'libc.stdio' */

/* Module declarations from 'cpython.object' */

/* Module declarations from '__builtin__' */

/* Module declarations from 'cpython.type' */
static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;

/* Module declarations from 'libc.stdlib' */

/* Module declarations from 'numpy' */

/* Module declarations from 'numpy' */
static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/

/* Module declarations from 'libcpp' */

/* Module declarations from 'libcpp.string' */

/* Module declarations from 'libcpp.vector' */

/* Module declarations from 'libcpp.utility' */

/* Module declarations from 'libcpp.map' */

/* Module declarations from 'libcpp.pair' */

/* Module declarations from 'vcflib' */
static PyTypeObject *__pyx_ptype_6vcflib_PyVariantCallFile = 0;

/* Module declarations from 'vcfnp' */
static PyTypeObject *__pyx_ptype_5vcfnp___pyx_scope_struct_7_eff_default_transformer = 0;
static PyTypeObject *__pyx_ptype_5vcfnp___pyx_scope_struct___iter_withprogress = 0;
static PyTypeObject *__pyx_ptype_5vcfnp___pyx_scope_struct_1__itervariants = 0;
static PyTypeObject *__pyx_ptype_5vcfnp___pyx_scope_struct_9_genexpr = 0;
static PyTypeObject *__pyx_ptype_5vcfnp___pyx_scope_struct_5__itercalldata = 0;
static PyTypeObject *__pyx_ptype_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition = 0;
static PyTypeObject *__pyx_ptype_5vcfnp___pyx_scope_struct_2__itervariants_with_condition = 0;
static PyTypeObject *__pyx_ptype_5vcfnp___pyx_scope_struct_3__iterinfo = 0;
static PyTypeObject *__pyx_ptype_5vcfnp___pyx_scope_struct_8__transformer = 0;
static PyTypeObject *__pyx_ptype_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition = 0;
static size_t __pyx_v_5vcfnp_npos;
static char __pyx_v_5vcfnp_SEMICOLON;
static std::string __pyx_v_5vcfnp_DOT;
static std::string __pyx_v_5vcfnp_GT_DELIMS;
static std::string __pyx_v_5vcfnp_FIELD_NAME_CHROM;
static std::string __pyx_v_5vcfnp_FIELD_NAME_POS;
static std::string __pyx_v_5vcfnp_FIELD_NAME_ID;
static std::string __pyx_v_5vcfnp_FIELD_NAME_REF;
static std::string __pyx_v_5vcfnp_FIELD_NAME_ALT;
static std::string __pyx_v_5vcfnp_FIELD_NAME_QUAL;
static std::string __pyx_v_5vcfnp_FIELD_NAME_FILTER;
static std::string __pyx_v_5vcfnp_FIELD_NAME_INFO;
static std::string __pyx_v_5vcfnp_FIELD_NAME_NUM_ALLELES;
static std::string __pyx_v_5vcfnp_FIELD_NAME_IS_SNP;
static std::string __pyx_v_5vcfnp_FIELD_NAME_IS_CALLED;
static std::string __pyx_v_5vcfnp_FIELD_NAME_IS_PHASED;
static std::string __pyx_v_5vcfnp_FIELD_NAME_GENOTYPE;
static std::string __pyx_v_5vcfnp_FIELD_NAME_GT;
static CYTHON_INLINE bool __pyx_f_5vcfnp__get_next_variant(vcf::VariantCallFile *, vcf::Variant *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkvvals(vcf::Variant *, std::vector<std::string>, std::map<std::string,int>, PyObject *, PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkvval(vcf::Variant *, std::string, int, PyObject *, PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkaltval(vcf::Variant *, int, PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkfilterval(vcf::Variant *, PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__is_snp(vcf::Variant *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkivals(vcf::Variant *, std::vector<std::string>, std::map<std::string,int>, PyObject *, PyObject *, PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkival(vcf::Variant *, std::string, int, PyObject *, int, PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkval(std::vector<std::string> &, int, PyObject *, int); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkval_string(std::vector<std::string> &, int, std::string); /*proto*/
static CYTHON_INLINE std::vector<std::string> __pyx_f_5vcfnp__mkval_string_multi(std::vector<std::string> &, int, std::string); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkval_float(std::vector<std::string> &, int, float); /*proto*/
static CYTHON_INLINE float __pyx_f_5vcfnp__mkval_float_single(std::vector<std::string> &, float); /*proto*/
static CYTHON_INLINE std::vector<float> __pyx_f_5vcfnp__mkval_float_multi(std::vector<std::string> &, int, float); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkval_int(std::vector<std::string> &, int, int); /*proto*/
static CYTHON_INLINE int __pyx_f_5vcfnp__mkval_int_single(std::vector<std::string> &, int); /*proto*/
static CYTHON_INLINE std::vector<int> __pyx_f_5vcfnp__mkval_int_multi(std::vector<std::string> &, int, int); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkssvals(vcf::Variant *, std::vector<std::string>, int, std::vector<std::string>, std::map<std::string,int>, PyObject *, std::map<std::string,enum vcf::VariantFieldType> &); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mksvals(vcf::Variant *, std::string, int, std::vector<std::string>, std::map<std::string,int>, PyObject *, std::map<std::string,enum vcf::VariantFieldType> &); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mksval(std::map<std::string,std::vector<std::string> > &, int, std::string, int, PyObject *, std::map<std::string,enum vcf::VariantFieldType> &); /*proto*/
static CYTHON_INLINE bool __pyx_f_5vcfnp__is_called(std::map<std::string,std::vector<std::string> > &); /*proto*/
static CYTHON_INLINE bool __pyx_f_5vcfnp__is_phased(std::map<std::string,std::vector<std::string> > &); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__genotype(std::map<std::string,std::vector<std::string> > &, int); /*proto*/
static std::string __pyx_convert_string_from_py_(PyObject *); /*proto*/
static std::vector<std::string> __pyx_convert_vector_from_py_std_3a__3a_string(PyObject *); /*proto*/
static std::map<std::string,int> __pyx_convert_map_from_py_std_3a__3a_string____int(PyObject *); /*proto*/
static PyObject *__pyx_convert_string_to_py_(const std::string &); /*proto*/
static PyObject *__pyx_convert_vector_to_py_std_3a__3a_string(const std::vector<std::string> &); /*proto*/
static PyObject *__pyx_convert_vector_to_py_float(const std::vector<float> &); /*proto*/
static PyObject *__pyx_convert_vector_to_py_int(const std::vector<int> &); /*proto*/
#define __Pyx_MODULE_NAME "vcfnp"
int __pyx_module_is_main_vcfnp = 0;

/* Implementation of 'vcfnp' */
static PyObject *__pyx_builtin_Exception;
static PyObject *__pyx_builtin_sorted;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_zip;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_RuntimeError;
static PyObject *__pyx_pf_5vcfnp_variants(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_region, PyObject *__pyx_v_fields, PyObject *__pyx_v_exclude_fields, PyObject *__pyx_v_dtypes, PyObject *__pyx_v_arities, PyObject *__pyx_v_fills, PyObject *__pyx_v_count, PyObject *__pyx_v_progress, PyObject *__pyx_v_logstream, PyObject *__pyx_v_condition, PyObject *__pyx_v_slice); /* proto */
static PyObject *__pyx_pf_5vcfnp_2_fromiter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_it, PyObject *__pyx_v_dtype, PyObject *__pyx_v_count, int __pyx_v_progress, PyObject *__pyx_v_logstream); /* proto */
static PyObject *__pyx_pf_5vcfnp_4_iter_withprogress(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_iterable, int __pyx_v_progress, PyObject *__pyx_v_logstream); /* proto */
static PyObject *__pyx_pf_5vcfnp_7_itervariants(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filenames, PyObject *__pyx_v_region, std::vector<std::string> __pyx_v_fields, std::map<std::string,int> __pyx_v_arities, PyObject *__pyx_v_fills); /* proto */
static PyObject *__pyx_pf_5vcfnp_10_itervariants_with_condition(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filenames, PyObject *__pyx_v_region, std::vector<std::string> __pyx_v_fields, std::map<std::string,int> __pyx_v_arities, PyObject *__pyx_v_fills, PyObject *__pyx_v_condition); /* proto */
static PyObject *__pyx_pf_5vcfnp_13info(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_region, PyObject *__pyx_v_fields, PyObject *__pyx_v_exclude_fields, PyObject *__pyx_v_dtypes, PyObject *__pyx_v_arities, PyObject *__pyx_v_fills, PyObject *__pyx_v_transformers, PyObject *__pyx_v_vcf_types, PyObject *__pyx_v_count, PyObject *__pyx_v_progress, PyObject *__pyx_v_logstream, PyObject *__pyx_v_condition, PyObject *__pyx_v_slice); /* proto */
static PyObject *__pyx_pf_5vcfnp_15_iterinfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filenames, PyObject *__pyx_v_region, std::vector<std::string> __pyx_v_fields, std::map<std::string,int> __pyx_v_arities, PyObject *__pyx_v_fills, PyObject *__pyx_v_infoTypes, PyObject *__pyx_v_transformers); /* proto */
static PyObject *__pyx_pf_5vcfnp_18_iterinfo_with_condition(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filenames, PyObject *__pyx_v_region, std::vector<std::string> __pyx_v_fields, std::map<std::string,int> __pyx_v_arities, PyObject *__pyx_v_fills, PyObject *__pyx_v_infoTypes, PyObject *__pyx_v_transformers, PyObject *__pyx_v_condition); /* proto */
static PyObject *__pyx_pf_5vcfnp_21calldata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_region, PyObject *__pyx_v_samples, PyObject *__pyx_v_ploidy, PyObject *__pyx_v_fields, PyObject *__pyx_v_exclude_fields, PyObject *__pyx_v_dtypes, PyObject *__pyx_v_arities, PyObject *__pyx_v_fills, PyObject *__pyx_v_count, PyObject *__pyx_v_progress, PyObject *__pyx_v_logstream, PyObject *__pyx_v_condition, PyObject *__pyx_v_slice); /* proto */
static PyObject *__pyx_pf_5vcfnp_23_itercalldata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filenames, PyObject *__pyx_v_region, std::vector<std::string> __pyx_v_samples, int __pyx_v_ploidy, std::vector<std::string> __pyx_v_fields, std::map<std::string,int> __pyx_v_arities, PyObject *__pyx_v_fills); /* proto */
static PyObject *__pyx_pf_5vcfnp_26_itercalldata_with_condition(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filenames, PyObject *__pyx_v_region, std::vector<std::string> __pyx_v_samples, int __pyx_v_ploidy, std::vector<std::string> __pyx_v_fields, std::map<std::string,int> __pyx_v_arities, PyObject *__pyx_v_fills, PyObject *__pyx_v_condition); /* proto */
static PyObject *__pyx_pf_5vcfnp_29view2d(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a); /* proto */
static PyObject *__pyx_pf_5vcfnp_23eff_default_transformer_12_transformer_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_5vcfnp_23eff_default_transformer__transformer(PyObject *__pyx_self, PyObject *__pyx_v_vals); /* proto */
static PyObject *__pyx_pf_5vcfnp_31eff_default_transformer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fills); /* proto */
static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */
static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_7_eff_default_transformer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct___iter_withprogress(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_1__itervariants(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_9_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_5__itercalldata(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_2__itervariants_with_condition(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_3__iterinfo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_8__transformer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static char __pyx_k_2[] = "file not found: %s";
static char __pyx_k_3[] = "unknown field: %s";
static char __pyx_k_5[] = "DEFAULT_VARIANT_DTYPE";
static char __pyx_k_6[] = "DEFAULT_VARIANT_ARITY";
static char __pyx_k_7[] = "DEFAULT_VARIANT_FILL";
static char __pyx_k_8[] = "_itervariants_with_condition";
static char __pyx_k_10[] = "%s rows in %.2fs; batch in %.2fs (%d rows/s)";
static char __pyx_k_11[] = "%s rows in %.2fs (%d rows/s)";
static char __pyx_k_13[] = "_iterinfo_with_condition";
static char __pyx_k_15[] = "unknown sample: %s";
static char __pyx_k_16[] = "a%d";
static char __pyx_k_17[] = "DEFAULT_CALLDATA_DTYPE";
static char __pyx_k_18[] = "DEFAULT_CALLDATA_ARITY";
static char __pyx_k_19[] = "/";
static char __pyx_k_20[] = ".";
static char __pyx_k_21[] = "DEFAULT_CALLDATA_FILL";
static char __pyx_k_22[] = "_itercalldata_with_condition";
static char __pyx_k_23[] = "|";
static char __pyx_k_27[] = "";
static char __pyx_k_31[] = "([^(]+)\\(([^)]+)\\)";
static char __pyx_k_35[] = "/home/aliman/src/github/alimanfoo/vcfnp/vcfnp.pyx";
static char __pyx_k_36[] = "eff_default_transformer.<locals>._transformer";
static char __pyx_k_37[] = "ndarray is not C contiguous";
static char __pyx_k_39[] = "ndarray is not Fortran contiguous";
static char __pyx_k_41[] = "Non-native byte order not supported";
static char __pyx_k_43[] = "unknown dtype code in numpy.pxd (%d)";
static char __pyx_k_44[] = "Format string allocated too short, see comment in numpy.pxd";
static char __pyx_k_47[] = "Format string allocated too short.";
static char __pyx_k_49[] = "\nUtility functions to extract data from a VCF file and load into a numpy array.\n\n";
static char __pyx_k_50[] = "0.11.1";
static char __pyx_k_53[] = "/|";
static char __pyx_k_92[] = "eff_default_transformer";
static char __pyx_k_93[] = "variants (line 176)";
static char __pyx_k_94[] = "\n    Load an numpy structured array with data from the fixed fields of a VCF file\n    (excluding INFO).\n\n    Parameters\n    ----------\n\n    filename: string or list\n        Name of the VCF file or list of file names\n    region: string\n        Region to extract, e.g., 'chr1' or 'chr1:0-100000'\n    fields: list or array-like\n        List of fields to extract from the VCF\n    exclude_fields: list or array-like\n        Fields to exclude from extraction\n    dtypes: dict or dict-like\n        Dictionary cotaining dtypes to use instead of the default inferred ones\n    arities: dict or dict-like\n        Dictinoary containing field:integer mappings used to override the number\n        of values to expect\n    fills: dict or dict-like\n        Dictionary containing field:fillvalue mappings used to override the\n        defaults used for missing values\n    count: int\n        Attempt to extract a specific number of records\n    progress: int\n        If greater than 0, log parsing progress\n    logstream: file or file-like object\n        Stream to use for logging progress\n    condition: array\n        Boolean array defining which rows to load\n    slice: tuple or list\n        Slice of the underlying iterator, e.g., (0, 1000, 10) takes every 10th row from the first 1000\n\n    Examples\n    --------\n\n        >>> from vcfnp import variants\n        >>> a = variants('sample.vcf')\n        >>> a\n        array([ ('19', 111, '.', 'A', 'C', 9.600000381469727, (False, False, False), 2, True),\n               ('19', 112, '.', 'A', 'G', 10.0, (False, False, False), 2, True),\n               ('20', 14370, 'rs6054257', 'G', 'A', 29.0, (True, False, False), 2, True),\n               ('20', 17330, '.', 'T', 'A', 3.0, (False, True, False), 2, True),\n               ('20', 1110696, 'rs6040355', 'A', 'G', 67.0, (True, False, False), 3, True),\n               ('20', 1230237, '.', 'T', '.', 47.0, (True, False, False), 2, False),\n               ('20', 1234567, 'microsat1'"", 'G', 'GA', 50.0, (True, False, False), 3, False),\n               ('20', 1235237, '.', 'T', '.', 0.0, (False, False, False), 2, False),\n               ('X', 10, 'rsTest', 'AC', 'A', 10.0, (True, False, False), 3, False)],\n              dtype=[('CHROM', '|S12'), ('POS', '<i4'), ('ID', '|S12'), ('REF', '|S12'), ('ALT', '|S12'), ('QUAL', '<f4'), ('FILTER', [('PASS', '|b1'), ('q10', '|b1'), ('s50', '|b1')]), ('num_alleles', '|u1'), ('is_snp', '|b1')])\n        >>> a['QUAL']\n        array([  9.60000038,  10.        ,  29.        ,   3.        ,\n                67.        ,  47.        ,  50.        ,   0.        ,  10.        ], dtype=float32)\n        >>> a['FILTER']['PASS']\n        array([False, False,  True, False,  True,  True,  True, False,  True], dtype=bool)\n\n    ";
static char __pyx_k_95[] = "info (line 487)";
static char __pyx_k_96[] = "\n    Load a numpy structured array with data from the INFO field of a VCF file.\n\n    Parameters\n    ----------\n\n    filename: string or list\n        Name of the VCF file or list of file names\n    region: string\n        Region to extract, e.g., 'chr1' or 'chr1:0-100000'\n    fields: list or array-like\n        List of fields to extract from the VCF\n    exclude_fields: list or array-like\n        Fields to exclude from extraction\n    dtypes: dict or dict-like\n        Dictionary cotaining dtypes to use instead of the default inferred ones\n    arities: dict or dict-like\n        Dictinoary containing field:integer mappings used to override the number\n        of values to expect\n    fills: dict or dict-like\n        Dictionary containing field:fillvalue mappings used to override the\n        defaults used for missing values\n    transformers: dict or dict-like\n        Dictionary containing field:function mappings used to preprocess\n        any values prior to loading into array\n    vcf_types: dict or dict-like\n        Dictionary containing field:string mappings used to override any\n        bogus type declarations in the VCF header (e.g., MQ0Fraction declared\n        as Integer)\n    count: int\n        Attempt to extract a specific number of records\n    progress: int\n        If greater than 0, log parsing progress\n    logstream: file or file-like object\n        Stream to use for logging progress\n    condition: array\n        Boolean array defining which rows to load\n    slice: tuple or list\n        Slice of the underlying iterator, e.g., (0, 1000, 10) takes every 10th row from the first 1000\n\n    Examples\n    --------\n\n        >>> from vcfnp import info\n        >>> a = info('sample.vcf')\n        >>> a\n        array([(0, 0, 0, 0, 0.0, '.', False, False),\n               (0, 0, 0, 0, 0.0, '.', False, False),\n               (3, 0, 0, 14, 0.5, '.', True, True),\n               (3, 0, 0, 11, 0.017000000923871994, '.', False, False),\n     ""          (2, 0, 0, 10, 0.3330000042915344, 'T', True, False),\n               (3, 0, 0, 13, 0.0, 'T', False, False),\n               (3, 6, 3, 9, 0.0, 'G', False, False),\n               (0, 0, 0, 0, 0.0, '.', False, False),\n               (0, 0, 0, 0, 0.0, '.', False, False)],\n              dtype=[('NS', '<i4'), ('AN', '<u2'), ('AC', '<u2'), ('DP', '<i4'), ('AF', '<f4'), ('AA', '|S12'), ('DB', '|b1'), ('H2', '|b1')])\n\n    ";
static char __pyx_k_97[] = "calldata (line 856)";
static char __pyx_k_98[] = "\n    Load a numpy structured array with data from the sample columns of a VCF\n    file.\n\n    Parameters\n    ----------\n\n    filename: string or list\n        Name of the VCF file or list of file names\n    region: string\n        Region to extract, e.g., 'chr1' or 'chr1:0-100000'\n    fields: list or array-like\n        List of fields to extract from the VCF\n    exclude_fields: list or array-like\n        Fields to exclude from extraction\n    dtypes: dict or dict-like\n        Dictionary cotaining dtypes to use instead of the default inferred ones\n    arities: dict or dict-like\n        Override the amount of values to expect\n    fills: dict or dict-like\n        Dictionary containing field:fillvalue mappings used to override the\n        default fill in values in VCF fields\n    count: int\n        Attempt to extract a specific number of records\n    progress: int\n        If greater than 0, log parsing progress\n    logstream: file or file-like object\n        Stream to use for logging progress\n    condition: array\n        Boolean array defining which rows to load\n    slice: tuple or list\n        Slice of the underlying iterator, e.g., (0, 1000, 10) takes every 10th row from the first 1000\n\n    Examples\n    --------\n\n        >>> from vcfnp import samples\n        >>> a = calldata('sample.vcf')\n        >>> a\n        array([ ((True, True, [0, 0], '0|0', 0, 0, [10, 10]), (True, True, [0, 0], '0|0', 0, 0, [10, 10]), (True, False, [0, 1], '0/1', 0, 0, [3, 3])),\n               ((True, True, [0, 0], '0|0', 0, 0, [10, 10]), (True, True, [0, 0], '0|0', 0, 0, [10, 10]), (True, False, [0, 1], '0/1', 0, 0, [3, 3])),\n               ((True, True, [0, 0], '0|0', 48, 1, [51, 51]), (True, True, [1, 0], '1|0', 48, 8, [51, 51]), (True, False, [1, 1], '1/1', 43, 5, [0, 0])),\n               ((True, True, [0, 0], '0|0', 49, 3, [58, 50]), (True, True, [0, 1], '0|1', 3, 5, [65, 3]), (True, False, [0, 0], '0/0', 41, 3, [0, 0])),\n               ((True, True, [1, 2""], '1|2', 21, 6, [23, 27]), (True, True, [2, 1], '2|1', 2, 0, [18, 2]), (True, False, [2, 2], '2/2', 35, 4, [0, 0])),\n               ((True, True, [0, 0], '0|0', 54, 0, [56, 60]), (True, True, [0, 0], '0|0', 48, 4, [51, 51]), (True, False, [0, 0], '0/0', 61, 2, [0, 0])),\n               ((True, False, [0, 1], '0/1', 0, 4, [0, 0]), (True, False, [0, 2], '0/2', 17, 2, [0, 0]), (True, False, [1, 1], '1/1', 40, 3, [0, 0])),\n               ((True, False, [0, 0], '0/0', 0, 0, [0, 0]), (True, True, [0, 0], '0|0', 0, 0, [0, 0]), (False, False, [-1, -1], './.', 0, 0, [0, 0])),\n               ((True, False, [0, -1], '0', 0, 0, [0, 0]), (True, False, [0, 1], '0/1', 0, 0, [0, 0]), (True, True, [0, 2], '0|2', 0, 0, [0, 0]))],\n              dtype=[('NA00001', [('is_called', '|b1'), ('is_phased', '|b1'), ('genotype', '|i1', (2,)), ('GT', '|S3'), ('GQ', '|u1'), ('DP', '<u2'), ('HQ', '<i4', (2,))]), ('NA00002', [('is_called', '|b1'), ('is_phased', '|b1'), ('genotype', '|i1', (2,)), ('GT', '|S3'), ('GQ', '|u1'), ('DP', '<u2'), ('HQ', '<i4', (2,))]), ('NA00003', [('is_called', '|b1'), ('is_phased', '|b1'), ('genotype', '|i1', (2,)), ('GT', '|S3'), ('GQ', '|u1'), ('DP', '<u2'), ('HQ', '<i4', (2,))])])\n        >>> a['NA00001']\n        array([(True, True, [0, 0], '0|0', 0, 0, [10, 10]),\n               (True, True, [0, 0], '0|0', 0, 0, [10, 10]),\n               (True, True, [0, 0], '0|0', 48, 1, [51, 51]),\n               (True, True, [0, 0], '0|0', 49, 3, [58, 50]),\n               (True, True, [1, 2], '1|2', 21, 6, [23, 27]),\n               (True, True, [0, 0], '0|0', 54, 0, [56, 60]),\n               (True, False, [0, 1], '0/1', 0, 4, [0, 0]),\n               (True, False, [0, 0], '0/0', 0, 0, [0, 0]),\n               (True, False, [0, -1], '0', 0, 0, [0, 0])],\n              dtype=[('is_called', '|b1'), ('is_phased', '|b1'), ('genotype', '|i1', (2,)), ('GT', '|S3'), ('GQ', '|u1'), ('DP', '<u2'), ('HQ', '<i4', (2,))])\n\n    ";
static char __pyx_k_99[] = "view2d (line 1231)";
static char __pyx_k__A[] = "A";
static char __pyx_k__B[] = "B";
static char __pyx_k__C[] = "C";
static char __pyx_k__G[] = "G";
static char __pyx_k__H[] = "H";
static char __pyx_k__I[] = "I";
static char __pyx_k__L[] = "L";
static char __pyx_k__O[] = "O";
static char __pyx_k__Q[] = "Q";
static char __pyx_k__T[] = "T";
static char __pyx_k__a[] = "a";
static char __pyx_k__b[] = "b";
static char __pyx_k__d[] = "d";
static char __pyx_k__f[] = "f";
static char __pyx_k__g[] = "g";
static char __pyx_k__h[] = "h";
static char __pyx_k__i[] = "i";
static char __pyx_k__l[] = "l";
static char __pyx_k__n[] = "n";
static char __pyx_k__o[] = "o";
static char __pyx_k__q[] = "q";
static char __pyx_k__s[] = "s";
static char __pyx_k__t[] = "t";
static char __pyx_k_100[] = "\n    Utility function to view a structured 1D array where all fields have a\n    uniform dtype (e.g., an array constructed by :func:calldata) as a 2D array.\n\n    Parameters\n    ----------\n\n    a: numpy array or array-like\n        The array to be viewed as 2D, must have a uniform dtype\n\n    Returns\n    -------\n\n    A 2D view of the array.\n\n    Examples\n    --------\n\n        >>> from vcfnp import calldata\n        >>> a = calldata('sample.vcf')\n        >>> a\n        array([ ((True, True, [0, 0], '0|0', 0, 0, [10, 10]), (True, True, [0, 0], '0|0', 0, 0, [10, 10]), (True, False, [0, 1], '0/1', 0, 0, [3, 3])),\n               ((True, True, [0, 0], '0|0', 0, 0, [10, 10]), (True, True, [0, 0], '0|0', 0, 0, [10, 10]), (True, False, [0, 1], '0/1', 0, 0, [3, 3])),\n               ((True, True, [0, 0], '0|0', 48, 1, [51, 51]), (True, True, [1, 0], '1|0', 48, 8, [51, 51]), (True, False, [1, 1], '1/1', 43, 5, [0, 0])),\n               ((True, True, [0, 0], '0|0', 49, 3, [58, 50]), (True, True, [0, 1], '0|1', 3, 5, [65, 3]), (True, False, [0, 0], '0/0', 41, 3, [0, 0])),\n               ((True, True, [1, 2], '1|2', 21, 6, [23, 27]), (True, True, [2, 1], '2|1', 2, 0, [18, 2]), (True, False, [2, 2], '2/2', 35, 4, [0, 0])),\n               ((True, True, [0, 0], '0|0', 54, 0, [56, 60]), (True, True, [0, 0], '0|0', 48, 4, [51, 51]), (True, False, [0, 0], '0/0', 61, 2, [0, 0])),\n               ((True, False, [0, 1], '0/1', 0, 4, [0, 0]), (True, False, [0, 2], '0/2', 17, 2, [0, 0]), (True, False, [1, 1], '1/1', 40, 3, [0, 0])),\n               ((True, False, [0, 0], '0/0', 0, 0, [0, 0]), (True, True, [0, 0], '0|0', 0, 0, [0, 0]), (False, False, [-1, -1], './.', 0, 0, [0, 0])),\n               ((True, False, [0, -1], '0', 0, 0, [0, 0]), (True, False, [0, 1], '0/1', 0, 0, [0, 0]), (True, True, [0, 2], '0|2', 0, 0, [0, 0]))],\n              dtype=[('NA00001', [('is_called', '|b1'), ('is_phased', '|b1'), ('genotype', '|i1', (2,)), ('GT', '|S3'), ('GQ', '|u1'), ('DP', '<u2""'), ('HQ', '<i4', (2,))]), ('NA00002', [('is_called', '|b1'), ('is_phased', '|b1'), ('genotype', '|i1', (2,)), ('GT', '|S3'), ('GQ', '|u1'), ('DP', '<u2'), ('HQ', '<i4', (2,))]), ('NA00003', [('is_called', '|b1'), ('is_phased', '|b1'), ('genotype', '|i1', (2,)), ('GT', '|S3'), ('GQ', '|u1'), ('DP', '<u2'), ('HQ', '<i4', (2,))])])\n        >>> from vcfnp import view2d\n        >>> b = view2d(a)\n        >>> b\n        array([[(True, True, [0, 0], '0|0', 0, 0, [10, 10]),\n                (True, True, [0, 0], '0|0', 0, 0, [10, 10]),\n                (True, False, [0, 1], '0/1', 0, 0, [3, 3])],\n               [(True, True, [0, 0], '0|0', 0, 0, [10, 10]),\n                (True, True, [0, 0], '0|0', 0, 0, [10, 10]),\n                (True, False, [0, 1], '0/1', 0, 0, [3, 3])],\n               [(True, True, [0, 0], '0|0', 48, 1, [51, 51]),\n                (True, True, [1, 0], '1|0', 48, 8, [51, 51]),\n                (True, False, [1, 1], '1/1', 43, 5, [0, 0])],\n               [(True, True, [0, 0], '0|0', 49, 3, [58, 50]),\n                (True, True, [0, 1], '0|1', 3, 5, [65, 3]),\n                (True, False, [0, 0], '0/0', 41, 3, [0, 0])],\n               [(True, True, [1, 2], '1|2', 21, 6, [23, 27]),\n                (True, True, [2, 1], '2|1', 2, 0, [18, 2]),\n                (True, False, [2, 2], '2/2', 35, 4, [0, 0])],\n               [(True, True, [0, 0], '0|0', 54, 0, [56, 60]),\n                (True, True, [0, 0], '0|0', 48, 4, [51, 51]),\n                (True, False, [0, 0], '0/0', 61, 2, [0, 0])],\n               [(True, False, [0, 1], '0/1', 0, 4, [0, 0]),\n                (True, False, [0, 2], '0/2', 17, 2, [0, 0]),\n                (True, False, [1, 1], '1/1', 40, 3, [0, 0])],\n               [(True, False, [0, 0], '0/0', 0, 0, [0, 0]),\n                (True, True, [0, 0], '0|0', 0, 0, [0, 0]),\n                (False, False, [-1, -1], './.', 0, 0, [0, 0])],\n               [(True, False, [0, -1], '0', 0, 0, [0, 0]),\n                (True, False, [""0, 1], '0/1', 0, 0, [0, 0]),\n                (True, True, [0, 2], '0|2', 0, 0, [0, 0])]],\n              dtype=[('is_called', '|b1'), ('is_phased', '|b1'), ('genotype', '|i1', (2,)), ('GT', '|S3'), ('GQ', '|u1'), ('DP', '<u2'), ('HQ', '<i4', (2,))])\n        >>> b['GT']\n        array([['0|0', '0|0', '0/1'],\n               ['0|0', '0|0', '0/1'],\n               ['0|0', '1|0', '1/1'],\n               ['0|0', '0|1', '0/0'],\n               ['1|2', '2|1', '2/2'],\n               ['0|0', '0|0', '0/0'],\n               ['0/1', '0/2', '1/1'],\n               ['0/0', '0|0', './.'],\n               ['0', '0/1', '0|2']],\n              dtype='|S3')\n\n    ";
static char __pyx_k__AC[] = "AC";
static char __pyx_k__AD[] = "AD";
static char __pyx_k__AN[] = "AN";
static char __pyx_k__DP[] = "DP";
static char __pyx_k__GQ[] = "GQ";
static char __pyx_k__GT[] = "GT";
static char __pyx_k__ID[] = "ID";
static char __pyx_k__MQ[] = "MQ";
static char __pyx_k__PL[] = "PL";
static char __pyx_k__QD[] = "QD";
static char __pyx_k__Zd[] = "Zd";
static char __pyx_k__Zf[] = "Zf";
static char __pyx_k__Zg[] = "Zg";
static char __pyx_k__a6[] = "a6";
static char __pyx_k__a7[] = "a7";
static char __pyx_k__a8[] = "a8";
static char __pyx_k__b1[] = "b1";
static char __pyx_k__f2[] = "f2";
static char __pyx_k__f4[] = "f4";
static char __pyx_k__fn[] = "fn";
static char __pyx_k__i1[] = "i1";
static char __pyx_k__i4[] = "i4";
static char __pyx_k__it[] = "it";
static char __pyx_k__np[] = "np";
static char __pyx_k__os[] = "os";
static char __pyx_k__re[] = "re";
static char __pyx_k__u1[] = "u1";
static char __pyx_k__u2[] = "u2";
static char __pyx_k__ALT[] = "ALT";
static char __pyx_k__MQ0[] = "MQ0";
static char __pyx_k__POS[] = "POS";
static char __pyx_k__REF[] = "REF";
static char __pyx_k__RPA[] = "RPA";
static char __pyx_k__a12[] = "a12";
static char __pyx_k__a14[] = "a14";
static char __pyx_k__a20[] = "a20";
static char __pyx_k__a33[] = "a33";
static char __pyx_k__eff[] = "eff";
static char __pyx_k__end[] = "end";
static char __pyx_k__flt[] = "flt";
static char __pyx_k__sys[] = "sys";
static char __pyx_k__var[] = "var";
static char __pyx_k__vcf[] = "vcf";
static char __pyx_k__zip[] = "zip";
static char __pyx_k__Exon[] = "Exon";
static char __pyx_k__Flag[] = "Flag";
static char __pyx_k__HRun[] = "HRun";
static char __pyx_k__INFO[] = "INFO";
static char __pyx_k__PASS[] = "PASS";
static char __pyx_k__QUAL[] = "QUAL";
static char __pyx_k__args[] = "args";
static char __pyx_k__cols[] = "cols";
static char __pyx_k__file[] = "file";
static char __pyx_k__info[] = "info";
static char __pyx_k__join[] = "join";
static char __pyx_k__path[] = "path";
static char __pyx_k__rows[] = "rows";
static char __pyx_k__send[] = "send";
static char __pyx_k__size[] = "size";
static char __pyx_k__time[] = "time";
static char __pyx_k__vals[] = "vals";
static char __pyx_k__view[] = "view";
static char __pyx_k__CHROM[] = "CHROM";
static char __pyx_k__Float[] = "Float";
static char __pyx_k__MLEAC[] = "MLEAC";
static char __pyx_k__after[] = "after";
static char __pyx_k__close[] = "close";
static char __pyx_k__count[] = "count";
static char __pyx_k__dtype[] = "dtype";
static char __pyx_k__fills[] = "fills";
static char __pyx_k__group[] = "group";
static char __pyx_k__match[] = "match";
static char __pyx_k__numpy[] = "numpy";
static char __pyx_k__print[] = "print";
static char __pyx_k__range[] = "range";
static char __pyx_k__slice[] = "slice";
static char __pyx_k__split[] = "split";
static char __pyx_k__throw[] = "throw";
static char __pyx_k__vcfnp[] = "vcfnp";
static char __pyx_k__CODING[] = "CODING";
static char __pyx_k__Effect[] = "Effect";
static char __pyx_k__FILTER[] = "FILTER";
static char __pyx_k__MLPSAC[] = "MLPSAC";
static char __pyx_k__MLPSAF[] = "MLPSAF";
static char __pyx_k__String[] = "String";
static char __pyx_k__before[] = "before";
static char __pyx_k__dtypes[] = "dtypes";
static char __pyx_k__exists[] = "exists";
static char __pyx_k__fields[] = "fields";
static char __pyx_k__is_snp[] = "is_snp";
static char __pyx_k__islice[] = "islice";
static char __pyx_k__ploidy[] = "ploidy";
static char __pyx_k__region[] = "region";
static char __pyx_k__result[] = "result";
static char __pyx_k__sorted[] = "sorted";
static char __pyx_k__stderr[] = "stderr";
static char __pyx_k__view2d[] = "view2d";
static char __pyx_k__Integer[] = "Integer";
static char __pyx_k__arities[] = "arities";
static char __pyx_k__compile[] = "compile";
static char __pyx_k__genexpr[] = "genexpr";
static char __pyx_k__infoIds[] = "infoIds";
static char __pyx_k__reshape[] = "reshape";
static char __pyx_k__samples[] = "samples";
static char __pyx_k____main__[] = "__main__";
static char __pyx_k____test__[] = "__test__";
static char __pyx_k__calldata[] = "calldata";
static char __pyx_k__filename[] = "filename";
static char __pyx_k__fromiter[] = "fromiter";
static char __pyx_k__genotype[] = "genotype";
static char __pyx_k__iterable[] = "iterable";
static char __pyx_k__progress[] = "progress";
static char __pyx_k__variants[] = "variants";
static char __pyx_k__vcf_type[] = "vcf_type";
static char __pyx_k__Exception[] = "Exception";
static char __pyx_k__Gene_Name[] = "Gene_Name";
static char __pyx_k___fromiter[] = "_fromiter";
static char __pyx_k___iterinfo[] = "_iterinfo";
static char __pyx_k__after_all[] = "after_all";
static char __pyx_k__condition[] = "condition";
static char __pyx_k__enumerate[] = "enumerate";
static char __pyx_k__filenames[] = "filenames";
static char __pyx_k__filterIds[] = "filterIds";
static char __pyx_k__formatIds[] = "formatIds";
static char __pyx_k__infoTypes[] = "infoTypes";
static char __pyx_k__is_called[] = "is_called";
static char __pyx_k__is_phased[] = "is_phased";
static char __pyx_k__iteritems[] = "iteritems";
static char __pyx_k__itertools[] = "itertools";
static char __pyx_k__logstream[] = "logstream";
static char __pyx_k__vcf_count[] = "vcf_count";
static char __pyx_k__vcf_types[] = "vcf_types";
static char __pyx_k__ValueError[] = "ValueError";
static char __pyx_k____import__[] = "__import__";
static char __pyx_k__before_all[] = "before_all";
static char __pyx_k__cell_dtype[] = "cell_dtype";
static char __pyx_k__infoCounts[] = "infoCounts";
static char __pyx_k__Gene_Coding[] = "Gene_Coding";
static char __pyx_k____version__[] = "__version__";
static char __pyx_k__all_samples[] = "all_samples";
static char __pyx_k__formatTypes[] = "formatTypes";
static char __pyx_k__num_alleles[] = "num_alleles";
static char __pyx_k__sampleNames[] = "sampleNames";
static char __pyx_k__variantFile[] = "variantFile";
static char __pyx_k__Codon_Change[] = "Codon_Change";
static char __pyx_k__RuntimeError[] = "RuntimeError";
static char __pyx_k___transformer[] = "_transformer";
static char __pyx_k__formatCounts[] = "formatCounts";
static char __pyx_k__transformers[] = "transformers";
static char __pyx_k__Effect_Impact[] = "Effect_Impact";
static char __pyx_k__Transcript_ID[] = "Transcript_ID";
static char __pyx_k___itercalldata[] = "_itercalldata";
static char __pyx_k___itervariants[] = "_itervariants";
static char __pyx_k__prog_eff_main[] = "prog_eff_main";
static char __pyx_k__TYPESTRING2KEY[] = "TYPESTRING2KEY";
static char __pyx_k__VARIANT_FIELDS[] = "VARIANT_FIELDS";
static char __pyx_k__exclude_fields[] = "exclude_fields";
static char __pyx_k__match_eff_main[] = "match_eff_main";
static char __pyx_k__CALLDATA_FIELDS[] = "CALLDATA_FIELDS";
static char __pyx_k__DEFAULT_FILL_MAP[] = "DEFAULT_FILL_MAP";
static char __pyx_k__DEFAULT_TYPE_MAP[] = "DEFAULT_TYPE_MAP";
static char __pyx_k__Functional_Class[] = "Functional_Class";
static char __pyx_k__current_filename[] = "current_filename";
static char __pyx_k__Amino_Acid_Change[] = "Amino_Acid_Change";
static char __pyx_k__Amino_Acid_Length[] = "Amino_Acid_Length";
static char __pyx_k__EFF_DEFAULT_DTYPE[] = "EFF_DEFAULT_DTYPE";
static char __pyx_k__EFF_DEFAULT_FILLS[] = "EFF_DEFAULT_FILLS";
static char __pyx_k__DEFAULT_INFO_DTYPE[] = "DEFAULT_INFO_DTYPE";
static char __pyx_k__Transcript_BioType[] = "Transcript_BioType";
static char __pyx_k___iter_withprogress[] = "_iter_withprogress";
static PyObject *__pyx_kp_s_10;
static PyObject *__pyx_kp_u_100;
static PyObject *__pyx_kp_s_11;
static PyObject *__pyx_n_s_13;
static PyObject *__pyx_kp_s_15;
static PyObject *__pyx_kp_s_16;
static PyObject *__pyx_n_s_17;
static PyObject *__pyx_n_s_18;
static PyObject *__pyx_kp_s_19;
static PyObject *__pyx_kp_s_2;
static PyObject *__pyx_kp_b_20;
static PyObject *__pyx_kp_s_20;
static PyObject *__pyx_n_s_21;
static PyObject *__pyx_n_s_22;
static PyObject *__pyx_kp_b_23;
static PyObject *__pyx_kp_s_23;
static PyObject *__pyx_kp_s_27;
static PyObject *__pyx_kp_s_3;
static PyObject *__pyx_kp_s_31;
static PyObject *__pyx_kp_s_35;
static PyObject *__pyx_n_s_36;
static PyObject *__pyx_kp_u_37;
static PyObject *__pyx_kp_u_39;
static PyObject *__pyx_kp_u_41;
static PyObject *__pyx_kp_u_43;
static PyObject *__pyx_kp_u_44;
static PyObject *__pyx_kp_u_47;
static PyObject *__pyx_n_s_5;
static PyObject *__pyx_kp_s_50;
static PyObject *__pyx_kp_b_53;
static PyObject *__pyx_n_s_6;
static PyObject *__pyx_n_s_7;
static PyObject *__pyx_n_s_8;
static PyObject *__pyx_n_s_92;
static PyObject *__pyx_kp_u_93;
static PyObject *__pyx_kp_u_94;
static PyObject *__pyx_kp_u_95;
static PyObject *__pyx_kp_u_96;
static PyObject *__pyx_kp_u_97;
static PyObject *__pyx_kp_u_98;
static PyObject *__pyx_kp_u_99;
static PyObject *__pyx_n_s__A;
static PyObject *__pyx_n_s__AC;
static PyObject *__pyx_n_s__AD;
static PyObject *__pyx_n_b__ALT;
static PyObject *__pyx_n_s__ALT;
static PyObject *__pyx_n_s__AN;
static PyObject *__pyx_n_s__Amino_Acid_Change;
static PyObject *__pyx_n_s__Amino_Acid_Length;
static PyObject *__pyx_n_s__C;
static PyObject *__pyx_n_s__CALLDATA_FIELDS;
static PyObject *__pyx_n_b__CHROM;
static PyObject *__pyx_n_s__CHROM;
static PyObject *__pyx_n_s__CODING;
static PyObject *__pyx_n_s__Codon_Change;
static PyObject *__pyx_n_s__DEFAULT_FILL_MAP;
static PyObject *__pyx_n_s__DEFAULT_INFO_DTYPE;
static PyObject *__pyx_n_s__DEFAULT_TYPE_MAP;
static PyObject *__pyx_n_s__DP;
static PyObject *__pyx_n_s__EFF_DEFAULT_DTYPE;
static PyObject *__pyx_n_s__EFF_DEFAULT_FILLS;
static PyObject *__pyx_n_s__Effect;
static PyObject *__pyx_n_s__Effect_Impact;
static PyObject *__pyx_n_s__Exception;
static PyObject *__pyx_n_s__Exon;
static PyObject *__pyx_n_b__FILTER;
static PyObject *__pyx_n_s__FILTER;
static PyObject *__pyx_n_s__Flag;
static PyObject *__pyx_n_s__Float;
static PyObject *__pyx_n_s__Functional_Class;
static PyObject *__pyx_n_s__G;
static PyObject *__pyx_n_s__GQ;
static PyObject *__pyx_n_b__GT;
static PyObject *__pyx_n_s__GT;
static PyObject *__pyx_n_s__Gene_Coding;
static PyObject *__pyx_n_s__Gene_Name;
static PyObject *__pyx_n_s__HRun;
static PyObject *__pyx_n_b__ID;
static PyObject *__pyx_n_s__ID;
static PyObject *__pyx_n_b__INFO;
static PyObject *__pyx_n_s__Integer;
static PyObject *__pyx_n_s__MLEAC;
static PyObject *__pyx_n_s__MLPSAC;
static PyObject *__pyx_n_s__MLPSAF;
static PyObject *__pyx_n_s__MQ;
static PyObject *__pyx_n_s__MQ0;
static PyObject *__pyx_n_s__PASS;
static PyObject *__pyx_n_s__PL;
static PyObject *__pyx_n_b__POS;
static PyObject *__pyx_n_s__POS;
static PyObject *__pyx_n_s__QD;
static PyObject *__pyx_n_b__QUAL;
static PyObject *__pyx_n_s__QUAL;
static PyObject *__pyx_n_b__REF;
static PyObject *__pyx_n_s__REF;
static PyObject *__pyx_n_s__RPA;
static PyObject *__pyx_n_s__RuntimeError;
static PyObject *__pyx_n_s__String;
static PyObject *__pyx_n_s__T;
static PyObject *__pyx_n_s__TYPESTRING2KEY;
static PyObject *__pyx_n_s__Transcript_BioType;
static PyObject *__pyx_n_s__Transcript_ID;
static PyObject *__pyx_n_s__VARIANT_FIELDS;
static PyObject *__pyx_n_s__ValueError;
static PyObject *__pyx_n_s____import__;
static PyObject *__pyx_n_s____main__;
static PyObject *__pyx_n_s____test__;
static PyObject *__pyx_n_s____version__;
static PyObject *__pyx_n_s___fromiter;
static PyObject *__pyx_n_s___iter_withprogress;
static PyObject *__pyx_n_s___itercalldata;
static PyObject *__pyx_n_s___iterinfo;
static PyObject *__pyx_n_s___itervariants;
static PyObject *__pyx_n_s___transformer;
static PyObject *__pyx_n_s__a;
static PyObject *__pyx_n_s__a12;
static PyObject *__pyx_n_s__a14;
static PyObject *__pyx_n_s__a20;
static PyObject *__pyx_n_s__a33;
static PyObject *__pyx_n_s__a6;
static PyObject *__pyx_n_s__a7;
static PyObject *__pyx_n_s__a8;
static PyObject *__pyx_n_s__after;
static PyObject *__pyx_n_s__after_all;
static PyObject *__pyx_n_s__all_samples;
static PyObject *__pyx_n_s__args;
static PyObject *__pyx_n_s__arities;
static PyObject *__pyx_n_s__b;
static PyObject *__pyx_n_s__b1;
static PyObject *__pyx_n_s__before;
static PyObject *__pyx_n_s__before_all;
static PyObject *__pyx_n_s__calldata;
static PyObject *__pyx_n_s__cell_dtype;
static PyObject *__pyx_n_s__close;
static PyObject *__pyx_n_s__cols;
static PyObject *__pyx_n_s__compile;
static PyObject *__pyx_n_s__condition;
static PyObject *__pyx_n_s__count;
static PyObject *__pyx_n_s__current_filename;
static PyObject *__pyx_n_s__dtype;
static PyObject *__pyx_n_s__dtypes;
static PyObject *__pyx_n_s__eff;
static PyObject *__pyx_n_s__end;
static PyObject *__pyx_n_s__enumerate;
static PyObject *__pyx_n_s__exclude_fields;
static PyObject *__pyx_n_s__exists;
static PyObject *__pyx_n_s__f;
static PyObject *__pyx_n_s__f2;
static PyObject *__pyx_n_s__f4;
static PyObject *__pyx_n_s__fields;
static PyObject *__pyx_n_s__file;
static PyObject *__pyx_n_s__filename;
static PyObject *__pyx_n_s__filenames;
static PyObject *__pyx_n_s__fills;
static PyObject *__pyx_n_s__filterIds;
static PyObject *__pyx_n_s__flt;
static PyObject *__pyx_n_s__fn;
static PyObject *__pyx_n_s__formatCounts;
static PyObject *__pyx_n_s__formatIds;
static PyObject *__pyx_n_s__formatTypes;
static PyObject *__pyx_n_s__fromiter;
static PyObject *__pyx_n_s__genexpr;
static PyObject *__pyx_n_b__genotype;
static PyObject *__pyx_n_s__genotype;
static PyObject *__pyx_n_s__group;
static PyObject *__pyx_n_s__i;
static PyObject *__pyx_n_s__i1;
static PyObject *__pyx_n_s__i4;
static PyObject *__pyx_n_s__info;
static PyObject *__pyx_n_s__infoCounts;
static PyObject *__pyx_n_s__infoIds;
static PyObject *__pyx_n_s__infoTypes;
static PyObject *__pyx_n_b__is_called;
static PyObject *__pyx_n_s__is_called;
static PyObject *__pyx_n_b__is_phased;
static PyObject *__pyx_n_s__is_phased;
static PyObject *__pyx_n_b__is_snp;
static PyObject *__pyx_n_s__is_snp;
static PyObject *__pyx_n_s__islice;
static PyObject *__pyx_n_s__it;
static PyObject *__pyx_n_s__iterable;
static PyObject *__pyx_n_s__iteritems;
static PyObject *__pyx_n_s__itertools;
static PyObject *__pyx_n_s__join;
static PyObject *__pyx_n_s__logstream;
static PyObject *__pyx_n_s__match;
static PyObject *__pyx_n_s__match_eff_main;
static PyObject *__pyx_n_s__n;
static PyObject *__pyx_n_s__np;
static PyObject *__pyx_n_b__num_alleles;
static PyObject *__pyx_n_s__num_alleles;
static PyObject *__pyx_n_s__numpy;
static PyObject *__pyx_n_s__o;
static PyObject *__pyx_n_s__os;
static PyObject *__pyx_n_s__path;
static PyObject *__pyx_n_s__ploidy;
static PyObject *__pyx_n_s__print;
static PyObject *__pyx_n_s__prog_eff_main;
static PyObject *__pyx_n_s__progress;
static PyObject *__pyx_n_s__range;
static PyObject *__pyx_n_s__re;
static PyObject *__pyx_n_s__region;
static PyObject *__pyx_n_s__reshape;
static PyObject *__pyx_n_s__result;
static PyObject *__pyx_n_s__rows;
static PyObject *__pyx_n_s__s;
static PyObject *__pyx_n_s__sampleNames;
static PyObject *__pyx_n_s__samples;
static PyObject *__pyx_n_s__send;
static PyObject *__pyx_n_s__size;
static PyObject *__pyx_n_s__slice;
static PyObject *__pyx_n_s__sorted;
static PyObject *__pyx_n_s__split;
static PyObject *__pyx_n_s__stderr;
static PyObject *__pyx_n_s__sys;
static PyObject *__pyx_n_s__t;
static PyObject *__pyx_n_s__throw;
static PyObject *__pyx_n_s__time;
static PyObject *__pyx_n_s__transformers;
static PyObject *__pyx_n_s__u1;
static PyObject *__pyx_n_s__u2;
static PyObject *__pyx_n_s__vals;
static PyObject *__pyx_n_s__var;
static PyObject *__pyx_n_s__variantFile;
static PyObject *__pyx_n_s__variants;
static PyObject *__pyx_n_s__vcf;
static PyObject *__pyx_n_s__vcf_count;
static PyObject *__pyx_n_s__vcf_type;
static PyObject *__pyx_n_s__vcf_types;
static PyObject *__pyx_n_s__vcfnp;
static PyObject *__pyx_n_s__view;
static PyObject *__pyx_n_s__view2d;
static PyObject *__pyx_n_s__zip;
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_5;
static PyObject *__pyx_int_8;
static PyObject *__pyx_int_neg_1;
static PyObject *__pyx_int_10;
static PyObject *__pyx_int_11;
static PyObject *__pyx_int_15;
static PyObject *__pyx_k_1;
static PyObject *__pyx_k_9;
static PyObject *__pyx_k_12;
static PyObject *__pyx_k_14;
static PyObject *__pyx_k_25;
static PyObject *__pyx_k_tuple_4;
static PyObject *__pyx_k_slice_26;
static PyObject *__pyx_k_tuple_24;
static PyObject *__pyx_k_tuple_28;
static PyObject *__pyx_k_tuple_29;
static PyObject *__pyx_k_tuple_30;
static PyObject *__pyx_k_tuple_32;
static PyObject *__pyx_k_tuple_33;
static PyObject *__pyx_k_tuple_38;
static PyObject *__pyx_k_tuple_40;
static PyObject *__pyx_k_tuple_42;
static PyObject *__pyx_k_tuple_45;
static PyObject *__pyx_k_tuple_46;
static PyObject *__pyx_k_tuple_48;
static PyObject *__pyx_k_tuple_51;
static PyObject *__pyx_k_tuple_52;
static PyObject *__pyx_k_tuple_54;
static PyObject *__pyx_k_tuple_56;
static PyObject *__pyx_k_tuple_58;
static PyObject *__pyx_k_tuple_60;
static PyObject *__pyx_k_tuple_62;
static PyObject *__pyx_k_tuple_64;
static PyObject *__pyx_k_tuple_66;
static PyObject *__pyx_k_tuple_68;
static PyObject *__pyx_k_tuple_70;
static PyObject *__pyx_k_tuple_72;
static PyObject *__pyx_k_tuple_74;
static PyObject *__pyx_k_tuple_76;
static PyObject *__pyx_k_tuple_78;
static PyObject *__pyx_k_tuple_79;
static PyObject *__pyx_k_tuple_80;
static PyObject *__pyx_k_tuple_81;
static PyObject *__pyx_k_tuple_82;
static PyObject *__pyx_k_tuple_83;
static PyObject *__pyx_k_tuple_84;
static PyObject *__pyx_k_tuple_85;
static PyObject *__pyx_k_tuple_86;
static PyObject *__pyx_k_tuple_87;
static PyObject *__pyx_k_tuple_88;
static PyObject *__pyx_k_tuple_89;
static PyObject *__pyx_k_tuple_90;
static PyObject *__pyx_k_codeobj_34;
static PyObject *__pyx_k_codeobj_55;
static PyObject *__pyx_k_codeobj_57;
static PyObject *__pyx_k_codeobj_59;
static PyObject *__pyx_k_codeobj_61;
static PyObject *__pyx_k_codeobj_63;
static PyObject *__pyx_k_codeobj_65;
static PyObject *__pyx_k_codeobj_67;
static PyObject *__pyx_k_codeobj_69;
static PyObject *__pyx_k_codeobj_71;
static PyObject *__pyx_k_codeobj_73;
static PyObject *__pyx_k_codeobj_75;
static PyObject *__pyx_k_codeobj_77;
static PyObject *__pyx_k_codeobj_91;

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_1variants(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5vcfnp_variants[] = "\n    Load an numpy structured array with data from the fixed fields of a VCF file\n    (excluding INFO).\n\n    Parameters\n    ----------\n\n    filename: string or list\n        Name of the VCF file or list of file names\n    region: string\n        Region to extract, e.g., 'chr1' or 'chr1:0-100000'\n    fields: list or array-like\n        List of fields to extract from the VCF\n    exclude_fields: list or array-like\n        Fields to exclude from extraction\n    dtypes: dict or dict-like\n        Dictionary cotaining dtypes to use instead of the default inferred ones\n    arities: dict or dict-like\n        Dictinoary containing field:integer mappings used to override the number\n        of values to expect\n    fills: dict or dict-like\n        Dictionary containing field:fillvalue mappings used to override the\n        defaults used for missing values\n    count: int\n        Attempt to extract a specific number of records\n    progress: int\n        If greater than 0, log parsing progress\n    logstream: file or file-like object\n        Stream to use for logging progress\n    condition: array\n        Boolean array defining which rows to load\n    slice: tuple or list\n        Slice of the underlying iterator, e.g., (0, 1000, 10) takes every 10th row from the first 1000\n\n    Examples\n    --------\n\n        >>> from vcfnp import variants\n        >>> a = variants('sample.vcf')\n        >>> a\n        array([ ('19', 111, '.', 'A', 'C', 9.600000381469727, (False, False, False), 2, True),\n               ('19', 112, '.', 'A', 'G', 10.0, (False, False, False), 2, True),\n               ('20', 14370, 'rs6054257', 'G', 'A', 29.0, (True, False, False), 2, True),\n               ('20', 17330, '.', 'T', 'A', 3.0, (False, True, False), 2, True),\n               ('20', 1110696, 'rs6040355', 'A', 'G', 67.0, (True, False, False), 3, True),\n               ('20', 1230237, '.', 'T', '.', 47.0, (True, False, False), 2, False),\n               ('20', 1234567, 'microsat1'"", 'G', 'GA', 50.0, (True, False, False), 3, False),\n               ('20', 1235237, '.', 'T', '.', 0.0, (False, False, False), 2, False),\n               ('X', 10, 'rsTest', 'AC', 'A', 10.0, (True, False, False), 3, False)],\n              dtype=[('CHROM', '|S12'), ('POS', '<i4'), ('ID', '|S12'), ('REF', '|S12'), ('ALT', '|S12'), ('QUAL', '<f4'), ('FILTER', [('PASS', '|b1'), ('q10', '|b1'), ('s50', '|b1')]), ('num_alleles', '|u1'), ('is_snp', '|b1')])\n        >>> a['QUAL']\n        array([  9.60000038,  10.        ,  29.        ,   3.        ,\n                67.        ,  47.        ,  50.        ,   0.        ,  10.        ], dtype=float32)\n        >>> a['FILTER']['PASS']\n        array([False, False,  True, False,  True,  True,  True, False,  True], dtype=bool)\n\n    ";
static PyMethodDef __pyx_mdef_5vcfnp_1variants = {__Pyx_NAMESTR("variants"), (PyCFunction)__pyx_pw_5vcfnp_1variants, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5vcfnp_variants)};
static PyObject *__pyx_pw_5vcfnp_1variants(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_filename = 0;
  PyObject *__pyx_v_region = 0;
  PyObject *__pyx_v_fields = 0;
  PyObject *__pyx_v_exclude_fields = 0;
  PyObject *__pyx_v_dtypes = 0;
  PyObject *__pyx_v_arities = 0;
  PyObject *__pyx_v_fills = 0;
  PyObject *__pyx_v_count = 0;
  PyObject *__pyx_v_progress = 0;
  PyObject *__pyx_v_logstream = 0;
  PyObject *__pyx_v_condition = 0;
  PyObject *__pyx_v_slice = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("variants (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__filename,&__pyx_n_s__region,&__pyx_n_s__fields,&__pyx_n_s__exclude_fields,&__pyx_n_s__dtypes,&__pyx_n_s__arities,&__pyx_n_s__fills,&__pyx_n_s__count,&__pyx_n_s__progress,&__pyx_n_s__logstream,&__pyx_n_s__condition,&__pyx_n_s__slice,0};
    PyObject* values[12] = {0,0,0,0,0,0,0,0,0,0,0,0};

    /* "vcfnp.pyx":177
 * 
 * def variants(filename,
 *              region=None,             # <<<<<<<<<<<<<<
 *              fields=None,
 *              exclude_fields=None,
 */
    values[1] = ((PyObject *)Py_None);

    /* "vcfnp.pyx":178
 * def variants(filename,
 *              region=None,
 *              fields=None,             # <<<<<<<<<<<<<<
 *              exclude_fields=None,
 *              dtypes=None,
 */
    values[2] = ((PyObject *)Py_None);

    /* "vcfnp.pyx":179
 *              region=None,
 *              fields=None,
 *              exclude_fields=None,             # <<<<<<<<<<<<<<
 *              dtypes=None,
 *              arities=None,
 */
    values[3] = ((PyObject *)Py_None);

    /* "vcfnp.pyx":180
 *              fields=None,
 *              exclude_fields=None,
 *              dtypes=None,             # <<<<<<<<<<<<<<
 *              arities=None,
 *              fills=None,
 */
    values[4] = ((PyObject *)Py_None);

    /* "vcfnp.pyx":181
 *              exclude_fields=None,
 *              dtypes=None,
 *              arities=None,             # <<<<<<<<<<<<<<
 *              fills=None,
 *              count=None,
 */
    values[5] = ((PyObject *)Py_None);

    /* "vcfnp.pyx":182
 *              dtypes=None,
 *              arities=None,
 *              fills=None,             # <<<<<<<<<<<<<<
 *              count=None,
 *              progress=0,
 */
    values[6] = ((PyObject *)Py_None);

    /* "vcfnp.pyx":183
 *              arities=None,
 *              fills=None,
 *              count=None,             # <<<<<<<<<<<<<<
 *              progress=0,
 *              logstream=sys.stderr,
 */
    values[7] = ((PyObject *)Py_None);
    values[8] = ((PyObject *)__pyx_int_0);
    values[9] = __pyx_k_1;

    /* "vcfnp.pyx":186
 *              progress=0,
 *              logstream=sys.stderr,
 *              condition=None,             # <<<<<<<<<<<<<<
 *              slice=None
 *              ):
 */
    values[10] = ((PyObject *)Py_None);

    /* "vcfnp.pyx":187
 *              logstream=sys.stderr,
 *              condition=None,
 *              slice=None             # <<<<<<<<<<<<<<
 *              ):
 *     """
 */
    values[11] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filename)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__region);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fields);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__exclude_fields);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dtypes);
          if (value) { values[4] = value; kw_args--; }
        }
        case  5:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arities);
          if (value) { values[5] = value; kw_args--; }
        }
        case  6:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fills);
          if (value) { values[6] = value; kw_args--; }
        }
        case  7:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__count);
          if (value) { values[7] = value; kw_args--; }
        }
        case  8:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__progress);
          if (value) { values[8] = value; kw_args--; }
        }
        case  9:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__logstream);
          if (value) { values[9] = value; kw_args--; }
        }
        case 10:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__condition);
          if (value) { values[10] = value; kw_args--; }
        }
        case 11:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__slice);
          if (value) { values[11] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "variants") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_filename = values[0];
    __pyx_v_region = values[1];
    __pyx_v_fields = values[2];
    __pyx_v_exclude_fields = values[3];
    __pyx_v_dtypes = values[4];
    __pyx_v_arities = values[5];
    __pyx_v_fills = values[6];
    __pyx_v_count = values[7];
    __pyx_v_progress = values[8];
    __pyx_v_logstream = values[9];
    __pyx_v_condition = values[10];
    __pyx_v_slice = values[11];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("variants", 0, 1, 12, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vcfnp.variants", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5vcfnp_variants(__pyx_self, __pyx_v_filename, __pyx_v_region, __pyx_v_fields, __pyx_v_exclude_fields, __pyx_v_dtypes, __pyx_v_arities, __pyx_v_fills, __pyx_v_count, __pyx_v_progress, __pyx_v_logstream, __pyx_v_condition, __pyx_v_slice);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":176
 * 
 * 
 * def variants(filename,             # <<<<<<<<<<<<<<
 *              region=None,
 *              fields=None,
 */

static PyObject *__pyx_pf_5vcfnp_variants(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_region, PyObject *__pyx_v_fields, PyObject *__pyx_v_exclude_fields, PyObject *__pyx_v_dtypes, PyObject *__pyx_v_arities, PyObject *__pyx_v_fills, PyObject *__pyx_v_count, PyObject *__pyx_v_progress, PyObject *__pyx_v_logstream, PyObject *__pyx_v_condition, PyObject *__pyx_v_slice) {
  PyObject *__pyx_v_filenames = NULL;
  PyObject *__pyx_v_fn = NULL;
  PyObject *__pyx_v_f = NULL;
  PyObject *__pyx_v_filterIds = NULL;
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_v_dtype = NULL;
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_it = NULL;
  PyObject *__pyx_v_flt = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("variants", 0);
  __Pyx_INCREF(__pyx_v_fields);
  __Pyx_INCREF(__pyx_v_dtypes);
  __Pyx_INCREF(__pyx_v_arities);
  __Pyx_INCREF(__pyx_v_fills);

  /* "vcfnp.pyx":247
 *     """
 * 
 *     if isinstance(filename, basestring):             # <<<<<<<<<<<<<<
 *         filenames = [filename]
 *     else:
 */
  __pyx_t_1 = __Pyx_PyBaseString_Check(__pyx_v_filename); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "vcfnp.pyx":248
 * 
 *     if isinstance(filename, basestring):
 *         filenames = [filename]             # <<<<<<<<<<<<<<
 *     else:
 *         filenames = filename
 */
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_filename);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_filename);
    __Pyx_GIVEREF(__pyx_v_filename);
    __pyx_v_filenames = ((PyObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "vcfnp.pyx":250
 *         filenames = [filename]
 *     else:
 *         filenames = filename             # <<<<<<<<<<<<<<
 * 
 *     for fn in filenames:
 */
    __Pyx_INCREF(__pyx_v_filename);
    __pyx_v_filenames = __pyx_v_filename;
  }
  __pyx_L3:;

  /* "vcfnp.pyx":252
 *         filenames = filename
 * 
 *     for fn in filenames:             # <<<<<<<<<<<<<<
 *         if not os.path.exists(fn):
 *             raise Exception('file not found: %s' % fn)
 */
  if (PyList_CheckExact(__pyx_v_filenames) || PyTuple_CheckExact(__pyx_v_filenames)) {
    __pyx_t_3 = __pyx_v_filenames; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_filenames); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_6 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_6)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF(__pyx_v_fn);
    __pyx_v_fn = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "vcfnp.pyx":253
 * 
 *     for fn in filenames:
 *         if not os.path.exists(fn):             # <<<<<<<<<<<<<<
 *             raise Exception('file not found: %s' % fn)
 * 
 */
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__os); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__path); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s__exists); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v_fn);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_fn);
    __Pyx_GIVEREF(__pyx_v_fn);
    __pyx_t_8 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_1 = ((!__pyx_t_2) != 0);
    if (__pyx_t_1) {

      /* "vcfnp.pyx":254
 *     for fn in filenames:
 *         if not os.path.exists(fn):
 *             raise Exception('file not found: %s' % fn)             # <<<<<<<<<<<<<<
 * 
 *     # determine fields to extract
 */
      __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_2), __pyx_v_fn); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_8));
      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_8));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_8));
      __pyx_t_8 = 0;
      __pyx_t_8 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L6;
    }
    __pyx_L6:;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "vcfnp.pyx":257
 * 
 *     # determine fields to extract
 *     if fields is None:             # <<<<<<<<<<<<<<
 *         fields = VARIANT_FIELDS
 *     else:
 */
  __pyx_t_1 = (__pyx_v_fields == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "vcfnp.pyx":258
 *     # determine fields to extract
 *     if fields is None:
 *         fields = VARIANT_FIELDS             # <<<<<<<<<<<<<<
 *     else:
 *         for f in fields:
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__VARIANT_FIELDS); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_v_fields);
    __pyx_v_fields = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L7;
  }
  /*else*/ {

    /* "vcfnp.pyx":260
 *         fields = VARIANT_FIELDS
 *     else:
 *         for f in fields:             # <<<<<<<<<<<<<<
 *             assert f in VARIANT_FIELDS, 'unknown field: %s' % f
 * 
 */
    if (PyList_CheckExact(__pyx_v_fields) || PyTuple_CheckExact(__pyx_v_fields)) {
      __pyx_t_3 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_fields); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
    }
    for (;;) {
      if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_8 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_8 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_8 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        __pyx_t_8 = __pyx_t_5(__pyx_t_3);
        if (unlikely(!__pyx_t_8)) {
          if (PyErr_Occurred()) {
            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_8);
      }
      __Pyx_XDECREF(__pyx_v_f);
      __pyx_v_f = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "vcfnp.pyx":261
 *     else:
 *         for f in fields:
 *             assert f in VARIANT_FIELDS, 'unknown field: %s' % f             # <<<<<<<<<<<<<<
 * 
 *     # exclude fields
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__VARIANT_FIELDS); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_t_8, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!(__pyx_t_2 != 0))) {
        __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_3), __pyx_v_f); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_8));
        PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_t_8));
        __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #endif
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_L7:;

  /* "vcfnp.pyx":264
 * 
 *     # exclude fields
 *     if exclude_fields is not None:             # <<<<<<<<<<<<<<
 *         fields = [f for f in fields if f not in exclude_fields]
 * 
 */
  __pyx_t_2 = (__pyx_v_exclude_fields != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":265
 *     # exclude fields
 *     if exclude_fields is not None:
 *         fields = [f for f in fields if f not in exclude_fields]             # <<<<<<<<<<<<<<
 * 
 *     # determine a numpy dtype for each field
 */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (PyList_CheckExact(__pyx_v_fields) || PyTuple_CheckExact(__pyx_v_fields)) {
      __pyx_t_8 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_8); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_fields); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_5 = Py_TYPE(__pyx_t_8)->tp_iternext;
    }
    for (;;) {
      if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_8)) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_8)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_8, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_8)) {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_8, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        __pyx_t_7 = __pyx_t_5(__pyx_t_8);
        if (unlikely(!__pyx_t_7)) {
          if (PyErr_Occurred()) {
            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_7);
      }
      __Pyx_XDECREF(__pyx_v_f);
      __pyx_v_f = __pyx_t_7;
      __pyx_t_7 = 0;
      __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_v_exclude_fields, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_2 = (__pyx_t_1 != 0);
      if (__pyx_t_2) {
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_v_f))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L13;
      }
      __pyx_L13:;
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_v_fields);
    __pyx_v_fields = ((PyObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L10;
  }
  __pyx_L10:;

  /* "vcfnp.pyx":268
 * 
 *     # determine a numpy dtype for each field
 *     if dtypes is None:             # <<<<<<<<<<<<<<
 *         dtypes = dict()
 *     for f in fields:
 */
  __pyx_t_2 = (__pyx_v_dtypes == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":269
 *     # determine a numpy dtype for each field
 *     if dtypes is None:
 *         dtypes = dict()             # <<<<<<<<<<<<<<
 *     for f in fields:
 *         if f == 'FILTER':
 */
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __Pyx_DECREF(__pyx_v_dtypes);
    __pyx_v_dtypes = ((PyObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L14;
  }
  __pyx_L14:;

  /* "vcfnp.pyx":270
 *     if dtypes is None:
 *         dtypes = dict()
 *     for f in fields:             # <<<<<<<<<<<<<<
 *         if f == 'FILTER':
 *             filterIds = PyVariantCallFile(filenames[0]).filterIds
 */
  if (PyList_CheckExact(__pyx_v_fields) || PyTuple_CheckExact(__pyx_v_fields)) {
    __pyx_t_3 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_fields); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_8 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_8 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_8 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_8 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_8)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_8);
    }
    __Pyx_XDECREF(__pyx_v_f);
    __pyx_v_f = __pyx_t_8;
    __pyx_t_8 = 0;

    /* "vcfnp.pyx":271
 *         dtypes = dict()
 *     for f in fields:
 *         if f == 'FILTER':             # <<<<<<<<<<<<<<
 *             filterIds = PyVariantCallFile(filenames[0]).filterIds
 *             t = [('PASS', 'b1')]
 */
    __pyx_t_8 = PyObject_RichCompare(__pyx_v_f, ((PyObject *)__pyx_n_s__FILTER), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_1) {

      /* "vcfnp.pyx":272
 *     for f in fields:
 *         if f == 'FILTER':
 *             filterIds = PyVariantCallFile(filenames[0]).filterIds             # <<<<<<<<<<<<<<
 *             t = [('PASS', 'b1')]
 *             t += [(flt, 'b1') for flt in sorted(filterIds)]
 */
      __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_filenames, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6vcflib_PyVariantCallFile)), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s__filterIds); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_v_filterIds);
      __pyx_v_filterIds = __pyx_t_7;
      __pyx_t_7 = 0;

      /* "vcfnp.pyx":273
 *         if f == 'FILTER':
 *             filterIds = PyVariantCallFile(filenames[0]).filterIds
 *             t = [('PASS', 'b1')]             # <<<<<<<<<<<<<<
 *             t += [(flt, 'b1') for flt in sorted(filterIds)]
 *             dtypes[f] = t
 */
      __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(((PyObject *)__pyx_k_tuple_4));
      PyList_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_k_tuple_4));
      __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_4));
      __Pyx_XDECREF(__pyx_v_t);
      __pyx_v_t = ((PyObject *)__pyx_t_7);
      __pyx_t_7 = 0;

      /* "vcfnp.pyx":274
 *             filterIds = PyVariantCallFile(filenames[0]).filterIds
 *             t = [('PASS', 'b1')]
 *             t += [(flt, 'b1') for flt in sorted(filterIds)]             # <<<<<<<<<<<<<<
 *             dtypes[f] = t
 *         elif f not in dtypes:
 */
      __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_v_filterIds);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_filterIds);
      __Pyx_GIVEREF(__pyx_v_filterIds);
      __pyx_t_6 = PyObject_Call(__pyx_builtin_sorted, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
      if (PyList_CheckExact(__pyx_t_6) || PyTuple_CheckExact(__pyx_t_6)) {
        __pyx_t_8 = __pyx_t_6; __Pyx_INCREF(__pyx_t_8); __pyx_t_9 = 0;
        __pyx_t_10 = NULL;
      } else {
        __pyx_t_9 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_10 = Py_TYPE(__pyx_t_8)->tp_iternext;
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      for (;;) {
        if (!__pyx_t_10 && PyList_CheckExact(__pyx_t_8)) {
          if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_8)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else if (!__pyx_t_10 && PyTuple_CheckExact(__pyx_t_8)) {
          if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else {
          __pyx_t_6 = __pyx_t_10(__pyx_t_8);
          if (unlikely(!__pyx_t_6)) {
            if (PyErr_Occurred()) {
              if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
              else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_6);
        }
        __Pyx_XDECREF(__pyx_v_flt);
        __pyx_v_flt = __pyx_t_6;
        __pyx_t_6 = 0;
        __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_v_flt);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_flt);
        __Pyx_GIVEREF(__pyx_v_flt);
        __Pyx_INCREF(((PyObject *)__pyx_n_s__b1));
        PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_n_s__b1));
        __Pyx_GIVEREF(((PyObject *)__pyx_n_s__b1));
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_t, ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_v_t);
      __pyx_v_t = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "vcfnp.pyx":275
 *             t = [('PASS', 'b1')]
 *             t += [(flt, 'b1') for flt in sorted(filterIds)]
 *             dtypes[f] = t             # <<<<<<<<<<<<<<
 *         elif f not in dtypes:
 *             dtypes[f] = DEFAULT_VARIANT_DTYPE[f]
 */
      if (PyObject_SetItem(__pyx_v_dtypes, __pyx_v_f, __pyx_v_t) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L17;
    }

    /* "vcfnp.pyx":276
 *             t += [(flt, 'b1') for flt in sorted(filterIds)]
 *             dtypes[f] = t
 *         elif f not in dtypes:             # <<<<<<<<<<<<<<
 *             dtypes[f] = DEFAULT_VARIANT_DTYPE[f]
 * 
 */
    __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_v_dtypes, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = (__pyx_t_1 != 0);
    if (__pyx_t_2) {

      /* "vcfnp.pyx":277
 *             dtypes[f] = t
 *         elif f not in dtypes:
 *             dtypes[f] = DEFAULT_VARIANT_DTYPE[f]             # <<<<<<<<<<<<<<
 * 
 *     # determine expected number of values for each field
 */
      __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_7 = PyObject_GetItem(__pyx_t_8, __pyx_v_f); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (PyObject_SetItem(__pyx_v_dtypes, __pyx_v_f, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L17;
    }
    __pyx_L17:;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "vcfnp.pyx":280
 * 
 *     # determine expected number of values for each field
 *     if arities is None:             # <<<<<<<<<<<<<<
 *         arities = dict()
 *     for f in fields:
 */
  __pyx_t_2 = (__pyx_v_arities == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":281
 *     # determine expected number of values for each field
 *     if arities is None:
 *         arities = dict()             # <<<<<<<<<<<<<<
 *     for f in fields:
 *         if f == 'FILTER':
 */
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __Pyx_DECREF(__pyx_v_arities);
    __pyx_v_arities = ((PyObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L20;
  }
  __pyx_L20:;

  /* "vcfnp.pyx":282
 *     if arities is None:
 *         arities = dict()
 *     for f in fields:             # <<<<<<<<<<<<<<
 *         if f == 'FILTER':
 *             arities[f] = 1 # one structured value
 */
  if (PyList_CheckExact(__pyx_v_fields) || PyTuple_CheckExact(__pyx_v_fields)) {
    __pyx_t_3 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_fields); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_7 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_7 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_7 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_7 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_7)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_7);
    }
    __Pyx_XDECREF(__pyx_v_f);
    __pyx_v_f = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "vcfnp.pyx":283
 *         arities = dict()
 *     for f in fields:
 *         if f == 'FILTER':             # <<<<<<<<<<<<<<
 *             arities[f] = 1 # one structured value
 *         elif f not in arities:
 */
    __pyx_t_7 = PyObject_RichCompare(__pyx_v_f, ((PyObject *)__pyx_n_s__FILTER), Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_1) {

      /* "vcfnp.pyx":284
 *     for f in fields:
 *         if f == 'FILTER':
 *             arities[f] = 1 # one structured value             # <<<<<<<<<<<<<<
 *         elif f not in arities:
 *             arities[f] = DEFAULT_VARIANT_ARITY[f]
 */
      if (PyObject_SetItem(__pyx_v_arities, __pyx_v_f, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L23;
    }

    /* "vcfnp.pyx":285
 *         if f == 'FILTER':
 *             arities[f] = 1 # one structured value
 *         elif f not in arities:             # <<<<<<<<<<<<<<
 *             arities[f] = DEFAULT_VARIANT_ARITY[f]
 * 
 */
    __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_v_arities, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = (__pyx_t_1 != 0);
    if (__pyx_t_2) {

      /* "vcfnp.pyx":286
 *             arities[f] = 1 # one structured value
 *         elif f not in arities:
 *             arities[f] = DEFAULT_VARIANT_ARITY[f]             # <<<<<<<<<<<<<<
 * 
 *     # determine fill values to use where number of values is less than expectation
 */
      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = PyObject_GetItem(__pyx_t_7, __pyx_v_f); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (PyObject_SetItem(__pyx_v_arities, __pyx_v_f, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L23;
    }
    __pyx_L23:;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "vcfnp.pyx":289
 * 
 *     # determine fill values to use where number of values is less than expectation
 *     if fills is None:             # <<<<<<<<<<<<<<
 *         fills = dict()
 *     for f in fields:
 */
  __pyx_t_2 = (__pyx_v_fills == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":290
 *     # determine fill values to use where number of values is less than expectation
 *     if fills is None:
 *         fills = dict()             # <<<<<<<<<<<<<<
 *     for f in fields:
 *         if f == 'FILTER':
 */
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __Pyx_DECREF(__pyx_v_fills);
    __pyx_v_fills = ((PyObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L24;
  }
  __pyx_L24:;

  /* "vcfnp.pyx":291
 *     if fills is None:
 *         fills = dict()
 *     for f in fields:             # <<<<<<<<<<<<<<
 *         if f == 'FILTER':
 *             fills[f] = False
 */
  if (PyList_CheckExact(__pyx_v_fields) || PyTuple_CheckExact(__pyx_v_fields)) {
    __pyx_t_3 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_fields); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_8 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_8 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_8 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_8 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_8)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_8);
    }
    __Pyx_XDECREF(__pyx_v_f);
    __pyx_v_f = __pyx_t_8;
    __pyx_t_8 = 0;

    /* "vcfnp.pyx":292
 *         fills = dict()
 *     for f in fields:
 *         if f == 'FILTER':             # <<<<<<<<<<<<<<
 *             fills[f] = False
 *         elif f not in fills:
 */
    __pyx_t_8 = PyObject_RichCompare(__pyx_v_f, ((PyObject *)__pyx_n_s__FILTER), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_1) {

      /* "vcfnp.pyx":293
 *     for f in fields:
 *         if f == 'FILTER':
 *             fills[f] = False             # <<<<<<<<<<<<<<
 *         elif f not in fills:
 *             fills[f] = DEFAULT_VARIANT_FILL[f]
 */
      __pyx_t_8 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      if (PyObject_SetItem(__pyx_v_fills, __pyx_v_f, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L27;
    }

    /* "vcfnp.pyx":294
 *         if f == 'FILTER':
 *             fills[f] = False
 *         elif f not in fills:             # <<<<<<<<<<<<<<
 *             fills[f] = DEFAULT_VARIANT_FILL[f]
 * 
 */
    __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_v_fills, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = (__pyx_t_1 != 0);
    if (__pyx_t_2) {

      /* "vcfnp.pyx":295
 *             fills[f] = False
 *         elif f not in fills:
 *             fills[f] = DEFAULT_VARIANT_FILL[f]             # <<<<<<<<<<<<<<
 * 
 *     # construct a numpy dtype for structured array
 */
      __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_7 = PyObject_GetItem(__pyx_t_8, __pyx_v_f); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (PyObject_SetItem(__pyx_v_fills, __pyx_v_f, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L27;
    }
    __pyx_L27:;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "vcfnp.pyx":298
 * 
 *     # construct a numpy dtype for structured array
 *     dtype = list()             # <<<<<<<<<<<<<<
 *     for f in fields:
 *         t = dtypes[f]
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_dtype = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "vcfnp.pyx":299
 *     # construct a numpy dtype for structured array
 *     dtype = list()
 *     for f in fields:             # <<<<<<<<<<<<<<
 *         t = dtypes[f]
 *         n = arities[f]
 */
  if (PyList_CheckExact(__pyx_v_fields) || PyTuple_CheckExact(__pyx_v_fields)) {
    __pyx_t_3 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_fields); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_7 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_7 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_7 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_7 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_7)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_7);
    }
    __Pyx_XDECREF(__pyx_v_f);
    __pyx_v_f = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "vcfnp.pyx":300
 *     dtype = list()
 *     for f in fields:
 *         t = dtypes[f]             # <<<<<<<<<<<<<<
 *         n = arities[f]
 *         if n == 1:
 */
    __pyx_t_7 = PyObject_GetItem(__pyx_v_dtypes, __pyx_v_f); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_XDECREF(__pyx_v_t);
    __pyx_v_t = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "vcfnp.pyx":301
 *     for f in fields:
 *         t = dtypes[f]
 *         n = arities[f]             # <<<<<<<<<<<<<<
 *         if n == 1:
 *             dtype.append((f, t))
 */
    __pyx_t_7 = PyObject_GetItem(__pyx_v_arities, __pyx_v_f); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_XDECREF(__pyx_v_n);
    __pyx_v_n = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "vcfnp.pyx":302
 *         t = dtypes[f]
 *         n = arities[f]
 *         if n == 1:             # <<<<<<<<<<<<<<
 *             dtype.append((f, t))
 *         else:
 */
    __pyx_t_7 = PyObject_RichCompare(__pyx_v_n, __pyx_int_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_2) {

      /* "vcfnp.pyx":303
 *         n = arities[f]
 *         if n == 1:
 *             dtype.append((f, t))             # <<<<<<<<<<<<<<
 *         else:
 *             dtype.append((f, t, (n,)))
 */
      __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_v_f);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_f);
      __Pyx_GIVEREF(__pyx_v_f);
      __Pyx_INCREF(__pyx_v_t);
      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_t);
      __Pyx_GIVEREF(__pyx_v_t);
      __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_dtype, ((PyObject *)__pyx_t_7)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
      goto __pyx_L30;
    }
    /*else*/ {

      /* "vcfnp.pyx":305
 *             dtype.append((f, t))
 *         else:
 *             dtype.append((f, t, (n,)))             # <<<<<<<<<<<<<<
 * 
 *     # set up iterator
 */
      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_v_n);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_n);
      __Pyx_GIVEREF(__pyx_v_n);
      __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_v_f);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_f);
      __Pyx_GIVEREF(__pyx_v_f);
      __Pyx_INCREF(__pyx_v_t);
      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_t);
      __Pyx_GIVEREF(__pyx_v_t);
      PyTuple_SET_ITEM(__pyx_t_8, 2, ((PyObject *)__pyx_t_7));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_7));
      __pyx_t_7 = 0;
      __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_dtype, ((PyObject *)__pyx_t_8)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
    }
    __pyx_L30:;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "vcfnp.pyx":308
 * 
 *     # set up iterator
 *     if condition is not None:             # <<<<<<<<<<<<<<
 *         it = _itervariants_with_condition(filenames, region, fields, arities, fills, condition)
 *     else:
 */
  __pyx_t_2 = (__pyx_v_condition != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":309
 *     # set up iterator
 *     if condition is not None:
 *         it = _itervariants_with_condition(filenames, region, fields, arities, fills, condition)             # <<<<<<<<<<<<<<
 *     else:
 *         it = _itervariants(filenames, region, fields, arities, fills)
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = PyTuple_New(6); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_v_filenames);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_filenames);
    __Pyx_GIVEREF(__pyx_v_filenames);
    __Pyx_INCREF(__pyx_v_region);
    PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_region);
    __Pyx_GIVEREF(__pyx_v_region);
    __Pyx_INCREF(__pyx_v_fields);
    PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_fields);
    __Pyx_GIVEREF(__pyx_v_fields);
    __Pyx_INCREF(__pyx_v_arities);
    PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_v_arities);
    __Pyx_GIVEREF(__pyx_v_arities);
    __Pyx_INCREF(__pyx_v_fills);
    PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_v_fills);
    __Pyx_GIVEREF(__pyx_v_fills);
    __Pyx_INCREF(__pyx_v_condition);
    PyTuple_SET_ITEM(__pyx_t_8, 5, __pyx_v_condition);
    __Pyx_GIVEREF(__pyx_v_condition);
    __pyx_t_7 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
    __pyx_v_it = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L31;
  }
  /*else*/ {

    /* "vcfnp.pyx":311
 *         it = _itervariants_with_condition(filenames, region, fields, arities, fills, condition)
 *     else:
 *         it = _itervariants(filenames, region, fields, arities, fills)             # <<<<<<<<<<<<<<
 * 
 *     # slice?
 */
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s___itervariants); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = PyTuple_New(5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_v_filenames);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_filenames);
    __Pyx_GIVEREF(__pyx_v_filenames);
    __Pyx_INCREF(__pyx_v_region);
    PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_region);
    __Pyx_GIVEREF(__pyx_v_region);
    __Pyx_INCREF(__pyx_v_fields);
    PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_fields);
    __Pyx_GIVEREF(__pyx_v_fields);
    __Pyx_INCREF(__pyx_v_arities);
    PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_v_arities);
    __Pyx_GIVEREF(__pyx_v_arities);
    __Pyx_INCREF(__pyx_v_fills);
    PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_v_fills);
    __Pyx_GIVEREF(__pyx_v_fills);
    __pyx_t_3 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
    __pyx_v_it = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_L31:;

  /* "vcfnp.pyx":314
 * 
 *     # slice?
 *     if slice:             # <<<<<<<<<<<<<<
 *         it = islice(it, *slice)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_slice); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "vcfnp.pyx":315
 *     # slice?
 *     if slice:
 *         it = islice(it, *slice)             # <<<<<<<<<<<<<<
 * 
 *     # build an array from the iterator
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__islice); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_v_it);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_it);
    __Pyx_GIVEREF(__pyx_v_it);
    __pyx_t_7 = PySequence_Tuple(__pyx_v_slice); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_7));
    __pyx_t_6 = PyNumber_Add(((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
    __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
    __pyx_t_7 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_v_it);
    __pyx_v_it = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L32;
  }
  __pyx_L32:;

  /* "vcfnp.pyx":318
 * 
 *     # build an array from the iterator
 *     return _fromiter(it, dtype, count, progress, logstream)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s___fromiter); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_v_it);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_it);
  __Pyx_GIVEREF(__pyx_v_it);
  __Pyx_INCREF(((PyObject *)__pyx_v_dtype));
  PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_v_dtype));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_dtype));
  __Pyx_INCREF(__pyx_v_count);
  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_count);
  __Pyx_GIVEREF(__pyx_v_count);
  __Pyx_INCREF(__pyx_v_progress);
  PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_v_progress);
  __Pyx_GIVEREF(__pyx_v_progress);
  __Pyx_INCREF(__pyx_v_logstream);
  PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_v_logstream);
  __Pyx_GIVEREF(__pyx_v_logstream);
  __pyx_t_3 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("vcfnp.variants", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_filenames);
  __Pyx_XDECREF(__pyx_v_fn);
  __Pyx_XDECREF(__pyx_v_f);
  __Pyx_XDECREF(__pyx_v_filterIds);
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XDECREF(__pyx_v_dtype);
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_it);
  __Pyx_XDECREF(__pyx_v_flt);
  __Pyx_XDECREF(__pyx_v_fields);
  __Pyx_XDECREF(__pyx_v_dtypes);
  __Pyx_XDECREF(__pyx_v_arities);
  __Pyx_XDECREF(__pyx_v_fills);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_3_fromiter(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_5vcfnp_3_fromiter = {__Pyx_NAMESTR("_fromiter"), (PyCFunction)__pyx_pw_5vcfnp_3_fromiter, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_5vcfnp_3_fromiter(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_it = 0;
  PyObject *__pyx_v_dtype = 0;
  PyObject *__pyx_v_count = 0;
  int __pyx_v_progress;
  PyObject *__pyx_v_logstream = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_fromiter (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__it,&__pyx_n_s__dtype,&__pyx_n_s__count,&__pyx_n_s__progress,&__pyx_n_s__logstream,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[4] = __pyx_k_9;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__it)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dtype)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_fromiter", 0, 3, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__count)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_fromiter", 0, 3, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__progress);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__logstream);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_fromiter") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_it = values[0];
    __pyx_v_dtype = values[1];
    __pyx_v_count = values[2];
    if (values[3]) {
      __pyx_v_progress = __Pyx_PyInt_AsInt(values[3]); if (unlikely((__pyx_v_progress == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_progress = ((int)0);
    }
    __pyx_v_logstream = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_fromiter", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vcfnp._fromiter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5vcfnp_2_fromiter(__pyx_self, __pyx_v_it, __pyx_v_dtype, __pyx_v_count, __pyx_v_progress, __pyx_v_logstream);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":322
 * 
 * 
 * def _fromiter(it, dtype, count, int progress=0, logstream=sys.stderr):             # <<<<<<<<<<<<<<
 *     if progress > 0:
 *         it = _iter_withprogress(it, progress, logstream)
 */

static PyObject *__pyx_pf_5vcfnp_2_fromiter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_it, PyObject *__pyx_v_dtype, PyObject *__pyx_v_count, int __pyx_v_progress, PyObject *__pyx_v_logstream) {
  PyObject *__pyx_v_a = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_fromiter", 0);
  __Pyx_INCREF(__pyx_v_it);

  /* "vcfnp.pyx":323
 * 
 * def _fromiter(it, dtype, count, int progress=0, logstream=sys.stderr):
 *     if progress > 0:             # <<<<<<<<<<<<<<
 *         it = _iter_withprogress(it, progress, logstream)
 *     if count is not None:
 */
  __pyx_t_1 = ((__pyx_v_progress > 0) != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":324
 * def _fromiter(it, dtype, count, int progress=0, logstream=sys.stderr):
 *     if progress > 0:
 *         it = _iter_withprogress(it, progress, logstream)             # <<<<<<<<<<<<<<
 *     if count is not None:
 *         a = np.fromiter(it, dtype=dtype, count=count)
 */
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s___iter_withprogress); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyInt_FromLong(__pyx_v_progress); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_it);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_it);
    __Pyx_GIVEREF(__pyx_v_it);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_logstream);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_logstream);
    __Pyx_GIVEREF(__pyx_v_logstream);
    __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_v_it);
    __pyx_v_it = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "vcfnp.pyx":325
 *     if progress > 0:
 *         it = _iter_withprogress(it, progress, logstream)
 *     if count is not None:             # <<<<<<<<<<<<<<
 *         a = np.fromiter(it, dtype=dtype, count=count)
 *     else:
 */
  __pyx_t_1 = (__pyx_v_count != Py_None);
  __pyx_t_5 = (__pyx_t_1 != 0);
  if (__pyx_t_5) {

    /* "vcfnp.pyx":326
 *         it = _iter_withprogress(it, progress, logstream)
 *     if count is not None:
 *         a = np.fromiter(it, dtype=dtype, count=count)             # <<<<<<<<<<<<<<
 *     else:
 *         a = np.fromiter(it, dtype=dtype)
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__fromiter); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_it);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_it);
    __Pyx_GIVEREF(__pyx_v_it);
    __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_v_dtype) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__count), __pyx_v_count) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_v_a = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L4;
  }
  /*else*/ {

    /* "vcfnp.pyx":328
 *         a = np.fromiter(it, dtype=dtype, count=count)
 *     else:
 *         a = np.fromiter(it, dtype=dtype)             # <<<<<<<<<<<<<<
 *     return a
 * 
 */
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__fromiter); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_it);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_it);
    __Pyx_GIVEREF(__pyx_v_it);
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), __pyx_v_dtype) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __pyx_v_a = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  __pyx_L4:;

  /* "vcfnp.pyx":329
 *     else:
 *         a = np.fromiter(it, dtype=dtype)
 *     return a             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_a);
  __pyx_r = __pyx_v_a;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("vcfnp._fromiter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_a);
  __Pyx_XDECREF(__pyx_v_it);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_5vcfnp_6generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_5_iter_withprogress(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_5vcfnp_5_iter_withprogress = {__Pyx_NAMESTR("_iter_withprogress"), (PyCFunction)__pyx_pw_5vcfnp_5_iter_withprogress, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_5vcfnp_5_iter_withprogress(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_iterable = 0;
  int __pyx_v_progress;
  PyObject *__pyx_v_logstream = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_iter_withprogress (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__iterable,&__pyx_n_s__progress,&__pyx_n_s__logstream,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__iterable)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__progress)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_iter_withprogress", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__logstream)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_iter_withprogress", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_iter_withprogress") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_iterable = values[0];
    __pyx_v_progress = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_progress == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_logstream = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_iter_withprogress", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vcfnp._iter_withprogress", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5vcfnp_4_iter_withprogress(__pyx_self, __pyx_v_iterable, __pyx_v_progress, __pyx_v_logstream);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":333
 * 
 * 
 * def _iter_withprogress(iterable, int progress, logstream):             # <<<<<<<<<<<<<<
 *     cdef int i
 *     before_all = time.time()
 */

static PyObject *__pyx_pf_5vcfnp_4_iter_withprogress(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_iterable, int __pyx_v_progress, PyObject *__pyx_v_logstream) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct___iter_withprogress *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_iter_withprogress", 0);
  __pyx_cur_scope = (struct __pyx_obj_5vcfnp___pyx_scope_struct___iter_withprogress *)__pyx_tp_new_5vcfnp___pyx_scope_struct___iter_withprogress(__pyx_ptype_5vcfnp___pyx_scope_struct___iter_withprogress, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_iterable = __pyx_v_iterable;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_iterable);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_iterable);
  __pyx_cur_scope->__pyx_v_progress = __pyx_v_progress;
  __pyx_cur_scope->__pyx_v_logstream = __pyx_v_logstream;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_logstream);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_logstream);
  {
    __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5vcfnp_6generator, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("vcfnp._iter_withprogress", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_5vcfnp_6generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5vcfnp___pyx_scope_struct___iter_withprogress *__pyx_cur_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct___iter_withprogress *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":335
 * def _iter_withprogress(iterable, int progress, logstream):
 *     cdef int i
 *     before_all = time.time()             # <<<<<<<<<<<<<<
 *     before = before_all
 *     for i, o in enumerate(iterable):
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__time); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_before_all = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "vcfnp.pyx":336
 *     cdef int i
 *     before_all = time.time()
 *     before = before_all             # <<<<<<<<<<<<<<
 *     for i, o in enumerate(iterable):
 *         yield o
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_before_all);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_before_all);
  __pyx_cur_scope->__pyx_v_before = __pyx_cur_scope->__pyx_v_before_all;

  /* "vcfnp.pyx":337
 *     before_all = time.time()
 *     before = before_all
 *     for i, o in enumerate(iterable):             # <<<<<<<<<<<<<<
 *         yield o
 *         if i > 0 and i % progress == 0:
 */
  __pyx_t_3 = 0;
  if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_iterable) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_iterable)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_iterable; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_iterable); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_1)) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_1)) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_2 = __pyx_t_5(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_o);
    __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_o);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_cur_scope->__pyx_v_o = __pyx_t_2;
    __pyx_t_2 = 0;
    __pyx_cur_scope->__pyx_v_i = __pyx_t_3;
    __pyx_t_3 = (__pyx_t_3 + 1);

    /* "vcfnp.pyx":338
 *     before = before_all
 *     for i, o in enumerate(iterable):
 *         yield o             # <<<<<<<<<<<<<<
 *         if i > 0 and i % progress == 0:
 *             after = time.time()
 */
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_o);
    __pyx_r = __pyx_cur_scope->__pyx_v_o;
    __Pyx_XGIVEREF(__pyx_t_1);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_3;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_4;
    __pyx_cur_scope->__pyx_t_3 = __pyx_t_5;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
    __pyx_cur_scope->__pyx_t_0 = 0;
    __Pyx_XGOTREF(__pyx_t_1);
    __pyx_t_3 = __pyx_cur_scope->__pyx_t_1;
    __pyx_t_4 = __pyx_cur_scope->__pyx_t_2;
    __pyx_t_5 = __pyx_cur_scope->__pyx_t_3;
    if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":339
 *     for i, o in enumerate(iterable):
 *         yield o
 *         if i > 0 and i % progress == 0:             # <<<<<<<<<<<<<<
 *             after = time.time()
 *             print >>logstream, '%s rows in %.2fs; batch in %.2fs (%d rows/s)' % (i, after-before_all, after-before, progress/(after-before))
 */
    __pyx_t_6 = ((__pyx_cur_scope->__pyx_v_i > 0) != 0);
    if (__pyx_t_6) {
      if (unlikely(__pyx_cur_scope->__pyx_v_progress == 0)) {
        #ifdef WITH_THREAD
        PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
        #endif
        PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero");
        #ifdef WITH_THREAD
        PyGILState_Release(__pyx_gilstate_save);
        #endif
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_7 = ((__Pyx_mod_int(__pyx_cur_scope->__pyx_v_i, __pyx_cur_scope->__pyx_v_progress) == 0) != 0);
      __pyx_t_8 = __pyx_t_7;
    } else {
      __pyx_t_8 = __pyx_t_6;
    }
    if (__pyx_t_8) {

      /* "vcfnp.pyx":340
 *         yield o
 *         if i > 0 and i % progress == 0:
 *             after = time.time()             # <<<<<<<<<<<<<<
 *             print >>logstream, '%s rows in %.2fs; batch in %.2fs (%d rows/s)' % (i, after-before_all, after-before, progress/(after-before))
 *             before = after
 */
      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__time); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__time); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_after);
      __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_after);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_cur_scope->__pyx_v_after = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "vcfnp.pyx":341
 *         if i > 0 and i % progress == 0:
 *             after = time.time()
 *             print >>logstream, '%s rows in %.2fs; batch in %.2fs (%d rows/s)' % (i, after-before_all, after-before, progress/(after-before))             # <<<<<<<<<<<<<<
 *             before = after
 *     after_all = time.time()
 */
      __pyx_t_2 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_after, __pyx_cur_scope->__pyx_v_before_all); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_after, __pyx_cur_scope->__pyx_v_before); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_progress); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_12 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_after, __pyx_cur_scope->__pyx_v_before); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_13 = __Pyx_PyNumber_Divide(__pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_12 = PyTuple_New(4); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_12);
      PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_10);
      PyTuple_SET_ITEM(__pyx_t_12, 3, __pyx_t_13);
      __Pyx_GIVEREF(__pyx_t_13);
      __pyx_t_2 = 0;
      __pyx_t_9 = 0;
      __pyx_t_10 = 0;
      __pyx_t_13 = 0;
      __pyx_t_13 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_10), ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_13));
      __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
      if (__Pyx_PrintOne(__pyx_cur_scope->__pyx_v_logstream, ((PyObject *)__pyx_t_13)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;

      /* "vcfnp.pyx":342
 *             after = time.time()
 *             print >>logstream, '%s rows in %.2fs; batch in %.2fs (%d rows/s)' % (i, after-before_all, after-before, progress/(after-before))
 *             before = after             # <<<<<<<<<<<<<<
 *     after_all = time.time()
 *     print >>logstream, '%s rows in %.2fs (%d rows/s)' % (i, after_all-before_all, i/(after_all-before_all))
 */
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_after);
      __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_before);
      __Pyx_DECREF(__pyx_cur_scope->__pyx_v_before);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_after);
      __pyx_cur_scope->__pyx_v_before = __pyx_cur_scope->__pyx_v_after;
      goto __pyx_L7;
    }
    __pyx_L7:;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":343
 *             print >>logstream, '%s rows in %.2fs; batch in %.2fs (%d rows/s)' % (i, after-before_all, after-before, progress/(after-before))
 *             before = after
 *     after_all = time.time()             # <<<<<<<<<<<<<<
 *     print >>logstream, '%s rows in %.2fs (%d rows/s)' % (i, after_all-before_all, i/(after_all-before_all))
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__time); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_after_all = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "vcfnp.pyx":344
 *             before = after
 *     after_all = time.time()
 *     print >>logstream, '%s rows in %.2fs (%d rows/s)' % (i, after_all-before_all, i/(after_all-before_all))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_13 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_after_all, __pyx_cur_scope->__pyx_v_before_all); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_12 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_10 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_after_all, __pyx_cur_scope->__pyx_v_before_all); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_9 = __Pyx_PyNumber_Divide(__pyx_t_12, __pyx_t_10); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_13);
  __Pyx_GIVEREF(__pyx_t_13);
  PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  __pyx_t_1 = 0;
  __pyx_t_13 = 0;
  __pyx_t_9 = 0;
  __pyx_t_9 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_11), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_9));
  __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
  if (__Pyx_PrintOne(__pyx_cur_scope->__pyx_v_logstream, ((PyObject *)__pyx_t_9)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("_iter_withprogress", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_generator->resume_label = -1;
  __Pyx_Generator_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return NULL;
}
static PyObject *__pyx_gb_5vcfnp_9generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_8_itervariants(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_5vcfnp_8_itervariants = {__Pyx_NAMESTR("_itervariants"), (PyCFunction)__pyx_pw_5vcfnp_8_itervariants, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_5vcfnp_8_itervariants(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_filenames = 0;
  PyObject *__pyx_v_region = 0;
  std::vector<std::string> __pyx_v_fields;
  std::map<std::string,int> __pyx_v_arities;
  PyObject *__pyx_v_fills = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_itervariants (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__filenames,&__pyx_n_s__region,&__pyx_n_s__fields,&__pyx_n_s__arities,&__pyx_n_s__fills,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filenames)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__region)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_itervariants", 1, 5, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fields)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_itervariants", 1, 5, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arities)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_itervariants", 1, 5, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fills)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_itervariants", 1, 5, 5, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_itervariants") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_filenames = values[0];
    __pyx_v_region = values[1];
    __pyx_v_fields = __pyx_convert_vector_from_py_std_3a__3a_string(values[2]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_arities = __pyx_convert_map_from_py_std_3a__3a_string____int(values[3]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_fills = ((PyObject*)values[4]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_itervariants", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vcfnp._itervariants", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fills), (&PyDict_Type), 1, "fills", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vcfnp_7_itervariants(__pyx_self, __pyx_v_filenames, __pyx_v_region, __pyx_v_fields, __pyx_v_arities, __pyx_v_fills);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":348
 * 
 * 
 * def _itervariants(filenames,             # <<<<<<<<<<<<<<
 *                  region,
 *                  vector[string] fields,
 */

static PyObject *__pyx_pf_5vcfnp_7_itervariants(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filenames, PyObject *__pyx_v_region, std::vector<std::string> __pyx_v_fields, std::map<std::string,int> __pyx_v_arities, PyObject *__pyx_v_fills) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_1__itervariants *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_itervariants", 0);
  __pyx_cur_scope = (struct __pyx_obj_5vcfnp___pyx_scope_struct_1__itervariants *)__pyx_tp_new_5vcfnp___pyx_scope_struct_1__itervariants(__pyx_ptype_5vcfnp___pyx_scope_struct_1__itervariants, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_filenames = __pyx_v_filenames;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_filenames);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_filenames);
  __pyx_cur_scope->__pyx_v_region = __pyx_v_region;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_region);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_region);
  __pyx_cur_scope->__pyx_v_fields = __pyx_v_fields;
  __pyx_cur_scope->__pyx_v_arities = __pyx_v_arities;
  __pyx_cur_scope->__pyx_v_fills = __pyx_v_fills;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fills);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fills);
  {
    __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5vcfnp_9generator1, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("vcfnp._itervariants", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_5vcfnp_9generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5vcfnp___pyx_scope_struct_1__itervariants *__pyx_cur_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_1__itervariants *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  vcf::VariantCallFile *__pyx_t_5;
  std::string __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  std::vector<std::string> __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L9_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":357
 *     cdef vector[string] filterIds
 * 
 *     for current_filename in filenames:             # <<<<<<<<<<<<<<
 *         variantFile = new VariantCallFile()
 *         variantFile.open(current_filename)
 */
  if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_filenames) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_filenames)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_filenames; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_filenames); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) {
      if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) {
      if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_current_filename);
    __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_current_filename);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_cur_scope->__pyx_v_current_filename = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "vcfnp.pyx":358
 * 
 *     for current_filename in filenames:
 *         variantFile = new VariantCallFile()             # <<<<<<<<<<<<<<
 *         variantFile.open(current_filename)
 *         variantFile.parseSamples = False
 */
    try {
      __pyx_t_5 = new vcf::VariantCallFile();
    } catch(...) {
      __Pyx_CppExn2PyErr();
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_cur_scope->__pyx_v_variantFile = __pyx_t_5;

    /* "vcfnp.pyx":359
 *     for current_filename in filenames:
 *         variantFile = new VariantCallFile()
 *         variantFile.open(current_filename)             # <<<<<<<<<<<<<<
 *         variantFile.parseSamples = False
 *         if region is not None:
 */
    __pyx_t_6 = __pyx_convert_string_from_py_(__pyx_cur_scope->__pyx_v_current_filename); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_cur_scope->__pyx_v_variantFile->open(__pyx_t_6);

    /* "vcfnp.pyx":360
 *         variantFile = new VariantCallFile()
 *         variantFile.open(current_filename)
 *         variantFile.parseSamples = False             # <<<<<<<<<<<<<<
 *         if region is not None:
 *             variantFile.setRegion(region)
 */
    __pyx_cur_scope->__pyx_v_variantFile->parseSamples = 0;

    /* "vcfnp.pyx":361
 *         variantFile.open(current_filename)
 *         variantFile.parseSamples = False
 *         if region is not None:             # <<<<<<<<<<<<<<
 *             variantFile.setRegion(region)
 *         var = new Variant(deref(variantFile))
 */
    __pyx_t_7 = (__pyx_cur_scope->__pyx_v_region != Py_None);
    __pyx_t_8 = (__pyx_t_7 != 0);
    if (__pyx_t_8) {

      /* "vcfnp.pyx":362
 *         variantFile.parseSamples = False
 *         if region is not None:
 *             variantFile.setRegion(region)             # <<<<<<<<<<<<<<
 *         var = new Variant(deref(variantFile))
 *         filterIds = <list>variantFile.filterIds()
 */
      __pyx_t_6 = __pyx_convert_string_from_py_(__pyx_cur_scope->__pyx_v_region); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_cur_scope->__pyx_v_variantFile->setRegion(__pyx_t_6);
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "vcfnp.pyx":363
 *         if region is not None:
 *             variantFile.setRegion(region)
 *         var = new Variant(deref(variantFile))             # <<<<<<<<<<<<<<
 *         filterIds = <list>variantFile.filterIds()
 *         filterIds = ['PASS'] + sorted(filterIds)
 */
    __pyx_cur_scope->__pyx_v_var = new vcf::Variant((*__pyx_cur_scope->__pyx_v_variantFile));

    /* "vcfnp.pyx":364
 *             variantFile.setRegion(region)
 *         var = new Variant(deref(variantFile))
 *         filterIds = <list>variantFile.filterIds()             # <<<<<<<<<<<<<<
 *         filterIds = ['PASS'] + sorted(filterIds)
 * 
 */
    __pyx_t_4 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_cur_scope->__pyx_v_variantFile->filterIds()); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    if (!(likely(PyList_CheckExact(__pyx_t_4))||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_9 = __pyx_convert_vector_from_py_std_3a__3a_string(__pyx_t_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_cur_scope->__pyx_v_filterIds = __pyx_t_9;

    /* "vcfnp.pyx":365
 *         var = new Variant(deref(variantFile))
 *         filterIds = <list>variantFile.filterIds()
 *         filterIds = ['PASS'] + sorted(filterIds)             # <<<<<<<<<<<<<<
 * 
 *         while _get_next_variant(variantFile, var):
 */
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)__pyx_n_s__PASS));
    PyList_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_n_s__PASS));
    __Pyx_GIVEREF(((PyObject *)__pyx_n_s__PASS));
    __pyx_t_10 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_cur_scope->__pyx_v_filterIds); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_10);
    __pyx_t_10 = 0;
    __pyx_t_10 = PyObject_Call(__pyx_builtin_sorted, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
    __pyx_t_11 = PyNumber_Add(((PyObject *)__pyx_t_4), __pyx_t_10); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_9 = __pyx_convert_vector_from_py_std_3a__3a_string(__pyx_t_11); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_cur_scope->__pyx_v_filterIds = __pyx_t_9;

    /* "vcfnp.pyx":367
 *         filterIds = ['PASS'] + sorted(filterIds)
 * 
 *         while _get_next_variant(variantFile, var):             # <<<<<<<<<<<<<<
 *             yield _mkvvals(var, fields, arities, fills, filterIds)
 * 
 */
    while (1) {
      __pyx_t_8 = (__pyx_f_5vcfnp__get_next_variant(__pyx_cur_scope->__pyx_v_variantFile, __pyx_cur_scope->__pyx_v_var) != 0);
      if (!__pyx_t_8) break;

      /* "vcfnp.pyx":368
 * 
 *         while _get_next_variant(variantFile, var):
 *             yield _mkvvals(var, fields, arities, fills, filterIds)             # <<<<<<<<<<<<<<
 * 
 *         del variantFile
 */
      __pyx_t_11 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_cur_scope->__pyx_v_filterIds); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      if (!(likely(PyList_CheckExact(__pyx_t_11))||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_11)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_10 = __pyx_f_5vcfnp__mkvvals(__pyx_cur_scope->__pyx_v_var, __pyx_cur_scope->__pyx_v_fields, __pyx_cur_scope->__pyx_v_arities, __pyx_cur_scope->__pyx_v_fills, ((PyObject*)__pyx_t_11)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_r = __pyx_t_10;
      __pyx_t_10 = 0;
      __Pyx_XGIVEREF(__pyx_t_1);
      __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
      __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
      __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      /* return from generator, yielding value */
      __pyx_generator->resume_label = 1;
      return __pyx_r;
      __pyx_L9_resume_from_yield:;
      __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
      __pyx_cur_scope->__pyx_t_0 = 0;
      __Pyx_XGOTREF(__pyx_t_1);
      __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
      __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
      if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }

    /* "vcfnp.pyx":370
 *             yield _mkvvals(var, fields, arities, fills, filterIds)
 * 
 *         del variantFile             # <<<<<<<<<<<<<<
 *         del var
 * 
 */
    delete __pyx_cur_scope->__pyx_v_variantFile;

    /* "vcfnp.pyx":371
 * 
 *         del variantFile
 *         del var             # <<<<<<<<<<<<<<
 * 
 * 
 */
    delete __pyx_cur_scope->__pyx_v_var;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("_itervariants", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_generator->resume_label = -1;
  __Pyx_Generator_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return NULL;
}
static PyObject *__pyx_gb_5vcfnp_12generator2(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_11_itervariants_with_condition(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_5vcfnp_11_itervariants_with_condition = {__Pyx_NAMESTR("_itervariants_with_condition"), (PyCFunction)__pyx_pw_5vcfnp_11_itervariants_with_condition, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_5vcfnp_11_itervariants_with_condition(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_filenames = 0;
  PyObject *__pyx_v_region = 0;
  std::vector<std::string> __pyx_v_fields;
  std::map<std::string,int> __pyx_v_arities;
  PyObject *__pyx_v_fills = 0;
  PyObject *__pyx_v_condition = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_itervariants_with_condition (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__filenames,&__pyx_n_s__region,&__pyx_n_s__fields,&__pyx_n_s__arities,&__pyx_n_s__fills,&__pyx_n_s__condition,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filenames)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__region)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_itervariants_with_condition", 1, 6, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fields)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_itervariants_with_condition", 1, 6, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arities)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_itervariants_with_condition", 1, 6, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fills)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_itervariants_with_condition", 1, 6, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__condition)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_itervariants_with_condition", 1, 6, 6, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_itervariants_with_condition") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
    }
    __pyx_v_filenames = values[0];
    __pyx_v_region = values[1];
    __pyx_v_fields = __pyx_convert_vector_from_py_std_3a__3a_string(values[2]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_arities = __pyx_convert_map_from_py_std_3a__3a_string____int(values[3]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_fills = ((PyObject*)values[4]);
    __pyx_v_condition = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_itervariants_with_condition", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vcfnp._itervariants_with_condition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fills), (&PyDict_Type), 1, "fills", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vcfnp_10_itervariants_with_condition(__pyx_self, __pyx_v_filenames, __pyx_v_region, __pyx_v_fields, __pyx_v_arities, __pyx_v_fills, __pyx_v_condition);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":374
 * 
 * 
 * def _itervariants_with_condition(filenames,             # <<<<<<<<<<<<<<
 *                                  region,
 *                                  vector[string] fields,
 */

static PyObject *__pyx_pf_5vcfnp_10_itervariants_with_condition(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filenames, PyObject *__pyx_v_region, std::vector<std::string> __pyx_v_fields, std::map<std::string,int> __pyx_v_arities, PyObject *__pyx_v_fills, PyObject *__pyx_v_condition) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_2__itervariants_with_condition *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_itervariants_with_condition", 0);
  __pyx_cur_scope = (struct __pyx_obj_5vcfnp___pyx_scope_struct_2__itervariants_with_condition *)__pyx_tp_new_5vcfnp___pyx_scope_struct_2__itervariants_with_condition(__pyx_ptype_5vcfnp___pyx_scope_struct_2__itervariants_with_condition, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_filenames = __pyx_v_filenames;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_filenames);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_filenames);
  __pyx_cur_scope->__pyx_v_region = __pyx_v_region;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_region);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_region);
  __pyx_cur_scope->__pyx_v_fields = __pyx_v_fields;
  __pyx_cur_scope->__pyx_v_arities = __pyx_v_arities;
  __pyx_cur_scope->__pyx_v_fills = __pyx_v_fills;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fills);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fills);
  __pyx_cur_scope->__pyx_v_condition = __pyx_v_condition;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_condition);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_condition);
  {
    __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5vcfnp_12generator2, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("vcfnp._itervariants_with_condition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_5vcfnp_12generator2(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5vcfnp___pyx_scope_struct_2__itervariants_with_condition *__pyx_cur_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_2__itervariants_with_condition *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  vcf::VariantCallFile *__pyx_t_5;
  std::string __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  std::vector<std::string> __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L10_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":383
 *     cdef Variant *var
 *     cdef vector[string] filterIds
 *     cdef int i = 0             # <<<<<<<<<<<<<<
 *     cdef int n = len(condition)
 * 
 */
  __pyx_cur_scope->__pyx_v_i = 0;

  /* "vcfnp.pyx":384
 *     cdef vector[string] filterIds
 *     cdef int i = 0
 *     cdef int n = len(condition)             # <<<<<<<<<<<<<<
 * 
 *     for current_filename in filenames:
 */
  __pyx_t_1 = PyObject_Length(__pyx_cur_scope->__pyx_v_condition); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_cur_scope->__pyx_v_n = __pyx_t_1;

  /* "vcfnp.pyx":386
 *     cdef int n = len(condition)
 * 
 *     for current_filename in filenames:             # <<<<<<<<<<<<<<
 *         variantFile = new VariantCallFile()
 *         variantFile.open(current_filename)
 */
  if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_filenames) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_filenames)) {
    __pyx_t_2 = __pyx_cur_scope->__pyx_v_filenames; __Pyx_INCREF(__pyx_t_2); __pyx_t_1 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_1 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_filenames); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = Py_TYPE(__pyx_t_2)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_2)) {
      if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_4); __pyx_t_1++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_2)) {
      if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_4); __pyx_t_1++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_2);
      if (unlikely(!__pyx_t_4)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_current_filename);
    __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_current_filename);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_cur_scope->__pyx_v_current_filename = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "vcfnp.pyx":387
 * 
 *     for current_filename in filenames:
 *         variantFile = new VariantCallFile()             # <<<<<<<<<<<<<<
 *         variantFile.open(current_filename)
 *         variantFile.parseSamples = False
 */
    try {
      __pyx_t_5 = new vcf::VariantCallFile();
    } catch(...) {
      __Pyx_CppExn2PyErr();
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_cur_scope->__pyx_v_variantFile = __pyx_t_5;

    /* "vcfnp.pyx":388
 *     for current_filename in filenames:
 *         variantFile = new VariantCallFile()
 *         variantFile.open(current_filename)             # <<<<<<<<<<<<<<
 *         variantFile.parseSamples = False
 *         if region is not None:
 */
    __pyx_t_6 = __pyx_convert_string_from_py_(__pyx_cur_scope->__pyx_v_current_filename); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_cur_scope->__pyx_v_variantFile->open(__pyx_t_6);

    /* "vcfnp.pyx":389
 *         variantFile = new VariantCallFile()
 *         variantFile.open(current_filename)
 *         variantFile.parseSamples = False             # <<<<<<<<<<<<<<
 *         if region is not None:
 *             variantFile.setRegion(region)
 */
    __pyx_cur_scope->__pyx_v_variantFile->parseSamples = 0;

    /* "vcfnp.pyx":390
 *         variantFile.open(current_filename)
 *         variantFile.parseSamples = False
 *         if region is not None:             # <<<<<<<<<<<<<<
 *             variantFile.setRegion(region)
 *         var = new Variant(deref(variantFile))
 */
    __pyx_t_7 = (__pyx_cur_scope->__pyx_v_region != Py_None);
    __pyx_t_8 = (__pyx_t_7 != 0);
    if (__pyx_t_8) {

      /* "vcfnp.pyx":391
 *         variantFile.parseSamples = False
 *         if region is not None:
 *             variantFile.setRegion(region)             # <<<<<<<<<<<<<<
 *         var = new Variant(deref(variantFile))
 *         filterIds = <list>variantFile.filterIds()
 */
      __pyx_t_6 = __pyx_convert_string_from_py_(__pyx_cur_scope->__pyx_v_region); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_cur_scope->__pyx_v_variantFile->setRegion(__pyx_t_6);
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "vcfnp.pyx":392
 *         if region is not None:
 *             variantFile.setRegion(region)
 *         var = new Variant(deref(variantFile))             # <<<<<<<<<<<<<<
 *         filterIds = <list>variantFile.filterIds()
 *         filterIds = ['PASS'] + sorted(filterIds)
 */
    __pyx_cur_scope->__pyx_v_var = new vcf::Variant((*__pyx_cur_scope->__pyx_v_variantFile));

    /* "vcfnp.pyx":393
 *             variantFile.setRegion(region)
 *         var = new Variant(deref(variantFile))
 *         filterIds = <list>variantFile.filterIds()             # <<<<<<<<<<<<<<
 *         filterIds = ['PASS'] + sorted(filterIds)
 * 
 */
    __pyx_t_4 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_cur_scope->__pyx_v_variantFile->filterIds()); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    if (!(likely(PyList_CheckExact(__pyx_t_4))||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_9 = __pyx_convert_vector_from_py_std_3a__3a_string(__pyx_t_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_cur_scope->__pyx_v_filterIds = __pyx_t_9;

    /* "vcfnp.pyx":394
 *         var = new Variant(deref(variantFile))
 *         filterIds = <list>variantFile.filterIds()
 *         filterIds = ['PASS'] + sorted(filterIds)             # <<<<<<<<<<<<<<
 * 
 *         while i < n and _get_next_variant(variantFile, var):
 */
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)__pyx_n_s__PASS));
    PyList_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_n_s__PASS));
    __Pyx_GIVEREF(((PyObject *)__pyx_n_s__PASS));
    __pyx_t_10 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_cur_scope->__pyx_v_filterIds); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_10);
    __pyx_t_10 = 0;
    __pyx_t_10 = PyObject_Call(__pyx_builtin_sorted, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
    __pyx_t_11 = PyNumber_Add(((PyObject *)__pyx_t_4), __pyx_t_10); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_9 = __pyx_convert_vector_from_py_std_3a__3a_string(__pyx_t_11); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_cur_scope->__pyx_v_filterIds = __pyx_t_9;

    /* "vcfnp.pyx":396
 *         filterIds = ['PASS'] + sorted(filterIds)
 * 
 *         while i < n and _get_next_variant(variantFile, var):             # <<<<<<<<<<<<<<
 *             if condition[i]:
 *                 yield _mkvvals(var, fields, arities, fills, filterIds)
 */
    while (1) {
      __pyx_t_8 = (__pyx_cur_scope->__pyx_v_i < __pyx_cur_scope->__pyx_v_n);
      if (__pyx_t_8) {
        __pyx_t_7 = (__pyx_f_5vcfnp__get_next_variant(__pyx_cur_scope->__pyx_v_variantFile, __pyx_cur_scope->__pyx_v_var) != 0);
      } else {
        __pyx_t_7 = __pyx_t_8;
      }
      if (!__pyx_t_7) break;

      /* "vcfnp.pyx":397
 * 
 *         while i < n and _get_next_variant(variantFile, var):
 *             if condition[i]:             # <<<<<<<<<<<<<<
 *                 yield _mkvvals(var, fields, arities, fills, filterIds)
 *             i += 1
 */
      __pyx_t_11 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_condition, __pyx_cur_scope->__pyx_v_i, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (__pyx_t_7) {

        /* "vcfnp.pyx":398
 *         while i < n and _get_next_variant(variantFile, var):
 *             if condition[i]:
 *                 yield _mkvvals(var, fields, arities, fills, filterIds)             # <<<<<<<<<<<<<<
 *             i += 1
 * 
 */
        __pyx_t_11 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_cur_scope->__pyx_v_filterIds); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_11);
        if (!(likely(PyList_CheckExact(__pyx_t_11))||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_11)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_10 = __pyx_f_5vcfnp__mkvvals(__pyx_cur_scope->__pyx_v_var, __pyx_cur_scope->__pyx_v_fields, __pyx_cur_scope->__pyx_v_arities, __pyx_cur_scope->__pyx_v_fills, ((PyObject*)__pyx_t_11)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_r = __pyx_t_10;
        __pyx_t_10 = 0;
        __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
        __Pyx_XGIVEREF(__pyx_t_2);
        __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
        __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
        __Pyx_XGIVEREF(__pyx_r);
        __Pyx_RefNannyFinishContext();
        /* return from generator, yielding value */
        __pyx_generator->resume_label = 1;
        return __pyx_r;
        __pyx_L10_resume_from_yield:;
        __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
        __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
        __pyx_cur_scope->__pyx_t_1 = 0;
        __Pyx_XGOTREF(__pyx_t_2);
        __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
        if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L9;
      }
      __pyx_L9:;

      /* "vcfnp.pyx":399
 *             if condition[i]:
 *                 yield _mkvvals(var, fields, arities, fills, filterIds)
 *             i += 1             # <<<<<<<<<<<<<<
 * 
 *         del variantFile
 */
      __pyx_cur_scope->__pyx_v_i = (__pyx_cur_scope->__pyx_v_i + 1);
    }

    /* "vcfnp.pyx":401
 *             i += 1
 * 
 *         del variantFile             # <<<<<<<<<<<<<<
 *         del var
 * 
 */
    delete __pyx_cur_scope->__pyx_v_variantFile;

    /* "vcfnp.pyx":402
 * 
 *         del variantFile
 *         del var             # <<<<<<<<<<<<<<
 * 
 * 
 */
    delete __pyx_cur_scope->__pyx_v_var;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("_itervariants_with_condition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_generator->resume_label = -1;
  __Pyx_Generator_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return NULL;
}

/* "vcfnp.pyx":405
 * 
 * 
 * cdef inline bool _get_next_variant(VariantCallFile *variantFile, Variant *var):             # <<<<<<<<<<<<<<
 *     # break this out into a separate function so we can profile it
 *     return variantFile.getNextVariant(deref(var))
 */

static CYTHON_INLINE bool __pyx_f_5vcfnp__get_next_variant(vcf::VariantCallFile *__pyx_v_variantFile, vcf::Variant *__pyx_v_var) {
  bool __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_next_variant", 0);

  /* "vcfnp.pyx":407
 * cdef inline bool _get_next_variant(VariantCallFile *variantFile, Variant *var):
 *     # break this out into a separate function so we can profile it
 *     return variantFile.getNextVariant(deref(var))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_variantFile->getNextVariant((*__pyx_v_var));
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":411
 * 
 * 
 * cdef inline object _mkvvals(Variant *var,             # <<<<<<<<<<<<<<
 *                             vector[string] fields,
 *                             map[string, int] arities,
 */

static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkvvals(vcf::Variant *__pyx_v_var, std::vector<std::string> __pyx_v_fields, std::map<std::string,int> __pyx_v_arities, PyObject *__pyx_v_fills, PyObject *__pyx_v_filterIds) {
  PyObject *__pyx_v_out = NULL;
  std::string __pyx_v_f;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  std::vector<std::string>::iterator __pyx_t_2;
  std::string __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_mkvvals", 0);

  /* "vcfnp.pyx":416
 *                             dict fills,
 *                             list filterIds):
 *     out = tuple([_mkvval(var, f, arities[f], fills[f], filterIds) for f in fields])             # <<<<<<<<<<<<<<
 *     return out
 * 
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_v_fields.begin();
  for (;;) {
    if (!(__pyx_t_2 != __pyx_v_fields.end())) break;
    __pyx_t_3 = *__pyx_t_2;
    ++__pyx_t_2;
    __pyx_v_f = __pyx_t_3;
    if (unlikely(((PyObject *)__pyx_v_fills) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = __pyx_convert_string_to_py_(__pyx_v_f); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
    __pyx_t_5 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_fills), ((PyObject *)__pyx_t_4)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __pyx_t_4 = __pyx_f_5vcfnp__mkvval(__pyx_v_var, __pyx_v_f, (__pyx_v_arities[__pyx_v_f]), __pyx_t_5, __pyx_v_filterIds); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_t_4 = ((PyObject *)PyList_AsTuple(((PyObject*)__pyx_t_1))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_v_out = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "vcfnp.pyx":417
 *                             list filterIds):
 *     out = tuple([_mkvval(var, f, arities[f], fills[f], filterIds) for f in fields])
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_out));
  __pyx_r = ((PyObject *)__pyx_v_out);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vcfnp._mkvvals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":421
 * 
 * 
 * cdef inline object _mkvval(Variant *var, string field, int arity, object fill, list filterIds):             # <<<<<<<<<<<<<<
 *     if field == FIELD_NAME_CHROM:
 *         out = var.sequenceName
 */

static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkvval(vcf::Variant *__pyx_v_var, std::string __pyx_v_field, int __pyx_v_arity, PyObject *__pyx_v_fill, PyObject *__pyx_v_filterIds) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_mkvval", 0);

  /* "vcfnp.pyx":422
 * 
 * cdef inline object _mkvval(Variant *var, string field, int arity, object fill, list filterIds):
 *     if field == FIELD_NAME_CHROM:             # <<<<<<<<<<<<<<
 *         out = var.sequenceName
 *     elif field == FIELD_NAME_POS:
 */
  __pyx_t_1 = ((__pyx_v_field == __pyx_v_5vcfnp_FIELD_NAME_CHROM) != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":423
 * cdef inline object _mkvval(Variant *var, string field, int arity, object fill, list filterIds):
 *     if field == FIELD_NAME_CHROM:
 *         out = var.sequenceName             # <<<<<<<<<<<<<<
 *     elif field == FIELD_NAME_POS:
 *         out = var.position
 */
    __pyx_t_2 = __pyx_convert_string_to_py_(__pyx_v_var->sequenceName); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __pyx_v_out = ((PyObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L3;
  }

  /* "vcfnp.pyx":424
 *     if field == FIELD_NAME_CHROM:
 *         out = var.sequenceName
 *     elif field == FIELD_NAME_POS:             # <<<<<<<<<<<<<<
 *         out = var.position
 *     elif field == FIELD_NAME_ID:
 */
  __pyx_t_1 = ((__pyx_v_field == __pyx_v_5vcfnp_FIELD_NAME_POS) != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":425
 *         out = var.sequenceName
 *     elif field == FIELD_NAME_POS:
 *         out = var.position             # <<<<<<<<<<<<<<
 *     elif field == FIELD_NAME_ID:
 *         out = var.id
 */
    __pyx_t_2 = PyInt_FromLong(__pyx_v_var->position); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_out = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L3;
  }

  /* "vcfnp.pyx":426
 *     elif field == FIELD_NAME_POS:
 *         out = var.position
 *     elif field == FIELD_NAME_ID:             # <<<<<<<<<<<<<<
 *         out = var.id
 *     elif field == FIELD_NAME_REF:
 */
  __pyx_t_1 = ((__pyx_v_field == __pyx_v_5vcfnp_FIELD_NAME_ID) != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":427
 *         out = var.position
 *     elif field == FIELD_NAME_ID:
 *         out = var.id             # <<<<<<<<<<<<<<
 *     elif field == FIELD_NAME_REF:
 *         out = var.ref
 */
    __pyx_t_2 = __pyx_convert_string_to_py_(__pyx_v_var->id); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __pyx_v_out = ((PyObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L3;
  }

  /* "vcfnp.pyx":428
 *     elif field == FIELD_NAME_ID:
 *         out = var.id
 *     elif field == FIELD_NAME_REF:             # <<<<<<<<<<<<<<
 *         out = var.ref
 *     elif field == FIELD_NAME_ALT:
 */
  __pyx_t_1 = ((__pyx_v_field == __pyx_v_5vcfnp_FIELD_NAME_REF) != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":429
 *         out = var.id
 *     elif field == FIELD_NAME_REF:
 *         out = var.ref             # <<<<<<<<<<<<<<
 *     elif field == FIELD_NAME_ALT:
 *         out = _mkaltval(var, arity, fill)
 */
    __pyx_t_2 = __pyx_convert_string_to_py_(__pyx_v_var->ref); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __pyx_v_out = ((PyObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L3;
  }

  /* "vcfnp.pyx":430
 *     elif field == FIELD_NAME_REF:
 *         out = var.ref
 *     elif field == FIELD_NAME_ALT:             # <<<<<<<<<<<<<<
 *         out = _mkaltval(var, arity, fill)
 *     elif field == FIELD_NAME_QUAL:
 */
  __pyx_t_1 = ((__pyx_v_field == __pyx_v_5vcfnp_FIELD_NAME_ALT) != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":431
 *         out = var.ref
 *     elif field == FIELD_NAME_ALT:
 *         out = _mkaltval(var, arity, fill)             # <<<<<<<<<<<<<<
 *     elif field == FIELD_NAME_QUAL:
 *         out = var.quality
 */
    __pyx_t_2 = __pyx_f_5vcfnp__mkaltval(__pyx_v_var, __pyx_v_arity, __pyx_v_fill); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_out = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L3;
  }

  /* "vcfnp.pyx":432
 *     elif field == FIELD_NAME_ALT:
 *         out = _mkaltval(var, arity, fill)
 *     elif field == FIELD_NAME_QUAL:             # <<<<<<<<<<<<<<
 *         out = var.quality
 *     elif field == FIELD_NAME_FILTER:
 */
  __pyx_t_1 = ((__pyx_v_field == __pyx_v_5vcfnp_FIELD_NAME_QUAL) != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":433
 *         out = _mkaltval(var, arity, fill)
 *     elif field == FIELD_NAME_QUAL:
 *         out = var.quality             # <<<<<<<<<<<<<<
 *     elif field == FIELD_NAME_FILTER:
 *         out = _mkfilterval(var, filterIds)
 */
    __pyx_t_2 = PyFloat_FromDouble(__pyx_v_var->quality); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_out = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L3;
  }

  /* "vcfnp.pyx":434
 *     elif field == FIELD_NAME_QUAL:
 *         out = var.quality
 *     elif field == FIELD_NAME_FILTER:             # <<<<<<<<<<<<<<
 *         out = _mkfilterval(var, filterIds)
 *     elif field == FIELD_NAME_NUM_ALLELES:
 */
  __pyx_t_1 = ((__pyx_v_field == __pyx_v_5vcfnp_FIELD_NAME_FILTER) != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":435
 *         out = var.quality
 *     elif field == FIELD_NAME_FILTER:
 *         out = _mkfilterval(var, filterIds)             # <<<<<<<<<<<<<<
 *     elif field == FIELD_NAME_NUM_ALLELES:
 *         out = var.alt.size() + 1
 */
    __pyx_t_2 = __pyx_f_5vcfnp__mkfilterval(__pyx_v_var, __pyx_v_filterIds); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_out = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L3;
  }

  /* "vcfnp.pyx":436
 *     elif field == FIELD_NAME_FILTER:
 *         out = _mkfilterval(var, filterIds)
 *     elif field == FIELD_NAME_NUM_ALLELES:             # <<<<<<<<<<<<<<
 *         out = var.alt.size() + 1
 *     elif field == FIELD_NAME_IS_SNP:
 */
  __pyx_t_1 = ((__pyx_v_field == __pyx_v_5vcfnp_FIELD_NAME_NUM_ALLELES) != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":437
 *         out = _mkfilterval(var, filterIds)
 *     elif field == FIELD_NAME_NUM_ALLELES:
 *         out = var.alt.size() + 1             # <<<<<<<<<<<<<<
 *     elif field == FIELD_NAME_IS_SNP:
 *         out = _is_snp(var)
 */
    __pyx_t_2 = __Pyx_PyInt_FromSize_t((__pyx_v_var->alt.size() + 1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_out = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L3;
  }

  /* "vcfnp.pyx":438
 *     elif field == FIELD_NAME_NUM_ALLELES:
 *         out = var.alt.size() + 1
 *     elif field == FIELD_NAME_IS_SNP:             # <<<<<<<<<<<<<<
 *         out = _is_snp(var)
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_field == __pyx_v_5vcfnp_FIELD_NAME_IS_SNP) != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":439
 *         out = var.alt.size() + 1
 *     elif field == FIELD_NAME_IS_SNP:
 *         out = _is_snp(var)             # <<<<<<<<<<<<<<
 *     else:
 *         out = 0 # TODO review this
 */
    __pyx_t_2 = __pyx_f_5vcfnp__is_snp(__pyx_v_var); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_out = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "vcfnp.pyx":441
 *         out = _is_snp(var)
 *     else:
 *         out = 0 # TODO review this             # <<<<<<<<<<<<<<
 *     return out
 * 
 */
    __Pyx_INCREF(__pyx_int_0);
    __pyx_v_out = __pyx_int_0;
  }
  __pyx_L3:;

  /* "vcfnp.pyx":442
 *     else:
 *         out = 0 # TODO review this
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vcfnp._mkvval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":446
 * 
 * 
 * cdef inline object _mkaltval(Variant *var, int arity, object fill):             # <<<<<<<<<<<<<<
 *     if arity == 1:
 *         if var.alt.size() == 0:
 */

static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkaltval(vcf::Variant *__pyx_v_var, int __pyx_v_arity, PyObject *__pyx_v_fill) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_mkaltval", 0);

  /* "vcfnp.pyx":447
 * 
 * cdef inline object _mkaltval(Variant *var, int arity, object fill):
 *     if arity == 1:             # <<<<<<<<<<<<<<
 *         if var.alt.size() == 0:
 *             out = fill
 */
  __pyx_t_1 = ((__pyx_v_arity == 1) != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":448
 * cdef inline object _mkaltval(Variant *var, int arity, object fill):
 *     if arity == 1:
 *         if var.alt.size() == 0:             # <<<<<<<<<<<<<<
 *             out = fill
 *         else:
 */
    __pyx_t_1 = ((__pyx_v_var->alt.size() == 0) != 0);
    if (__pyx_t_1) {

      /* "vcfnp.pyx":449
 *     if arity == 1:
 *         if var.alt.size() == 0:
 *             out = fill             # <<<<<<<<<<<<<<
 *         else:
 *             out = var.alt.at(0)
 */
      __Pyx_INCREF(__pyx_v_fill);
      __pyx_v_out = __pyx_v_fill;
      goto __pyx_L4;
    }
    /*else*/ {

      /* "vcfnp.pyx":451
 *             out = fill
 *         else:
 *             out = var.alt.at(0)             # <<<<<<<<<<<<<<
 *     elif var.alt.size() == arity:
 *         out = var.alt
 */
      __pyx_t_2 = __pyx_convert_string_to_py_(__pyx_v_var->alt.at(0)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __pyx_v_out = ((PyObject *)__pyx_t_2);
      __pyx_t_2 = 0;
    }
    __pyx_L4:;
    goto __pyx_L3;
  }

  /* "vcfnp.pyx":452
 *         else:
 *             out = var.alt.at(0)
 *     elif var.alt.size() == arity:             # <<<<<<<<<<<<<<
 *         out = var.alt
 *         out = tuple(out)
 */
  __pyx_t_1 = ((__pyx_v_var->alt.size() == __pyx_v_arity) != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":453
 *             out = var.alt.at(0)
 *     elif var.alt.size() == arity:
 *         out = var.alt             # <<<<<<<<<<<<<<
 *         out = tuple(out)
 *     elif var.alt.size() > arity:
 */
    __pyx_t_2 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_var->alt); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_out = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "vcfnp.pyx":454
 *     elif var.alt.size() == arity:
 *         out = var.alt
 *         out = tuple(out)             # <<<<<<<<<<<<<<
 *     elif var.alt.size() > arity:
 *         out = var.alt
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_out);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_out);
    __Pyx_GIVEREF(__pyx_v_out);
    __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_v_out);
    __pyx_v_out = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3;
  }

  /* "vcfnp.pyx":455
 *         out = var.alt
 *         out = tuple(out)
 *     elif var.alt.size() > arity:             # <<<<<<<<<<<<<<
 *         out = var.alt
 *         out = tuple(out[:arity])
 */
  __pyx_t_1 = ((__pyx_v_var->alt.size() > __pyx_v_arity) != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":456
 *         out = tuple(out)
 *     elif var.alt.size() > arity:
 *         out = var.alt             # <<<<<<<<<<<<<<
 *         out = tuple(out[:arity])
 *     else:
 */
    __pyx_t_3 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_var->alt); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_out = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "vcfnp.pyx":457
 *     elif var.alt.size() > arity:
 *         out = var.alt
 *         out = tuple(out[:arity])             # <<<<<<<<<<<<<<
 *     else:
 *         out = var.alt
 */
    __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_out, 0, __pyx_v_arity, NULL, NULL, NULL, 0, 1, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_v_out);
    __pyx_v_out = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "vcfnp.pyx":459
 *         out = tuple(out[:arity])
 *     else:
 *         out = var.alt             # <<<<<<<<<<<<<<
 *         out += [fill] * (arity-var.alt.size())
 *         out = tuple(out)
 */
    __pyx_t_3 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_var->alt); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_out = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "vcfnp.pyx":460
 *     else:
 *         out = var.alt
 *         out += [fill] * (arity-var.alt.size())             # <<<<<<<<<<<<<<
 *         out = tuple(out)
 *     return out
 */
    __pyx_t_3 = PyList_New(1 * (((__pyx_v_arity - __pyx_v_var->alt.size())<0) ? 0:(__pyx_v_arity - __pyx_v_var->alt.size()))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    { Py_ssize_t __pyx_temp;
      for (__pyx_temp=0; __pyx_temp < (__pyx_v_arity - __pyx_v_var->alt.size()); __pyx_temp++) {
        __Pyx_INCREF(__pyx_v_fill);
        PyList_SET_ITEM(__pyx_t_3, __pyx_temp, __pyx_v_fill);
        __Pyx_GIVEREF(__pyx_v_fill);
      }
    }
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_out, ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_v_out);
    __pyx_v_out = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "vcfnp.pyx":461
 *         out = var.alt
 *         out += [fill] * (arity-var.alt.size())
 *         out = tuple(out)             # <<<<<<<<<<<<<<
 *     return out
 * 
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_out);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_out);
    __Pyx_GIVEREF(__pyx_v_out);
    __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_v_out);
    __pyx_v_out = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_L3:;

  /* "vcfnp.pyx":462
 *         out += [fill] * (arity-var.alt.size())
 *         out = tuple(out)
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("vcfnp._mkaltval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":466
 * 
 * 
 * cdef inline object _mkfilterval(Variant *var, list filterIds):             # <<<<<<<<<<<<<<
 *     filters = <list>split(var.filter, SEMICOLON)
 *     out = [(id in filters) for id in filterIds]
 */

static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkfilterval(vcf::Variant *__pyx_v_var, PyObject *__pyx_v_filterIds) {
  PyObject *__pyx_v_filters = NULL;
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_v_id = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_mkfilterval", 0);

  /* "vcfnp.pyx":467
 * 
 * cdef inline object _mkfilterval(Variant *var, list filterIds):
 *     filters = <list>split(var.filter, SEMICOLON)             # <<<<<<<<<<<<<<
 *     out = [(id in filters) for id in filterIds]
 *     out = tuple(out)
 */
  __pyx_t_1 = __pyx_convert_vector_to_py_std_3a__3a_string(split(__pyx_v_var->filter, __pyx_v_5vcfnp_SEMICOLON)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyList_CheckExact(__pyx_t_1))||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_INCREF(((PyObject*)__pyx_t_1));
  __pyx_v_filters = ((PyObject*)__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":468
 * cdef inline object _mkfilterval(Variant *var, list filterIds):
 *     filters = <list>split(var.filter, SEMICOLON)
 *     out = [(id in filters) for id in filterIds]             # <<<<<<<<<<<<<<
 *     out = tuple(out)
 *     return out
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(((PyObject *)__pyx_v_filterIds) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = ((PyObject *)__pyx_v_filterIds); __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF(__pyx_v_id);
    __pyx_v_id = __pyx_t_4;
    __pyx_t_4 = 0;
    __pyx_t_5 = (__Pyx_PySequence_Contains(__pyx_v_id, ((PyObject *)__pyx_v_filters), Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_out = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "vcfnp.pyx":469
 *     filters = <list>split(var.filter, SEMICOLON)
 *     out = [(id in filters) for id in filterIds]
 *     out = tuple(out)             # <<<<<<<<<<<<<<
 *     return out
 * 
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_out);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_out);
  __Pyx_GIVEREF(__pyx_v_out);
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_v_out);
  __pyx_v_out = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "vcfnp.pyx":470
 *     out = [(id in filters) for id in filterIds]
 *     out = tuple(out)
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("vcfnp._mkfilterval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_filters);
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XDECREF(__pyx_v_id);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":474
 * 
 * 
 * cdef inline object _is_snp(Variant *var):             # <<<<<<<<<<<<<<
 *     cdef int i
 *     cdef bytes alt
 */

static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__is_snp(vcf::Variant *__pyx_v_var) {
  int __pyx_v_i;
  PyObject *__pyx_v_alt = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_is_snp", 0);

  /* "vcfnp.pyx":477
 *     cdef int i
 *     cdef bytes alt
 *     if var.ref.size() > 1:             # <<<<<<<<<<<<<<
 *         return False
 *     for i in range(var.alt.size()):
 */
  __pyx_t_1 = ((__pyx_v_var->ref.size() > 1) != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":478
 *     cdef bytes alt
 *     if var.ref.size() > 1:
 *         return False             # <<<<<<<<<<<<<<
 *     for i in range(var.alt.size()):
 *         alt = var.alt.at(i)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "vcfnp.pyx":479
 *     if var.ref.size() > 1:
 *         return False
 *     for i in range(var.alt.size()):             # <<<<<<<<<<<<<<
 *         alt = var.alt.at(i)
 *         if alt not in {'A', 'C', 'G', 'T'}:
 */
  __pyx_t_3 = __pyx_v_var->alt.size();
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "vcfnp.pyx":480
 *         return False
 *     for i in range(var.alt.size()):
 *         alt = var.alt.at(i)             # <<<<<<<<<<<<<<
 *         if alt not in {'A', 'C', 'G', 'T'}:
 *             return False
 */
    __pyx_t_2 = __pyx_convert_string_to_py_(__pyx_v_var->alt.at(__pyx_v_i)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __Pyx_XDECREF(((PyObject *)__pyx_v_alt));
    __pyx_v_alt = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "vcfnp.pyx":481
 *     for i in range(var.alt.size()):
 *         alt = var.alt.at(i)
 *         if alt not in {'A', 'C', 'G', 'T'}:             # <<<<<<<<<<<<<<
 *             return False
 *     return True
 */
    __Pyx_INCREF(((PyObject *)__pyx_v_alt));
    __pyx_t_5 = __pyx_v_alt;
    __pyx_t_1 = (__Pyx_PyBytes_Equals(((PyObject *)__pyx_t_5), ((PyObject *)__pyx_n_s__A), Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (((int)__pyx_t_1)) {
      __pyx_t_6 = (__Pyx_PyBytes_Equals(((PyObject *)__pyx_t_5), ((PyObject *)__pyx_n_s__C), Py_NE)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_7 = ((int)__pyx_t_6);
    } else {
      __pyx_t_7 = ((int)__pyx_t_1);
    }
    if (__pyx_t_7) {
      __pyx_t_1 = (__Pyx_PyBytes_Equals(((PyObject *)__pyx_t_5), ((PyObject *)__pyx_n_s__G), Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_6 = ((int)__pyx_t_1);
    } else {
      __pyx_t_6 = __pyx_t_7;
    }
    if (__pyx_t_6) {
      __pyx_t_7 = (__Pyx_PyBytes_Equals(((PyObject *)__pyx_t_5), ((PyObject *)__pyx_n_s__T), Py_NE)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_1 = ((int)__pyx_t_7);
    } else {
      __pyx_t_1 = __pyx_t_6;
    }
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __pyx_t_6 = (__pyx_t_1 != 0);
    if (__pyx_t_6) {

      /* "vcfnp.pyx":482
 *         alt = var.alt.at(i)
 *         if alt not in {'A', 'C', 'G', 'T'}:
 *             return False             # <<<<<<<<<<<<<<
 *     return True
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;
      goto __pyx_L6;
    }
    __pyx_L6:;
  }

  /* "vcfnp.pyx":483
 *         if alt not in {'A', 'C', 'G', 'T'}:
 *             return False
 *     return True             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(((PyObject *)__pyx_t_5));
  __Pyx_AddTraceback("vcfnp._is_snp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_alt);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_14info(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5vcfnp_13info[] = "\n    Load a numpy structured array with data from the INFO field of a VCF file.\n\n    Parameters\n    ----------\n\n    filename: string or list\n        Name of the VCF file or list of file names\n    region: string\n        Region to extract, e.g., 'chr1' or 'chr1:0-100000'\n    fields: list or array-like\n        List of fields to extract from the VCF\n    exclude_fields: list or array-like\n        Fields to exclude from extraction\n    dtypes: dict or dict-like\n        Dictionary cotaining dtypes to use instead of the default inferred ones\n    arities: dict or dict-like\n        Dictinoary containing field:integer mappings used to override the number\n        of values to expect\n    fills: dict or dict-like\n        Dictionary containing field:fillvalue mappings used to override the\n        defaults used for missing values\n    transformers: dict or dict-like\n        Dictionary containing field:function mappings used to preprocess\n        any values prior to loading into array\n    vcf_types: dict or dict-like\n        Dictionary containing field:string mappings used to override any\n        bogus type declarations in the VCF header (e.g., MQ0Fraction declared\n        as Integer)\n    count: int\n        Attempt to extract a specific number of records\n    progress: int\n        If greater than 0, log parsing progress\n    logstream: file or file-like object\n        Stream to use for logging progress\n    condition: array\n        Boolean array defining which rows to load\n    slice: tuple or list\n        Slice of the underlying iterator, e.g., (0, 1000, 10) takes every 10th row from the first 1000\n\n    Examples\n    --------\n\n        >>> from vcfnp import info\n        >>> a = info('sample.vcf')\n        >>> a\n        array([(0, 0, 0, 0, 0.0, '.', False, False),\n               (0, 0, 0, 0, 0.0, '.', False, False),\n               (3, 0, 0, 14, 0.5, '.', True, True),\n               (3, 0, 0, 11, 0.017000000923871994, '.', False, False),\n     ""          (2, 0, 0, 10, 0.3330000042915344, 'T', True, False),\n               (3, 0, 0, 13, 0.0, 'T', False, False),\n               (3, 6, 3, 9, 0.0, 'G', False, False),\n               (0, 0, 0, 0, 0.0, '.', False, False),\n               (0, 0, 0, 0, 0.0, '.', False, False)],\n              dtype=[('NS', '<i4'), ('AN', '<u2'), ('AC', '<u2'), ('DP', '<i4'), ('AF', '<f4'), ('AA', '|S12'), ('DB', '|b1'), ('H2', '|b1')])\n\n    ";
static PyMethodDef __pyx_mdef_5vcfnp_14info = {__Pyx_NAMESTR("info"), (PyCFunction)__pyx_pw_5vcfnp_14info, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5vcfnp_13info)};
static PyObject *__pyx_pw_5vcfnp_14info(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_filename = 0;
  PyObject *__pyx_v_region = 0;
  PyObject *__pyx_v_fields = 0;
  PyObject *__pyx_v_exclude_fields = 0;
  PyObject *__pyx_v_dtypes = 0;
  PyObject *__pyx_v_arities = 0;
  PyObject *__pyx_v_fills = 0;
  PyObject *__pyx_v_transformers = 0;
  PyObject *__pyx_v_vcf_types = 0;
  PyObject *__pyx_v_count = 0;
  PyObject *__pyx_v_progress = 0;
  PyObject *__pyx_v_logstream = 0;
  PyObject *__pyx_v_condition = 0;
  PyObject *__pyx_v_slice = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("info (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__filename,&__pyx_n_s__region,&__pyx_n_s__fields,&__pyx_n_s__exclude_fields,&__pyx_n_s__dtypes,&__pyx_n_s__arities,&__pyx_n_s__fills,&__pyx_n_s__transformers,&__pyx_n_s__vcf_types,&__pyx_n_s__count,&__pyx_n_s__progress,&__pyx_n_s__logstream,&__pyx_n_s__condition,&__pyx_n_s__slice,0};
    PyObject* values[14] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0};

    /* "vcfnp.pyx":488
 * 
 * def info(filename,
 *          region=None,             # <<<<<<<<<<<<<<
 *          fields=None,
 *          exclude_fields=None,
 */
    values[1] = ((PyObject *)Py_None);

    /* "vcfnp.pyx":489
 * def info(filename,
 *          region=None,
 *          fields=None,             # <<<<<<<<<<<<<<
 *          exclude_fields=None,
 *          dtypes=None,
 */
    values[2] = ((PyObject *)Py_None);

    /* "vcfnp.pyx":490
 *          region=None,
 *          fields=None,
 *          exclude_fields=None,             # <<<<<<<<<<<<<<
 *          dtypes=None,
 *          arities=None,
 */
    values[3] = ((PyObject *)Py_None);

    /* "vcfnp.pyx":491
 *          fields=None,
 *          exclude_fields=None,
 *          dtypes=None,             # <<<<<<<<<<<<<<
 *          arities=None,
 *          fills=None,
 */
    values[4] = ((PyObject *)Py_None);

    /* "vcfnp.pyx":492
 *          exclude_fields=None,
 *          dtypes=None,
 *          arities=None,             # <<<<<<<<<<<<<<
 *          fills=None,
 *          transformers=None,
 */
    values[5] = ((PyObject *)Py_None);

    /* "vcfnp.pyx":493
 *          dtypes=None,
 *          arities=None,
 *          fills=None,             # <<<<<<<<<<<<<<
 *          transformers=None,
 *          vcf_types=None,
 */
    values[6] = ((PyObject *)Py_None);

    /* "vcfnp.pyx":494
 *          arities=None,
 *          fills=None,
 *          transformers=None,             # <<<<<<<<<<<<<<
 *          vcf_types=None,
 *          count=None,
 */
    values[7] = ((PyObject *)Py_None);

    /* "vcfnp.pyx":495
 *          fills=None,
 *          transformers=None,
 *          vcf_types=None,             # <<<<<<<<<<<<<<
 *          count=None,
 *          progress=0,
 */
    values[8] = ((PyObject *)Py_None);

    /* "vcfnp.pyx":496
 *          transformers=None,
 *          vcf_types=None,
 *          count=None,             # <<<<<<<<<<<<<<
 *          progress=0,
 *          logstream=sys.stderr,
 */
    values[9] = ((PyObject *)Py_None);
    values[10] = ((PyObject *)__pyx_int_0);
    values[11] = __pyx_k_12;

    /* "vcfnp.pyx":499
 *          progress=0,
 *          logstream=sys.stderr,
 *          condition=None,             # <<<<<<<<<<<<<<
 *          slice=None,
 *          ):
 */
    values[12] = ((PyObject *)Py_None);

    /* "vcfnp.pyx":500
 *          logstream=sys.stderr,
 *          condition=None,
 *          slice=None,             # <<<<<<<<<<<<<<
 *          ):
 *     """
 */
    values[13] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
        case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filename)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__region);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fields);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__exclude_fields);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dtypes);
          if (value) { values[4] = value; kw_args--; }
        }
        case  5:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arities);
          if (value) { values[5] = value; kw_args--; }
        }
        case  6:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fills);
          if (value) { values[6] = value; kw_args--; }
        }
        case  7:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__transformers);
          if (value) { values[7] = value; kw_args--; }
        }
        case  8:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__vcf_types);
          if (value) { values[8] = value; kw_args--; }
        }
        case  9:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__count);
          if (value) { values[9] = value; kw_args--; }
        }
        case 10:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__progress);
          if (value) { values[10] = value; kw_args--; }
        }
        case 11:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__logstream);
          if (value) { values[11] = value; kw_args--; }
        }
        case 12:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__condition);
          if (value) { values[12] = value; kw_args--; }
        }
        case 13:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__slice);
          if (value) { values[13] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "info") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
        case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_filename = values[0];
    __pyx_v_region = values[1];
    __pyx_v_fields = values[2];
    __pyx_v_exclude_fields = values[3];
    __pyx_v_dtypes = values[4];
    __pyx_v_arities = values[5];
    __pyx_v_fills = values[6];
    __pyx_v_transformers = values[7];
    __pyx_v_vcf_types = values[8];
    __pyx_v_count = values[9];
    __pyx_v_progress = values[10];
    __pyx_v_logstream = values[11];
    __pyx_v_condition = values[12];
    __pyx_v_slice = values[13];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("info", 0, 1, 14, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vcfnp.info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5vcfnp_13info(__pyx_self, __pyx_v_filename, __pyx_v_region, __pyx_v_fields, __pyx_v_exclude_fields, __pyx_v_dtypes, __pyx_v_arities, __pyx_v_fills, __pyx_v_transformers, __pyx_v_vcf_types, __pyx_v_count, __pyx_v_progress, __pyx_v_logstream, __pyx_v_condition, __pyx_v_slice);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":487
 * 
 * 
 * def info(filename,             # <<<<<<<<<<<<<<
 *          region=None,
 *          fields=None,
 */

static PyObject *__pyx_pf_5vcfnp_13info(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_region, PyObject *__pyx_v_fields, PyObject *__pyx_v_exclude_fields, PyObject *__pyx_v_dtypes, PyObject *__pyx_v_arities, PyObject *__pyx_v_fills, PyObject *__pyx_v_transformers, PyObject *__pyx_v_vcf_types, PyObject *__pyx_v_count, PyObject *__pyx_v_progress, PyObject *__pyx_v_logstream, PyObject *__pyx_v_condition, PyObject *__pyx_v_slice) {
  PyObject *__pyx_v_filenames = NULL;
  PyObject *__pyx_v_fn = NULL;
  struct __pyx_obj_6vcflib_PyVariantCallFile *__pyx_v_vcf = NULL;
  PyObject *__pyx_v_infoIds = NULL;
  PyObject *__pyx_v_infoTypes = NULL;
  PyObject *__pyx_v_infoCounts = NULL;
  PyObject *__pyx_v_f = NULL;
  PyObject *__pyx_v_vcf_type = NULL;
  PyObject *__pyx_v_vcf_count = NULL;
  PyObject *__pyx_v_dtype = NULL;
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_it = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("info", 0);
  __Pyx_INCREF(__pyx_v_fields);
  __Pyx_INCREF(__pyx_v_dtypes);
  __Pyx_INCREF(__pyx_v_arities);
  __Pyx_INCREF(__pyx_v_fills);
  __Pyx_INCREF(__pyx_v_transformers);

  /* "vcfnp.pyx":561
 *     """
 * 
 *     if isinstance(filename, basestring):             # <<<<<<<<<<<<<<
 *         filenames = [filename]
 *     else:
 */
  __pyx_t_1 = __Pyx_PyBaseString_Check(__pyx_v_filename); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "vcfnp.pyx":562
 * 
 *     if isinstance(filename, basestring):
 *         filenames = [filename]             # <<<<<<<<<<<<<<
 *     else:
 *         filenames = filename
 */
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_filename);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_filename);
    __Pyx_GIVEREF(__pyx_v_filename);
    __pyx_v_filenames = ((PyObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "vcfnp.pyx":564
 *         filenames = [filename]
 *     else:
 *         filenames = filename             # <<<<<<<<<<<<<<
 * 
 *     for fn in filenames:
 */
    __Pyx_INCREF(__pyx_v_filename);
    __pyx_v_filenames = __pyx_v_filename;
  }
  __pyx_L3:;

  /* "vcfnp.pyx":566
 *         filenames = filename
 * 
 *     for fn in filenames:             # <<<<<<<<<<<<<<
 *         if not os.path.exists(fn):
 *             raise Exception('file not found: %s' % fn)
 */
  if (PyList_CheckExact(__pyx_v_filenames) || PyTuple_CheckExact(__pyx_v_filenames)) {
    __pyx_t_3 = __pyx_v_filenames; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_filenames); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_6 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_6)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF(__pyx_v_fn);
    __pyx_v_fn = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "vcfnp.pyx":567
 * 
 *     for fn in filenames:
 *         if not os.path.exists(fn):             # <<<<<<<<<<<<<<
 *             raise Exception('file not found: %s' % fn)
 * 
 */
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__os); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__path); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s__exists); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v_fn);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_fn);
    __Pyx_GIVEREF(__pyx_v_fn);
    __pyx_t_8 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_1 = ((!__pyx_t_2) != 0);
    if (__pyx_t_1) {

      /* "vcfnp.pyx":568
 *     for fn in filenames:
 *         if not os.path.exists(fn):
 *             raise Exception('file not found: %s' % fn)             # <<<<<<<<<<<<<<
 * 
 *     vcf = PyVariantCallFile(filenames[0])
 */
      __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_2), __pyx_v_fn); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_8));
      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_8));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_8));
      __pyx_t_8 = 0;
      __pyx_t_8 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L6;
    }
    __pyx_L6:;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "vcfnp.pyx":570
 *             raise Exception('file not found: %s' % fn)
 * 
 *     vcf = PyVariantCallFile(filenames[0])             # <<<<<<<<<<<<<<
 *     infoIds = vcf.infoIds
 *     infoTypes = vcf.infoTypes
 */
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_filenames, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6vcflib_PyVariantCallFile)), ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __pyx_v_vcf = ((struct __pyx_obj_6vcflib_PyVariantCallFile *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "vcfnp.pyx":571
 * 
 *     vcf = PyVariantCallFile(filenames[0])
 *     infoIds = vcf.infoIds             # <<<<<<<<<<<<<<
 *     infoTypes = vcf.infoTypes
 *     infoCounts = vcf.infoCounts
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_vcf), __pyx_n_s__infoIds); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_infoIds = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "vcfnp.pyx":572
 *     vcf = PyVariantCallFile(filenames[0])
 *     infoIds = vcf.infoIds
 *     infoTypes = vcf.infoTypes             # <<<<<<<<<<<<<<
 *     infoCounts = vcf.infoCounts
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_vcf), __pyx_n_s__infoTypes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_infoTypes = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "vcfnp.pyx":573
 *     infoIds = vcf.infoIds
 *     infoTypes = vcf.infoTypes
 *     infoCounts = vcf.infoCounts             # <<<<<<<<<<<<<<
 * 
 *     # determine INFO fields to extract
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_vcf), __pyx_n_s__infoCounts); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_infoCounts = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "vcfnp.pyx":576
 * 
 *     # determine INFO fields to extract
 *     if fields is None:             # <<<<<<<<<<<<<<
 *         fields = infoIds # extract all INFO fields
 *     else:
 */
  __pyx_t_1 = (__pyx_v_fields == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "vcfnp.pyx":577
 *     # determine INFO fields to extract
 *     if fields is None:
 *         fields = infoIds # extract all INFO fields             # <<<<<<<<<<<<<<
 *     else:
 *         for f in fields:
 */
    __Pyx_INCREF(__pyx_v_infoIds);
    __Pyx_DECREF(__pyx_v_fields);
    __pyx_v_fields = __pyx_v_infoIds;
    goto __pyx_L7;
  }
  /*else*/ {

    /* "vcfnp.pyx":579
 *         fields = infoIds # extract all INFO fields
 *     else:
 *         for f in fields:             # <<<<<<<<<<<<<<
 *             assert f in infoIds, 'unknown field: %s' % f
 * 
 */
    if (PyList_CheckExact(__pyx_v_fields) || PyTuple_CheckExact(__pyx_v_fields)) {
      __pyx_t_3 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_fields); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
    }
    for (;;) {
      if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_8 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_8 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_8 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        __pyx_t_8 = __pyx_t_5(__pyx_t_3);
        if (unlikely(!__pyx_t_8)) {
          if (PyErr_Occurred()) {
            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_8);
      }
      __Pyx_XDECREF(__pyx_v_f);
      __pyx_v_f = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "vcfnp.pyx":580
 *     else:
 *         for f in fields:
 *             assert f in infoIds, 'unknown field: %s' % f             # <<<<<<<<<<<<<<
 * 
 *     # exclude fields
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_v_infoIds, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (unlikely(!(__pyx_t_2 != 0))) {
        __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_3), __pyx_v_f); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_8));
        PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_t_8));
        __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #endif
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_L7:;

  /* "vcfnp.pyx":583
 * 
 *     # exclude fields
 *     if exclude_fields is not None:             # <<<<<<<<<<<<<<
 *         fields = [f for f in fields if f not in exclude_fields]
 * 
 */
  __pyx_t_2 = (__pyx_v_exclude_fields != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":584
 *     # exclude fields
 *     if exclude_fields is not None:
 *         fields = [f for f in fields if f not in exclude_fields]             # <<<<<<<<<<<<<<
 * 
 *     # override vcf types
 */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (PyList_CheckExact(__pyx_v_fields) || PyTuple_CheckExact(__pyx_v_fields)) {
      __pyx_t_8 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_8); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_fields); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_5 = Py_TYPE(__pyx_t_8)->tp_iternext;
    }
    for (;;) {
      if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_8)) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_8)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_8, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_8)) {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_8, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        __pyx_t_7 = __pyx_t_5(__pyx_t_8);
        if (unlikely(!__pyx_t_7)) {
          if (PyErr_Occurred()) {
            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_7);
      }
      __Pyx_XDECREF(__pyx_v_f);
      __pyx_v_f = __pyx_t_7;
      __pyx_t_7 = 0;
      __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_v_exclude_fields, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_2 = (__pyx_t_1 != 0);
      if (__pyx_t_2) {
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_v_f))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L13;
      }
      __pyx_L13:;
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_v_fields);
    __pyx_v_fields = ((PyObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L10;
  }
  __pyx_L10:;

  /* "vcfnp.pyx":587
 * 
 *     # override vcf types
 *     if vcf_types is not None:             # <<<<<<<<<<<<<<
 *         for f in vcf_types:
 *             infoTypes[f] = TYPESTRING2KEY[vcf_types[f]]
 */
  __pyx_t_2 = (__pyx_v_vcf_types != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":588
 *     # override vcf types
 *     if vcf_types is not None:
 *         for f in vcf_types:             # <<<<<<<<<<<<<<
 *             infoTypes[f] = TYPESTRING2KEY[vcf_types[f]]
 * 
 */
    if (PyList_CheckExact(__pyx_v_vcf_types) || PyTuple_CheckExact(__pyx_v_vcf_types)) {
      __pyx_t_3 = __pyx_v_vcf_types; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_vcf_types); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
    }
    for (;;) {
      if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_8 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_8 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_8 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        __pyx_t_8 = __pyx_t_5(__pyx_t_3);
        if (unlikely(!__pyx_t_8)) {
          if (PyErr_Occurred()) {
            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_8);
      }
      __Pyx_XDECREF(__pyx_v_f);
      __pyx_v_f = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "vcfnp.pyx":589
 *     if vcf_types is not None:
 *         for f in vcf_types:
 *             infoTypes[f] = TYPESTRING2KEY[vcf_types[f]]             # <<<<<<<<<<<<<<
 * 
 *     # determine a numpy dtype for each field
 */
      __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__TYPESTRING2KEY); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_7 = PyObject_GetItem(__pyx_v_vcf_types, __pyx_v_f); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = PyObject_GetItem(__pyx_t_8, __pyx_t_7); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (PyObject_SetItem(__pyx_v_infoTypes, __pyx_v_f, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L14;
  }
  __pyx_L14:;

  /* "vcfnp.pyx":592
 * 
 *     # determine a numpy dtype for each field
 *     if dtypes is None:             # <<<<<<<<<<<<<<
 *         dtypes = dict()
 *     for f in fields:
 */
  __pyx_t_1 = (__pyx_v_dtypes == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "vcfnp.pyx":593
 *     # determine a numpy dtype for each field
 *     if dtypes is None:
 *         dtypes = dict()             # <<<<<<<<<<<<<<
 *     for f in fields:
 *         if f not in dtypes:
 */
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __Pyx_DECREF(__pyx_v_dtypes);
    __pyx_v_dtypes = ((PyObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L17;
  }
  __pyx_L17:;

  /* "vcfnp.pyx":594
 *     if dtypes is None:
 *         dtypes = dict()
 *     for f in fields:             # <<<<<<<<<<<<<<
 *         if f not in dtypes:
 *             if f in DEFAULT_INFO_DTYPE:
 */
  if (PyList_CheckExact(__pyx_v_fields) || PyTuple_CheckExact(__pyx_v_fields)) {
    __pyx_t_3 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_fields); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_6 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_6)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF(__pyx_v_f);
    __pyx_v_f = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "vcfnp.pyx":595
 *         dtypes = dict()
 *     for f in fields:
 *         if f not in dtypes:             # <<<<<<<<<<<<<<
 *             if f in DEFAULT_INFO_DTYPE:
 *                 # known INFO field
 */
    __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_v_dtypes, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (__pyx_t_1) {

      /* "vcfnp.pyx":596
 *     for f in fields:
 *         if f not in dtypes:
 *             if f in DEFAULT_INFO_DTYPE:             # <<<<<<<<<<<<<<
 *                 # known INFO field
 *                 dtypes[f] = DEFAULT_INFO_DTYPE[f]
 */
      __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__DEFAULT_INFO_DTYPE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_t_6, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_2 = (__pyx_t_1 != 0);
      if (__pyx_t_2) {

        /* "vcfnp.pyx":598
 *             if f in DEFAULT_INFO_DTYPE:
 *                 # known INFO field
 *                 dtypes[f] = DEFAULT_INFO_DTYPE[f]             # <<<<<<<<<<<<<<
 *             else:
 *                 vcf_type = infoTypes[f]
 */
        __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__DEFAULT_INFO_DTYPE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = PyObject_GetItem(__pyx_t_6, __pyx_v_f); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (PyObject_SetItem(__pyx_v_dtypes, __pyx_v_f, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L21;
      }
      /*else*/ {

        /* "vcfnp.pyx":600
 *                 dtypes[f] = DEFAULT_INFO_DTYPE[f]
 *             else:
 *                 vcf_type = infoTypes[f]             # <<<<<<<<<<<<<<
 *                 dtypes[f] = DEFAULT_TYPE_MAP[vcf_type]
 * 
 */
        __pyx_t_7 = PyObject_GetItem(__pyx_v_infoTypes, __pyx_v_f); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_XDECREF(__pyx_v_vcf_type);
        __pyx_v_vcf_type = __pyx_t_7;
        __pyx_t_7 = 0;

        /* "vcfnp.pyx":601
 *             else:
 *                 vcf_type = infoTypes[f]
 *                 dtypes[f] = DEFAULT_TYPE_MAP[vcf_type]             # <<<<<<<<<<<<<<
 * 
 *     # determine expected number of values for each field
 */
        __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s__DEFAULT_TYPE_MAP); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_6 = PyObject_GetItem(__pyx_t_7, __pyx_v_vcf_type); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (PyObject_SetItem(__pyx_v_dtypes, __pyx_v_f, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __pyx_L21:;
      goto __pyx_L20;
    }
    __pyx_L20:;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "vcfnp.pyx":604
 * 
 *     # determine expected number of values for each field
 *     if arities is None:             # <<<<<<<<<<<<<<
 *         arities = dict()
 *     for f in fields:
 */
  __pyx_t_2 = (__pyx_v_arities == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":605
 *     # determine expected number of values for each field
 *     if arities is None:
 *         arities = dict()             # <<<<<<<<<<<<<<
 *     for f in fields:
 *         if f not in arities:
 */
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __Pyx_DECREF(__pyx_v_arities);
    __pyx_v_arities = ((PyObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L22;
  }
  __pyx_L22:;

  /* "vcfnp.pyx":606
 *     if arities is None:
 *         arities = dict()
 *     for f in fields:             # <<<<<<<<<<<<<<
 *         if f not in arities:
 *             vcf_count = infoCounts[f]
 */
  if (PyList_CheckExact(__pyx_v_fields) || PyTuple_CheckExact(__pyx_v_fields)) {
    __pyx_t_3 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_fields); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_6 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_6)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF(__pyx_v_f);
    __pyx_v_f = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "vcfnp.pyx":607
 *         arities = dict()
 *     for f in fields:
 *         if f not in arities:             # <<<<<<<<<<<<<<
 *             vcf_count = infoCounts[f]
 *             if vcf_count == ALLELE_NUMBER:
 */
    __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_v_arities, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = (__pyx_t_1 != 0);
    if (__pyx_t_2) {

      /* "vcfnp.pyx":608
 *     for f in fields:
 *         if f not in arities:
 *             vcf_count = infoCounts[f]             # <<<<<<<<<<<<<<
 *             if vcf_count == ALLELE_NUMBER:
 *                 # default to 1 (biallelic)
 */
      __pyx_t_6 = PyObject_GetItem(__pyx_v_infoCounts, __pyx_v_f); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_v_vcf_count);
      __pyx_v_vcf_count = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "vcfnp.pyx":609
 *         if f not in arities:
 *             vcf_count = infoCounts[f]
 *             if vcf_count == ALLELE_NUMBER:             # <<<<<<<<<<<<<<
 *                 # default to 1 (biallelic)
 *                 arities[f] = 1
 */
      __pyx_t_6 = PyInt_FromLong(vcf::ALLELE_NUMBER); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = PyObject_RichCompare(__pyx_v_vcf_count, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__pyx_t_2) {

        /* "vcfnp.pyx":611
 *             if vcf_count == ALLELE_NUMBER:
 *                 # default to 1 (biallelic)
 *                 arities[f] = 1             # <<<<<<<<<<<<<<
 *             elif vcf_count <= 0:
 *                 # catch any other cases of non-specific arity
 */
        if (PyObject_SetItem(__pyx_v_arities, __pyx_v_f, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L26;
      }

      /* "vcfnp.pyx":612
 *                 # default to 1 (biallelic)
 *                 arities[f] = 1
 *             elif vcf_count <= 0:             # <<<<<<<<<<<<<<
 *                 # catch any other cases of non-specific arity
 *                 arities[f] = 1
 */
      __pyx_t_7 = PyObject_RichCompare(__pyx_v_vcf_count, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__pyx_t_2) {

        /* "vcfnp.pyx":614
 *             elif vcf_count <= 0:
 *                 # catch any other cases of non-specific arity
 *                 arities[f] = 1             # <<<<<<<<<<<<<<
 *             else:
 *                 arities[f] = vcf_count
 */
        if (PyObject_SetItem(__pyx_v_arities, __pyx_v_f, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L26;
      }
      /*else*/ {

        /* "vcfnp.pyx":616
 *                 arities[f] = 1
 *             else:
 *                 arities[f] = vcf_count             # <<<<<<<<<<<<<<
 * 
 *     # determine fill values to use where number of values is less than expectation
 */
        if (PyObject_SetItem(__pyx_v_arities, __pyx_v_f, __pyx_v_vcf_count) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_L26:;
      goto __pyx_L25;
    }
    __pyx_L25:;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "vcfnp.pyx":619
 * 
 *     # determine fill values to use where number of values is less than expectation
 *     if fills is None:             # <<<<<<<<<<<<<<
 *         fills = dict()
 *     for f in fields:
 */
  __pyx_t_2 = (__pyx_v_fills == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":620
 *     # determine fill values to use where number of values is less than expectation
 *     if fills is None:
 *         fills = dict()             # <<<<<<<<<<<<<<
 *     for f in fields:
 *         if f not in fills:
 */
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __Pyx_DECREF(__pyx_v_fills);
    __pyx_v_fills = ((PyObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L27;
  }
  __pyx_L27:;

  /* "vcfnp.pyx":621
 *     if fills is None:
 *         fills = dict()
 *     for f in fields:             # <<<<<<<<<<<<<<
 *         if f not in fills:
 *             vcf_type = infoTypes[f]
 */
  if (PyList_CheckExact(__pyx_v_fields) || PyTuple_CheckExact(__pyx_v_fields)) {
    __pyx_t_3 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_fields); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_7 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_7 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_7 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_7 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_7)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_7);
    }
    __Pyx_XDECREF(__pyx_v_f);
    __pyx_v_f = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "vcfnp.pyx":622
 *         fills = dict()
 *     for f in fields:
 *         if f not in fills:             # <<<<<<<<<<<<<<
 *             vcf_type = infoTypes[f]
 *             fills[f] = DEFAULT_FILL_MAP[vcf_type]
 */
    __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_v_fills, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = (__pyx_t_1 != 0);
    if (__pyx_t_2) {

      /* "vcfnp.pyx":623
 *     for f in fields:
 *         if f not in fills:
 *             vcf_type = infoTypes[f]             # <<<<<<<<<<<<<<
 *             fills[f] = DEFAULT_FILL_MAP[vcf_type]
 * 
 */
      __pyx_t_7 = PyObject_GetItem(__pyx_v_infoTypes, __pyx_v_f); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_v_vcf_type);
      __pyx_v_vcf_type = __pyx_t_7;
      __pyx_t_7 = 0;

      /* "vcfnp.pyx":624
 *         if f not in fills:
 *             vcf_type = infoTypes[f]
 *             fills[f] = DEFAULT_FILL_MAP[vcf_type]             # <<<<<<<<<<<<<<
 * 
 *     if transformers is None:
 */
      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s__DEFAULT_FILL_MAP); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = PyObject_GetItem(__pyx_t_7, __pyx_v_vcf_type); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (PyObject_SetItem(__pyx_v_fills, __pyx_v_f, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L30;
    }
    __pyx_L30:;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "vcfnp.pyx":626
 *             fills[f] = DEFAULT_FILL_MAP[vcf_type]
 * 
 *     if transformers is None:             # <<<<<<<<<<<<<<
 *         transformers = dict()
 *     for f in fields:
 */
  __pyx_t_2 = (__pyx_v_transformers == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":627
 * 
 *     if transformers is None:
 *         transformers = dict()             # <<<<<<<<<<<<<<
 *     for f in fields:
 *         if f not in transformers:
 */
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __Pyx_DECREF(__pyx_v_transformers);
    __pyx_v_transformers = ((PyObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L31;
  }
  __pyx_L31:;

  /* "vcfnp.pyx":628
 *     if transformers is None:
 *         transformers = dict()
 *     for f in fields:             # <<<<<<<<<<<<<<
 *         if f not in transformers:
 *             transformers[f] = None
 */
  if (PyList_CheckExact(__pyx_v_fields) || PyTuple_CheckExact(__pyx_v_fields)) {
    __pyx_t_3 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_fields); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_6 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_6)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF(__pyx_v_f);
    __pyx_v_f = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "vcfnp.pyx":629
 *         transformers = dict()
 *     for f in fields:
 *         if f not in transformers:             # <<<<<<<<<<<<<<
 *             transformers[f] = None
 * 
 */
    __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_v_transformers, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = (__pyx_t_1 != 0);
    if (__pyx_t_2) {

      /* "vcfnp.pyx":630
 *     for f in fields:
 *         if f not in transformers:
 *             transformers[f] = None             # <<<<<<<<<<<<<<
 * 
 *     # construct a numpy dtype for structured array
 */
      if (PyObject_SetItem(__pyx_v_transformers, __pyx_v_f, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L34;
    }
    __pyx_L34:;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "vcfnp.pyx":633
 * 
 *     # construct a numpy dtype for structured array
 *     dtype = list()             # <<<<<<<<<<<<<<
 *     for f in fields:
 *         t = dtypes[f]
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_dtype = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "vcfnp.pyx":634
 *     # construct a numpy dtype for structured array
 *     dtype = list()
 *     for f in fields:             # <<<<<<<<<<<<<<
 *         t = dtypes[f]
 *         n = arities[f]
 */
  if (PyList_CheckExact(__pyx_v_fields) || PyTuple_CheckExact(__pyx_v_fields)) {
    __pyx_t_3 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_fields); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_6 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_6)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF(__pyx_v_f);
    __pyx_v_f = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "vcfnp.pyx":635
 *     dtype = list()
 *     for f in fields:
 *         t = dtypes[f]             # <<<<<<<<<<<<<<
 *         n = arities[f]
 *         if n == 1:
 */
    __pyx_t_6 = PyObject_GetItem(__pyx_v_dtypes, __pyx_v_f); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_XDECREF(__pyx_v_t);
    __pyx_v_t = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "vcfnp.pyx":636
 *     for f in fields:
 *         t = dtypes[f]
 *         n = arities[f]             # <<<<<<<<<<<<<<
 *         if n == 1:
 *             dtype.append((f, t))
 */
    __pyx_t_6 = PyObject_GetItem(__pyx_v_arities, __pyx_v_f); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_XDECREF(__pyx_v_n);
    __pyx_v_n = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "vcfnp.pyx":637
 *         t = dtypes[f]
 *         n = arities[f]
 *         if n == 1:             # <<<<<<<<<<<<<<
 *             dtype.append((f, t))
 *         else:
 */
    __pyx_t_6 = PyObject_RichCompare(__pyx_v_n, __pyx_int_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_2) {

      /* "vcfnp.pyx":638
 *         n = arities[f]
 *         if n == 1:
 *             dtype.append((f, t))             # <<<<<<<<<<<<<<
 *         else:
 *             dtype.append((f, t, (n,)))
 */
      __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_v_f);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_f);
      __Pyx_GIVEREF(__pyx_v_f);
      __Pyx_INCREF(__pyx_v_t);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_t);
      __Pyx_GIVEREF(__pyx_v_t);
      __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_dtype, ((PyObject *)__pyx_t_6)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
      goto __pyx_L37;
    }
    /*else*/ {

      /* "vcfnp.pyx":640
 *             dtype.append((f, t))
 *         else:
 *             dtype.append((f, t, (n,)))             # <<<<<<<<<<<<<<
 * 
 *     # set up iterator
 */
      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_v_n);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_n);
      __Pyx_GIVEREF(__pyx_v_n);
      __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_v_f);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_f);
      __Pyx_GIVEREF(__pyx_v_f);
      __Pyx_INCREF(__pyx_v_t);
      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_t);
      __Pyx_GIVEREF(__pyx_v_t);
      PyTuple_SET_ITEM(__pyx_t_7, 2, ((PyObject *)__pyx_t_6));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_6));
      __pyx_t_6 = 0;
      __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_dtype, ((PyObject *)__pyx_t_7)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
    }
    __pyx_L37:;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "vcfnp.pyx":643
 * 
 *     # set up iterator
 *     if condition is not None:             # <<<<<<<<<<<<<<
 *         it = _iterinfo_with_condition(filenames, region, fields, arities, fills, infoTypes, transformers, condition)
 *     else:
 */
  __pyx_t_2 = (__pyx_v_condition != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":644
 *     # set up iterator
 *     if condition is not None:
 *         it = _iterinfo_with_condition(filenames, region, fields, arities, fills, infoTypes, transformers, condition)             # <<<<<<<<<<<<<<
 *     else:
 *         it = _iterinfo(filenames, region, fields, arities, fills, infoTypes, transformers)
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_13); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = PyTuple_New(8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v_filenames);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_filenames);
    __Pyx_GIVEREF(__pyx_v_filenames);
    __Pyx_INCREF(__pyx_v_region);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_region);
    __Pyx_GIVEREF(__pyx_v_region);
    __Pyx_INCREF(__pyx_v_fields);
    PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_fields);
    __Pyx_GIVEREF(__pyx_v_fields);
    __Pyx_INCREF(__pyx_v_arities);
    PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_v_arities);
    __Pyx_GIVEREF(__pyx_v_arities);
    __Pyx_INCREF(__pyx_v_fills);
    PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_v_fills);
    __Pyx_GIVEREF(__pyx_v_fills);
    __Pyx_INCREF(__pyx_v_infoTypes);
    PyTuple_SET_ITEM(__pyx_t_7, 5, __pyx_v_infoTypes);
    __Pyx_GIVEREF(__pyx_v_infoTypes);
    __Pyx_INCREF(__pyx_v_transformers);
    PyTuple_SET_ITEM(__pyx_t_7, 6, __pyx_v_transformers);
    __Pyx_GIVEREF(__pyx_v_transformers);
    __Pyx_INCREF(__pyx_v_condition);
    PyTuple_SET_ITEM(__pyx_t_7, 7, __pyx_v_condition);
    __Pyx_GIVEREF(__pyx_v_condition);
    __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
    __pyx_v_it = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L38;
  }
  /*else*/ {

    /* "vcfnp.pyx":646
 *         it = _iterinfo_with_condition(filenames, region, fields, arities, fills, infoTypes, transformers, condition)
 *     else:
 *         it = _iterinfo(filenames, region, fields, arities, fills, infoTypes, transformers)             # <<<<<<<<<<<<<<
 * 
 *     # slice?
 */
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s___iterinfo); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PyTuple_New(7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v_filenames);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_filenames);
    __Pyx_GIVEREF(__pyx_v_filenames);
    __Pyx_INCREF(__pyx_v_region);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_region);
    __Pyx_GIVEREF(__pyx_v_region);
    __Pyx_INCREF(__pyx_v_fields);
    PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_fields);
    __Pyx_GIVEREF(__pyx_v_fields);
    __Pyx_INCREF(__pyx_v_arities);
    PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_v_arities);
    __Pyx_GIVEREF(__pyx_v_arities);
    __Pyx_INCREF(__pyx_v_fills);
    PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_v_fills);
    __Pyx_GIVEREF(__pyx_v_fills);
    __Pyx_INCREF(__pyx_v_infoTypes);
    PyTuple_SET_ITEM(__pyx_t_7, 5, __pyx_v_infoTypes);
    __Pyx_GIVEREF(__pyx_v_infoTypes);
    __Pyx_INCREF(__pyx_v_transformers);
    PyTuple_SET_ITEM(__pyx_t_7, 6, __pyx_v_transformers);
    __Pyx_GIVEREF(__pyx_v_transformers);
    __pyx_t_3 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
    __pyx_v_it = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_L38:;

  /* "vcfnp.pyx":649
 * 
 *     # slice?
 *     if slice:             # <<<<<<<<<<<<<<
 *         it = islice(it, *slice)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_slice); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "vcfnp.pyx":650
 *     # slice?
 *     if slice:
 *         it = islice(it, *slice)             # <<<<<<<<<<<<<<
 * 
 *     # build an array from the iterator
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__islice); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v_it);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_it);
    __Pyx_GIVEREF(__pyx_v_it);
    __pyx_t_6 = PySequence_Tuple(__pyx_v_slice); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
    __pyx_t_8 = PyNumber_Add(((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_8));
    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_v_it);
    __pyx_v_it = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L39;
  }
  __pyx_L39:;

  /* "vcfnp.pyx":653
 * 
 *     # build an array from the iterator
 *     return _fromiter(it, dtype, count, progress, logstream)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s___fromiter); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = PyTuple_New(5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_INCREF(__pyx_v_it);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_it);
  __Pyx_GIVEREF(__pyx_v_it);
  __Pyx_INCREF(((PyObject *)__pyx_v_dtype));
  PyTuple_SET_ITEM(__pyx_t_8, 1, ((PyObject *)__pyx_v_dtype));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_dtype));
  __Pyx_INCREF(__pyx_v_count);
  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_count);
  __Pyx_GIVEREF(__pyx_v_count);
  __Pyx_INCREF(__pyx_v_progress);
  PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_v_progress);
  __Pyx_GIVEREF(__pyx_v_progress);
  __Pyx_INCREF(__pyx_v_logstream);
  PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_v_logstream);
  __Pyx_GIVEREF(__pyx_v_logstream);
  __pyx_t_3 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("vcfnp.info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_filenames);
  __Pyx_XDECREF(__pyx_v_fn);
  __Pyx_XDECREF((PyObject *)__pyx_v_vcf);
  __Pyx_XDECREF(__pyx_v_infoIds);
  __Pyx_XDECREF(__pyx_v_infoTypes);
  __Pyx_XDECREF(__pyx_v_infoCounts);
  __Pyx_XDECREF(__pyx_v_f);
  __Pyx_XDECREF(__pyx_v_vcf_type);
  __Pyx_XDECREF(__pyx_v_vcf_count);
  __Pyx_XDECREF(__pyx_v_dtype);
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_it);
  __Pyx_XDECREF(__pyx_v_fields);
  __Pyx_XDECREF(__pyx_v_dtypes);
  __Pyx_XDECREF(__pyx_v_arities);
  __Pyx_XDECREF(__pyx_v_fills);
  __Pyx_XDECREF(__pyx_v_transformers);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_5vcfnp_17generator3(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_16_iterinfo(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_5vcfnp_16_iterinfo = {__Pyx_NAMESTR("_iterinfo"), (PyCFunction)__pyx_pw_5vcfnp_16_iterinfo, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_5vcfnp_16_iterinfo(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_filenames = 0;
  PyObject *__pyx_v_region = 0;
  std::vector<std::string> __pyx_v_fields;
  std::map<std::string,int> __pyx_v_arities;
  PyObject *__pyx_v_fills = 0;
  PyObject *__pyx_v_infoTypes = 0;
  PyObject *__pyx_v_transformers = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_iterinfo (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__filenames,&__pyx_n_s__region,&__pyx_n_s__fields,&__pyx_n_s__arities,&__pyx_n_s__fills,&__pyx_n_s__infoTypes,&__pyx_n_s__transformers,0};
    PyObject* values[7] = {0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filenames)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__region)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_iterinfo", 1, 7, 7, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fields)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_iterinfo", 1, 7, 7, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arities)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_iterinfo", 1, 7, 7, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fills)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_iterinfo", 1, 7, 7, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__infoTypes)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_iterinfo", 1, 7, 7, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  6:
        if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__transformers)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_iterinfo", 1, 7, 7, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_iterinfo") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
      values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
    }
    __pyx_v_filenames = values[0];
    __pyx_v_region = values[1];
    __pyx_v_fields = __pyx_convert_vector_from_py_std_3a__3a_string(values[2]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_arities = __pyx_convert_map_from_py_std_3a__3a_string____int(values[3]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_fills = ((PyObject*)values[4]);
    __pyx_v_infoTypes = ((PyObject*)values[5]);
    __pyx_v_transformers = ((PyObject*)values[6]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_iterinfo", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vcfnp._iterinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fills), (&PyDict_Type), 1, "fills", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_infoTypes), (&PyDict_Type), 1, "infoTypes", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_transformers), (&PyDict_Type), 1, "transformers", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vcfnp_15_iterinfo(__pyx_self, __pyx_v_filenames, __pyx_v_region, __pyx_v_fields, __pyx_v_arities, __pyx_v_fills, __pyx_v_infoTypes, __pyx_v_transformers);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":657
 * 
 * 
 * def _iterinfo(filenames,             # <<<<<<<<<<<<<<
 *              region,
 *              vector[string] fields,
 */

static PyObject *__pyx_pf_5vcfnp_15_iterinfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filenames, PyObject *__pyx_v_region, std::vector<std::string> __pyx_v_fields, std::map<std::string,int> __pyx_v_arities, PyObject *__pyx_v_fills, PyObject *__pyx_v_infoTypes, PyObject *__pyx_v_transformers) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_3__iterinfo *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_iterinfo", 0);
  __pyx_cur_scope = (struct __pyx_obj_5vcfnp___pyx_scope_struct_3__iterinfo *)__pyx_tp_new_5vcfnp___pyx_scope_struct_3__iterinfo(__pyx_ptype_5vcfnp___pyx_scope_struct_3__iterinfo, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_filenames = __pyx_v_filenames;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_filenames);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_filenames);
  __pyx_cur_scope->__pyx_v_region = __pyx_v_region;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_region);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_region);
  __pyx_cur_scope->__pyx_v_fields = __pyx_v_fields;
  __pyx_cur_scope->__pyx_v_arities = __pyx_v_arities;
  __pyx_cur_scope->__pyx_v_fills = __pyx_v_fills;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fills);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fills);
  __pyx_cur_scope->__pyx_v_infoTypes = __pyx_v_infoTypes;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_infoTypes);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_infoTypes);
  __pyx_cur_scope->__pyx_v_transformers = __pyx_v_transformers;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_transformers);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_transformers);
  {
    __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5vcfnp_17generator3, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("vcfnp._iterinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_5vcfnp_17generator3(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5vcfnp___pyx_scope_struct_3__iterinfo *__pyx_cur_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_3__iterinfo *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  vcf::VariantCallFile *__pyx_t_5;
  std::string __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L9_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":667
 *     cdef Variant *var
 * 
 *     for current_filename in filenames:             # <<<<<<<<<<<<<<
 *         variantFile = new VariantCallFile()
 *         variantFile.open(current_filename)
 */
  if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_filenames) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_filenames)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_filenames; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_filenames); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) {
      if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) {
      if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_current_filename);
    __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_current_filename);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_cur_scope->__pyx_v_current_filename = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "vcfnp.pyx":668
 * 
 *     for current_filename in filenames:
 *         variantFile = new VariantCallFile()             # <<<<<<<<<<<<<<
 *         variantFile.open(current_filename)
 *         variantFile.parseSamples = False
 */
    try {
      __pyx_t_5 = new vcf::VariantCallFile();
    } catch(...) {
      __Pyx_CppExn2PyErr();
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_cur_scope->__pyx_v_variantFile = __pyx_t_5;

    /* "vcfnp.pyx":669
 *     for current_filename in filenames:
 *         variantFile = new VariantCallFile()
 *         variantFile.open(current_filename)             # <<<<<<<<<<<<<<
 *         variantFile.parseSamples = False
 *         if region is not None:
 */
    __pyx_t_6 = __pyx_convert_string_from_py_(__pyx_cur_scope->__pyx_v_current_filename); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_cur_scope->__pyx_v_variantFile->open(__pyx_t_6);

    /* "vcfnp.pyx":670
 *         variantFile = new VariantCallFile()
 *         variantFile.open(current_filename)
 *         variantFile.parseSamples = False             # <<<<<<<<<<<<<<
 *         if region is not None:
 *             variantFile.setRegion(region)
 */
    __pyx_cur_scope->__pyx_v_variantFile->parseSamples = 0;

    /* "vcfnp.pyx":671
 *         variantFile.open(current_filename)
 *         variantFile.parseSamples = False
 *         if region is not None:             # <<<<<<<<<<<<<<
 *             variantFile.setRegion(region)
 *         var = new Variant(deref(variantFile))
 */
    __pyx_t_7 = (__pyx_cur_scope->__pyx_v_region != Py_None);
    __pyx_t_8 = (__pyx_t_7 != 0);
    if (__pyx_t_8) {

      /* "vcfnp.pyx":672
 *         variantFile.parseSamples = False
 *         if region is not None:
 *             variantFile.setRegion(region)             # <<<<<<<<<<<<<<
 *         var = new Variant(deref(variantFile))
 * 
 */
      __pyx_t_6 = __pyx_convert_string_from_py_(__pyx_cur_scope->__pyx_v_region); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_cur_scope->__pyx_v_variantFile->setRegion(__pyx_t_6);
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "vcfnp.pyx":673
 *         if region is not None:
 *             variantFile.setRegion(region)
 *         var = new Variant(deref(variantFile))             # <<<<<<<<<<<<<<
 * 
 *         while _get_next_variant(variantFile, var):
 */
    __pyx_cur_scope->__pyx_v_var = new vcf::Variant((*__pyx_cur_scope->__pyx_v_variantFile));

    /* "vcfnp.pyx":675
 *         var = new Variant(deref(variantFile))
 * 
 *         while _get_next_variant(variantFile, var):             # <<<<<<<<<<<<<<
 *             yield _mkivals(var, fields, arities, fills, infoTypes, transformers)
 * 
 */
    while (1) {
      __pyx_t_8 = (__pyx_f_5vcfnp__get_next_variant(__pyx_cur_scope->__pyx_v_variantFile, __pyx_cur_scope->__pyx_v_var) != 0);
      if (!__pyx_t_8) break;

      /* "vcfnp.pyx":676
 * 
 *         while _get_next_variant(variantFile, var):
 *             yield _mkivals(var, fields, arities, fills, infoTypes, transformers)             # <<<<<<<<<<<<<<
 * 
 *         del variantFile
 */
      __pyx_t_4 = __pyx_f_5vcfnp__mkivals(__pyx_cur_scope->__pyx_v_var, __pyx_cur_scope->__pyx_v_fields, __pyx_cur_scope->__pyx_v_arities, __pyx_cur_scope->__pyx_v_fills, __pyx_cur_scope->__pyx_v_infoTypes, __pyx_cur_scope->__pyx_v_transformers); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      __Pyx_XGIVEREF(__pyx_t_1);
      __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
      __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
      __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      /* return from generator, yielding value */
      __pyx_generator->resume_label = 1;
      return __pyx_r;
      __pyx_L9_resume_from_yield:;
      __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
      __pyx_cur_scope->__pyx_t_0 = 0;
      __Pyx_XGOTREF(__pyx_t_1);
      __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
      __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
      if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }

    /* "vcfnp.pyx":678
 *             yield _mkivals(var, fields, arities, fills, infoTypes, transformers)
 * 
 *         del variantFile             # <<<<<<<<<<<<<<
 *         del var
 * 
 */
    delete __pyx_cur_scope->__pyx_v_variantFile;

    /* "vcfnp.pyx":679
 * 
 *         del variantFile
 *         del var             # <<<<<<<<<<<<<<
 * 
 * 
 */
    delete __pyx_cur_scope->__pyx_v_var;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("_iterinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_generator->resume_label = -1;
  __Pyx_Generator_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return NULL;
}
static PyObject *__pyx_gb_5vcfnp_20generator4(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_19_iterinfo_with_condition(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_5vcfnp_19_iterinfo_with_condition = {__Pyx_NAMESTR("_iterinfo_with_condition"), (PyCFunction)__pyx_pw_5vcfnp_19_iterinfo_with_condition, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_5vcfnp_19_iterinfo_with_condition(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_filenames = 0;
  PyObject *__pyx_v_region = 0;
  std::vector<std::string> __pyx_v_fields;
  std::map<std::string,int> __pyx_v_arities;
  PyObject *__pyx_v_fills = 0;
  PyObject *__pyx_v_infoTypes = 0;
  PyObject *__pyx_v_transformers = 0;
  PyObject *__pyx_v_condition = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_iterinfo_with_condition (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__filenames,&__pyx_n_s__region,&__pyx_n_s__fields,&__pyx_n_s__arities,&__pyx_n_s__fills,&__pyx_n_s__infoTypes,&__pyx_n_s__transformers,&__pyx_n_s__condition,0};
    PyObject* values[8] = {0,0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filenames)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__region)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_iterinfo_with_condition", 1, 8, 8, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fields)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_iterinfo_with_condition", 1, 8, 8, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arities)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_iterinfo_with_condition", 1, 8, 8, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fills)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_iterinfo_with_condition", 1, 8, 8, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__infoTypes)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_iterinfo_with_condition", 1, 8, 8, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  6:
        if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__transformers)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_iterinfo_with_condition", 1, 8, 8, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  7:
        if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__condition)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_iterinfo_with_condition", 1, 8, 8, 7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_iterinfo_with_condition") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 8) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
      values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
      values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
    }
    __pyx_v_filenames = values[0];
    __pyx_v_region = values[1];
    __pyx_v_fields = __pyx_convert_vector_from_py_std_3a__3a_string(values[2]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_arities = __pyx_convert_map_from_py_std_3a__3a_string____int(values[3]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_fills = ((PyObject*)values[4]);
    __pyx_v_infoTypes = ((PyObject*)values[5]);
    __pyx_v_transformers = ((PyObject*)values[6]);
    __pyx_v_condition = values[7];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_iterinfo_with_condition", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vcfnp._iterinfo_with_condition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fills), (&PyDict_Type), 1, "fills", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_infoTypes), (&PyDict_Type), 1, "infoTypes", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_transformers), (&PyDict_Type), 1, "transformers", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vcfnp_18_iterinfo_with_condition(__pyx_self, __pyx_v_filenames, __pyx_v_region, __pyx_v_fields, __pyx_v_arities, __pyx_v_fills, __pyx_v_infoTypes, __pyx_v_transformers, __pyx_v_condition);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":682
 * 
 * 
 * def _iterinfo_with_condition(filenames,             # <<<<<<<<<<<<<<
 *                              region,
 *                              vector[string] fields,
 */

static PyObject *__pyx_pf_5vcfnp_18_iterinfo_with_condition(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filenames, PyObject *__pyx_v_region, std::vector<std::string> __pyx_v_fields, std::map<std::string,int> __pyx_v_arities, PyObject *__pyx_v_fills, PyObject *__pyx_v_infoTypes, PyObject *__pyx_v_transformers, PyObject *__pyx_v_condition) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_iterinfo_with_condition", 0);
  __pyx_cur_scope = (struct __pyx_obj_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition *)__pyx_tp_new_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition(__pyx_ptype_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_filenames = __pyx_v_filenames;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_filenames);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_filenames);
  __pyx_cur_scope->__pyx_v_region = __pyx_v_region;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_region);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_region);
  __pyx_cur_scope->__pyx_v_fields = __pyx_v_fields;
  __pyx_cur_scope->__pyx_v_arities = __pyx_v_arities;
  __pyx_cur_scope->__pyx_v_fills = __pyx_v_fills;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fills);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fills);
  __pyx_cur_scope->__pyx_v_infoTypes = __pyx_v_infoTypes;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_infoTypes);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_infoTypes);
  __pyx_cur_scope->__pyx_v_transformers = __pyx_v_transformers;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_transformers);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_transformers);
  __pyx_cur_scope->__pyx_v_condition = __pyx_v_condition;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_condition);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_condition);
  {
    __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5vcfnp_20generator4, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("vcfnp._iterinfo_with_condition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_5vcfnp_20generator4(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition *__pyx_cur_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  vcf::VariantCallFile *__pyx_t_5;
  std::string __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L10_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":692
 *     cdef VariantCallFile *variantFile
 *     cdef Variant *var
 *     cdef int i = 0             # <<<<<<<<<<<<<<
 *     cdef int n = len(condition)
 * 
 */
  __pyx_cur_scope->__pyx_v_i = 0;

  /* "vcfnp.pyx":693
 *     cdef Variant *var
 *     cdef int i = 0
 *     cdef int n = len(condition)             # <<<<<<<<<<<<<<
 * 
 *     for current_filename in filenames:
 */
  __pyx_t_1 = PyObject_Length(__pyx_cur_scope->__pyx_v_condition); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_cur_scope->__pyx_v_n = __pyx_t_1;

  /* "vcfnp.pyx":695
 *     cdef int n = len(condition)
 * 
 *     for current_filename in filenames:             # <<<<<<<<<<<<<<
 *         variantFile = new VariantCallFile()
 *         variantFile.open(current_filename)
 */
  if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_filenames) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_filenames)) {
    __pyx_t_2 = __pyx_cur_scope->__pyx_v_filenames; __Pyx_INCREF(__pyx_t_2); __pyx_t_1 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_1 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_filenames); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = Py_TYPE(__pyx_t_2)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_2)) {
      if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_4); __pyx_t_1++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_2)) {
      if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_4); __pyx_t_1++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_2);
      if (unlikely(!__pyx_t_4)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_current_filename);
    __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_current_filename);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_cur_scope->__pyx_v_current_filename = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "vcfnp.pyx":696
 * 
 *     for current_filename in filenames:
 *         variantFile = new VariantCallFile()             # <<<<<<<<<<<<<<
 *         variantFile.open(current_filename)
 *         variantFile.parseSamples = False
 */
    try {
      __pyx_t_5 = new vcf::VariantCallFile();
    } catch(...) {
      __Pyx_CppExn2PyErr();
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_cur_scope->__pyx_v_variantFile = __pyx_t_5;

    /* "vcfnp.pyx":697
 *     for current_filename in filenames:
 *         variantFile = new VariantCallFile()
 *         variantFile.open(current_filename)             # <<<<<<<<<<<<<<
 *         variantFile.parseSamples = False
 *         if region is not None:
 */
    __pyx_t_6 = __pyx_convert_string_from_py_(__pyx_cur_scope->__pyx_v_current_filename); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_cur_scope->__pyx_v_variantFile->open(__pyx_t_6);

    /* "vcfnp.pyx":698
 *         variantFile = new VariantCallFile()
 *         variantFile.open(current_filename)
 *         variantFile.parseSamples = False             # <<<<<<<<<<<<<<
 *         if region is not None:
 *             variantFile.setRegion(region)
 */
    __pyx_cur_scope->__pyx_v_variantFile->parseSamples = 0;

    /* "vcfnp.pyx":699
 *         variantFile.open(current_filename)
 *         variantFile.parseSamples = False
 *         if region is not None:             # <<<<<<<<<<<<<<
 *             variantFile.setRegion(region)
 *         var = new Variant(deref(variantFile))
 */
    __pyx_t_7 = (__pyx_cur_scope->__pyx_v_region != Py_None);
    __pyx_t_8 = (__pyx_t_7 != 0);
    if (__pyx_t_8) {

      /* "vcfnp.pyx":700
 *         variantFile.parseSamples = False
 *         if region is not None:
 *             variantFile.setRegion(region)             # <<<<<<<<<<<<<<
 *         var = new Variant(deref(variantFile))
 * 
 */
      __pyx_t_6 = __pyx_convert_string_from_py_(__pyx_cur_scope->__pyx_v_region); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_cur_scope->__pyx_v_variantFile->setRegion(__pyx_t_6);
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "vcfnp.pyx":701
 *         if region is not None:
 *             variantFile.setRegion(region)
 *         var = new Variant(deref(variantFile))             # <<<<<<<<<<<<<<
 * 
 *         while i < n and _get_next_variant(variantFile, var):
 */
    __pyx_cur_scope->__pyx_v_var = new vcf::Variant((*__pyx_cur_scope->__pyx_v_variantFile));

    /* "vcfnp.pyx":703
 *         var = new Variant(deref(variantFile))
 * 
 *         while i < n and _get_next_variant(variantFile, var):             # <<<<<<<<<<<<<<
 *             if condition[i]:
 *                 yield _mkivals(var, fields, arities, fills, infoTypes, transformers)
 */
    while (1) {
      __pyx_t_8 = (__pyx_cur_scope->__pyx_v_i < __pyx_cur_scope->__pyx_v_n);
      if (__pyx_t_8) {
        __pyx_t_7 = (__pyx_f_5vcfnp__get_next_variant(__pyx_cur_scope->__pyx_v_variantFile, __pyx_cur_scope->__pyx_v_var) != 0);
      } else {
        __pyx_t_7 = __pyx_t_8;
      }
      if (!__pyx_t_7) break;

      /* "vcfnp.pyx":704
 * 
 *         while i < n and _get_next_variant(variantFile, var):
 *             if condition[i]:             # <<<<<<<<<<<<<<
 *                 yield _mkivals(var, fields, arities, fills, infoTypes, transformers)
 *             i += 1
 */
      __pyx_t_4 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_condition, __pyx_cur_scope->__pyx_v_i, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_7) {

        /* "vcfnp.pyx":705
 *         while i < n and _get_next_variant(variantFile, var):
 *             if condition[i]:
 *                 yield _mkivals(var, fields, arities, fills, infoTypes, transformers)             # <<<<<<<<<<<<<<
 *             i += 1
 * 
 */
        __pyx_t_4 = __pyx_f_5vcfnp__mkivals(__pyx_cur_scope->__pyx_v_var, __pyx_cur_scope->__pyx_v_fields, __pyx_cur_scope->__pyx_v_arities, __pyx_cur_scope->__pyx_v_fills, __pyx_cur_scope->__pyx_v_infoTypes, __pyx_cur_scope->__pyx_v_transformers); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_r = __pyx_t_4;
        __pyx_t_4 = 0;
        __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
        __Pyx_XGIVEREF(__pyx_t_2);
        __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
        __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
        __Pyx_XGIVEREF(__pyx_r);
        __Pyx_RefNannyFinishContext();
        /* return from generator, yielding value */
        __pyx_generator->resume_label = 1;
        return __pyx_r;
        __pyx_L10_resume_from_yield:;
        __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
        __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
        __pyx_cur_scope->__pyx_t_1 = 0;
        __Pyx_XGOTREF(__pyx_t_2);
        __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
        if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L9;
      }
      __pyx_L9:;

      /* "vcfnp.pyx":706
 *             if condition[i]:
 *                 yield _mkivals(var, fields, arities, fills, infoTypes, transformers)
 *             i += 1             # <<<<<<<<<<<<<<
 * 
 *         del variantFile
 */
      __pyx_cur_scope->__pyx_v_i = (__pyx_cur_scope->__pyx_v_i + 1);
    }

    /* "vcfnp.pyx":708
 *             i += 1
 * 
 *         del variantFile             # <<<<<<<<<<<<<<
 *         del var
 * 
 */
    delete __pyx_cur_scope->__pyx_v_variantFile;

    /* "vcfnp.pyx":709
 * 
 *         del variantFile
 *         del var             # <<<<<<<<<<<<<<
 * 
 * 
 */
    delete __pyx_cur_scope->__pyx_v_var;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("_iterinfo_with_condition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_generator->resume_label = -1;
  __Pyx_Generator_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return NULL;
}

/* "vcfnp.pyx":712
 * 
 * 
 * cdef inline object _mkivals(Variant *var,             # <<<<<<<<<<<<<<
 *                             vector[string] fields,
 *                             map[string, int] arities,
 */

static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkivals(vcf::Variant *__pyx_v_var, std::vector<std::string> __pyx_v_fields, std::map<std::string,int> __pyx_v_arities, PyObject *__pyx_v_fills, PyObject *__pyx_v_infoTypes, PyObject *__pyx_v_transformers) {
  PyObject *__pyx_v_out = NULL;
  std::string __pyx_v_f;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  std::vector<std::string>::iterator __pyx_t_2;
  std::string __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_mkivals", 0);

  /* "vcfnp.pyx":718
 *                             dict infoTypes,
 *                             dict transformers):
 *     out = [_mkival(var, f, arities[f], fills[f], infoTypes[f], transformers[f]) for f in fields]             # <<<<<<<<<<<<<<
 *     return tuple(out)
 * 
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_v_fields.begin();
  for (;;) {
    if (!(__pyx_t_2 != __pyx_v_fields.end())) break;
    __pyx_t_3 = *__pyx_t_2;
    ++__pyx_t_2;
    __pyx_v_f = __pyx_t_3;
    if (unlikely(((PyObject *)__pyx_v_fills) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = __pyx_convert_string_to_py_(__pyx_v_f); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
    __pyx_t_5 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_fills), ((PyObject *)__pyx_t_4)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    if (unlikely(((PyObject *)__pyx_v_infoTypes) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = __pyx_convert_string_to_py_(__pyx_v_f); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
    __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_infoTypes), ((PyObject *)__pyx_t_4)); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(((PyObject *)__pyx_v_transformers) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_6 = __pyx_convert_string_to_py_(__pyx_v_f); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
    __pyx_t_4 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_transformers), ((PyObject *)__pyx_t_6)); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    __pyx_t_6 = __pyx_f_5vcfnp__mkival(__pyx_v_var, __pyx_v_f, (__pyx_v_arities[__pyx_v_f]), __pyx_t_5, __pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "vcfnp.pyx":719
 *                             dict transformers):
 *     out = [_mkival(var, f, arities[f], fills[f], infoTypes[f], transformers[f]) for f in fields]
 *     return tuple(out)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)PyList_AsTuple(__pyx_v_out)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("vcfnp._mkivals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":723
 * 
 * 
 * cdef inline object _mkival(Variant *var, string field, int arity, object fill, int vcf_type, transformer):             # <<<<<<<<<<<<<<
 *     if transformer is not None:
 *         out = transformer(var.info[field])
 */

static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkival(vcf::Variant *__pyx_v_var, std::string __pyx_v_field, int __pyx_v_arity, PyObject *__pyx_v_fill, int __pyx_v_vcf_type, PyObject *__pyx_v_transformer) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_mkival", 0);

  /* "vcfnp.pyx":724
 * 
 * cdef inline object _mkival(Variant *var, string field, int arity, object fill, int vcf_type, transformer):
 *     if transformer is not None:             # <<<<<<<<<<<<<<
 *         out = transformer(var.info[field])
 *     elif vcf_type == FIELD_BOOL:
 */
  __pyx_t_1 = (__pyx_v_transformer != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "vcfnp.pyx":725
 * cdef inline object _mkival(Variant *var, string field, int arity, object fill, int vcf_type, transformer):
 *     if transformer is not None:
 *         out = transformer(var.info[field])             # <<<<<<<<<<<<<<
 *     elif vcf_type == FIELD_BOOL:
 *         # ignore arity, this is a flag
 */
    __pyx_t_3 = __pyx_convert_vector_to_py_std_3a__3a_string((__pyx_v_var->info[__pyx_v_field])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_v_transformer, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __pyx_v_out = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3;
  }

  /* "vcfnp.pyx":726
 *     if transformer is not None:
 *         out = transformer(var.info[field])
 *     elif vcf_type == FIELD_BOOL:             # <<<<<<<<<<<<<<
 *         # ignore arity, this is a flag
 *         out = (var.infoFlags.count(field) > 0)
 */
  __pyx_t_2 = ((__pyx_v_vcf_type == vcf::FIELD_BOOL) != 0);
  if (__pyx_t_2) {

    /* "vcfnp.pyx":728
 *     elif vcf_type == FIELD_BOOL:
 *         # ignore arity, this is a flag
 *         out = (var.infoFlags.count(field) > 0)             # <<<<<<<<<<<<<<
 *     else:
 *         out = _mkval(var.info[field], arity, fill, vcf_type)
 */
    __pyx_t_3 = __Pyx_PyBool_FromLong((__pyx_v_var->infoFlags.count(__pyx_v_field) > 0)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_out = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "vcfnp.pyx":730
 *         out = (var.infoFlags.count(field) > 0)
 *     else:
 *         out = _mkval(var.info[field], arity, fill, vcf_type)             # <<<<<<<<<<<<<<
 *     return out
 * 
 */
    __pyx_t_3 = __pyx_f_5vcfnp__mkval((__pyx_v_var->info[__pyx_v_field]), __pyx_v_arity, __pyx_v_fill, __pyx_v_vcf_type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_out = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_L3:;

  /* "vcfnp.pyx":731
 *     else:
 *         out = _mkval(var.info[field], arity, fill, vcf_type)
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("vcfnp._mkival", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":735
 * 
 * 
 * cdef inline object _mkval(vector[string]& string_vals, int arity, object fill, int vcf_type):             # <<<<<<<<<<<<<<
 *     if vcf_type == FIELD_FLOAT:
 *         out = _mkval_float(string_vals, arity, fill)
 */

static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkval(std::vector<std::string> &__pyx_v_string_vals, int __pyx_v_arity, PyObject *__pyx_v_fill, int __pyx_v_vcf_type) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  std::string __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_mkval", 0);

  /* "vcfnp.pyx":738
 *     if vcf_type == FIELD_FLOAT:
 *         out = _mkval_float(string_vals, arity, fill)
 *     elif vcf_type == FIELD_INTEGER:             # <<<<<<<<<<<<<<
 *         out = _mkval_int(string_vals, arity, fill)
 *     else:
 */
  switch (__pyx_v_vcf_type) {

    /* "vcfnp.pyx":736
 * 
 * cdef inline object _mkval(vector[string]& string_vals, int arity, object fill, int vcf_type):
 *     if vcf_type == FIELD_FLOAT:             # <<<<<<<<<<<<<<
 *         out = _mkval_float(string_vals, arity, fill)
 *     elif vcf_type == FIELD_INTEGER:
 */
    case vcf::FIELD_FLOAT:

    /* "vcfnp.pyx":737
 * cdef inline object _mkval(vector[string]& string_vals, int arity, object fill, int vcf_type):
 *     if vcf_type == FIELD_FLOAT:
 *         out = _mkval_float(string_vals, arity, fill)             # <<<<<<<<<<<<<<
 *     elif vcf_type == FIELD_INTEGER:
 *         out = _mkval_int(string_vals, arity, fill)
 */
    __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_fill); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = __pyx_f_5vcfnp__mkval_float(__pyx_v_string_vals, __pyx_v_arity, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_out = __pyx_t_2;
    __pyx_t_2 = 0;
    break;

    /* "vcfnp.pyx":738
 *     if vcf_type == FIELD_FLOAT:
 *         out = _mkval_float(string_vals, arity, fill)
 *     elif vcf_type == FIELD_INTEGER:             # <<<<<<<<<<<<<<
 *         out = _mkval_int(string_vals, arity, fill)
 *     else:
 */
    case vcf::FIELD_INTEGER:

    /* "vcfnp.pyx":739
 *         out = _mkval_float(string_vals, arity, fill)
 *     elif vcf_type == FIELD_INTEGER:
 *         out = _mkval_int(string_vals, arity, fill)             # <<<<<<<<<<<<<<
 *     else:
 *         # make strings by default
 */
    __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_v_fill); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = __pyx_f_5vcfnp__mkval_int(__pyx_v_string_vals, __pyx_v_arity, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_out = __pyx_t_2;
    __pyx_t_2 = 0;
    break;
    default:

    /* "vcfnp.pyx":742
 *     else:
 *         # make strings by default
 *         out = _mkval_string(string_vals, arity, fill)             # <<<<<<<<<<<<<<
 *     return out
 * 
 */
    __pyx_t_4 = __pyx_convert_string_from_py_(__pyx_v_fill); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = __pyx_f_5vcfnp__mkval_string(__pyx_v_string_vals, __pyx_v_arity, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_out = __pyx_t_2;
    __pyx_t_2 = 0;
    break;
  }

  /* "vcfnp.pyx":743
 *         # make strings by default
 *         out = _mkval_string(string_vals, arity, fill)
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vcfnp._mkval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":747
 * 
 * 
 * cdef inline object _mkval_string(vector[string]& string_vals, int arity, string fill):             # <<<<<<<<<<<<<<
 *     if arity == 1:
 *         if string_vals.size() > 0:
 */

static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkval_string(std::vector<std::string> &__pyx_v_string_vals, int __pyx_v_arity, std::string __pyx_v_fill) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_mkval_string", 0);

  /* "vcfnp.pyx":748
 * 
 * cdef inline object _mkval_string(vector[string]& string_vals, int arity, string fill):
 *     if arity == 1:             # <<<<<<<<<<<<<<
 *         if string_vals.size() > 0:
 *             return string_vals.at(0)
 */
  __pyx_t_1 = ((__pyx_v_arity == 1) != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":749
 * cdef inline object _mkval_string(vector[string]& string_vals, int arity, string fill):
 *     if arity == 1:
 *         if string_vals.size() > 0:             # <<<<<<<<<<<<<<
 *             return string_vals.at(0)
 *         else:
 */
    __pyx_t_1 = ((__pyx_v_string_vals.size() > 0) != 0);
    if (__pyx_t_1) {

      /* "vcfnp.pyx":750
 *     if arity == 1:
 *         if string_vals.size() > 0:
 *             return string_vals.at(0)             # <<<<<<<<<<<<<<
 *         else:
 *             return fill
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __pyx_convert_string_to_py_(__pyx_v_string_vals.at(0)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __pyx_r = ((PyObject *)__pyx_t_2);
      __pyx_t_2 = 0;
      goto __pyx_L0;
      goto __pyx_L4;
    }
    /*else*/ {

      /* "vcfnp.pyx":752
 *             return string_vals.at(0)
 *         else:
 *             return fill             # <<<<<<<<<<<<<<
 *     else:
 *         return _mkval_string_multi(string_vals, arity, fill)
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __pyx_convert_string_to_py_(__pyx_v_fill); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __pyx_r = ((PyObject *)__pyx_t_2);
      __pyx_t_2 = 0;
      goto __pyx_L0;
    }
    __pyx_L4:;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "vcfnp.pyx":754
 *             return fill
 *     else:
 *         return _mkval_string_multi(string_vals, arity, fill)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_f_5vcfnp__mkval_string_multi(__pyx_v_string_vals, __pyx_v_arity, __pyx_v_fill)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vcfnp._mkval_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":758
 * 
 * 
 * cdef inline vector[string] _mkval_string_multi(vector[string]& string_vals, int arity, string fill):             # <<<<<<<<<<<<<<
 *     cdef int i
 *     cdef vector[string] v
 */

static CYTHON_INLINE std::vector<std::string> __pyx_f_5vcfnp__mkval_string_multi(std::vector<std::string> &__pyx_v_string_vals, int __pyx_v_arity, std::string __pyx_v_fill) {
  int __pyx_v_i;
  std::vector<std::string> __pyx_v_v;
  std::vector<std::string> __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("_mkval_string_multi", 0);

  /* "vcfnp.pyx":761
 *     cdef int i
 *     cdef vector[string] v
 *     for i in range(arity):             # <<<<<<<<<<<<<<
 *         if i < string_vals.size():
 *             v.push_back(string_vals.at(i))
 */
  __pyx_t_1 = __pyx_v_arity;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "vcfnp.pyx":762
 *     cdef vector[string] v
 *     for i in range(arity):
 *         if i < string_vals.size():             # <<<<<<<<<<<<<<
 *             v.push_back(string_vals.at(i))
 *         else:
 */
    __pyx_t_3 = ((__pyx_v_i < __pyx_v_string_vals.size()) != 0);
    if (__pyx_t_3) {

      /* "vcfnp.pyx":763
 *     for i in range(arity):
 *         if i < string_vals.size():
 *             v.push_back(string_vals.at(i))             # <<<<<<<<<<<<<<
 *         else:
 *             v.push_back(fill)
 */
      __pyx_v_v.push_back(__pyx_v_string_vals.at(__pyx_v_i));
      goto __pyx_L5;
    }
    /*else*/ {

      /* "vcfnp.pyx":765
 *             v.push_back(string_vals.at(i))
 *         else:
 *             v.push_back(fill)             # <<<<<<<<<<<<<<
 *     return v
 * 
 */
      __pyx_v_v.push_back(__pyx_v_fill);
    }
    __pyx_L5:;
  }

  /* "vcfnp.pyx":766
 *         else:
 *             v.push_back(fill)
 *     return v             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_v;
  goto __pyx_L0;

  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":770
 * 
 * 
 * cdef inline object _mkval_float(vector[string]& string_vals, int arity, float fill):             # <<<<<<<<<<<<<<
 *     if arity == 1:
 *         out = _mkval_float_single(string_vals, fill)
 */

static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkval_float(std::vector<std::string> &__pyx_v_string_vals, int __pyx_v_arity, float __pyx_v_fill) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_mkval_float", 0);

  /* "vcfnp.pyx":771
 * 
 * cdef inline object _mkval_float(vector[string]& string_vals, int arity, float fill):
 *     if arity == 1:             # <<<<<<<<<<<<<<
 *         out = _mkval_float_single(string_vals, fill)
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_arity == 1) != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":772
 * cdef inline object _mkval_float(vector[string]& string_vals, int arity, float fill):
 *     if arity == 1:
 *         out = _mkval_float_single(string_vals, fill)             # <<<<<<<<<<<<<<
 *     else:
 *         out = _mkval_float_multi(string_vals, arity, fill)
 */
    __pyx_t_2 = PyFloat_FromDouble(__pyx_f_5vcfnp__mkval_float_single(__pyx_v_string_vals, __pyx_v_fill)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_out = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "vcfnp.pyx":774
 *         out = _mkval_float_single(string_vals, fill)
 *     else:
 *         out = _mkval_float_multi(string_vals, arity, fill)             # <<<<<<<<<<<<<<
 *     return out
 * 
 */
    __pyx_t_2 = __pyx_convert_vector_to_py_float(__pyx_f_5vcfnp__mkval_float_multi(__pyx_v_string_vals, __pyx_v_arity, __pyx_v_fill)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_out = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "vcfnp.pyx":775
 *     else:
 *         out = _mkval_float_multi(string_vals, arity, fill)
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vcfnp._mkval_float", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":779
 * 
 * 
 * cdef inline float _mkval_float_single(vector[string]& string_vals, float fill):             # <<<<<<<<<<<<<<
 *     cdef float v
 *     if string_vals.size() > 0:
 */

static CYTHON_INLINE float __pyx_f_5vcfnp__mkval_float_single(std::vector<std::string> &__pyx_v_string_vals, float __pyx_v_fill) {
  float __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("_mkval_float_single", 0);

  /* "vcfnp.pyx":781
 * cdef inline float _mkval_float_single(vector[string]& string_vals, float fill):
 *     cdef float v
 *     if string_vals.size() > 0:             # <<<<<<<<<<<<<<
 *         return atof(string_vals.at(0).c_str())
 *     return fill
 */
  __pyx_t_1 = ((__pyx_v_string_vals.size() > 0) != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":782
 *     cdef float v
 *     if string_vals.size() > 0:
 *         return atof(string_vals.at(0).c_str())             # <<<<<<<<<<<<<<
 *     return fill
 * #    cdef float v = fill
 */
    __pyx_r = atof(__pyx_v_string_vals.at(0).c_str());
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "vcfnp.pyx":783
 *     if string_vals.size() > 0:
 *         return atof(string_vals.at(0).c_str())
 *     return fill             # <<<<<<<<<<<<<<
 * #    cdef float v = fill
 * #    if string_vals.size() > 0:
 */
  __pyx_r = __pyx_v_fill;
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":791
 * 
 * 
 * cdef inline vector[float] _mkval_float_multi(vector[string]& string_vals, int arity, float fill):             # <<<<<<<<<<<<<<
 *     cdef int i
 *     cdef vector[float] out
 */

static CYTHON_INLINE std::vector<float> __pyx_f_5vcfnp__mkval_float_multi(std::vector<std::string> &__pyx_v_string_vals, int __pyx_v_arity, float __pyx_v_fill) {
  int __pyx_v_i;
  std::vector<float> __pyx_v_out;
  std::vector<float> __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("_mkval_float_multi", 0);

  /* "vcfnp.pyx":794
 *     cdef int i
 *     cdef vector[float] out
 *     for i in range(arity):             # <<<<<<<<<<<<<<
 *         if i < string_vals.size():
 *             out.push_back(atof(string_vals.at(i).c_str()))
 */
  __pyx_t_1 = __pyx_v_arity;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "vcfnp.pyx":795
 *     cdef vector[float] out
 *     for i in range(arity):
 *         if i < string_vals.size():             # <<<<<<<<<<<<<<
 *             out.push_back(atof(string_vals.at(i).c_str()))
 *         else:
 */
    __pyx_t_3 = ((__pyx_v_i < __pyx_v_string_vals.size()) != 0);
    if (__pyx_t_3) {

      /* "vcfnp.pyx":796
 *     for i in range(arity):
 *         if i < string_vals.size():
 *             out.push_back(atof(string_vals.at(i).c_str()))             # <<<<<<<<<<<<<<
 *         else:
 *             out.push_back(fill)
 */
      __pyx_v_out.push_back(atof(__pyx_v_string_vals.at(__pyx_v_i).c_str()));
      goto __pyx_L5;
    }
    /*else*/ {

      /* "vcfnp.pyx":798
 *             out.push_back(atof(string_vals.at(i).c_str()))
 *         else:
 *             out.push_back(fill)             # <<<<<<<<<<<<<<
 *     return out
 * #cdef inline vector[float] _mkval_float_multi(vector[string]& string_vals, int arity, float fill):
 */
      __pyx_v_out.push_back(__pyx_v_fill);
    }
    __pyx_L5:;
  }

  /* "vcfnp.pyx":799
 *         else:
 *             out.push_back(fill)
 *     return out             # <<<<<<<<<<<<<<
 * #cdef inline vector[float] _mkval_float_multi(vector[string]& string_vals, int arity, float fill):
 * #    cdef int i
 */
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":813
 * 
 * 
 * cdef inline object _mkval_int(vector[string]& string_vals, int arity, int fill):             # <<<<<<<<<<<<<<
 *     if arity == 1:
 *         out = _mkval_int_single(string_vals, fill)
 */

static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkval_int(std::vector<std::string> &__pyx_v_string_vals, int __pyx_v_arity, int __pyx_v_fill) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_mkval_int", 0);

  /* "vcfnp.pyx":814
 * 
 * cdef inline object _mkval_int(vector[string]& string_vals, int arity, int fill):
 *     if arity == 1:             # <<<<<<<<<<<<<<
 *         out = _mkval_int_single(string_vals, fill)
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_arity == 1) != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":815
 * cdef inline object _mkval_int(vector[string]& string_vals, int arity, int fill):
 *     if arity == 1:
 *         out = _mkval_int_single(string_vals, fill)             # <<<<<<<<<<<<<<
 *     else:
 *         out = _mkval_int_multi(string_vals, arity, fill)
 */
    __pyx_t_2 = PyInt_FromLong(__pyx_f_5vcfnp__mkval_int_single(__pyx_v_string_vals, __pyx_v_fill)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_out = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "vcfnp.pyx":817
 *         out = _mkval_int_single(string_vals, fill)
 *     else:
 *         out = _mkval_int_multi(string_vals, arity, fill)             # <<<<<<<<<<<<<<
 *     return out
 * 
 */
    __pyx_t_2 = __pyx_convert_vector_to_py_int(__pyx_f_5vcfnp__mkval_int_multi(__pyx_v_string_vals, __pyx_v_arity, __pyx_v_fill)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_out = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "vcfnp.pyx":818
 *     else:
 *         out = _mkval_int_multi(string_vals, arity, fill)
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vcfnp._mkval_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":822
 * 
 * 
 * cdef inline int _mkval_int_single(vector[string]& string_vals, int fill):             # <<<<<<<<<<<<<<
 *     cdef int v
 *     if string_vals.size() > 0:
 */

static CYTHON_INLINE int __pyx_f_5vcfnp__mkval_int_single(std::vector<std::string> &__pyx_v_string_vals, int __pyx_v_fill) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("_mkval_int_single", 0);

  /* "vcfnp.pyx":824
 * cdef inline int _mkval_int_single(vector[string]& string_vals, int fill):
 *     cdef int v
 *     if string_vals.size() > 0:             # <<<<<<<<<<<<<<
 *         return atoi(string_vals.at(0).c_str())
 *     return fill
 */
  __pyx_t_1 = ((__pyx_v_string_vals.size() > 0) != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":825
 *     cdef int v
 *     if string_vals.size() > 0:
 *         return atoi(string_vals.at(0).c_str())             # <<<<<<<<<<<<<<
 *     return fill
 * #    cdef int v = fill
 */
    __pyx_r = atoi(__pyx_v_string_vals.at(0).c_str());
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "vcfnp.pyx":826
 *     if string_vals.size() > 0:
 *         return atoi(string_vals.at(0).c_str())
 *     return fill             # <<<<<<<<<<<<<<
 * #    cdef int v = fill
 * #    if string_vals.size() > 0:
 */
  __pyx_r = __pyx_v_fill;
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":834
 * 
 * 
 * cdef inline vector[int] _mkval_int_multi(vector[string]& string_vals, int arity, int fill):             # <<<<<<<<<<<<<<
 *     cdef int i
 *     cdef vector[int] out
 */

static CYTHON_INLINE std::vector<int> __pyx_f_5vcfnp__mkval_int_multi(std::vector<std::string> &__pyx_v_string_vals, int __pyx_v_arity, int __pyx_v_fill) {
  int __pyx_v_i;
  std::vector<int> __pyx_v_out;
  std::vector<int> __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("_mkval_int_multi", 0);

  /* "vcfnp.pyx":837
 *     cdef int i
 *     cdef vector[int] out
 *     for i in range(arity):             # <<<<<<<<<<<<<<
 *         if i < string_vals.size():
 *             out.push_back(atoi(string_vals.at(i).c_str()))
 */
  __pyx_t_1 = __pyx_v_arity;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "vcfnp.pyx":838
 *     cdef vector[int] out
 *     for i in range(arity):
 *         if i < string_vals.size():             # <<<<<<<<<<<<<<
 *             out.push_back(atoi(string_vals.at(i).c_str()))
 *         else:
 */
    __pyx_t_3 = ((__pyx_v_i < __pyx_v_string_vals.size()) != 0);
    if (__pyx_t_3) {

      /* "vcfnp.pyx":839
 *     for i in range(arity):
 *         if i < string_vals.size():
 *             out.push_back(atoi(string_vals.at(i).c_str()))             # <<<<<<<<<<<<<<
 *         else:
 *             out.push_back(fill)
 */
      __pyx_v_out.push_back(atoi(__pyx_v_string_vals.at(__pyx_v_i).c_str()));
      goto __pyx_L5;
    }
    /*else*/ {

      /* "vcfnp.pyx":841
 *             out.push_back(atoi(string_vals.at(i).c_str()))
 *         else:
 *             out.push_back(fill)             # <<<<<<<<<<<<<<
 *     return out
 * #cdef inline vector[int] _mkval_int_multi(vector[string]& string_vals, int arity, int fill):
 */
      __pyx_v_out.push_back(__pyx_v_fill);
    }
    __pyx_L5:;
  }

  /* "vcfnp.pyx":842
 *         else:
 *             out.push_back(fill)
 *     return out             # <<<<<<<<<<<<<<
 * #cdef inline vector[int] _mkval_int_multi(vector[string]& string_vals, int arity, int fill):
 * #    cdef int i
 */
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_22calldata(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5vcfnp_21calldata[] = "\n    Load a numpy structured array with data from the sample columns of a VCF\n    file.\n\n    Parameters\n    ----------\n\n    filename: string or list\n        Name of the VCF file or list of file names\n    region: string\n        Region to extract, e.g., 'chr1' or 'chr1:0-100000'\n    fields: list or array-like\n        List of fields to extract from the VCF\n    exclude_fields: list or array-like\n        Fields to exclude from extraction\n    dtypes: dict or dict-like\n        Dictionary cotaining dtypes to use instead of the default inferred ones\n    arities: dict or dict-like\n        Override the amount of values to expect\n    fills: dict or dict-like\n        Dictionary containing field:fillvalue mappings used to override the\n        default fill in values in VCF fields\n    count: int\n        Attempt to extract a specific number of records\n    progress: int\n        If greater than 0, log parsing progress\n    logstream: file or file-like object\n        Stream to use for logging progress\n    condition: array\n        Boolean array defining which rows to load\n    slice: tuple or list\n        Slice of the underlying iterator, e.g., (0, 1000, 10) takes every 10th row from the first 1000\n\n    Examples\n    --------\n\n        >>> from vcfnp import samples\n        >>> a = calldata('sample.vcf')\n        >>> a\n        array([ ((True, True, [0, 0], '0|0', 0, 0, [10, 10]), (True, True, [0, 0], '0|0', 0, 0, [10, 10]), (True, False, [0, 1], '0/1', 0, 0, [3, 3])),\n               ((True, True, [0, 0], '0|0', 0, 0, [10, 10]), (True, True, [0, 0], '0|0', 0, 0, [10, 10]), (True, False, [0, 1], '0/1', 0, 0, [3, 3])),\n               ((True, True, [0, 0], '0|0', 48, 1, [51, 51]), (True, True, [1, 0], '1|0', 48, 8, [51, 51]), (True, False, [1, 1], '1/1', 43, 5, [0, 0])),\n               ((True, True, [0, 0], '0|0', 49, 3, [58, 50]), (True, True, [0, 1], '0|1', 3, 5, [65, 3]), (True, False, [0, 0], '0/0', 41, 3, [0, 0])),\n               ((True, True, [1, 2""], '1|2', 21, 6, [23, 27]), (True, True, [2, 1], '2|1', 2, 0, [18, 2]), (True, False, [2, 2], '2/2', 35, 4, [0, 0])),\n               ((True, True, [0, 0], '0|0', 54, 0, [56, 60]), (True, True, [0, 0], '0|0', 48, 4, [51, 51]), (True, False, [0, 0], '0/0', 61, 2, [0, 0])),\n               ((True, False, [0, 1], '0/1', 0, 4, [0, 0]), (True, False, [0, 2], '0/2', 17, 2, [0, 0]), (True, False, [1, 1], '1/1', 40, 3, [0, 0])),\n               ((True, False, [0, 0], '0/0', 0, 0, [0, 0]), (True, True, [0, 0], '0|0', 0, 0, [0, 0]), (False, False, [-1, -1], './.', 0, 0, [0, 0])),\n               ((True, False, [0, -1], '0', 0, 0, [0, 0]), (True, False, [0, 1], '0/1', 0, 0, [0, 0]), (True, True, [0, 2], '0|2', 0, 0, [0, 0]))],\n              dtype=[('NA00001', [('is_called', '|b1'), ('is_phased', '|b1'), ('genotype', '|i1', (2,)), ('GT', '|S3'), ('GQ', '|u1'), ('DP', '<u2'), ('HQ', '<i4', (2,))]), ('NA00002', [('is_called', '|b1'), ('is_phased', '|b1'), ('genotype', '|i1', (2,)), ('GT', '|S3'), ('GQ', '|u1'), ('DP', '<u2'), ('HQ', '<i4', (2,))]), ('NA00003', [('is_called', '|b1'), ('is_phased', '|b1'), ('genotype', '|i1', (2,)), ('GT', '|S3'), ('GQ', '|u1'), ('DP', '<u2'), ('HQ', '<i4', (2,))])])\n        >>> a['NA00001']\n        array([(True, True, [0, 0], '0|0', 0, 0, [10, 10]),\n               (True, True, [0, 0], '0|0', 0, 0, [10, 10]),\n               (True, True, [0, 0], '0|0', 48, 1, [51, 51]),\n               (True, True, [0, 0], '0|0', 49, 3, [58, 50]),\n               (True, True, [1, 2], '1|2', 21, 6, [23, 27]),\n               (True, True, [0, 0], '0|0', 54, 0, [56, 60]),\n               (True, False, [0, 1], '0/1', 0, 4, [0, 0]),\n               (True, False, [0, 0], '0/0', 0, 0, [0, 0]),\n               (True, False, [0, -1], '0', 0, 0, [0, 0])],\n              dtype=[('is_called', '|b1'), ('is_phased', '|b1'), ('genotype', '|i1', (2,)), ('GT', '|S3'), ('GQ', '|u1'), ('DP', '<u2'), ('HQ', '<i4', (2,))])\n\n    ";
static PyMethodDef __pyx_mdef_5vcfnp_22calldata = {__Pyx_NAMESTR("calldata"), (PyCFunction)__pyx_pw_5vcfnp_22calldata, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5vcfnp_21calldata)};
static PyObject *__pyx_pw_5vcfnp_22calldata(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_filename = 0;
  PyObject *__pyx_v_region = 0;
  PyObject *__pyx_v_samples = 0;
  PyObject *__pyx_v_ploidy = 0;
  PyObject *__pyx_v_fields = 0;
  PyObject *__pyx_v_exclude_fields = 0;
  PyObject *__pyx_v_dtypes = 0;
  PyObject *__pyx_v_arities = 0;
  PyObject *__pyx_v_fills = 0;
  PyObject *__pyx_v_count = 0;
  PyObject *__pyx_v_progress = 0;
  PyObject *__pyx_v_logstream = 0;
  PyObject *__pyx_v_condition = 0;
  PyObject *__pyx_v_slice = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("calldata (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__filename,&__pyx_n_s__region,&__pyx_n_s__samples,&__pyx_n_s__ploidy,&__pyx_n_s__fields,&__pyx_n_s__exclude_fields,&__pyx_n_s__dtypes,&__pyx_n_s__arities,&__pyx_n_s__fills,&__pyx_n_s__count,&__pyx_n_s__progress,&__pyx_n_s__logstream,&__pyx_n_s__condition,&__pyx_n_s__slice,0};
    PyObject* values[14] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0};

    /* "vcfnp.pyx":857
 * 
 * def calldata(filename,
 *              region=None,             # <<<<<<<<<<<<<<
 *              samples=None,
 *              ploidy=2,
 */
    values[1] = ((PyObject *)Py_None);

    /* "vcfnp.pyx":858
 * def calldata(filename,
 *              region=None,
 *              samples=None,             # <<<<<<<<<<<<<<
 *              ploidy=2,
 *              fields=None,
 */
    values[2] = ((PyObject *)Py_None);
    values[3] = ((PyObject *)__pyx_int_2);

    /* "vcfnp.pyx":860
 *              samples=None,
 *              ploidy=2,
 *              fields=None,             # <<<<<<<<<<<<<<
 *              exclude_fields=None,
 *              dtypes=None,
 */
    values[4] = ((PyObject *)Py_None);

    /* "vcfnp.pyx":861
 *              ploidy=2,
 *              fields=None,
 *              exclude_fields=None,             # <<<<<<<<<<<<<<
 *              dtypes=None,
 *              arities=None,
 */
    values[5] = ((PyObject *)Py_None);

    /* "vcfnp.pyx":862
 *              fields=None,
 *              exclude_fields=None,
 *              dtypes=None,             # <<<<<<<<<<<<<<
 *              arities=None,
 *              fills=None,
 */
    values[6] = ((PyObject *)Py_None);

    /* "vcfnp.pyx":863
 *              exclude_fields=None,
 *              dtypes=None,
 *              arities=None,             # <<<<<<<<<<<<<<
 *              fills=None,
 *              count=None,
 */
    values[7] = ((PyObject *)Py_None);

    /* "vcfnp.pyx":864
 *              dtypes=None,
 *              arities=None,
 *              fills=None,             # <<<<<<<<<<<<<<
 *              count=None,
 *              progress=0,
 */
    values[8] = ((PyObject *)Py_None);

    /* "vcfnp.pyx":865
 *              arities=None,
 *              fills=None,
 *              count=None,             # <<<<<<<<<<<<<<
 *              progress=0,
 *              logstream=sys.stderr,
 */
    values[9] = ((PyObject *)Py_None);
    values[10] = ((PyObject *)__pyx_int_0);
    values[11] = __pyx_k_14;

    /* "vcfnp.pyx":868
 *              progress=0,
 *              logstream=sys.stderr,
 *              condition=None,             # <<<<<<<<<<<<<<
 *              slice=None,
 *              ):
 */
    values[12] = ((PyObject *)Py_None);

    /* "vcfnp.pyx":869
 *              logstream=sys.stderr,
 *              condition=None,
 *              slice=None,             # <<<<<<<<<<<<<<
 *              ):
 *     """
 */
    values[13] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
        case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filename)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__region);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__samples);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ploidy);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fields);
          if (value) { values[4] = value; kw_args--; }
        }
        case  5:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__exclude_fields);
          if (value) { values[5] = value; kw_args--; }
        }
        case  6:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dtypes);
          if (value) { values[6] = value; kw_args--; }
        }
        case  7:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arities);
          if (value) { values[7] = value; kw_args--; }
        }
        case  8:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fills);
          if (value) { values[8] = value; kw_args--; }
        }
        case  9:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__count);
          if (value) { values[9] = value; kw_args--; }
        }
        case 10:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__progress);
          if (value) { values[10] = value; kw_args--; }
        }
        case 11:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__logstream);
          if (value) { values[11] = value; kw_args--; }
        }
        case 12:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__condition);
          if (value) { values[12] = value; kw_args--; }
        }
        case 13:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__slice);
          if (value) { values[13] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calldata") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
        case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_filename = values[0];
    __pyx_v_region = values[1];
    __pyx_v_samples = values[2];
    __pyx_v_ploidy = values[3];
    __pyx_v_fields = values[4];
    __pyx_v_exclude_fields = values[5];
    __pyx_v_dtypes = values[6];
    __pyx_v_arities = values[7];
    __pyx_v_fills = values[8];
    __pyx_v_count = values[9];
    __pyx_v_progress = values[10];
    __pyx_v_logstream = values[11];
    __pyx_v_condition = values[12];
    __pyx_v_slice = values[13];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("calldata", 0, 1, 14, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vcfnp.calldata", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5vcfnp_21calldata(__pyx_self, __pyx_v_filename, __pyx_v_region, __pyx_v_samples, __pyx_v_ploidy, __pyx_v_fields, __pyx_v_exclude_fields, __pyx_v_dtypes, __pyx_v_arities, __pyx_v_fills, __pyx_v_count, __pyx_v_progress, __pyx_v_logstream, __pyx_v_condition, __pyx_v_slice);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":856
 * 
 * 
 * def calldata(filename,             # <<<<<<<<<<<<<<
 *              region=None,
 *              samples=None,
 */

static PyObject *__pyx_pf_5vcfnp_21calldata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_region, PyObject *__pyx_v_samples, PyObject *__pyx_v_ploidy, PyObject *__pyx_v_fields, PyObject *__pyx_v_exclude_fields, PyObject *__pyx_v_dtypes, PyObject *__pyx_v_arities, PyObject *__pyx_v_fills, PyObject *__pyx_v_count, PyObject *__pyx_v_progress, PyObject *__pyx_v_logstream, PyObject *__pyx_v_condition, PyObject *__pyx_v_slice) {
  PyObject *__pyx_v_filenames = NULL;
  PyObject *__pyx_v_fn = NULL;
  struct __pyx_obj_6vcflib_PyVariantCallFile *__pyx_v_vcf = NULL;
  PyObject *__pyx_v_formatIds = NULL;
  PyObject *__pyx_v_formatTypes = NULL;
  PyObject *__pyx_v_formatCounts = NULL;
  PyObject *__pyx_v_all_samples = NULL;
  PyObject *__pyx_v_s = NULL;
  PyObject *__pyx_v_f = NULL;
  PyObject *__pyx_v_vcf_type = NULL;
  PyObject *__pyx_v_vcf_count = NULL;
  PyObject *__pyx_v_cell_dtype = NULL;
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_dtype = NULL;
  PyObject *__pyx_v_it = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("calldata", 0);
  __Pyx_INCREF(__pyx_v_samples);
  __Pyx_INCREF(__pyx_v_fields);
  __Pyx_INCREF(__pyx_v_dtypes);
  __Pyx_INCREF(__pyx_v_arities);
  __Pyx_INCREF(__pyx_v_fills);

  /* "vcfnp.pyx":934
 *     """
 * 
 *     if isinstance(filename, basestring):             # <<<<<<<<<<<<<<
 *         filenames = [filename]
 *     else:
 */
  __pyx_t_1 = __Pyx_PyBaseString_Check(__pyx_v_filename); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "vcfnp.pyx":935
 * 
 *     if isinstance(filename, basestring):
 *         filenames = [filename]             # <<<<<<<<<<<<<<
 *     else:
 *         filenames = filename
 */
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_filename);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_filename);
    __Pyx_GIVEREF(__pyx_v_filename);
    __pyx_v_filenames = ((PyObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "vcfnp.pyx":937
 *         filenames = [filename]
 *     else:
 *         filenames = filename             # <<<<<<<<<<<<<<
 * 
 *     for fn in filenames:
 */
    __Pyx_INCREF(__pyx_v_filename);
    __pyx_v_filenames = __pyx_v_filename;
  }
  __pyx_L3:;

  /* "vcfnp.pyx":939
 *         filenames = filename
 * 
 *     for fn in filenames:             # <<<<<<<<<<<<<<
 *         if not os.path.exists(fn):
 *             raise Exception('file not found: %s' % fn)
 */
  if (PyList_CheckExact(__pyx_v_filenames) || PyTuple_CheckExact(__pyx_v_filenames)) {
    __pyx_t_3 = __pyx_v_filenames; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_filenames); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_6 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_6)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF(__pyx_v_fn);
    __pyx_v_fn = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "vcfnp.pyx":940
 * 
 *     for fn in filenames:
 *         if not os.path.exists(fn):             # <<<<<<<<<<<<<<
 *             raise Exception('file not found: %s' % fn)
 * 
 */
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__os); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__path); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s__exists); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v_fn);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_fn);
    __Pyx_GIVEREF(__pyx_v_fn);
    __pyx_t_8 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_1 = ((!__pyx_t_2) != 0);
    if (__pyx_t_1) {

      /* "vcfnp.pyx":941
 *     for fn in filenames:
 *         if not os.path.exists(fn):
 *             raise Exception('file not found: %s' % fn)             # <<<<<<<<<<<<<<
 * 
 *     vcf = PyVariantCallFile(filenames[0])
 */
      __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_2), __pyx_v_fn); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_8));
      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_8));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_8));
      __pyx_t_8 = 0;
      __pyx_t_8 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L6;
    }
    __pyx_L6:;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "vcfnp.pyx":943
 *             raise Exception('file not found: %s' % fn)
 * 
 *     vcf = PyVariantCallFile(filenames[0])             # <<<<<<<<<<<<<<
 *     formatIds = vcf.formatIds
 *     formatTypes = vcf.formatTypes
 */
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_filenames, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6vcflib_PyVariantCallFile)), ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __pyx_v_vcf = ((struct __pyx_obj_6vcflib_PyVariantCallFile *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "vcfnp.pyx":944
 * 
 *     vcf = PyVariantCallFile(filenames[0])
 *     formatIds = vcf.formatIds             # <<<<<<<<<<<<<<
 *     formatTypes = vcf.formatTypes
 *     formatCounts = vcf.formatCounts
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_vcf), __pyx_n_s__formatIds); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_formatIds = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "vcfnp.pyx":945
 *     vcf = PyVariantCallFile(filenames[0])
 *     formatIds = vcf.formatIds
 *     formatTypes = vcf.formatTypes             # <<<<<<<<<<<<<<
 *     formatCounts = vcf.formatCounts
 *     all_samples = vcf.sampleNames
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_vcf), __pyx_n_s__formatTypes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_formatTypes = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "vcfnp.pyx":946
 *     formatIds = vcf.formatIds
 *     formatTypes = vcf.formatTypes
 *     formatCounts = vcf.formatCounts             # <<<<<<<<<<<<<<
 *     all_samples = vcf.sampleNames
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_vcf), __pyx_n_s__formatCounts); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_formatCounts = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "vcfnp.pyx":947
 *     formatTypes = vcf.formatTypes
 *     formatCounts = vcf.formatCounts
 *     all_samples = vcf.sampleNames             # <<<<<<<<<<<<<<
 * 
 *     if samples is None:
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_vcf), __pyx_n_s__sampleNames); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_all_samples = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "vcfnp.pyx":949
 *     all_samples = vcf.sampleNames
 * 
 *     if samples is None:             # <<<<<<<<<<<<<<
 *         samples = all_samples
 *     else:
 */
  __pyx_t_1 = (__pyx_v_samples == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "vcfnp.pyx":950
 * 
 *     if samples is None:
 *         samples = all_samples             # <<<<<<<<<<<<<<
 *     else:
 *         for s in samples:
 */
    __Pyx_INCREF(__pyx_v_all_samples);
    __Pyx_DECREF(__pyx_v_samples);
    __pyx_v_samples = __pyx_v_all_samples;
    goto __pyx_L7;
  }
  /*else*/ {

    /* "vcfnp.pyx":952
 *         samples = all_samples
 *     else:
 *         for s in samples:             # <<<<<<<<<<<<<<
 *             assert s in all_samples, 'unknown sample: %s' % s
 * 
 */
    if (PyList_CheckExact(__pyx_v_samples) || PyTuple_CheckExact(__pyx_v_samples)) {
      __pyx_t_3 = __pyx_v_samples; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_samples); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
    }
    for (;;) {
      if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_8 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_8 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_8 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        __pyx_t_8 = __pyx_t_5(__pyx_t_3);
        if (unlikely(!__pyx_t_8)) {
          if (PyErr_Occurred()) {
            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_8);
      }
      __Pyx_XDECREF(__pyx_v_s);
      __pyx_v_s = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "vcfnp.pyx":953
 *     else:
 *         for s in samples:
 *             assert s in all_samples, 'unknown sample: %s' % s             # <<<<<<<<<<<<<<
 * 
 *     # determine fields to extract
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_v_s, __pyx_v_all_samples, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (unlikely(!(__pyx_t_2 != 0))) {
        __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_15), __pyx_v_s); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_8));
        PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_t_8));
        __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #endif
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_L7:;

  /* "vcfnp.pyx":956
 * 
 *     # determine fields to extract
 *     if fields is None:             # <<<<<<<<<<<<<<
 *         fields = list(CALLDATA_FIELDS) + formatIds
 *     else:
 */
  __pyx_t_2 = (__pyx_v_fields == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":957
 *     # determine fields to extract
 *     if fields is None:
 *         fields = list(CALLDATA_FIELDS) + formatIds             # <<<<<<<<<<<<<<
 *     else:
 *         for f in fields:
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__CALLDATA_FIELDS); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
    __pyx_t_8 = PyNumber_Add(__pyx_t_3, __pyx_v_formatIds); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_v_fields);
    __pyx_v_fields = __pyx_t_8;
    __pyx_t_8 = 0;
    goto __pyx_L10;
  }
  /*else*/ {

    /* "vcfnp.pyx":959
 *         fields = list(CALLDATA_FIELDS) + formatIds
 *     else:
 *         for f in fields:             # <<<<<<<<<<<<<<
 *             assert f in CALLDATA_FIELDS or f in formatIds, 'unknown field: %s' % f
 * 
 */
    if (PyList_CheckExact(__pyx_v_fields) || PyTuple_CheckExact(__pyx_v_fields)) {
      __pyx_t_8 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_8); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_fields); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_5 = Py_TYPE(__pyx_t_8)->tp_iternext;
    }
    for (;;) {
      if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_8)) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_8)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_8, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_8)) {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_8, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        __pyx_t_3 = __pyx_t_5(__pyx_t_8);
        if (unlikely(!__pyx_t_3)) {
          if (PyErr_Occurred()) {
            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF(__pyx_v_f);
      __pyx_v_f = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "vcfnp.pyx":960
 *     else:
 *         for f in fields:
 *             assert f in CALLDATA_FIELDS or f in formatIds, 'unknown field: %s' % f             # <<<<<<<<<<<<<<
 * 
 *     # exclude fields
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__CALLDATA_FIELDS); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(__pyx_t_1 != 0)) {
        __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_v_formatIds, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_9 = (__pyx_t_2 != 0);
      } else {
        __pyx_t_9 = (__pyx_t_1 != 0);
      }
      if (unlikely(!__pyx_t_9)) {
        __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_3), __pyx_v_f); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_3));
        PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_t_3));
        __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #endif
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __pyx_L10:;

  /* "vcfnp.pyx":963
 * 
 *     # exclude fields
 *     if exclude_fields is not None:             # <<<<<<<<<<<<<<
 *         fields = [f for f in fields if f not in exclude_fields]
 * 
 */
  __pyx_t_9 = (__pyx_v_exclude_fields != Py_None);
  __pyx_t_1 = (__pyx_t_9 != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":964
 *     # exclude fields
 *     if exclude_fields is not None:
 *         fields = [f for f in fields if f not in exclude_fields]             # <<<<<<<<<<<<<<
 * 
 *     # determine a numpy dtype for each field
 */
    __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    if (PyList_CheckExact(__pyx_v_fields) || PyTuple_CheckExact(__pyx_v_fields)) {
      __pyx_t_3 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_fields); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
    }
    for (;;) {
      if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        __pyx_t_7 = __pyx_t_5(__pyx_t_3);
        if (unlikely(!__pyx_t_7)) {
          if (PyErr_Occurred()) {
            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_7);
      }
      __Pyx_XDECREF(__pyx_v_f);
      __pyx_v_f = __pyx_t_7;
      __pyx_t_7 = 0;
      __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_v_exclude_fields, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_9 = (__pyx_t_1 != 0);
      if (__pyx_t_9) {
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_8, (PyObject*)__pyx_v_f))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L16;
      }
      __pyx_L16:;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_v_fields);
    __pyx_v_fields = ((PyObject *)__pyx_t_8);
    __pyx_t_8 = 0;
    goto __pyx_L13;
  }
  __pyx_L13:;

  /* "vcfnp.pyx":967
 * 
 *     # determine a numpy dtype for each field
 *     if dtypes is None:             # <<<<<<<<<<<<<<
 *         dtypes = dict()
 *     for f in fields:
 */
  __pyx_t_9 = (__pyx_v_dtypes == Py_None);
  __pyx_t_1 = (__pyx_t_9 != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":968
 *     # determine a numpy dtype for each field
 *     if dtypes is None:
 *         dtypes = dict()             # <<<<<<<<<<<<<<
 *     for f in fields:
 *         if f not in dtypes:
 */
    __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_8));
    __Pyx_DECREF(__pyx_v_dtypes);
    __pyx_v_dtypes = ((PyObject *)__pyx_t_8);
    __pyx_t_8 = 0;
    goto __pyx_L17;
  }
  __pyx_L17:;

  /* "vcfnp.pyx":969
 *     if dtypes is None:
 *         dtypes = dict()
 *     for f in fields:             # <<<<<<<<<<<<<<
 *         if f not in dtypes:
 *             if f == 'GT':
 */
  if (PyList_CheckExact(__pyx_v_fields) || PyTuple_CheckExact(__pyx_v_fields)) {
    __pyx_t_8 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_8); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_fields); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = Py_TYPE(__pyx_t_8)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_8)) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_8)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_3 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_3 = PySequence_ITEM(__pyx_t_8, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_8)) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_3 = PySequence_ITEM(__pyx_t_8, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_3 = __pyx_t_5(__pyx_t_8);
      if (unlikely(!__pyx_t_3)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF(__pyx_v_f);
    __pyx_v_f = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "vcfnp.pyx":970
 *         dtypes = dict()
 *     for f in fields:
 *         if f not in dtypes:             # <<<<<<<<<<<<<<
 *             if f == 'GT':
 *                 dtypes[f] = 'a%d' % ((ploidy*2)-1)
 */
    __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_v_dtypes, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_9 = (__pyx_t_1 != 0);
    if (__pyx_t_9) {

      /* "vcfnp.pyx":971
 *     for f in fields:
 *         if f not in dtypes:
 *             if f == 'GT':             # <<<<<<<<<<<<<<
 *                 dtypes[f] = 'a%d' % ((ploidy*2)-1)
 *             elif f in DEFAULT_CALLDATA_DTYPE:
 */
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_f, ((PyObject *)__pyx_n_s__GT), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_9) {

        /* "vcfnp.pyx":972
 *         if f not in dtypes:
 *             if f == 'GT':
 *                 dtypes[f] = 'a%d' % ((ploidy*2)-1)             # <<<<<<<<<<<<<<
 *             elif f in DEFAULT_CALLDATA_DTYPE:
 *                 # known field
 */
        __pyx_t_3 = PyNumber_Multiply(__pyx_v_ploidy, __pyx_int_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_7 = PyNumber_Subtract(__pyx_t_3, __pyx_int_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_16), __pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_3));
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (PyObject_SetItem(__pyx_v_dtypes, __pyx_v_f, ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
        goto __pyx_L21;
      }

      /* "vcfnp.pyx":973
 *             if f == 'GT':
 *                 dtypes[f] = 'a%d' % ((ploidy*2)-1)
 *             elif f in DEFAULT_CALLDATA_DTYPE:             # <<<<<<<<<<<<<<
 *                 # known field
 *                 dtypes[f] = DEFAULT_CALLDATA_DTYPE[f]
 */
      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_17); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_1 = (__pyx_t_9 != 0);
      if (__pyx_t_1) {

        /* "vcfnp.pyx":975
 *             elif f in DEFAULT_CALLDATA_DTYPE:
 *                 # known field
 *                 dtypes[f] = DEFAULT_CALLDATA_DTYPE[f]             # <<<<<<<<<<<<<<
 *             else:
 *                 vcf_type = formatTypes[f]
 */
        __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_17); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_7 = PyObject_GetItem(__pyx_t_3, __pyx_v_f); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (PyObject_SetItem(__pyx_v_dtypes, __pyx_v_f, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L21;
      }
      /*else*/ {

        /* "vcfnp.pyx":977
 *                 dtypes[f] = DEFAULT_CALLDATA_DTYPE[f]
 *             else:
 *                 vcf_type = formatTypes[f]             # <<<<<<<<<<<<<<
 *                 dtypes[f] = DEFAULT_TYPE_MAP[vcf_type]
 * 
 */
        __pyx_t_7 = PyObject_GetItem(__pyx_v_formatTypes, __pyx_v_f); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_XDECREF(__pyx_v_vcf_type);
        __pyx_v_vcf_type = __pyx_t_7;
        __pyx_t_7 = 0;

        /* "vcfnp.pyx":978
 *             else:
 *                 vcf_type = formatTypes[f]
 *                 dtypes[f] = DEFAULT_TYPE_MAP[vcf_type]             # <<<<<<<<<<<<<<
 * 
 *     # determine expected number of values for each field
 */
        __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s__DEFAULT_TYPE_MAP); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_3 = PyObject_GetItem(__pyx_t_7, __pyx_v_vcf_type); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (PyObject_SetItem(__pyx_v_dtypes, __pyx_v_f, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __pyx_L21:;
      goto __pyx_L20;
    }
    __pyx_L20:;
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "vcfnp.pyx":981
 * 
 *     # determine expected number of values for each field
 *     if arities is None:             # <<<<<<<<<<<<<<
 *         arities = dict()
 *     for f in fields:
 */
  __pyx_t_1 = (__pyx_v_arities == Py_None);
  __pyx_t_9 = (__pyx_t_1 != 0);
  if (__pyx_t_9) {

    /* "vcfnp.pyx":982
 *     # determine expected number of values for each field
 *     if arities is None:
 *         arities = dict()             # <<<<<<<<<<<<<<
 *     for f in fields:
 *         if f not in arities:
 */
    __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 982; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_8));
    __Pyx_DECREF(__pyx_v_arities);
    __pyx_v_arities = ((PyObject *)__pyx_t_8);
    __pyx_t_8 = 0;
    goto __pyx_L22;
  }
  __pyx_L22:;

  /* "vcfnp.pyx":983
 *     if arities is None:
 *         arities = dict()
 *     for f in fields:             # <<<<<<<<<<<<<<
 *         if f not in arities:
 *             if f == 'genotype':
 */
  if (PyList_CheckExact(__pyx_v_fields) || PyTuple_CheckExact(__pyx_v_fields)) {
    __pyx_t_8 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_8); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_fields); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = Py_TYPE(__pyx_t_8)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_8)) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_8)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_3 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_3 = PySequence_ITEM(__pyx_t_8, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_8)) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_3 = PySequence_ITEM(__pyx_t_8, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_3 = __pyx_t_5(__pyx_t_8);
      if (unlikely(!__pyx_t_3)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF(__pyx_v_f);
    __pyx_v_f = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "vcfnp.pyx":984
 *         arities = dict()
 *     for f in fields:
 *         if f not in arities:             # <<<<<<<<<<<<<<
 *             if f == 'genotype':
 *                 arities[f] = ploidy
 */
    __pyx_t_9 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_v_arities, Py_NE)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_1 = (__pyx_t_9 != 0);
    if (__pyx_t_1) {

      /* "vcfnp.pyx":985
 *     for f in fields:
 *         if f not in arities:
 *             if f == 'genotype':             # <<<<<<<<<<<<<<
 *                 arities[f] = ploidy
 *             elif f in DEFAULT_CALLDATA_ARITY:
 */
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_f, ((PyObject *)__pyx_n_s__genotype), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_1) {

        /* "vcfnp.pyx":986
 *         if f not in arities:
 *             if f == 'genotype':
 *                 arities[f] = ploidy             # <<<<<<<<<<<<<<
 *             elif f in DEFAULT_CALLDATA_ARITY:
 *                 arities[f] = DEFAULT_CALLDATA_ARITY[f]
 */
        if (PyObject_SetItem(__pyx_v_arities, __pyx_v_f, __pyx_v_ploidy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L26;
      }

      /* "vcfnp.pyx":987
 *             if f == 'genotype':
 *                 arities[f] = ploidy
 *             elif f in DEFAULT_CALLDATA_ARITY:             # <<<<<<<<<<<<<<
 *                 arities[f] = DEFAULT_CALLDATA_ARITY[f]
 *             else:
 */
      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_18); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_9 = (__pyx_t_1 != 0);
      if (__pyx_t_9) {

        /* "vcfnp.pyx":988
 *                 arities[f] = ploidy
 *             elif f in DEFAULT_CALLDATA_ARITY:
 *                 arities[f] = DEFAULT_CALLDATA_ARITY[f]             # <<<<<<<<<<<<<<
 *             else:
 *                 vcf_count = formatCounts[f]
 */
        __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_18); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_7 = PyObject_GetItem(__pyx_t_3, __pyx_v_f); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (PyObject_SetItem(__pyx_v_arities, __pyx_v_f, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L26;
      }
      /*else*/ {

        /* "vcfnp.pyx":990
 *                 arities[f] = DEFAULT_CALLDATA_ARITY[f]
 *             else:
 *                 vcf_count = formatCounts[f]             # <<<<<<<<<<<<<<
 *                 if vcf_count == ALLELE_NUMBER:
 *                     # default to 2 (biallelic)
 */
        __pyx_t_7 = PyObject_GetItem(__pyx_v_formatCounts, __pyx_v_f); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_XDECREF(__pyx_v_vcf_count);
        __pyx_v_vcf_count = __pyx_t_7;
        __pyx_t_7 = 0;

        /* "vcfnp.pyx":991
 *             else:
 *                 vcf_count = formatCounts[f]
 *                 if vcf_count == ALLELE_NUMBER:             # <<<<<<<<<<<<<<
 *                     # default to 2 (biallelic)
 *                     arities[f] = 2
 */
        __pyx_t_7 = PyInt_FromLong(vcf::ALLELE_NUMBER); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_3 = PyObject_RichCompare(__pyx_v_vcf_count, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (__pyx_t_9) {

          /* "vcfnp.pyx":993
 *                 if vcf_count == ALLELE_NUMBER:
 *                     # default to 2 (biallelic)
 *                     arities[f] = 2             # <<<<<<<<<<<<<<
 *                 elif vcf_count == GENOTYPE_NUMBER:
 *                     # arity = (n + p - 1) choose p (n is number of alleles; p is ploidy)
 */
          if (PyObject_SetItem(__pyx_v_arities, __pyx_v_f, __pyx_int_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          goto __pyx_L27;
        }

        /* "vcfnp.pyx":994
 *                     # default to 2 (biallelic)
 *                     arities[f] = 2
 *                 elif vcf_count == GENOTYPE_NUMBER:             # <<<<<<<<<<<<<<
 *                     # arity = (n + p - 1) choose p (n is number of alleles; p is ploidy)
 *                     # default to biallelic (n = 2)
 */
        __pyx_t_3 = PyInt_FromLong(vcf::GENOTYPE_NUMBER); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_7 = PyObject_RichCompare(__pyx_v_vcf_count, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (__pyx_t_9) {

          /* "vcfnp.pyx":997
 *                     # arity = (n + p - 1) choose p (n is number of alleles; p is ploidy)
 *                     # default to biallelic (n = 2)
 *                     arities[f] = ploidy + 1             # <<<<<<<<<<<<<<
 *                 elif vcf_count <= 0:
 *                     # catch any other cases of non-specific arity
 */
          __pyx_t_7 = PyNumber_Add(__pyx_v_ploidy, __pyx_int_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_7);
          if (PyObject_SetItem(__pyx_v_arities, __pyx_v_f, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          goto __pyx_L27;
        }

        /* "vcfnp.pyx":998
 *                     # default to biallelic (n = 2)
 *                     arities[f] = ploidy + 1
 *                 elif vcf_count <= 0:             # <<<<<<<<<<<<<<
 *                     # catch any other cases of non-specific arity
 *                     arities[f] = 1
 */
        __pyx_t_7 = PyObject_RichCompare(__pyx_v_vcf_count, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (__pyx_t_9) {

          /* "vcfnp.pyx":1000
 *                 elif vcf_count <= 0:
 *                     # catch any other cases of non-specific arity
 *                     arities[f] = 1             # <<<<<<<<<<<<<<
 *                 else:
 *                     arities[f] = vcf_count
 */
          if (PyObject_SetItem(__pyx_v_arities, __pyx_v_f, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          goto __pyx_L27;
        }
        /*else*/ {

          /* "vcfnp.pyx":1002
 *                     arities[f] = 1
 *                 else:
 *                     arities[f] = vcf_count             # <<<<<<<<<<<<<<
 * 
 *     # determine fill values to use where number of values is less than expectation
 */
          if (PyObject_SetItem(__pyx_v_arities, __pyx_v_f, __pyx_v_vcf_count) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_L27:;
      }
      __pyx_L26:;
      goto __pyx_L25;
    }
    __pyx_L25:;
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "vcfnp.pyx":1005
 * 
 *     # determine fill values to use where number of values is less than expectation
 *     if fills is None:             # <<<<<<<<<<<<<<
 *         fills = dict()
 *     for f in fields:
 */
  __pyx_t_9 = (__pyx_v_fills == Py_None);
  __pyx_t_1 = (__pyx_t_9 != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":1006
 *     # determine fill values to use where number of values is less than expectation
 *     if fills is None:
 *         fills = dict()             # <<<<<<<<<<<<<<
 *     for f in fields:
 *         if f not in fills:
 */
    __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_8));
    __Pyx_DECREF(__pyx_v_fills);
    __pyx_v_fills = ((PyObject *)__pyx_t_8);
    __pyx_t_8 = 0;
    goto __pyx_L28;
  }
  __pyx_L28:;

  /* "vcfnp.pyx":1007
 *     if fills is None:
 *         fills = dict()
 *     for f in fields:             # <<<<<<<<<<<<<<
 *         if f not in fills:
 *             if f == 'GT':
 */
  if (PyList_CheckExact(__pyx_v_fields) || PyTuple_CheckExact(__pyx_v_fields)) {
    __pyx_t_8 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_8); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_fields); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = Py_TYPE(__pyx_t_8)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_8)) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_8)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_7 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_7 = PySequence_ITEM(__pyx_t_8, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_8)) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_7 = PySequence_ITEM(__pyx_t_8, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_7 = __pyx_t_5(__pyx_t_8);
      if (unlikely(!__pyx_t_7)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_7);
    }
    __Pyx_XDECREF(__pyx_v_f);
    __pyx_v_f = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "vcfnp.pyx":1008
 *         fills = dict()
 *     for f in fields:
 *         if f not in fills:             # <<<<<<<<<<<<<<
 *             if f == 'GT':
 *                 fills[f] = '/'.join(['.'] * ploidy)
 */
    __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_v_fills, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_9 = (__pyx_t_1 != 0);
    if (__pyx_t_9) {

      /* "vcfnp.pyx":1009
 *     for f in fields:
 *         if f not in fills:
 *             if f == 'GT':             # <<<<<<<<<<<<<<
 *                 fills[f] = '/'.join(['.'] * ploidy)
 *             elif f in DEFAULT_CALLDATA_FILL:
 */
      __pyx_t_7 = PyObject_RichCompare(__pyx_v_f, ((PyObject *)__pyx_n_s__GT), Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__pyx_t_9) {

        /* "vcfnp.pyx":1010
 *         if f not in fills:
 *             if f == 'GT':
 *                 fills[f] = '/'.join(['.'] * ploidy)             # <<<<<<<<<<<<<<
 *             elif f in DEFAULT_CALLDATA_FILL:
 *                 fills[f] = DEFAULT_CALLDATA_FILL[f]
 */
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_kp_s_19), __pyx_n_s__join); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(((PyObject *)__pyx_kp_s_20));
        PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_20));
        __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_20));
        { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_3, __pyx_v_ploidy); if (unlikely(!__pyx_temp)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_temp);
          __Pyx_DECREF(__pyx_t_3);
          __pyx_t_3 = __pyx_temp;
        }
        __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_3));
        __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
        __pyx_t_3 = 0;
        __pyx_t_3 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
        if (PyObject_SetItem(__pyx_v_fills, __pyx_v_f, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        goto __pyx_L32;
      }

      /* "vcfnp.pyx":1011
 *             if f == 'GT':
 *                 fills[f] = '/'.join(['.'] * ploidy)
 *             elif f in DEFAULT_CALLDATA_FILL:             # <<<<<<<<<<<<<<
 *                 fills[f] = DEFAULT_CALLDATA_FILL[f]
 *             else:
 */
      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_21); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_1 = (__pyx_t_9 != 0);
      if (__pyx_t_1) {

        /* "vcfnp.pyx":1012
 *                 fills[f] = '/'.join(['.'] * ploidy)
 *             elif f in DEFAULT_CALLDATA_FILL:
 *                 fills[f] = DEFAULT_CALLDATA_FILL[f]             # <<<<<<<<<<<<<<
 *             else:
 *                 vcf_type = formatTypes[f]
 */
        __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_21); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_6 = PyObject_GetItem(__pyx_t_3, __pyx_v_f); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (PyObject_SetItem(__pyx_v_fills, __pyx_v_f, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L32;
      }
      /*else*/ {

        /* "vcfnp.pyx":1014
 *                 fills[f] = DEFAULT_CALLDATA_FILL[f]
 *             else:
 *                 vcf_type = formatTypes[f]             # <<<<<<<<<<<<<<
 *                 fills[f] = DEFAULT_FILL_MAP[vcf_type]
 * 
 */
        __pyx_t_6 = PyObject_GetItem(__pyx_v_formatTypes, __pyx_v_f); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_XDECREF(__pyx_v_vcf_type);
        __pyx_v_vcf_type = __pyx_t_6;
        __pyx_t_6 = 0;

        /* "vcfnp.pyx":1015
 *             else:
 *                 vcf_type = formatTypes[f]
 *                 fills[f] = DEFAULT_FILL_MAP[vcf_type]             # <<<<<<<<<<<<<<
 * 
 *     # construct a numpy dtype for structured array cells
 */
        __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__DEFAULT_FILL_MAP); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_3 = PyObject_GetItem(__pyx_t_6, __pyx_v_vcf_type); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (PyObject_SetItem(__pyx_v_fills, __pyx_v_f, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __pyx_L32:;
      goto __pyx_L31;
    }
    __pyx_L31:;
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "vcfnp.pyx":1018
 * 
 *     # construct a numpy dtype for structured array cells
 *     cell_dtype = list()             # <<<<<<<<<<<<<<
 *     for f in fields:
 *         t = dtypes[f]
 */
  __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_v_cell_dtype = ((PyObject*)__pyx_t_8);
  __pyx_t_8 = 0;

  /* "vcfnp.pyx":1019
 *     # construct a numpy dtype for structured array cells
 *     cell_dtype = list()
 *     for f in fields:             # <<<<<<<<<<<<<<
 *         t = dtypes[f]
 *         n = arities[f]
 */
  if (PyList_CheckExact(__pyx_v_fields) || PyTuple_CheckExact(__pyx_v_fields)) {
    __pyx_t_8 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_8); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_fields); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = Py_TYPE(__pyx_t_8)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_8)) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_8)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_3 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_3 = PySequence_ITEM(__pyx_t_8, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_8)) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_3 = PySequence_ITEM(__pyx_t_8, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_3 = __pyx_t_5(__pyx_t_8);
      if (unlikely(!__pyx_t_3)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF(__pyx_v_f);
    __pyx_v_f = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "vcfnp.pyx":1020
 *     cell_dtype = list()
 *     for f in fields:
 *         t = dtypes[f]             # <<<<<<<<<<<<<<
 *         n = arities[f]
 *         if n == 1:
 */
    __pyx_t_3 = PyObject_GetItem(__pyx_v_dtypes, __pyx_v_f); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF(__pyx_v_t);
    __pyx_v_t = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "vcfnp.pyx":1021
 *     for f in fields:
 *         t = dtypes[f]
 *         n = arities[f]             # <<<<<<<<<<<<<<
 *         if n == 1:
 *             cell_dtype.append((f, t))
 */
    __pyx_t_3 = PyObject_GetItem(__pyx_v_arities, __pyx_v_f); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF(__pyx_v_n);
    __pyx_v_n = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "vcfnp.pyx":1022
 *         t = dtypes[f]
 *         n = arities[f]
 *         if n == 1:             # <<<<<<<<<<<<<<
 *             cell_dtype.append((f, t))
 *         else:
 */
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_n, __pyx_int_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {

      /* "vcfnp.pyx":1023
 *         n = arities[f]
 *         if n == 1:
 *             cell_dtype.append((f, t))             # <<<<<<<<<<<<<<
 *         else:
 *             cell_dtype.append((f, t, (n,)))
 */
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_f);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_f);
      __Pyx_GIVEREF(__pyx_v_f);
      __Pyx_INCREF(__pyx_v_t);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_t);
      __Pyx_GIVEREF(__pyx_v_t);
      __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_cell_dtype, ((PyObject *)__pyx_t_3)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      goto __pyx_L35;
    }
    /*else*/ {

      /* "vcfnp.pyx":1025
 *             cell_dtype.append((f, t))
 *         else:
 *             cell_dtype.append((f, t, (n,)))             # <<<<<<<<<<<<<<
 *     # construct a numpy dtype for structured array
 *     dtype = [(s, cell_dtype) for s in samples]
 */
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_n);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_n);
      __Pyx_GIVEREF(__pyx_v_n);
      __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_v_f);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_f);
      __Pyx_GIVEREF(__pyx_v_f);
      __Pyx_INCREF(__pyx_v_t);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_t);
      __Pyx_GIVEREF(__pyx_v_t);
      PyTuple_SET_ITEM(__pyx_t_6, 2, ((PyObject *)__pyx_t_3));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
      __pyx_t_3 = 0;
      __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_cell_dtype, ((PyObject *)__pyx_t_6)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    }
    __pyx_L35:;
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "vcfnp.pyx":1027
 *             cell_dtype.append((f, t, (n,)))
 *     # construct a numpy dtype for structured array
 *     dtype = [(s, cell_dtype) for s in samples]             # <<<<<<<<<<<<<<
 * 
 *     # set up iterator
 */
  __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyList_CheckExact(__pyx_v_samples) || PyTuple_CheckExact(__pyx_v_samples)) {
    __pyx_t_6 = __pyx_v_samples; __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_samples); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = Py_TYPE(__pyx_t_6)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_6)) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_6)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_3 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_6)) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_3 = __pyx_t_5(__pyx_t_6);
      if (unlikely(!__pyx_t_3)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF(__pyx_v_s);
    __pyx_v_s = __pyx_t_3;
    __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_s);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_s);
    __Pyx_GIVEREF(__pyx_v_s);
    __Pyx_INCREF(((PyObject *)__pyx_v_cell_dtype));
    PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_cell_dtype));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_cell_dtype));
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_8, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_dtype = ((PyObject*)__pyx_t_8);
  __pyx_t_8 = 0;

  /* "vcfnp.pyx":1030
 * 
 *     # set up iterator
 *     if condition is not None:             # <<<<<<<<<<<<<<
 *         it = _itercalldata_with_condition(filenames, region, samples, ploidy, fields, arities, fills, condition)
 *     else:
 */
  __pyx_t_1 = (__pyx_v_condition != Py_None);
  __pyx_t_9 = (__pyx_t_1 != 0);
  if (__pyx_t_9) {

    /* "vcfnp.pyx":1031
 *     # set up iterator
 *     if condition is not None:
 *         it = _itercalldata_with_condition(filenames, region, samples, ploidy, fields, arities, fills, condition)             # <<<<<<<<<<<<<<
 *     else:
 *         it = _itercalldata(filenames, region, samples, ploidy, fields, arities, fills)
 */
    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_22); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = PyTuple_New(8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_filenames);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_filenames);
    __Pyx_GIVEREF(__pyx_v_filenames);
    __Pyx_INCREF(__pyx_v_region);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_region);
    __Pyx_GIVEREF(__pyx_v_region);
    __Pyx_INCREF(__pyx_v_samples);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_samples);
    __Pyx_GIVEREF(__pyx_v_samples);
    __Pyx_INCREF(__pyx_v_ploidy);
    PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_v_ploidy);
    __Pyx_GIVEREF(__pyx_v_ploidy);
    __Pyx_INCREF(__pyx_v_fields);
    PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_v_fields);
    __Pyx_GIVEREF(__pyx_v_fields);
    __Pyx_INCREF(__pyx_v_arities);
    PyTuple_SET_ITEM(__pyx_t_6, 5, __pyx_v_arities);
    __Pyx_GIVEREF(__pyx_v_arities);
    __Pyx_INCREF(__pyx_v_fills);
    PyTuple_SET_ITEM(__pyx_t_6, 6, __pyx_v_fills);
    __Pyx_GIVEREF(__pyx_v_fills);
    __Pyx_INCREF(__pyx_v_condition);
    PyTuple_SET_ITEM(__pyx_t_6, 7, __pyx_v_condition);
    __Pyx_GIVEREF(__pyx_v_condition);
    __pyx_t_3 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    __pyx_v_it = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L38;
  }
  /*else*/ {

    /* "vcfnp.pyx":1033
 *         it = _itercalldata_with_condition(filenames, region, samples, ploidy, fields, arities, fills, condition)
 *     else:
 *         it = _itercalldata(filenames, region, samples, ploidy, fields, arities, fills)             # <<<<<<<<<<<<<<
 * 
 *     # slice?
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s___itercalldata); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = PyTuple_New(7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_filenames);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_filenames);
    __Pyx_GIVEREF(__pyx_v_filenames);
    __Pyx_INCREF(__pyx_v_region);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_region);
    __Pyx_GIVEREF(__pyx_v_region);
    __Pyx_INCREF(__pyx_v_samples);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_samples);
    __Pyx_GIVEREF(__pyx_v_samples);
    __Pyx_INCREF(__pyx_v_ploidy);
    PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_v_ploidy);
    __Pyx_GIVEREF(__pyx_v_ploidy);
    __Pyx_INCREF(__pyx_v_fields);
    PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_v_fields);
    __Pyx_GIVEREF(__pyx_v_fields);
    __Pyx_INCREF(__pyx_v_arities);
    PyTuple_SET_ITEM(__pyx_t_6, 5, __pyx_v_arities);
    __Pyx_GIVEREF(__pyx_v_arities);
    __Pyx_INCREF(__pyx_v_fills);
    PyTuple_SET_ITEM(__pyx_t_6, 6, __pyx_v_fills);
    __Pyx_GIVEREF(__pyx_v_fills);
    __pyx_t_8 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    __pyx_v_it = __pyx_t_8;
    __pyx_t_8 = 0;
  }
  __pyx_L38:;

  /* "vcfnp.pyx":1036
 * 
 *     # slice?
 *     if slice:             # <<<<<<<<<<<<<<
 *         it = islice(it, *slice)
 * 
 */
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_slice); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_9) {

    /* "vcfnp.pyx":1037
 *     # slice?
 *     if slice:
 *         it = islice(it, *slice)             # <<<<<<<<<<<<<<
 * 
 *     # build an array from the iterator
 */
    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__islice); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_it);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_it);
    __Pyx_GIVEREF(__pyx_v_it);
    __pyx_t_3 = PySequence_Tuple(__pyx_v_slice); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __pyx_t_7 = PyNumber_Add(((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_7));
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_v_it);
    __pyx_v_it = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L39;
  }
  __pyx_L39:;

  /* "vcfnp.pyx":1040
 * 
 *     # build an array from the iterator
 *     return _fromiter(it, dtype, count, progress, logstream)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s___fromiter); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = PyTuple_New(5); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_v_it);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_it);
  __Pyx_GIVEREF(__pyx_v_it);
  __Pyx_INCREF(((PyObject *)__pyx_v_dtype));
  PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_dtype));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_dtype));
  __Pyx_INCREF(__pyx_v_count);
  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_count);
  __Pyx_GIVEREF(__pyx_v_count);
  __Pyx_INCREF(__pyx_v_progress);
  PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_v_progress);
  __Pyx_GIVEREF(__pyx_v_progress);
  __Pyx_INCREF(__pyx_v_logstream);
  PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_v_logstream);
  __Pyx_GIVEREF(__pyx_v_logstream);
  __pyx_t_8 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("vcfnp.calldata", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_filenames);
  __Pyx_XDECREF(__pyx_v_fn);
  __Pyx_XDECREF((PyObject *)__pyx_v_vcf);
  __Pyx_XDECREF(__pyx_v_formatIds);
  __Pyx_XDECREF(__pyx_v_formatTypes);
  __Pyx_XDECREF(__pyx_v_formatCounts);
  __Pyx_XDECREF(__pyx_v_all_samples);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XDECREF(__pyx_v_f);
  __Pyx_XDECREF(__pyx_v_vcf_type);
  __Pyx_XDECREF(__pyx_v_vcf_count);
  __Pyx_XDECREF(__pyx_v_cell_dtype);
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_dtype);
  __Pyx_XDECREF(__pyx_v_it);
  __Pyx_XDECREF(__pyx_v_samples);
  __Pyx_XDECREF(__pyx_v_fields);
  __Pyx_XDECREF(__pyx_v_dtypes);
  __Pyx_XDECREF(__pyx_v_arities);
  __Pyx_XDECREF(__pyx_v_fills);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_5vcfnp_25generator5(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_24_itercalldata(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_5vcfnp_24_itercalldata = {__Pyx_NAMESTR("_itercalldata"), (PyCFunction)__pyx_pw_5vcfnp_24_itercalldata, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_5vcfnp_24_itercalldata(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_filenames = 0;
  PyObject *__pyx_v_region = 0;
  std::vector<std::string> __pyx_v_samples;
  int __pyx_v_ploidy;
  std::vector<std::string> __pyx_v_fields;
  std::map<std::string,int> __pyx_v_arities;
  PyObject *__pyx_v_fills = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_itercalldata (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__filenames,&__pyx_n_s__region,&__pyx_n_s__samples,&__pyx_n_s__ploidy,&__pyx_n_s__fields,&__pyx_n_s__arities,&__pyx_n_s__fills,0};
    PyObject* values[7] = {0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filenames)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__region)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_itercalldata", 1, 7, 7, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__samples)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_itercalldata", 1, 7, 7, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ploidy)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_itercalldata", 1, 7, 7, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fields)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_itercalldata", 1, 7, 7, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arities)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_itercalldata", 1, 7, 7, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  6:
        if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fills)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_itercalldata", 1, 7, 7, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_itercalldata") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
      values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
    }
    __pyx_v_filenames = values[0];
    __pyx_v_region = values[1];
    __pyx_v_samples = __pyx_convert_vector_from_py_std_3a__3a_string(values[2]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_ploidy = __Pyx_PyInt_AsInt(values[3]); if (unlikely((__pyx_v_ploidy == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_fields = __pyx_convert_vector_from_py_std_3a__3a_string(values[4]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_arities = __pyx_convert_map_from_py_std_3a__3a_string____int(values[5]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_fills = ((PyObject*)values[6]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_itercalldata", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vcfnp._itercalldata", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fills), (&PyDict_Type), 1, "fills", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vcfnp_23_itercalldata(__pyx_self, __pyx_v_filenames, __pyx_v_region, __pyx_v_samples, __pyx_v_ploidy, __pyx_v_fields, __pyx_v_arities, __pyx_v_fills);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":1044
 * 
 * 
 * def _itercalldata(filenames,             # <<<<<<<<<<<<<<
 *                   region,
 *                   vector[string] samples,
 */

static PyObject *__pyx_pf_5vcfnp_23_itercalldata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filenames, PyObject *__pyx_v_region, std::vector<std::string> __pyx_v_samples, int __pyx_v_ploidy, std::vector<std::string> __pyx_v_fields, std::map<std::string,int> __pyx_v_arities, PyObject *__pyx_v_fills) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_5__itercalldata *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_itercalldata", 0);
  __pyx_cur_scope = (struct __pyx_obj_5vcfnp___pyx_scope_struct_5__itercalldata *)__pyx_tp_new_5vcfnp___pyx_scope_struct_5__itercalldata(__pyx_ptype_5vcfnp___pyx_scope_struct_5__itercalldata, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_filenames = __pyx_v_filenames;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_filenames);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_filenames);
  __pyx_cur_scope->__pyx_v_region = __pyx_v_region;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_region);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_region);
  __pyx_cur_scope->__pyx_v_samples = __pyx_v_samples;
  __pyx_cur_scope->__pyx_v_ploidy = __pyx_v_ploidy;
  __pyx_cur_scope->__pyx_v_fields = __pyx_v_fields;
  __pyx_cur_scope->__pyx_v_arities = __pyx_v_arities;
  __pyx_cur_scope->__pyx_v_fills = __pyx_v_fills;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fills);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fills);
  {
    __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5vcfnp_25generator5, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("vcfnp._itercalldata", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_5vcfnp_25generator5(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5vcfnp___pyx_scope_struct_5__itercalldata *__pyx_cur_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_5__itercalldata *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  vcf::VariantCallFile *__pyx_t_5;
  std::string __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L9_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":1054
 *     cdef Variant *var
 * 
 *     for current_filename in filenames:             # <<<<<<<<<<<<<<
 *         variantFile = new VariantCallFile()
 *         variantFile.open(current_filename)
 */
  if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_filenames) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_filenames)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_filenames; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_filenames); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) {
      if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) {
      if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_current_filename);
    __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_current_filename);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_cur_scope->__pyx_v_current_filename = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "vcfnp.pyx":1055
 * 
 *     for current_filename in filenames:
 *         variantFile = new VariantCallFile()             # <<<<<<<<<<<<<<
 *         variantFile.open(current_filename)
 *         variantFile.parseSamples = True
 */
    try {
      __pyx_t_5 = new vcf::VariantCallFile();
    } catch(...) {
      __Pyx_CppExn2PyErr();
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_cur_scope->__pyx_v_variantFile = __pyx_t_5;

    /* "vcfnp.pyx":1056
 *     for current_filename in filenames:
 *         variantFile = new VariantCallFile()
 *         variantFile.open(current_filename)             # <<<<<<<<<<<<<<
 *         variantFile.parseSamples = True
 *         if region is not None:
 */
    __pyx_t_6 = __pyx_convert_string_from_py_(__pyx_cur_scope->__pyx_v_current_filename); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_cur_scope->__pyx_v_variantFile->open(__pyx_t_6);

    /* "vcfnp.pyx":1057
 *         variantFile = new VariantCallFile()
 *         variantFile.open(current_filename)
 *         variantFile.parseSamples = True             # <<<<<<<<<<<<<<
 *         if region is not None:
 *             variantFile.setRegion(region)
 */
    __pyx_cur_scope->__pyx_v_variantFile->parseSamples = 1;

    /* "vcfnp.pyx":1058
 *         variantFile.open(current_filename)
 *         variantFile.parseSamples = True
 *         if region is not None:             # <<<<<<<<<<<<<<
 *             variantFile.setRegion(region)
 *         var = new Variant(deref(variantFile))
 */
    __pyx_t_7 = (__pyx_cur_scope->__pyx_v_region != Py_None);
    __pyx_t_8 = (__pyx_t_7 != 0);
    if (__pyx_t_8) {

      /* "vcfnp.pyx":1059
 *         variantFile.parseSamples = True
 *         if region is not None:
 *             variantFile.setRegion(region)             # <<<<<<<<<<<<<<
 *         var = new Variant(deref(variantFile))
 * 
 */
      __pyx_t_6 = __pyx_convert_string_from_py_(__pyx_cur_scope->__pyx_v_region); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_cur_scope->__pyx_v_variantFile->setRegion(__pyx_t_6);
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "vcfnp.pyx":1060
 *         if region is not None:
 *             variantFile.setRegion(region)
 *         var = new Variant(deref(variantFile))             # <<<<<<<<<<<<<<
 * 
 *         while _get_next_variant(variantFile, var):
 */
    __pyx_cur_scope->__pyx_v_var = new vcf::Variant((*__pyx_cur_scope->__pyx_v_variantFile));

    /* "vcfnp.pyx":1062
 *         var = new Variant(deref(variantFile))
 * 
 *         while _get_next_variant(variantFile, var):             # <<<<<<<<<<<<<<
 *             yield _mkssvals(var, samples, ploidy, fields, arities, fills, variantFile.formatTypes)
 *     #        out = [_mksvals(var, s, ploidy, fields, arities, fills, variantFile.formatTypes) for s in samples]
 */
    while (1) {
      __pyx_t_8 = (__pyx_f_5vcfnp__get_next_variant(__pyx_cur_scope->__pyx_v_variantFile, __pyx_cur_scope->__pyx_v_var) != 0);
      if (!__pyx_t_8) break;

      /* "vcfnp.pyx":1063
 * 
 *         while _get_next_variant(variantFile, var):
 *             yield _mkssvals(var, samples, ploidy, fields, arities, fills, variantFile.formatTypes)             # <<<<<<<<<<<<<<
 *     #        out = [_mksvals(var, s, ploidy, fields, arities, fills, variantFile.formatTypes) for s in samples]
 *     #        yield tuple(out)
 */
      __pyx_t_4 = __pyx_f_5vcfnp__mkssvals(__pyx_cur_scope->__pyx_v_var, __pyx_cur_scope->__pyx_v_samples, __pyx_cur_scope->__pyx_v_ploidy, __pyx_cur_scope->__pyx_v_fields, __pyx_cur_scope->__pyx_v_arities, __pyx_cur_scope->__pyx_v_fills, __pyx_cur_scope->__pyx_v_variantFile->formatTypes); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      __Pyx_XGIVEREF(__pyx_t_1);
      __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
      __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
      __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      /* return from generator, yielding value */
      __pyx_generator->resume_label = 1;
      return __pyx_r;
      __pyx_L9_resume_from_yield:;
      __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
      __pyx_cur_scope->__pyx_t_0 = 0;
      __Pyx_XGOTREF(__pyx_t_1);
      __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
      __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
      if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }

    /* "vcfnp.pyx":1067
 *     #        yield tuple(out)
 * 
 *         del variantFile             # <<<<<<<<<<<<<<
 *         del var
 * 
 */
    delete __pyx_cur_scope->__pyx_v_variantFile;

    /* "vcfnp.pyx":1068
 * 
 *         del variantFile
 *         del var             # <<<<<<<<<<<<<<
 * 
 * 
 */
    delete __pyx_cur_scope->__pyx_v_var;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("_itercalldata", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_generator->resume_label = -1;
  __Pyx_Generator_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return NULL;
}
static PyObject *__pyx_gb_5vcfnp_28generator6(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_27_itercalldata_with_condition(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_5vcfnp_27_itercalldata_with_condition = {__Pyx_NAMESTR("_itercalldata_with_condition"), (PyCFunction)__pyx_pw_5vcfnp_27_itercalldata_with_condition, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_5vcfnp_27_itercalldata_with_condition(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_filenames = 0;
  PyObject *__pyx_v_region = 0;
  std::vector<std::string> __pyx_v_samples;
  int __pyx_v_ploidy;
  std::vector<std::string> __pyx_v_fields;
  std::map<std::string,int> __pyx_v_arities;
  PyObject *__pyx_v_fills = 0;
  PyObject *__pyx_v_condition = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_itercalldata_with_condition (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__filenames,&__pyx_n_s__region,&__pyx_n_s__samples,&__pyx_n_s__ploidy,&__pyx_n_s__fields,&__pyx_n_s__arities,&__pyx_n_s__fills,&__pyx_n_s__condition,0};
    PyObject* values[8] = {0,0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filenames)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__region)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_itercalldata_with_condition", 1, 8, 8, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__samples)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_itercalldata_with_condition", 1, 8, 8, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ploidy)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_itercalldata_with_condition", 1, 8, 8, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fields)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_itercalldata_with_condition", 1, 8, 8, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arities)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_itercalldata_with_condition", 1, 8, 8, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  6:
        if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fills)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_itercalldata_with_condition", 1, 8, 8, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  7:
        if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__condition)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_itercalldata_with_condition", 1, 8, 8, 7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_itercalldata_with_condition") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 8) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
      values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
      values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
    }
    __pyx_v_filenames = values[0];
    __pyx_v_region = values[1];
    __pyx_v_samples = __pyx_convert_vector_from_py_std_3a__3a_string(values[2]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_ploidy = __Pyx_PyInt_AsInt(values[3]); if (unlikely((__pyx_v_ploidy == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_fields = __pyx_convert_vector_from_py_std_3a__3a_string(values[4]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_arities = __pyx_convert_map_from_py_std_3a__3a_string____int(values[5]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_fills = ((PyObject*)values[6]);
    __pyx_v_condition = values[7];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_itercalldata_with_condition", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vcfnp._itercalldata_with_condition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fills), (&PyDict_Type), 1, "fills", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vcfnp_26_itercalldata_with_condition(__pyx_self, __pyx_v_filenames, __pyx_v_region, __pyx_v_samples, __pyx_v_ploidy, __pyx_v_fields, __pyx_v_arities, __pyx_v_fills, __pyx_v_condition);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":1071
 * 
 * 
 * def _itercalldata_with_condition(filenames,             # <<<<<<<<<<<<<<
 *                                  region,
 *                                  vector[string] samples,
 */

static PyObject *__pyx_pf_5vcfnp_26_itercalldata_with_condition(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filenames, PyObject *__pyx_v_region, std::vector<std::string> __pyx_v_samples, int __pyx_v_ploidy, std::vector<std::string> __pyx_v_fields, std::map<std::string,int> __pyx_v_arities, PyObject *__pyx_v_fills, PyObject *__pyx_v_condition) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_itercalldata_with_condition", 0);
  __pyx_cur_scope = (struct __pyx_obj_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition *)__pyx_tp_new_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition(__pyx_ptype_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_filenames = __pyx_v_filenames;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_filenames);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_filenames);
  __pyx_cur_scope->__pyx_v_region = __pyx_v_region;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_region);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_region);
  __pyx_cur_scope->__pyx_v_samples = __pyx_v_samples;
  __pyx_cur_scope->__pyx_v_ploidy = __pyx_v_ploidy;
  __pyx_cur_scope->__pyx_v_fields = __pyx_v_fields;
  __pyx_cur_scope->__pyx_v_arities = __pyx_v_arities;
  __pyx_cur_scope->__pyx_v_fills = __pyx_v_fills;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fills);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fills);
  __pyx_cur_scope->__pyx_v_condition = __pyx_v_condition;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_condition);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_condition);
  {
    __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5vcfnp_28generator6, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("vcfnp._itercalldata_with_condition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_5vcfnp_28generator6(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition *__pyx_cur_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  vcf::VariantCallFile *__pyx_t_5;
  std::string __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L11_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":1082
 *     cdef VariantCallFile *variantFile
 *     cdef Variant *var
 *     cdef int i = 0             # <<<<<<<<<<<<<<
 *     cdef int n = len(condition)
 * 
 */
  __pyx_cur_scope->__pyx_v_i = 0;

  /* "vcfnp.pyx":1083
 *     cdef Variant *var
 *     cdef int i = 0
 *     cdef int n = len(condition)             # <<<<<<<<<<<<<<
 * 
 *     for current_filename in filenames:
 */
  __pyx_t_1 = PyObject_Length(__pyx_cur_scope->__pyx_v_condition); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_cur_scope->__pyx_v_n = __pyx_t_1;

  /* "vcfnp.pyx":1085
 *     cdef int n = len(condition)
 * 
 *     for current_filename in filenames:             # <<<<<<<<<<<<<<
 *         variantFile = new VariantCallFile()
 *         variantFile.open(current_filename)
 */
  if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_filenames) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_filenames)) {
    __pyx_t_2 = __pyx_cur_scope->__pyx_v_filenames; __Pyx_INCREF(__pyx_t_2); __pyx_t_1 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_1 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_filenames); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = Py_TYPE(__pyx_t_2)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_2)) {
      if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_4); __pyx_t_1++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_2)) {
      if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_4); __pyx_t_1++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_2);
      if (unlikely(!__pyx_t_4)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_current_filename);
    __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_current_filename);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_cur_scope->__pyx_v_current_filename = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "vcfnp.pyx":1086
 * 
 *     for current_filename in filenames:
 *         variantFile = new VariantCallFile()             # <<<<<<<<<<<<<<
 *         variantFile.open(current_filename)
 *         variantFile.parseSamples = False
 */
    try {
      __pyx_t_5 = new vcf::VariantCallFile();
    } catch(...) {
      __Pyx_CppExn2PyErr();
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_cur_scope->__pyx_v_variantFile = __pyx_t_5;

    /* "vcfnp.pyx":1087
 *     for current_filename in filenames:
 *         variantFile = new VariantCallFile()
 *         variantFile.open(current_filename)             # <<<<<<<<<<<<<<
 *         variantFile.parseSamples = False
 *         if region is not None:
 */
    __pyx_t_6 = __pyx_convert_string_from_py_(__pyx_cur_scope->__pyx_v_current_filename); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_cur_scope->__pyx_v_variantFile->open(__pyx_t_6);

    /* "vcfnp.pyx":1088
 *         variantFile = new VariantCallFile()
 *         variantFile.open(current_filename)
 *         variantFile.parseSamples = False             # <<<<<<<<<<<<<<
 *         if region is not None:
 *             variantFile.setRegion(region)
 */
    __pyx_cur_scope->__pyx_v_variantFile->parseSamples = 0;

    /* "vcfnp.pyx":1089
 *         variantFile.open(current_filename)
 *         variantFile.parseSamples = False
 *         if region is not None:             # <<<<<<<<<<<<<<
 *             variantFile.setRegion(region)
 *         var = new Variant(deref(variantFile))
 */
    __pyx_t_7 = (__pyx_cur_scope->__pyx_v_region != Py_None);
    __pyx_t_8 = (__pyx_t_7 != 0);
    if (__pyx_t_8) {

      /* "vcfnp.pyx":1090
 *         variantFile.parseSamples = False
 *         if region is not None:
 *             variantFile.setRegion(region)             # <<<<<<<<<<<<<<
 *         var = new Variant(deref(variantFile))
 * 
 */
      __pyx_t_6 = __pyx_convert_string_from_py_(__pyx_cur_scope->__pyx_v_region); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_cur_scope->__pyx_v_variantFile->setRegion(__pyx_t_6);
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "vcfnp.pyx":1091
 *         if region is not None:
 *             variantFile.setRegion(region)
 *         var = new Variant(deref(variantFile))             # <<<<<<<<<<<<<<
 * 
 *         while i < n:
 */
    __pyx_cur_scope->__pyx_v_var = new vcf::Variant((*__pyx_cur_scope->__pyx_v_variantFile));

    /* "vcfnp.pyx":1093
 *         var = new Variant(deref(variantFile))
 * 
 *         while i < n:             # <<<<<<<<<<<<<<
 *             # only both parsing samples if we know we want the variant
 *             if condition[i]:
 */
    while (1) {
      __pyx_t_8 = ((__pyx_cur_scope->__pyx_v_i < __pyx_cur_scope->__pyx_v_n) != 0);
      if (!__pyx_t_8) break;

      /* "vcfnp.pyx":1095
 *         while i < n:
 *             # only both parsing samples if we know we want the variant
 *             if condition[i]:             # <<<<<<<<<<<<<<
 *                 variantFile.parseSamples = True
 *                 if not _get_next_variant(variantFile, var):
 */
      __pyx_t_4 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_condition, __pyx_cur_scope->__pyx_v_i, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_8) {

        /* "vcfnp.pyx":1096
 *             # only both parsing samples if we know we want the variant
 *             if condition[i]:
 *                 variantFile.parseSamples = True             # <<<<<<<<<<<<<<
 *                 if not _get_next_variant(variantFile, var):
 *                     break
 */
        __pyx_cur_scope->__pyx_v_variantFile->parseSamples = 1;

        /* "vcfnp.pyx":1097
 *             if condition[i]:
 *                 variantFile.parseSamples = True
 *                 if not _get_next_variant(variantFile, var):             # <<<<<<<<<<<<<<
 *                     break
 *                 yield _mkssvals(var, samples, ploidy, fields, arities, fills, variantFile.formatTypes)
 */
        __pyx_t_8 = ((!(__pyx_f_5vcfnp__get_next_variant(__pyx_cur_scope->__pyx_v_variantFile, __pyx_cur_scope->__pyx_v_var) != 0)) != 0);
        if (__pyx_t_8) {

          /* "vcfnp.pyx":1098
 *                 variantFile.parseSamples = True
 *                 if not _get_next_variant(variantFile, var):
 *                     break             # <<<<<<<<<<<<<<
 *                 yield _mkssvals(var, samples, ploidy, fields, arities, fills, variantFile.formatTypes)
 *             else:
 */
          goto __pyx_L8_break;
          goto __pyx_L10;
        }
        __pyx_L10:;

        /* "vcfnp.pyx":1099
 *                 if not _get_next_variant(variantFile, var):
 *                     break
 *                 yield _mkssvals(var, samples, ploidy, fields, arities, fills, variantFile.formatTypes)             # <<<<<<<<<<<<<<
 *             else:
 *                 variantFile.parseSamples = False
 */
        __pyx_t_4 = __pyx_f_5vcfnp__mkssvals(__pyx_cur_scope->__pyx_v_var, __pyx_cur_scope->__pyx_v_samples, __pyx_cur_scope->__pyx_v_ploidy, __pyx_cur_scope->__pyx_v_fields, __pyx_cur_scope->__pyx_v_arities, __pyx_cur_scope->__pyx_v_fills, __pyx_cur_scope->__pyx_v_variantFile->formatTypes); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_r = __pyx_t_4;
        __pyx_t_4 = 0;
        __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
        __Pyx_XGIVEREF(__pyx_t_2);
        __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
        __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
        __Pyx_XGIVEREF(__pyx_r);
        __Pyx_RefNannyFinishContext();
        /* return from generator, yielding value */
        __pyx_generator->resume_label = 1;
        return __pyx_r;
        __pyx_L11_resume_from_yield:;
        __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
        __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
        __pyx_cur_scope->__pyx_t_1 = 0;
        __Pyx_XGOTREF(__pyx_t_2);
        __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
        if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L9;
      }
      /*else*/ {

        /* "vcfnp.pyx":1101
 *                 yield _mkssvals(var, samples, ploidy, fields, arities, fills, variantFile.formatTypes)
 *             else:
 *                 variantFile.parseSamples = False             # <<<<<<<<<<<<<<
 *                 if not _get_next_variant(variantFile, var):
 *                     break
 */
        __pyx_cur_scope->__pyx_v_variantFile->parseSamples = 0;

        /* "vcfnp.pyx":1102
 *             else:
 *                 variantFile.parseSamples = False
 *                 if not _get_next_variant(variantFile, var):             # <<<<<<<<<<<<<<
 *                     break
 *             i += 1
 */
        __pyx_t_8 = ((!(__pyx_f_5vcfnp__get_next_variant(__pyx_cur_scope->__pyx_v_variantFile, __pyx_cur_scope->__pyx_v_var) != 0)) != 0);
        if (__pyx_t_8) {

          /* "vcfnp.pyx":1103
 *                 variantFile.parseSamples = False
 *                 if not _get_next_variant(variantFile, var):
 *                     break             # <<<<<<<<<<<<<<
 *             i += 1
 *     #        out = [_mksvals(var, s, ploidy, fields, arities, fills, variantFile.formatTypes) for s in samples]
 */
          goto __pyx_L8_break;
          goto __pyx_L12;
        }
        __pyx_L12:;
      }
      __pyx_L9:;

      /* "vcfnp.pyx":1104
 *                 if not _get_next_variant(variantFile, var):
 *                     break
 *             i += 1             # <<<<<<<<<<<<<<
 *     #        out = [_mksvals(var, s, ploidy, fields, arities, fills, variantFile.formatTypes) for s in samples]
 *     #        yield tuple(out)
 */
      __pyx_cur_scope->__pyx_v_i = (__pyx_cur_scope->__pyx_v_i + 1);
    }
    __pyx_L8_break:;

    /* "vcfnp.pyx":1108
 *     #        yield tuple(out)
 * 
 *         del variantFile             # <<<<<<<<<<<<<<
 *         del var
 * 
 */
    delete __pyx_cur_scope->__pyx_v_variantFile;

    /* "vcfnp.pyx":1109
 * 
 *         del variantFile
 *         del var             # <<<<<<<<<<<<<<
 * 
 * 
 */
    delete __pyx_cur_scope->__pyx_v_var;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("_itercalldata_with_condition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_generator->resume_label = -1;
  __Pyx_Generator_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return NULL;
}

/* "vcfnp.pyx":1112
 * 
 * 
 * cdef inline object _mkssvals(Variant *var,             # <<<<<<<<<<<<<<
 *                              vector[string] samples,
 *                              int ploidy,
 */

static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkssvals(vcf::Variant *__pyx_v_var, std::vector<std::string> __pyx_v_samples, int __pyx_v_ploidy, std::vector<std::string> __pyx_v_fields, std::map<std::string,int> __pyx_v_arities, PyObject *__pyx_v_fills, std::map<std::string,enum vcf::VariantFieldType> &__pyx_v_formatTypes) {
  PyObject *__pyx_v_out = NULL;
  std::string __pyx_v_s;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  std::vector<std::string>::iterator __pyx_t_2;
  std::string __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_mkssvals", 0);

  /* "vcfnp.pyx":1119
 *                              dict fills,
 *                              map[string, VariantFieldType]& formatTypes):
 *     out = [_mksvals(var, s, ploidy, fields, arities, fills, formatTypes) for s in samples]             # <<<<<<<<<<<<<<
 *     return tuple(out)
 * 
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_v_samples.begin();
  for (;;) {
    if (!(__pyx_t_2 != __pyx_v_samples.end())) break;
    __pyx_t_3 = *__pyx_t_2;
    ++__pyx_t_2;
    __pyx_v_s = __pyx_t_3;
    __pyx_t_4 = __pyx_f_5vcfnp__mksvals(__pyx_v_var, __pyx_v_s, __pyx_v_ploidy, __pyx_v_fields, __pyx_v_arities, __pyx_v_fills, __pyx_v_formatTypes); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "vcfnp.pyx":1120
 *                              map[string, VariantFieldType]& formatTypes):
 *     out = [_mksvals(var, s, ploidy, fields, arities, fills, formatTypes) for s in samples]
 *     return tuple(out)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)PyList_AsTuple(__pyx_v_out)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("vcfnp._mkssvals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":1124
 * 
 * 
 * cdef inline object _mksvals(Variant *var,             # <<<<<<<<<<<<<<
 *                             string sample,
 *                             int ploidy,
 */

static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mksvals(vcf::Variant *__pyx_v_var, std::string __pyx_v_sample, int __pyx_v_ploidy, std::vector<std::string> __pyx_v_fields, std::map<std::string,int> __pyx_v_arities, PyObject *__pyx_v_fills, std::map<std::string,enum vcf::VariantFieldType> &__pyx_v_formatTypes) {
  PyObject *__pyx_v_out = NULL;
  std::string __pyx_v_f;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  std::vector<std::string>::iterator __pyx_t_2;
  std::string __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_mksvals", 0);

  /* "vcfnp.pyx":1131
 *                             dict fills,
 *                             map[string, VariantFieldType]& formatTypes):
 *     out = [_mksval(var.samples[sample], ploidy, f, arities[f], fills[f], formatTypes) for f in fields]             # <<<<<<<<<<<<<<
 *     return tuple(out)
 * 
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_v_fields.begin();
  for (;;) {
    if (!(__pyx_t_2 != __pyx_v_fields.end())) break;
    __pyx_t_3 = *__pyx_t_2;
    ++__pyx_t_2;
    __pyx_v_f = __pyx_t_3;
    if (unlikely(((PyObject *)__pyx_v_fills) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = __pyx_convert_string_to_py_(__pyx_v_f); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
    __pyx_t_5 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_fills), ((PyObject *)__pyx_t_4)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __pyx_t_4 = __pyx_f_5vcfnp__mksval((__pyx_v_var->samples[__pyx_v_sample]), __pyx_v_ploidy, __pyx_v_f, (__pyx_v_arities[__pyx_v_f]), __pyx_t_5, __pyx_v_formatTypes); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "vcfnp.pyx":1132
 *                             map[string, VariantFieldType]& formatTypes):
 *     out = [_mksval(var.samples[sample], ploidy, f, arities[f], fills[f], formatTypes) for f in fields]
 *     return tuple(out)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)PyList_AsTuple(__pyx_v_out)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vcfnp._mksvals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":1136
 * 
 * 
 * cdef inline object _mksval(map[string, vector[string]]& sample_data,             # <<<<<<<<<<<<<<
 *                            int ploidy,
 *                            string field,
 */

static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mksval(std::map<std::string,std::vector<std::string> > &__pyx_v_sample_data, int __pyx_v_ploidy, std::string __pyx_v_field, int __pyx_v_arity, PyObject *__pyx_v_fill, std::map<std::string,enum vcf::VariantFieldType> &__pyx_v_formatTypes) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_mksval", 0);

  /* "vcfnp.pyx":1142
 *                            object fill,
 *                            map[string, VariantFieldType]& formatTypes):
 *     if field == FIELD_NAME_IS_CALLED:             # <<<<<<<<<<<<<<
 *         return _is_called(sample_data)
 *     elif field == FIELD_NAME_IS_PHASED:
 */
  __pyx_t_1 = ((__pyx_v_field == __pyx_v_5vcfnp_FIELD_NAME_IS_CALLED) != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":1143
 *                            map[string, VariantFieldType]& formatTypes):
 *     if field == FIELD_NAME_IS_CALLED:
 *         return _is_called(sample_data)             # <<<<<<<<<<<<<<
 *     elif field == FIELD_NAME_IS_PHASED:
 *         return _is_phased(sample_data)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_f_5vcfnp__is_called(__pyx_v_sample_data)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "vcfnp.pyx":1144
 *     if field == FIELD_NAME_IS_CALLED:
 *         return _is_called(sample_data)
 *     elif field == FIELD_NAME_IS_PHASED:             # <<<<<<<<<<<<<<
 *         return _is_phased(sample_data)
 *     elif field == FIELD_NAME_GENOTYPE:
 */
  __pyx_t_1 = ((__pyx_v_field == __pyx_v_5vcfnp_FIELD_NAME_IS_PHASED) != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":1145
 *         return _is_called(sample_data)
 *     elif field == FIELD_NAME_IS_PHASED:
 *         return _is_phased(sample_data)             # <<<<<<<<<<<<<<
 *     elif field == FIELD_NAME_GENOTYPE:
 *         return _genotype(sample_data, ploidy)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_f_5vcfnp__is_phased(__pyx_v_sample_data)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "vcfnp.pyx":1146
 *     elif field == FIELD_NAME_IS_PHASED:
 *         return _is_phased(sample_data)
 *     elif field == FIELD_NAME_GENOTYPE:             # <<<<<<<<<<<<<<
 *         return _genotype(sample_data, ploidy)
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_field == __pyx_v_5vcfnp_FIELD_NAME_GENOTYPE) != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":1147
 *         return _is_phased(sample_data)
 *     elif field == FIELD_NAME_GENOTYPE:
 *         return _genotype(sample_data, ploidy)             # <<<<<<<<<<<<<<
 *     else:
 *         return _mkval(sample_data[field], arity, fill, formatTypes[field])
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_5vcfnp__genotype(__pyx_v_sample_data, __pyx_v_ploidy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "vcfnp.pyx":1149
 *         return _genotype(sample_data, ploidy)
 *     else:
 *         return _mkval(sample_data[field], arity, fill, formatTypes[field])             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_5vcfnp__mkval((__pyx_v_sample_data[__pyx_v_field]), __pyx_v_arity, __pyx_v_fill, (__pyx_v_formatTypes[__pyx_v_field])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vcfnp._mksval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":1153
 * 
 * 
 * cdef inline bool _is_called(map[string, vector[string]]& sample_data):             # <<<<<<<<<<<<<<
 *     cdef vector[string] *gts
 *     gts = &sample_data[FIELD_NAME_GT]
 */

static CYTHON_INLINE bool __pyx_f_5vcfnp__is_called(std::map<std::string,std::vector<std::string> > &__pyx_v_sample_data) {
  std::vector<std::string> *__pyx_v_gts;
  bool __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  std::string __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_is_called", 0);

  /* "vcfnp.pyx":1155
 * cdef inline bool _is_called(map[string, vector[string]]& sample_data):
 *     cdef vector[string] *gts
 *     gts = &sample_data[FIELD_NAME_GT]             # <<<<<<<<<<<<<<
 *     if gts.size() == 0:
 *         return False
 */
  __pyx_v_gts = (&(__pyx_v_sample_data[__pyx_v_5vcfnp_FIELD_NAME_GT]));

  /* "vcfnp.pyx":1156
 *     cdef vector[string] *gts
 *     gts = &sample_data[FIELD_NAME_GT]
 *     if gts.size() == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_gts->size() == 0) != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":1157
 *     gts = &sample_data[FIELD_NAME_GT]
 *     if gts.size() == 0:
 *         return False             # <<<<<<<<<<<<<<
 *     else:
 *         return (gts.at(0).find('.') == npos)
 */
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "vcfnp.pyx":1159
 *         return False
 *     else:
 *         return (gts.at(0).find('.') == npos)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_2 = __pyx_convert_string_from_py_(((PyObject *)__pyx_kp_b_20)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_r = (__pyx_v_gts->at(0).find(__pyx_t_2) == __pyx_v_5vcfnp_npos);
    goto __pyx_L0;
  }
  __pyx_L3:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("vcfnp._is_called", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":1162
 * 
 * 
 * cdef inline bool _is_phased(map[string, vector[string]]& sample_data):             # <<<<<<<<<<<<<<
 *     cdef vector[string] *gts
 *     gts = &sample_data[FIELD_NAME_GT]
 */

static CYTHON_INLINE bool __pyx_f_5vcfnp__is_phased(std::map<std::string,std::vector<std::string> > &__pyx_v_sample_data) {
  std::vector<std::string> *__pyx_v_gts;
  bool __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  std::string __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_is_phased", 0);

  /* "vcfnp.pyx":1164
 * cdef inline bool _is_phased(map[string, vector[string]]& sample_data):
 *     cdef vector[string] *gts
 *     gts = &sample_data[FIELD_NAME_GT]             # <<<<<<<<<<<<<<
 *     if gts.size() == 0:
 *         return False
 */
  __pyx_v_gts = (&(__pyx_v_sample_data[__pyx_v_5vcfnp_FIELD_NAME_GT]));

  /* "vcfnp.pyx":1165
 *     cdef vector[string] *gts
 *     gts = &sample_data[FIELD_NAME_GT]
 *     if gts.size() == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_gts->size() == 0) != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":1166
 *     gts = &sample_data[FIELD_NAME_GT]
 *     if gts.size() == 0:
 *         return False             # <<<<<<<<<<<<<<
 *     else:
 *         return (gts.at(0).find('|') != npos)
 */
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "vcfnp.pyx":1168
 *         return False
 *     else:
 *         return (gts.at(0).find('|') != npos)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_2 = __pyx_convert_string_from_py_(((PyObject *)__pyx_kp_b_23)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_r = (__pyx_v_gts->at(0).find(__pyx_t_2) != __pyx_v_5vcfnp_npos);
    goto __pyx_L0;
  }
  __pyx_L3:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("vcfnp._is_phased", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":1171
 * 
 * 
 * cdef inline object _genotype(map[string, vector[string]]& sample_data, int ploidy):             # <<<<<<<<<<<<<<
 *     cdef vector[string] *gts
 *     cdef vector[int] alleles
 */

static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__genotype(std::map<std::string,std::vector<std::string> > &__pyx_v_sample_data, int __pyx_v_ploidy) {
  std::vector<std::string> *__pyx_v_gts;
  std::vector<int> __pyx_v_alleles;
  std::vector<std::string> __pyx_v_allele_strings;
  int __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_genotype", 0);

  /* "vcfnp.pyx":1177
 *     cdef int i
 *     cdef int allele
 *     gts = &sample_data[FIELD_NAME_GT]             # <<<<<<<<<<<<<<
 *     if gts.size() == 0:
 *         if ploidy == 1:
 */
  __pyx_v_gts = (&(__pyx_v_sample_data[__pyx_v_5vcfnp_FIELD_NAME_GT]));

  /* "vcfnp.pyx":1178
 *     cdef int allele
 *     gts = &sample_data[FIELD_NAME_GT]
 *     if gts.size() == 0:             # <<<<<<<<<<<<<<
 *         if ploidy == 1:
 *             return -1
 */
  __pyx_t_1 = ((__pyx_v_gts->size() == 0) != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":1179
 *     gts = &sample_data[FIELD_NAME_GT]
 *     if gts.size() == 0:
 *         if ploidy == 1:             # <<<<<<<<<<<<<<
 *             return -1
 *         else:
 */
    __pyx_t_1 = ((__pyx_v_ploidy == 1) != 0);
    if (__pyx_t_1) {

      /* "vcfnp.pyx":1180
 *     if gts.size() == 0:
 *         if ploidy == 1:
 *             return -1             # <<<<<<<<<<<<<<
 *         else:
 *             return (-1,) * ploidy
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_int_neg_1);
      __pyx_r = __pyx_int_neg_1;
      goto __pyx_L0;
      goto __pyx_L4;
    }
    /*else*/ {

      /* "vcfnp.pyx":1182
 *             return -1
 *         else:
 *             return (-1,) * ploidy             # <<<<<<<<<<<<<<
 *     else:
 *         split(gts.at(0), GT_DELIMS, allele_strings)
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyInt_FromLong(__pyx_v_ploidy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyNumber_Multiply(__pyx_k_tuple_24, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = ((PyObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;
    }
    __pyx_L4:;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "vcfnp.pyx":1184
 *             return (-1,) * ploidy
 *     else:
 *         split(gts.at(0), GT_DELIMS, allele_strings)             # <<<<<<<<<<<<<<
 *         if ploidy == 1:
 *             if allele_strings.size() > 0:
 */
    split(__pyx_v_gts->at(0), __pyx_v_5vcfnp_GT_DELIMS, __pyx_v_allele_strings);

    /* "vcfnp.pyx":1185
 *     else:
 *         split(gts.at(0), GT_DELIMS, allele_strings)
 *         if ploidy == 1:             # <<<<<<<<<<<<<<
 *             if allele_strings.size() > 0:
 *                 if allele_strings.at(0) == DOT:
 */
    __pyx_t_1 = ((__pyx_v_ploidy == 1) != 0);
    if (__pyx_t_1) {

      /* "vcfnp.pyx":1186
 *         split(gts.at(0), GT_DELIMS, allele_strings)
 *         if ploidy == 1:
 *             if allele_strings.size() > 0:             # <<<<<<<<<<<<<<
 *                 if allele_strings.at(0) == DOT:
 *                     return -1
 */
      __pyx_t_1 = ((__pyx_v_allele_strings.size() > 0) != 0);
      if (__pyx_t_1) {

        /* "vcfnp.pyx":1187
 *         if ploidy == 1:
 *             if allele_strings.size() > 0:
 *                 if allele_strings.at(0) == DOT:             # <<<<<<<<<<<<<<
 *                     return -1
 *                 else:
 */
        __pyx_t_1 = ((__pyx_v_allele_strings.at(0) == __pyx_v_5vcfnp_DOT) != 0);
        if (__pyx_t_1) {

          /* "vcfnp.pyx":1188
 *             if allele_strings.size() > 0:
 *                 if allele_strings.at(0) == DOT:
 *                     return -1             # <<<<<<<<<<<<<<
 *                 else:
 *                     return atoi(allele_strings.at(0).c_str())
 */
          __Pyx_XDECREF(__pyx_r);
          __Pyx_INCREF(__pyx_int_neg_1);
          __pyx_r = __pyx_int_neg_1;
          goto __pyx_L0;
          goto __pyx_L7;
        }
        /*else*/ {

          /* "vcfnp.pyx":1190
 *                     return -1
 *                 else:
 *                     return atoi(allele_strings.at(0).c_str())             # <<<<<<<<<<<<<<
 *             else:
 *                 return -1
 */
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_3 = PyInt_FromLong(atoi(__pyx_v_allele_strings.at(0).c_str())); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_r = __pyx_t_3;
          __pyx_t_3 = 0;
          goto __pyx_L0;
        }
        __pyx_L7:;
        goto __pyx_L6;
      }
      /*else*/ {

        /* "vcfnp.pyx":1192
 *                     return atoi(allele_strings.at(0).c_str())
 *             else:
 *                 return -1             # <<<<<<<<<<<<<<
 *         else:
 *             for i in range(ploidy):
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_int_neg_1);
        __pyx_r = __pyx_int_neg_1;
        goto __pyx_L0;
      }
      __pyx_L6:;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "vcfnp.pyx":1194
 *                 return -1
 *         else:
 *             for i in range(ploidy):             # <<<<<<<<<<<<<<
 *                 if i < allele_strings.size():
 *                     if allele_strings.at(i) == DOT:
 */
      __pyx_t_4 = __pyx_v_ploidy;
      for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
        __pyx_v_i = __pyx_t_5;

        /* "vcfnp.pyx":1195
 *         else:
 *             for i in range(ploidy):
 *                 if i < allele_strings.size():             # <<<<<<<<<<<<<<
 *                     if allele_strings.at(i) == DOT:
 *                         alleles.push_back(-1)
 */
        __pyx_t_1 = ((__pyx_v_i < __pyx_v_allele_strings.size()) != 0);
        if (__pyx_t_1) {

          /* "vcfnp.pyx":1196
 *             for i in range(ploidy):
 *                 if i < allele_strings.size():
 *                     if allele_strings.at(i) == DOT:             # <<<<<<<<<<<<<<
 *                         alleles.push_back(-1)
 *                     else:
 */
          __pyx_t_1 = ((__pyx_v_allele_strings.at(__pyx_v_i) == __pyx_v_5vcfnp_DOT) != 0);
          if (__pyx_t_1) {

            /* "vcfnp.pyx":1197
 *                 if i < allele_strings.size():
 *                     if allele_strings.at(i) == DOT:
 *                         alleles.push_back(-1)             # <<<<<<<<<<<<<<
 *                     else:
 *                         alleles.push_back(atoi(allele_strings.at(i).c_str()))
 */
            __pyx_v_alleles.push_back(-1);
            goto __pyx_L11;
          }
          /*else*/ {

            /* "vcfnp.pyx":1199
 *                         alleles.push_back(-1)
 *                     else:
 *                         alleles.push_back(atoi(allele_strings.at(i).c_str()))             # <<<<<<<<<<<<<<
 *                 else:
 *                     alleles.push_back(-1)
 */
            __pyx_v_alleles.push_back(atoi(__pyx_v_allele_strings.at(__pyx_v_i).c_str()));
          }
          __pyx_L11:;
          goto __pyx_L10;
        }
        /*else*/ {

          /* "vcfnp.pyx":1201
 *                         alleles.push_back(atoi(allele_strings.at(i).c_str()))
 *                 else:
 *                     alleles.push_back(-1)             # <<<<<<<<<<<<<<
 *             return tuple(alleles)
 * #cdef inline object _genotype(map[string, vector[string]]& sample_data, int ploidy):
 */
          __pyx_v_alleles.push_back(-1);
        }
        __pyx_L10:;
      }

      /* "vcfnp.pyx":1202
 *                 else:
 *                     alleles.push_back(-1)
 *             return tuple(alleles)             # <<<<<<<<<<<<<<
 * #cdef inline object _genotype(map[string, vector[string]]& sample_data, int ploidy):
 * #    cdef vector[string] *gts
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __pyx_convert_vector_to_py_int(__pyx_v_alleles); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;
    }
    __pyx_L5:;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("vcfnp._genotype", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_30view2d(PyObject *__pyx_self, PyObject *__pyx_v_a); /*proto*/
static char __pyx_doc_5vcfnp_29view2d[] = "\n    Utility function to view a structured 1D array where all fields have a\n    uniform dtype (e.g., an array constructed by :func:calldata) as a 2D array.\n\n    Parameters\n    ----------\n\n    a: numpy array or array-like\n        The array to be viewed as 2D, must have a uniform dtype\n\n    Returns\n    -------\n\n    A 2D view of the array.\n\n    Examples\n    --------\n\n        >>> from vcfnp import calldata\n        >>> a = calldata('sample.vcf')\n        >>> a\n        array([ ((True, True, [0, 0], '0|0', 0, 0, [10, 10]), (True, True, [0, 0], '0|0', 0, 0, [10, 10]), (True, False, [0, 1], '0/1', 0, 0, [3, 3])),\n               ((True, True, [0, 0], '0|0', 0, 0, [10, 10]), (True, True, [0, 0], '0|0', 0, 0, [10, 10]), (True, False, [0, 1], '0/1', 0, 0, [3, 3])),\n               ((True, True, [0, 0], '0|0', 48, 1, [51, 51]), (True, True, [1, 0], '1|0', 48, 8, [51, 51]), (True, False, [1, 1], '1/1', 43, 5, [0, 0])),\n               ((True, True, [0, 0], '0|0', 49, 3, [58, 50]), (True, True, [0, 1], '0|1', 3, 5, [65, 3]), (True, False, [0, 0], '0/0', 41, 3, [0, 0])),\n               ((True, True, [1, 2], '1|2', 21, 6, [23, 27]), (True, True, [2, 1], '2|1', 2, 0, [18, 2]), (True, False, [2, 2], '2/2', 35, 4, [0, 0])),\n               ((True, True, [0, 0], '0|0', 54, 0, [56, 60]), (True, True, [0, 0], '0|0', 48, 4, [51, 51]), (True, False, [0, 0], '0/0', 61, 2, [0, 0])),\n               ((True, False, [0, 1], '0/1', 0, 4, [0, 0]), (True, False, [0, 2], '0/2', 17, 2, [0, 0]), (True, False, [1, 1], '1/1', 40, 3, [0, 0])),\n               ((True, False, [0, 0], '0/0', 0, 0, [0, 0]), (True, True, [0, 0], '0|0', 0, 0, [0, 0]), (False, False, [-1, -1], './.', 0, 0, [0, 0])),\n               ((True, False, [0, -1], '0', 0, 0, [0, 0]), (True, False, [0, 1], '0/1', 0, 0, [0, 0]), (True, True, [0, 2], '0|2', 0, 0, [0, 0]))],\n              dtype=[('NA00001', [('is_called', '|b1'), ('is_phased', '|b1'), ('genotype', '|i1', (2,)), ('GT', '|S3'), ('GQ', '|u1'), ('DP', '<u2""'), ('HQ', '<i4', (2,))]), ('NA00002', [('is_called', '|b1'), ('is_phased', '|b1'), ('genotype', '|i1', (2,)), ('GT', '|S3'), ('GQ', '|u1'), ('DP', '<u2'), ('HQ', '<i4', (2,))]), ('NA00003', [('is_called', '|b1'), ('is_phased', '|b1'), ('genotype', '|i1', (2,)), ('GT', '|S3'), ('GQ', '|u1'), ('DP', '<u2'), ('HQ', '<i4', (2,))])])\n        >>> from vcfnp import view2d\n        >>> b = view2d(a)\n        >>> b\n        array([[(True, True, [0, 0], '0|0', 0, 0, [10, 10]),\n                (True, True, [0, 0], '0|0', 0, 0, [10, 10]),\n                (True, False, [0, 1], '0/1', 0, 0, [3, 3])],\n               [(True, True, [0, 0], '0|0', 0, 0, [10, 10]),\n                (True, True, [0, 0], '0|0', 0, 0, [10, 10]),\n                (True, False, [0, 1], '0/1', 0, 0, [3, 3])],\n               [(True, True, [0, 0], '0|0', 48, 1, [51, 51]),\n                (True, True, [1, 0], '1|0', 48, 8, [51, 51]),\n                (True, False, [1, 1], '1/1', 43, 5, [0, 0])],\n               [(True, True, [0, 0], '0|0', 49, 3, [58, 50]),\n                (True, True, [0, 1], '0|1', 3, 5, [65, 3]),\n                (True, False, [0, 0], '0/0', 41, 3, [0, 0])],\n               [(True, True, [1, 2], '1|2', 21, 6, [23, 27]),\n                (True, True, [2, 1], '2|1', 2, 0, [18, 2]),\n                (True, False, [2, 2], '2/2', 35, 4, [0, 0])],\n               [(True, True, [0, 0], '0|0', 54, 0, [56, 60]),\n                (True, True, [0, 0], '0|0', 48, 4, [51, 51]),\n                (True, False, [0, 0], '0/0', 61, 2, [0, 0])],\n               [(True, False, [0, 1], '0/1', 0, 4, [0, 0]),\n                (True, False, [0, 2], '0/2', 17, 2, [0, 0]),\n                (True, False, [1, 1], '1/1', 40, 3, [0, 0])],\n               [(True, False, [0, 0], '0/0', 0, 0, [0, 0]),\n                (True, True, [0, 0], '0|0', 0, 0, [0, 0]),\n                (False, False, [-1, -1], './.', 0, 0, [0, 0])],\n               [(True, False, [0, -1], '0', 0, 0, [0, 0]),\n                (True, False, [""0, 1], '0/1', 0, 0, [0, 0]),\n                (True, True, [0, 2], '0|2', 0, 0, [0, 0])]],\n              dtype=[('is_called', '|b1'), ('is_phased', '|b1'), ('genotype', '|i1', (2,)), ('GT', '|S3'), ('GQ', '|u1'), ('DP', '<u2'), ('HQ', '<i4', (2,))])\n        >>> b['GT']\n        array([['0|0', '0|0', '0/1'],\n               ['0|0', '0|0', '0/1'],\n               ['0|0', '1|0', '1/1'],\n               ['0|0', '0|1', '0/0'],\n               ['1|2', '2|1', '2/2'],\n               ['0|0', '0|0', '0/0'],\n               ['0/1', '0/2', '1/1'],\n               ['0/0', '0|0', './.'],\n               ['0', '0/1', '0|2']],\n              dtype='|S3')\n\n    ";
static PyMethodDef __pyx_mdef_5vcfnp_30view2d = {__Pyx_NAMESTR("view2d"), (PyCFunction)__pyx_pw_5vcfnp_30view2d, METH_O, __Pyx_DOCSTR(__pyx_doc_5vcfnp_29view2d)};
static PyObject *__pyx_pw_5vcfnp_30view2d(PyObject *__pyx_self, PyObject *__pyx_v_a) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("view2d (wrapper)", 0);
  __pyx_r = __pyx_pf_5vcfnp_29view2d(__pyx_self, ((PyObject *)__pyx_v_a));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":1231
 * 
 * 
 * def view2d(a):             # <<<<<<<<<<<<<<
 *     """
 *     Utility function to view a structured 1D array where all fields have a
 */

static PyObject *__pyx_pf_5vcfnp_29view2d(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a) {
  PyObject *__pyx_v_rows = NULL;
  PyObject *__pyx_v_cols = NULL;
  PyObject *__pyx_v_dtype = NULL;
  PyObject *__pyx_v_b = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("view2d", 0);

  /* "vcfnp.pyx":1308
 *     """
 * 
 *     rows = a.size             # <<<<<<<<<<<<<<
 *     cols = len(a.dtype)
 *     dtype = a.dtype[0]
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s__size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_rows = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "vcfnp.pyx":1309
 * 
 *     rows = a.size
 *     cols = len(a.dtype)             # <<<<<<<<<<<<<<
 *     dtype = a.dtype[0]
 *     b = a.view(dtype).reshape(rows, cols)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_cols = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "vcfnp.pyx":1310
 *     rows = a.size
 *     cols = len(a.dtype)
 *     dtype = a.dtype[0]             # <<<<<<<<<<<<<<
 *     b = a.view(dtype).reshape(rows, cols)
 *     return b
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dtype = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "vcfnp.pyx":1311
 *     cols = len(a.dtype)
 *     dtype = a.dtype[0]
 *     b = a.view(dtype).reshape(rows, cols)             # <<<<<<<<<<<<<<
 *     return b
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s__view); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_dtype);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_dtype);
  __Pyx_GIVEREF(__pyx_v_dtype);
  __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__reshape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_rows);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_rows);
  __Pyx_GIVEREF(__pyx_v_rows);
  __Pyx_INCREF(__pyx_v_cols);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_cols);
  __Pyx_GIVEREF(__pyx_v_cols);
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __pyx_v_b = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "vcfnp.pyx":1312
 *     dtype = a.dtype[0]
 *     b = a.view(dtype).reshape(rows, cols)
 *     return b             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_b);
  __pyx_r = __pyx_v_b;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("vcfnp.view2d", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_rows);
  __Pyx_XDECREF(__pyx_v_cols);
  __Pyx_XDECREF(__pyx_v_dtype);
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_32eff_default_transformer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5vcfnp_31eff_default_transformer[] = "\n    Return a simple transformer function for parsing EFF annotations. N.B.,\n    ignores all but the first effect.\n\n    ";
static PyMethodDef __pyx_mdef_5vcfnp_32eff_default_transformer = {__Pyx_NAMESTR("eff_default_transformer"), (PyCFunction)__pyx_pw_5vcfnp_32eff_default_transformer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5vcfnp_31eff_default_transformer)};
static PyObject *__pyx_pw_5vcfnp_32eff_default_transformer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_fills = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("eff_default_transformer (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__fills,0};
    PyObject* values[1] = {0};
    values[0] = __pyx_k_25;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fills);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "eff_default_transformer") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1333; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_fills = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("eff_default_transformer", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1333; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vcfnp.eff_default_transformer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5vcfnp_31eff_default_transformer(__pyx_self, __pyx_v_fills);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_23eff_default_transformer_1_transformer(PyObject *__pyx_self, PyObject *__pyx_v_vals); /*proto*/
static PyMethodDef __pyx_mdef_5vcfnp_23eff_default_transformer_1_transformer = {__Pyx_NAMESTR("_transformer"), (PyCFunction)__pyx_pw_5vcfnp_23eff_default_transformer_1_transformer, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_5vcfnp_23eff_default_transformer_1_transformer(PyObject *__pyx_self, PyObject *__pyx_v_vals) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_transformer (wrapper)", 0);
  __pyx_r = __pyx_pf_5vcfnp_23eff_default_transformer__transformer(__pyx_self, ((PyObject *)__pyx_v_vals));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_5vcfnp_23eff_default_transformer_12_transformer_2generator7(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "vcfnp.pyx":1347
 *             eff = [match_eff_main.group(1)] + match_eff_main.group(2).split('|')
 *             result = tuple(
 *                 fill if v == ''             # <<<<<<<<<<<<<<
 *                 else int(v) if i == 5 or i == 10
 *                 else (1 if v == 'CODING' else 0) if i == 8
 */

static PyObject *__pyx_pf_5vcfnp_23eff_default_transformer_12_transformer_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_9_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_5vcfnp___pyx_scope_struct_9_genexpr *)__pyx_tp_new_5vcfnp___pyx_scope_struct_9_genexpr(__pyx_ptype_5vcfnp___pyx_scope_struct_9_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5vcfnp___pyx_scope_struct_8__transformer *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5vcfnp_23eff_default_transformer_12_transformer_2generator7, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("vcfnp.eff_default_transformer._transformer.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_5vcfnp_23eff_default_transformer_12_transformer_2generator7(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5vcfnp___pyx_scope_struct_9_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_9_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  long __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L8_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_INCREF(__pyx_int_0);
  __pyx_t_1 = __pyx_int_0;

  /* "vcfnp.pyx":1351
 *                 else (1 if v == 'CODING' else 0) if i == 8
 *                 else v
 *                 for i, (v, fill) in enumerate(zip(eff, fills)[:11])             # <<<<<<<<<<<<<<
 *             )
 *             return result
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff)) { __Pyx_RaiseClosureNameError("eff"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_fills)) { __Pyx_RaiseClosureNameError("fills"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_fills);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_fills);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_fills);
  __pyx_t_3 = PyObject_Call(__pyx_builtin_zip, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, 11, NULL, NULL, &__pyx_k_slice_26, 0, 1, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_2 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_2)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
      PyObject* sequence = __pyx_t_2;
      #if CYTHON_COMPILING_IN_CPYTHON
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      #else
      __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    {
      Py_ssize_t index = -1;
      __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
      index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_9 = NULL;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L7_unpacking_done:;
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_v);
    __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_v);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_cur_scope->__pyx_v_v = __pyx_t_6;
    __pyx_t_6 = 0;
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_fill);
    __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_fill);
    __Pyx_GIVEREF(__pyx_t_7);
    __pyx_cur_scope->__pyx_v_fill = __pyx_t_7;
    __pyx_t_7 = 0;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_i);
    __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_i);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_cur_scope->__pyx_v_i = __pyx_t_1;
    __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "vcfnp.pyx":1347
 *             eff = [match_eff_main.group(1)] + match_eff_main.group(2).split('|')
 *             result = tuple(
 *                 fill if v == ''             # <<<<<<<<<<<<<<
 *                 else int(v) if i == 5 or i == 10
 *                 else (1 if v == 'CODING' else 0) if i == 8
 */
    __pyx_t_7 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_v, ((PyObject *)__pyx_kp_s_27), Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_10) {
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fill);
      __pyx_t_2 = __pyx_cur_scope->__pyx_v_fill;
    } else {

      /* "vcfnp.pyx":1348
 *             result = tuple(
 *                 fill if v == ''
 *                 else int(v) if i == 5 or i == 10             # <<<<<<<<<<<<<<
 *                 else (1 if v == 'CODING' else 0) if i == 8
 *                 else v
 */
      __pyx_t_6 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_i, __pyx_int_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (!__pyx_t_11) {
        __pyx_t_6 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_i, __pyx_int_10, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_13 = __pyx_t_12;
      } else {
        __pyx_t_13 = __pyx_t_11;
      }
      if (__pyx_t_13) {
        __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_cur_scope->__pyx_v_v);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_cur_scope->__pyx_v_v);
        __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_v);
        __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
        __pyx_t_7 = __pyx_t_8;
        __pyx_t_8 = 0;
      } else {

        /* "vcfnp.pyx":1349
 *                 fill if v == ''
 *                 else int(v) if i == 5 or i == 10
 *                 else (1 if v == 'CODING' else 0) if i == 8             # <<<<<<<<<<<<<<
 *                 else v
 *                 for i, (v, fill) in enumerate(zip(eff, fills)[:11])
 */
        __pyx_t_6 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_i, __pyx_int_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (__pyx_t_11) {
          __pyx_t_6 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_v, ((PyObject *)__pyx_n_s__CODING), Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (__pyx_t_12) {
            __pyx_t_14 = 1;
          } else {
            __pyx_t_14 = 0;
          }
          __pyx_t_6 = PyInt_FromLong(__pyx_t_14); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_8 = __pyx_t_6;
          __pyx_t_6 = 0;
        } else {

          /* "vcfnp.pyx":1351
 *                 else (1 if v == 'CODING' else 0) if i == 8
 *                 else v
 *                 for i, (v, fill) in enumerate(zip(eff, fills)[:11])             # <<<<<<<<<<<<<<
 *             )
 *             return result
 */
          __Pyx_INCREF(__pyx_cur_scope->__pyx_v_v);
          __pyx_t_8 = __pyx_cur_scope->__pyx_v_v;
        }
        __pyx_t_7 = __pyx_t_8;
        __pyx_t_8 = 0;
      }
      __pyx_t_2 = __pyx_t_7;
      __pyx_t_7 = 0;
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    __Pyx_XGIVEREF(__pyx_t_1);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
    __Pyx_XGIVEREF(__pyx_t_3);
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_3;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_4;
    __pyx_cur_scope->__pyx_t_3 = __pyx_t_5;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L8_resume_from_yield:;
    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
    __pyx_cur_scope->__pyx_t_0 = 0;
    __Pyx_XGOTREF(__pyx_t_1);
    __pyx_t_3 = __pyx_cur_scope->__pyx_t_1;
    __pyx_cur_scope->__pyx_t_1 = 0;
    __Pyx_XGOTREF(__pyx_t_3);
    __pyx_t_4 = __pyx_cur_scope->__pyx_t_2;
    __pyx_t_5 = __pyx_cur_scope->__pyx_t_3;
    if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_generator->resume_label = -1;
  __Pyx_Generator_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return NULL;
}

/* "vcfnp.pyx":1340
 *     """
 *     prog_eff_main = re.compile(r'([^(]+)\(([^)]+)\)')
 *     def _transformer(vals):             # <<<<<<<<<<<<<<
 *         if len(vals) == 0:
 *             return fills
 */

static PyObject *__pyx_pf_5vcfnp_23eff_default_transformer__transformer(PyObject *__pyx_self, PyObject *__pyx_v_vals) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_8__transformer *__pyx_cur_scope;
  PyObject *__pyx_v_match_eff_main = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_transformer", 0);
  __pyx_cur_scope = (struct __pyx_obj_5vcfnp___pyx_scope_struct_8__transformer *)__pyx_tp_new_5vcfnp___pyx_scope_struct_8__transformer(__pyx_ptype_5vcfnp___pyx_scope_struct_8__transformer, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5vcfnp___pyx_scope_struct_7_eff_default_transformer *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);

  /* "vcfnp.pyx":1341
 *     prog_eff_main = re.compile(r'([^(]+)\(([^)]+)\)')
 *     def _transformer(vals):
 *         if len(vals) == 0:             # <<<<<<<<<<<<<<
 *             return fills
 *         else:
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_vals); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = ((__pyx_t_1 == 0) != 0);
  if (__pyx_t_2) {

    /* "vcfnp.pyx":1342
 *     def _transformer(vals):
 *         if len(vals) == 0:
 *             return fills             # <<<<<<<<<<<<<<
 *         else:
 *             match_eff_main = prog_eff_main.match(vals[0]) # ignore all but first effect
 */
    __Pyx_XDECREF(__pyx_r);
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fills)) { __Pyx_RaiseClosureNameError("fills"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fills);
    __pyx_r = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_fills;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "vcfnp.pyx":1344
 *             return fills
 *         else:
 *             match_eff_main = prog_eff_main.match(vals[0]) # ignore all but first effect             # <<<<<<<<<<<<<<
 *             eff = [match_eff_main.group(1)] + match_eff_main.group(2).split('|')
 *             result = tuple(
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_prog_eff_main)) { __Pyx_RaiseClosureNameError("prog_eff_main"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_prog_eff_main, __pyx_n_s__match); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_vals, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __pyx_v_match_eff_main = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "vcfnp.pyx":1345
 *         else:
 *             match_eff_main = prog_eff_main.match(vals[0]) # ignore all but first effect
 *             eff = [match_eff_main.group(1)] + match_eff_main.group(2).split('|')             # <<<<<<<<<<<<<<
 *             result = tuple(
 *                 fill if v == ''
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_match_eff_main, __pyx_n_s__group); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_28), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_match_eff_main, __pyx_n_s__group); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_29), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__split); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_30), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_Add(((PyObject *)__pyx_t_4), __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_cur_scope->__pyx_v_eff = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "vcfnp.pyx":1347
 *             eff = [match_eff_main.group(1)] + match_eff_main.group(2).split('|')
 *             result = tuple(
 *                 fill if v == ''             # <<<<<<<<<<<<<<
 *                 else int(v) if i == 5 or i == 10
 *                 else (1 if v == 'CODING' else 0) if i == 8
 */
    __pyx_t_5 = __pyx_pf_5vcfnp_23eff_default_transformer_12_transformer_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __pyx_v_result = ((PyObject*)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "vcfnp.pyx":1353
 *                 for i, (v, fill) in enumerate(zip(eff, fills)[:11])
 *             )
 *             return result             # <<<<<<<<<<<<<<
 *     return _transformer
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_result));
    __pyx_r = ((PyObject *)__pyx_v_result);
    goto __pyx_L0;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vcfnp.eff_default_transformer._transformer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_match_eff_main);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":1333
 * 
 * 
 * def eff_default_transformer(fills=EFF_DEFAULT_FILLS):             # <<<<<<<<<<<<<<
 *     """
 *     Return a simple transformer function for parsing EFF annotations. N.B.,
 */

static PyObject *__pyx_pf_5vcfnp_31eff_default_transformer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fills) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_7_eff_default_transformer *__pyx_cur_scope;
  PyObject *__pyx_v__transformer = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("eff_default_transformer", 0);
  __pyx_cur_scope = (struct __pyx_obj_5vcfnp___pyx_scope_struct_7_eff_default_transformer *)__pyx_tp_new_5vcfnp___pyx_scope_struct_7_eff_default_transformer(__pyx_ptype_5vcfnp___pyx_scope_struct_7_eff_default_transformer, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_fills = __pyx_v_fills;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fills);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fills);

  /* "vcfnp.pyx":1339
 * 
 *     """
 *     prog_eff_main = re.compile(r'([^(]+)\(([^)]+)\)')             # <<<<<<<<<<<<<<
 *     def _transformer(vals):
 *         if len(vals) == 0:
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__re); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__compile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_32), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_prog_eff_main = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "vcfnp.pyx":1340
 *     """
 *     prog_eff_main = re.compile(r'([^(]+)\(([^)]+)\)')
 *     def _transformer(vals):             # <<<<<<<<<<<<<<
 *         if len(vals) == 0:
 *             return fills
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5vcfnp_23eff_default_transformer_1_transformer, 0, __pyx_n_s_36, ((PyObject*)__pyx_cur_scope), __pyx_n_s__vcfnp, ((PyObject *)__pyx_k_codeobj_34)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__transformer = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "vcfnp.pyx":1354
 *             )
 *             return result
 *     return _transformer             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v__transformer);
  __pyx_r = __pyx_v__transformer;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vcfnp.eff_default_transformer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__transformer);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "numpy.pxd":194
 *         # experimental exception made for __getbuffer__ and __releasebuffer__
 *         # -- the details of this may change.
 *         def __getbuffer__(ndarray self, Py_buffer* info, int flags):             # <<<<<<<<<<<<<<
 *             # This implementation of getbuffer is geared towards Cython
 *             # requirements, and does not yet fullfill the PEP.
 */

static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_v_copy_shape;
  int __pyx_v_i;
  int __pyx_v_ndim;
  int __pyx_v_endian_detector;
  int __pyx_v_little_endian;
  int __pyx_v_t;
  char *__pyx_v_f;
  PyArray_Descr *__pyx_v_descr = 0;
  int __pyx_v_offset;
  int __pyx_v_hasfields;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  char *__pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getbuffer__", 0);
  if (__pyx_v_info != NULL) {
    __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(__pyx_v_info->obj);
  }

  /* "numpy.pxd":200
 *             # of flags
 * 
 *             if info == NULL: return             # <<<<<<<<<<<<<<
 * 
 *             cdef int copy_shape, i, ndim
 */
  __pyx_t_1 = ((__pyx_v_info == NULL) != 0);
  if (__pyx_t_1) {
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "numpy.pxd":203
 * 
 *             cdef int copy_shape, i, ndim
 *             cdef int endian_detector = 1             # <<<<<<<<<<<<<<
 *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
 * 
 */
  __pyx_v_endian_detector = 1;

  /* "numpy.pxd":204
 *             cdef int copy_shape, i, ndim
 *             cdef int endian_detector = 1
 *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)             # <<<<<<<<<<<<<<
 * 
 *             ndim = PyArray_NDIM(self)
 */
  __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);

  /* "numpy.pxd":206
 *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
 * 
 *             ndim = PyArray_NDIM(self)             # <<<<<<<<<<<<<<
 * 
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 */
  __pyx_v_ndim = PyArray_NDIM(__pyx_v_self);

  /* "numpy.pxd":208
 *             ndim = PyArray_NDIM(self)
 * 
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
 *                 copy_shape = 1
 *             else:
 */
  __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
  if (__pyx_t_1) {

    /* "numpy.pxd":209
 * 
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 *                 copy_shape = 1             # <<<<<<<<<<<<<<
 *             else:
 *                 copy_shape = 0
 */
    __pyx_v_copy_shape = 1;
    goto __pyx_L4;
  }
  /*else*/ {

    /* "numpy.pxd":211
 *                 copy_shape = 1
 *             else:
 *                 copy_shape = 0             # <<<<<<<<<<<<<<
 * 
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 */
    __pyx_v_copy_shape = 0;
  }
  __pyx_L4:;

  /* "numpy.pxd":213
 *                 copy_shape = 0
 * 
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)             # <<<<<<<<<<<<<<
 *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not C contiguous")
 */
  __pyx_t_1 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0);
  if (__pyx_t_1) {

    /* "numpy.pxd":214
 * 
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):             # <<<<<<<<<<<<<<
 *                 raise ValueError(u"ndarray is not C contiguous")
 * 
 */
    __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_C_CONTIGUOUS) != 0)) != 0);
    __pyx_t_3 = __pyx_t_2;
  } else {
    __pyx_t_3 = __pyx_t_1;
  }
  if (__pyx_t_3) {

    /* "numpy.pxd":215
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not C contiguous")             # <<<<<<<<<<<<<<
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 */
    __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_38), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "numpy.pxd":217
 *                 raise ValueError(u"ndarray is not C contiguous")
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)             # <<<<<<<<<<<<<<
 *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not Fortran contiguous")
 */
  __pyx_t_3 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0);
  if (__pyx_t_3) {

    /* "numpy.pxd":218
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):             # <<<<<<<<<<<<<<
 *                 raise ValueError(u"ndarray is not Fortran contiguous")
 * 
 */
    __pyx_t_1 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0);
    __pyx_t_2 = __pyx_t_1;
  } else {
    __pyx_t_2 = __pyx_t_3;
  }
  if (__pyx_t_2) {

    /* "numpy.pxd":219
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not Fortran contiguous")             # <<<<<<<<<<<<<<
 * 
 *             info.buf = PyArray_DATA(self)
 */
    __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_40), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "numpy.pxd":221
 *                 raise ValueError(u"ndarray is not Fortran contiguous")
 * 
 *             info.buf = PyArray_DATA(self)             # <<<<<<<<<<<<<<
 *             info.ndim = ndim
 *             if copy_shape:
 */
  __pyx_v_info->buf = PyArray_DATA(__pyx_v_self);

  /* "numpy.pxd":222
 * 
 *             info.buf = PyArray_DATA(self)
 *             info.ndim = ndim             # <<<<<<<<<<<<<<
 *             if copy_shape:
 *                 # Allocate new buffer for strides and shape info.
 */
  __pyx_v_info->ndim = __pyx_v_ndim;

  /* "numpy.pxd":223
 *             info.buf = PyArray_DATA(self)
 *             info.ndim = ndim
 *             if copy_shape:             # <<<<<<<<<<<<<<
 *                 # Allocate new buffer for strides and shape info.
 *                 # This is allocated as one block, strides first.
 */
  __pyx_t_2 = (__pyx_v_copy_shape != 0);
  if (__pyx_t_2) {

    /* "numpy.pxd":226
 *                 # Allocate new buffer for strides and shape info.
 *                 # This is allocated as one block, strides first.
 *                 info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2)             # <<<<<<<<<<<<<<
 *                 info.shape = info.strides + ndim
 *                 for i in range(ndim):
 */
    __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2)));

    /* "numpy.pxd":227
 *                 # This is allocated as one block, strides first.
 *                 info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2)
 *                 info.shape = info.strides + ndim             # <<<<<<<<<<<<<<
 *                 for i in range(ndim):
 *                     info.strides[i] = PyArray_STRIDES(self)[i]
 */
    __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);

    /* "numpy.pxd":228
 *                 info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2)
 *                 info.shape = info.strides + ndim
 *                 for i in range(ndim):             # <<<<<<<<<<<<<<
 *                     info.strides[i] = PyArray_STRIDES(self)[i]
 *                     info.shape[i] = PyArray_DIMS(self)[i]
 */
    __pyx_t_5 = __pyx_v_ndim;
    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
      __pyx_v_i = __pyx_t_6;

      /* "numpy.pxd":229
 *                 info.shape = info.strides + ndim
 *                 for i in range(ndim):
 *                     info.strides[i] = PyArray_STRIDES(self)[i]             # <<<<<<<<<<<<<<
 *                     info.shape[i] = PyArray_DIMS(self)[i]
 *             else:
 */
      (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]);

      /* "numpy.pxd":230
 *                 for i in range(ndim):
 *                     info.strides[i] = PyArray_STRIDES(self)[i]
 *                     info.shape[i] = PyArray_DIMS(self)[i]             # <<<<<<<<<<<<<<
 *             else:
 *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
 */
      (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]);
    }
    goto __pyx_L7;
  }
  /*else*/ {

    /* "numpy.pxd":232
 *                     info.shape[i] = PyArray_DIMS(self)[i]
 *             else:
 *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)             # <<<<<<<<<<<<<<
 *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
 *             info.suboffsets = NULL
 */
    __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self));

    /* "numpy.pxd":233
 *             else:
 *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
 *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)             # <<<<<<<<<<<<<<
 *             info.suboffsets = NULL
 *             info.itemsize = PyArray_ITEMSIZE(self)
 */
    __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self));
  }
  __pyx_L7:;

  /* "numpy.pxd":234
 *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
 *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
 *             info.suboffsets = NULL             # <<<<<<<<<<<<<<
 *             info.itemsize = PyArray_ITEMSIZE(self)
 *             info.readonly = not PyArray_ISWRITEABLE(self)
 */
  __pyx_v_info->suboffsets = NULL;

  /* "numpy.pxd":235
 *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
 *             info.suboffsets = NULL
 *             info.itemsize = PyArray_ITEMSIZE(self)             # <<<<<<<<<<<<<<
 *             info.readonly = not PyArray_ISWRITEABLE(self)
 * 
 */
  __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self);

  /* "numpy.pxd":236
 *             info.suboffsets = NULL
 *             info.itemsize = PyArray_ITEMSIZE(self)
 *             info.readonly = not PyArray_ISWRITEABLE(self)             # <<<<<<<<<<<<<<
 * 
 *             cdef int t
 */
  __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0));

  /* "numpy.pxd":239
 * 
 *             cdef int t
 *             cdef char* f = NULL             # <<<<<<<<<<<<<<
 *             cdef dtype descr = self.descr
 *             cdef list stack
 */
  __pyx_v_f = NULL;

  /* "numpy.pxd":240
 *             cdef int t
 *             cdef char* f = NULL
 *             cdef dtype descr = self.descr             # <<<<<<<<<<<<<<
 *             cdef list stack
 *             cdef int offset
 */
  __pyx_t_4 = ((PyObject *)__pyx_v_self->descr);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_v_descr = ((PyArray_Descr *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "numpy.pxd":244
 *             cdef int offset
 * 
 *             cdef bint hasfields = PyDataType_HASFIELDS(descr)             # <<<<<<<<<<<<<<
 * 
 *             if not hasfields and not copy_shape:
 */
  __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr);

  /* "numpy.pxd":246
 *             cdef bint hasfields = PyDataType_HASFIELDS(descr)
 * 
 *             if not hasfields and not copy_shape:             # <<<<<<<<<<<<<<
 *                 # do not call releasebuffer
 *                 info.obj = None
 */
  __pyx_t_2 = ((!(__pyx_v_hasfields != 0)) != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = ((!(__pyx_v_copy_shape != 0)) != 0);
    __pyx_t_1 = __pyx_t_3;
  } else {
    __pyx_t_1 = __pyx_t_2;
  }
  if (__pyx_t_1) {

    /* "numpy.pxd":248
 *             if not hasfields and not copy_shape:
 *                 # do not call releasebuffer
 *                 info.obj = None             # <<<<<<<<<<<<<<
 *             else:
 *                 # need to call releasebuffer
 */
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj);
    __pyx_v_info->obj = Py_None;
    goto __pyx_L10;
  }
  /*else*/ {

    /* "numpy.pxd":251
 *             else:
 *                 # need to call releasebuffer
 *                 info.obj = self             # <<<<<<<<<<<<<<
 * 
 *             if not hasfields:
 */
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj);
    __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
  }
  __pyx_L10:;

  /* "numpy.pxd":253
 *                 info.obj = self
 * 
 *             if not hasfields:             # <<<<<<<<<<<<<<
 *                 t = descr.type_num
 *                 if ((descr.byteorder == c'>' and little_endian) or
 */
  __pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0);
  if (__pyx_t_1) {

    /* "numpy.pxd":254
 * 
 *             if not hasfields:
 *                 t = descr.type_num             # <<<<<<<<<<<<<<
 *                 if ((descr.byteorder == c'>' and little_endian) or
 *                     (descr.byteorder == c'<' and not little_endian)):
 */
    __pyx_t_5 = __pyx_v_descr->type_num;
    __pyx_v_t = __pyx_t_5;

    /* "numpy.pxd":255
 *             if not hasfields:
 *                 t = descr.type_num
 *                 if ((descr.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
 *                     (descr.byteorder == c'<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")
 */
    __pyx_t_1 = ((__pyx_v_descr->byteorder == '>') != 0);
    if (__pyx_t_1) {
      __pyx_t_2 = (__pyx_v_little_endian != 0);
    } else {
      __pyx_t_2 = __pyx_t_1;
    }
    if (!__pyx_t_2) {

      /* "numpy.pxd":256
 *                 t = descr.type_num
 *                 if ((descr.byteorder == c'>' and little_endian) or
 *                     (descr.byteorder == c'<' and not little_endian)):             # <<<<<<<<<<<<<<
 *                     raise ValueError(u"Non-native byte order not supported")
 *                 if   t == NPY_BYTE:        f = "b"
 */
      __pyx_t_1 = ((__pyx_v_descr->byteorder == '<') != 0);
      if (__pyx_t_1) {
        __pyx_t_3 = ((!(__pyx_v_little_endian != 0)) != 0);
        __pyx_t_7 = __pyx_t_3;
      } else {
        __pyx_t_7 = __pyx_t_1;
      }
      __pyx_t_1 = __pyx_t_7;
    } else {
      __pyx_t_1 = __pyx_t_2;
    }
    if (__pyx_t_1) {

      /* "numpy.pxd":257
 *                 if ((descr.byteorder == c'>' and little_endian) or
 *                     (descr.byteorder == c'<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
 *                 if   t == NPY_BYTE:        f = "b"
 *                 elif t == NPY_UBYTE:       f = "B"
 */
      __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_42), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L12;
    }
    __pyx_L12:;

    /* "numpy.pxd":274
 *                 elif t == NPY_CDOUBLE:     f = "Zd"
 *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
 *                 elif t == NPY_OBJECT:      f = "O"             # <<<<<<<<<<<<<<
 *                 else:
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 */
    switch (__pyx_v_t) {

      /* "numpy.pxd":258
 *                     (descr.byteorder == c'<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")
 *                 if   t == NPY_BYTE:        f = "b"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_UBYTE:       f = "B"
 *                 elif t == NPY_SHORT:       f = "h"
 */
      case NPY_BYTE:
      __pyx_v_f = __pyx_k__b;
      break;

      /* "numpy.pxd":259
 *                     raise ValueError(u"Non-native byte order not supported")
 *                 if   t == NPY_BYTE:        f = "b"
 *                 elif t == NPY_UBYTE:       f = "B"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_SHORT:       f = "h"
 *                 elif t == NPY_USHORT:      f = "H"
 */
      case NPY_UBYTE:
      __pyx_v_f = __pyx_k__B;
      break;

      /* "numpy.pxd":260
 *                 if   t == NPY_BYTE:        f = "b"
 *                 elif t == NPY_UBYTE:       f = "B"
 *                 elif t == NPY_SHORT:       f = "h"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_USHORT:      f = "H"
 *                 elif t == NPY_INT:         f = "i"
 */
      case NPY_SHORT:
      __pyx_v_f = __pyx_k__h;
      break;

      /* "numpy.pxd":261
 *                 elif t == NPY_UBYTE:       f = "B"
 *                 elif t == NPY_SHORT:       f = "h"
 *                 elif t == NPY_USHORT:      f = "H"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_INT:         f = "i"
 *                 elif t == NPY_UINT:        f = "I"
 */
      case NPY_USHORT:
      __pyx_v_f = __pyx_k__H;
      break;

      /* "numpy.pxd":262
 *                 elif t == NPY_SHORT:       f = "h"
 *                 elif t == NPY_USHORT:      f = "H"
 *                 elif t == NPY_INT:         f = "i"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_UINT:        f = "I"
 *                 elif t == NPY_LONG:        f = "l"
 */
      case NPY_INT:
      __pyx_v_f = __pyx_k__i;
      break;

      /* "numpy.pxd":263
 *                 elif t == NPY_USHORT:      f = "H"
 *                 elif t == NPY_INT:         f = "i"
 *                 elif t == NPY_UINT:        f = "I"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_LONG:        f = "l"
 *                 elif t == NPY_ULONG:       f = "L"
 */
      case NPY_UINT:
      __pyx_v_f = __pyx_k__I;
      break;

      /* "numpy.pxd":264
 *                 elif t == NPY_INT:         f = "i"
 *                 elif t == NPY_UINT:        f = "I"
 *                 elif t == NPY_LONG:        f = "l"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_ULONG:       f = "L"
 *                 elif t == NPY_LONGLONG:    f = "q"
 */
      case NPY_LONG:
      __pyx_v_f = __pyx_k__l;
      break;

      /* "numpy.pxd":265
 *                 elif t == NPY_UINT:        f = "I"
 *                 elif t == NPY_LONG:        f = "l"
 *                 elif t == NPY_ULONG:       f = "L"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_LONGLONG:    f = "q"
 *                 elif t == NPY_ULONGLONG:   f = "Q"
 */
      case NPY_ULONG:
      __pyx_v_f = __pyx_k__L;
      break;

      /* "numpy.pxd":266
 *                 elif t == NPY_LONG:        f = "l"
 *                 elif t == NPY_ULONG:       f = "L"
 *                 elif t == NPY_LONGLONG:    f = "q"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_ULONGLONG:   f = "Q"
 *                 elif t == NPY_FLOAT:       f = "f"
 */
      case NPY_LONGLONG:
      __pyx_v_f = __pyx_k__q;
      break;

      /* "numpy.pxd":267
 *                 elif t == NPY_ULONG:       f = "L"
 *                 elif t == NPY_LONGLONG:    f = "q"
 *                 elif t == NPY_ULONGLONG:   f = "Q"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_FLOAT:       f = "f"
 *                 elif t == NPY_DOUBLE:      f = "d"
 */
      case NPY_ULONGLONG:
      __pyx_v_f = __pyx_k__Q;
      break;

      /* "numpy.pxd":268
 *                 elif t == NPY_LONGLONG:    f = "q"
 *                 elif t == NPY_ULONGLONG:   f = "Q"
 *                 elif t == NPY_FLOAT:       f = "f"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_DOUBLE:      f = "d"
 *                 elif t == NPY_LONGDOUBLE:  f = "g"
 */
      case NPY_FLOAT:
      __pyx_v_f = __pyx_k__f;
      break;

      /* "numpy.pxd":269
 *                 elif t == NPY_ULONGLONG:   f = "Q"
 *                 elif t == NPY_FLOAT:       f = "f"
 *                 elif t == NPY_DOUBLE:      f = "d"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_LONGDOUBLE:  f = "g"
 *                 elif t == NPY_CFLOAT:      f = "Zf"
 */
      case NPY_DOUBLE:
      __pyx_v_f = __pyx_k__d;
      break;

      /* "numpy.pxd":270
 *                 elif t == NPY_FLOAT:       f = "f"
 *                 elif t == NPY_DOUBLE:      f = "d"
 *                 elif t == NPY_LONGDOUBLE:  f = "g"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_CFLOAT:      f = "Zf"
 *                 elif t == NPY_CDOUBLE:     f = "Zd"
 */
      case NPY_LONGDOUBLE:
      __pyx_v_f = __pyx_k__g;
      break;

      /* "numpy.pxd":271
 *                 elif t == NPY_DOUBLE:      f = "d"
 *                 elif t == NPY_LONGDOUBLE:  f = "g"
 *                 elif t == NPY_CFLOAT:      f = "Zf"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_CDOUBLE:     f = "Zd"
 *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
 */
      case NPY_CFLOAT:
      __pyx_v_f = __pyx_k__Zf;
      break;

      /* "numpy.pxd":272
 *                 elif t == NPY_LONGDOUBLE:  f = "g"
 *                 elif t == NPY_CFLOAT:      f = "Zf"
 *                 elif t == NPY_CDOUBLE:     f = "Zd"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
 *                 elif t == NPY_OBJECT:      f = "O"
 */
      case NPY_CDOUBLE:
      __pyx_v_f = __pyx_k__Zd;
      break;

      /* "numpy.pxd":273
 *                 elif t == NPY_CFLOAT:      f = "Zf"
 *                 elif t == NPY_CDOUBLE:     f = "Zd"
 *                 elif t == NPY_CLONGDOUBLE: f = "Zg"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_OBJECT:      f = "O"
 *                 else:
 */
      case NPY_CLONGDOUBLE:
      __pyx_v_f = __pyx_k__Zg;
      break;

      /* "numpy.pxd":274
 *                 elif t == NPY_CDOUBLE:     f = "Zd"
 *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
 *                 elif t == NPY_OBJECT:      f = "O"             # <<<<<<<<<<<<<<
 *                 else:
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 */
      case NPY_OBJECT:
      __pyx_v_f = __pyx_k__O;
      break;
      default:

      /* "numpy.pxd":276
 *                 elif t == NPY_OBJECT:      f = "O"
 *                 else:
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
 *                 info.format = f
 *                 return
 */
      __pyx_t_4 = PyInt_FromLong(__pyx_v_t); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_43), __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_8));
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_8));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_8));
      __pyx_t_8 = 0;
      __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      break;
    }

    /* "numpy.pxd":277
 *                 else:
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 *                 info.format = f             # <<<<<<<<<<<<<<
 *                 return
 *             else:
 */
    __pyx_v_info->format = __pyx_v_f;

    /* "numpy.pxd":278
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 *                 info.format = f
 *                 return             # <<<<<<<<<<<<<<
 *             else:
 *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)
 */
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L11;
  }
  /*else*/ {

    /* "numpy.pxd":280
 *                 return
 *             else:
 *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)             # <<<<<<<<<<<<<<
 *                 info.format[0] = c'^' # Native data types, manual alignment
 *                 offset = 0
 */
    __pyx_v_info->format = ((char *)malloc(255));

    /* "numpy.pxd":281
 *             else:
 *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)
 *                 info.format[0] = c'^' # Native data types, manual alignment             # <<<<<<<<<<<<<<
 *                 offset = 0
 *                 f = _util_dtypestring(descr, info.format + 1,
 */
    (__pyx_v_info->format[0]) = '^';

    /* "numpy.pxd":282
 *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)
 *                 info.format[0] = c'^' # Native data types, manual alignment
 *                 offset = 0             # <<<<<<<<<<<<<<
 *                 f = _util_dtypestring(descr, info.format + 1,
 *                                       info.format + _buffer_format_string_len,
 */
    __pyx_v_offset = 0;

    /* "numpy.pxd":285
 *                 f = _util_dtypestring(descr, info.format + 1,
 *                                       info.format + _buffer_format_string_len,
 *                                       &offset)             # <<<<<<<<<<<<<<
 *                 f[0] = c'\0' # Terminate format string
 * 
 */
    __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_f = __pyx_t_9;

    /* "numpy.pxd":286
 *                                       info.format + _buffer_format_string_len,
 *                                       &offset)
 *                 f[0] = c'\0' # Terminate format string             # <<<<<<<<<<<<<<
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):
 */
    (__pyx_v_f[0]) = '\x00';
  }
  __pyx_L11:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL;
  }
  goto __pyx_L2;
  __pyx_L0:;
  if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) {
    __Pyx_GOTREF(Py_None);
    __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL;
  }
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_descr);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
  __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info));
  __Pyx_RefNannyFinishContext();
}

/* "numpy.pxd":288
 *                 f[0] = c'\0' # Terminate format string
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):             # <<<<<<<<<<<<<<
 *             if PyArray_HASFIELDS(self):
 *                 stdlib.free(info.format)
 */

static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__releasebuffer__", 0);

  /* "numpy.pxd":289
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):
 *             if PyArray_HASFIELDS(self):             # <<<<<<<<<<<<<<
 *                 stdlib.free(info.format)
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 */
  __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0);
  if (__pyx_t_1) {

    /* "numpy.pxd":290
 *         def __releasebuffer__(ndarray self, Py_buffer* info):
 *             if PyArray_HASFIELDS(self):
 *                 stdlib.free(info.format)             # <<<<<<<<<<<<<<
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 *                 stdlib.free(info.strides)
 */
    free(__pyx_v_info->format);
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "numpy.pxd":291
 *             if PyArray_HASFIELDS(self):
 *                 stdlib.free(info.format)
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
 *                 stdlib.free(info.strides)
 *                 # info.shape was stored after info.strides in the same block
 */
  __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
  if (__pyx_t_1) {

    /* "numpy.pxd":292
 *                 stdlib.free(info.format)
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 *                 stdlib.free(info.strides)             # <<<<<<<<<<<<<<
 *                 # info.shape was stored after info.strides in the same block
 * 
 */
    free(__pyx_v_info->strides);
    goto __pyx_L4;
  }
  __pyx_L4:;

  __Pyx_RefNannyFinishContext();
}

/* "numpy.pxd":768
 * ctypedef npy_cdouble     complex_t
 * 
 * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);

  /* "numpy.pxd":769
 * 
 * cdef inline object PyArray_MultiIterNew1(a):
 *     return PyArray_MultiIterNew(1, <void*>a)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "numpy.pxd":771
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);

  /* "numpy.pxd":772
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "numpy.pxd":774
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);

  /* "numpy.pxd":775
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "numpy.pxd":777
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);

  /* "numpy.pxd":778
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "numpy.pxd":780
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);

  /* "numpy.pxd":781
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)             # <<<<<<<<<<<<<<
 * 
 * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "numpy.pxd":783
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:             # <<<<<<<<<<<<<<
 *     # Recursive utility function used in __getbuffer__ to get format
 *     # string. The new location in the format string is returned.
 */

static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) {
  PyArray_Descr *__pyx_v_child = 0;
  int __pyx_v_endian_detector;
  int __pyx_v_little_endian;
  PyObject *__pyx_v_fields = 0;
  PyObject *__pyx_v_childname = NULL;
  PyObject *__pyx_v_new_offset = NULL;
  PyObject *__pyx_v_t = NULL;
  char *__pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *(*__pyx_t_6)(PyObject *);
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  long __pyx_t_11;
  char *__pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_util_dtypestring", 0);

  /* "numpy.pxd":790
 *     cdef int delta_offset
 *     cdef tuple i
 *     cdef int endian_detector = 1             # <<<<<<<<<<<<<<
 *     cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
 *     cdef tuple fields
 */
  __pyx_v_endian_detector = 1;

  /* "numpy.pxd":791
 *     cdef tuple i
 *     cdef int endian_detector = 1
 *     cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)             # <<<<<<<<<<<<<<
 *     cdef tuple fields
 * 
 */
  __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);

  /* "numpy.pxd":794
 *     cdef tuple fields
 * 
 *     for childname in descr.names:             # <<<<<<<<<<<<<<
 *         fields = descr.fields[childname]
 *         child, new_offset = fields
 */
  if (unlikely(((PyObject *)__pyx_v_descr->names) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = ((PyObject *)__pyx_v_descr->names); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF(__pyx_v_childname);
    __pyx_v_childname = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "numpy.pxd":795
 * 
 *     for childname in descr.names:
 *         fields = descr.fields[childname]             # <<<<<<<<<<<<<<
 *         child, new_offset = fields
 * 
 */
    __pyx_t_3 = PyObject_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (!__pyx_t_3) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected tuple, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_XDECREF(((PyObject *)__pyx_v_fields));
    __pyx_v_fields = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "numpy.pxd":796
 *     for childname in descr.names:
 *         fields = descr.fields[childname]
 *         child, new_offset = fields             # <<<<<<<<<<<<<<
 * 
 *         if (end - f) - (new_offset - offset[0]) < 15:
 */
    if (likely(PyTuple_CheckExact(((PyObject *)__pyx_v_fields)))) {
      PyObject* sequence = ((PyObject *)__pyx_v_fields);
      #if CYTHON_COMPILING_IN_CPYTHON
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      #endif
    } else if (1) {
      __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else
    {
      Py_ssize_t index = -1;
      __pyx_t_5 = PyObject_GetIter(((PyObject *)__pyx_v_fields)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
      index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_6 = NULL;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_6 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L6_unpacking_done:;
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_XDECREF(((PyObject *)__pyx_v_child));
    __pyx_v_child = ((PyArray_Descr *)__pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_v_new_offset);
    __pyx_v_new_offset = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "numpy.pxd":798
 *         child, new_offset = fields
 * 
 *         if (end - f) - (new_offset - offset[0]) < 15:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
 * 
 */
    __pyx_t_4 = PyInt_FromLong((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_int_15, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_7) {

      /* "numpy.pxd":799
 * 
 *         if (end - f) - (new_offset - offset[0]) < 15:
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")             # <<<<<<<<<<<<<<
 * 
 *         if ((child.byteorder == c'>' and little_endian) or
 */
      __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_45), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L7;
    }
    __pyx_L7:;

    /* "numpy.pxd":801
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
 * 
 *         if ((child.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
 *             (child.byteorder == c'<' and not little_endian)):
 *             raise ValueError(u"Non-native byte order not supported")
 */
    __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0);
    if (__pyx_t_7) {
      __pyx_t_8 = (__pyx_v_little_endian != 0);
    } else {
      __pyx_t_8 = __pyx_t_7;
    }
    if (!__pyx_t_8) {

      /* "numpy.pxd":802
 * 
 *         if ((child.byteorder == c'>' and little_endian) or
 *             (child.byteorder == c'<' and not little_endian)):             # <<<<<<<<<<<<<<
 *             raise ValueError(u"Non-native byte order not supported")
 *             # One could encode it in the format string and have Cython
 */
      __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0);
      if (__pyx_t_7) {
        __pyx_t_9 = ((!(__pyx_v_little_endian != 0)) != 0);
        __pyx_t_10 = __pyx_t_9;
      } else {
        __pyx_t_10 = __pyx_t_7;
      }
      __pyx_t_7 = __pyx_t_10;
    } else {
      __pyx_t_7 = __pyx_t_8;
    }
    if (__pyx_t_7) {

      /* "numpy.pxd":803
 *         if ((child.byteorder == c'>' and little_endian) or
 *             (child.byteorder == c'<' and not little_endian)):
 *             raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
 *             # One could encode it in the format string and have Cython
 *             # complain instead, BUT: < and > in format strings also imply
 */
      __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_46), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "numpy.pxd":813
 * 
 *         # Output padding bytes
 *         while offset[0] < new_offset:             # <<<<<<<<<<<<<<
 *             f[0] = 120 # "x"; pad byte
 *             f += 1
 */
    while (1) {
      __pyx_t_5 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!__pyx_t_7) break;

      /* "numpy.pxd":814
 *         # Output padding bytes
 *         while offset[0] < new_offset:
 *             f[0] = 120 # "x"; pad byte             # <<<<<<<<<<<<<<
 *             f += 1
 *             offset[0] += 1
 */
      (__pyx_v_f[0]) = 120;

      /* "numpy.pxd":815
 *         while offset[0] < new_offset:
 *             f[0] = 120 # "x"; pad byte
 *             f += 1             # <<<<<<<<<<<<<<
 *             offset[0] += 1
 * 
 */
      __pyx_v_f = (__pyx_v_f + 1);

      /* "numpy.pxd":816
 *             f[0] = 120 # "x"; pad byte
 *             f += 1
 *             offset[0] += 1             # <<<<<<<<<<<<<<
 * 
 *         offset[0] += child.itemsize
 */
      __pyx_t_11 = 0;
      (__pyx_v_offset[__pyx_t_11]) = ((__pyx_v_offset[__pyx_t_11]) + 1);
    }

    /* "numpy.pxd":818
 *             offset[0] += 1
 * 
 *         offset[0] += child.itemsize             # <<<<<<<<<<<<<<
 * 
 *         if not PyDataType_HASFIELDS(child):
 */
    __pyx_t_11 = 0;
    (__pyx_v_offset[__pyx_t_11]) = ((__pyx_v_offset[__pyx_t_11]) + __pyx_v_child->elsize);

    /* "numpy.pxd":820
 *         offset[0] += child.itemsize
 * 
 *         if not PyDataType_HASFIELDS(child):             # <<<<<<<<<<<<<<
 *             t = child.type_num
 *             if end - f < 5:
 */
    __pyx_t_7 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0);
    if (__pyx_t_7) {

      /* "numpy.pxd":821
 * 
 *         if not PyDataType_HASFIELDS(child):
 *             t = child.type_num             # <<<<<<<<<<<<<<
 *             if end - f < 5:
 *                 raise RuntimeError(u"Format string allocated too short.")
 */
      __pyx_t_3 = PyInt_FromLong(__pyx_v_child->type_num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_v_t);
      __pyx_v_t = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "numpy.pxd":822
 *         if not PyDataType_HASFIELDS(child):
 *             t = child.type_num
 *             if end - f < 5:             # <<<<<<<<<<<<<<
 *                 raise RuntimeError(u"Format string allocated too short.")
 * 
 */
      __pyx_t_7 = (((__pyx_v_end - __pyx_v_f) < 5) != 0);
      if (__pyx_t_7) {

        /* "numpy.pxd":823
 *             t = child.type_num
 *             if end - f < 5:
 *                 raise RuntimeError(u"Format string allocated too short.")             # <<<<<<<<<<<<<<
 * 
 *             # Until ticket #99 is fixed, use integers to avoid warnings
 */
        __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_48), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L12;
      }
      __pyx_L12:;

      /* "numpy.pxd":826
 * 
 *             # Until ticket #99 is fixed, use integers to avoid warnings
 *             if   t == NPY_BYTE:        f[0] =  98 #"b"             # <<<<<<<<<<<<<<
 *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"
 */
      __pyx_t_3 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 98;
        goto __pyx_L13;
      }

      /* "numpy.pxd":827
 *             # Until ticket #99 is fixed, use integers to avoid warnings
 *             if   t == NPY_BYTE:        f[0] =  98 #"b"
 *             elif t == NPY_UBYTE:       f[0] =  66 #"B"             # <<<<<<<<<<<<<<
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"
 */
      __pyx_t_5 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 66;
        goto __pyx_L13;
      }

      /* "numpy.pxd":828
 *             if   t == NPY_BYTE:        f[0] =  98 #"b"
 *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"             # <<<<<<<<<<<<<<
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"
 *             elif t == NPY_INT:         f[0] = 105 #"i"
 */
      __pyx_t_3 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 104;
        goto __pyx_L13;
      }

      /* "numpy.pxd":829
 *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"             # <<<<<<<<<<<<<<
 *             elif t == NPY_INT:         f[0] = 105 #"i"
 *             elif t == NPY_UINT:        f[0] =  73 #"I"
 */
      __pyx_t_5 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 72;
        goto __pyx_L13;
      }

      /* "numpy.pxd":830
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"
 *             elif t == NPY_INT:         f[0] = 105 #"i"             # <<<<<<<<<<<<<<
 *             elif t == NPY_UINT:        f[0] =  73 #"I"
 *             elif t == NPY_LONG:        f[0] = 108 #"l"
 */
      __pyx_t_3 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 105;
        goto __pyx_L13;
      }

      /* "numpy.pxd":831
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"
 *             elif t == NPY_INT:         f[0] = 105 #"i"
 *             elif t == NPY_UINT:        f[0] =  73 #"I"             # <<<<<<<<<<<<<<
 *             elif t == NPY_LONG:        f[0] = 108 #"l"
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"
 */
      __pyx_t_5 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 73;
        goto __pyx_L13;
      }

      /* "numpy.pxd":832
 *             elif t == NPY_INT:         f[0] = 105 #"i"
 *             elif t == NPY_UINT:        f[0] =  73 #"I"
 *             elif t == NPY_LONG:        f[0] = 108 #"l"             # <<<<<<<<<<<<<<
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
 */
      __pyx_t_3 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 108;
        goto __pyx_L13;
      }

      /* "numpy.pxd":833
 *             elif t == NPY_UINT:        f[0] =  73 #"I"
 *             elif t == NPY_LONG:        f[0] = 108 #"l"
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"             # <<<<<<<<<<<<<<
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
 */
      __pyx_t_5 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 76;
        goto __pyx_L13;
      }

      /* "numpy.pxd":834
 *             elif t == NPY_LONG:        f[0] = 108 #"l"
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"             # <<<<<<<<<<<<<<
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
 */
      __pyx_t_3 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 113;
        goto __pyx_L13;
      }

      /* "numpy.pxd":835
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"             # <<<<<<<<<<<<<<
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
 */
      __pyx_t_5 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 81;
        goto __pyx_L13;
      }

      /* "numpy.pxd":836
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"             # <<<<<<<<<<<<<<
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
 */
      __pyx_t_3 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 102;
        goto __pyx_L13;
      }

      /* "numpy.pxd":837
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"             # <<<<<<<<<<<<<<
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
 */
      __pyx_t_5 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 100;
        goto __pyx_L13;
      }

      /* "numpy.pxd":838
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"             # <<<<<<<<<<<<<<
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
 */
      __pyx_t_3 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 103;
        goto __pyx_L13;
      }

      /* "numpy.pxd":839
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf             # <<<<<<<<<<<<<<
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
 *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
 */
      __pyx_t_5 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 90;
        (__pyx_v_f[1]) = 102;
        __pyx_v_f = (__pyx_v_f + 1);
        goto __pyx_L13;
      }

      /* "numpy.pxd":840
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd             # <<<<<<<<<<<<<<
 *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
 *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
 */
      __pyx_t_3 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 90;
        (__pyx_v_f[1]) = 100;
        __pyx_v_f = (__pyx_v_f + 1);
        goto __pyx_L13;
      }

      /* "numpy.pxd":841
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
 *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg             # <<<<<<<<<<<<<<
 *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
 *             else:
 */
      __pyx_t_5 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 90;
        (__pyx_v_f[1]) = 103;
        __pyx_v_f = (__pyx_v_f + 1);
        goto __pyx_L13;
      }

      /* "numpy.pxd":842
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
 *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
 *             elif t == NPY_OBJECT:      f[0] = 79 #"O"             # <<<<<<<<<<<<<<
 *             else:
 *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 */
      __pyx_t_3 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 79;
        goto __pyx_L13;
      }
      /*else*/ {

        /* "numpy.pxd":844
 *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
 *             else:
 *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
 *             f += 1
 *         else:
 */
        __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_43), __pyx_v_t); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_5));
        __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_5));
        __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
        __pyx_t_5 = 0;
        __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
        __Pyx_Raise(__pyx_t_5, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_L13:;

      /* "numpy.pxd":845
 *             else:
 *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 *             f += 1             # <<<<<<<<<<<<<<
 *         else:
 *             # Cython ignores struct boundary information ("T{...}"),
 */
      __pyx_v_f = (__pyx_v_f + 1);
      goto __pyx_L11;
    }
    /*else*/ {

      /* "numpy.pxd":849
 *             # Cython ignores struct boundary information ("T{...}"),
 *             # so don't output it
 *             f = _util_dtypestring(child, f, end, offset)             # <<<<<<<<<<<<<<
 *     return f
 * 
 */
      __pyx_t_12 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_v_f = __pyx_t_12;
    }
    __pyx_L11:;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "numpy.pxd":850
 *             # so don't output it
 *             f = _util_dtypestring(child, f, end, offset)
 *     return f             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_f;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_child);
  __Pyx_XDECREF(__pyx_v_fields);
  __Pyx_XDECREF(__pyx_v_childname);
  __Pyx_XDECREF(__pyx_v_new_offset);
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "numpy.pxd":965
 * 
 * 
 * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
 *      cdef PyObject* baseptr
 *      if base is None:
 */

static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
  PyObject *__pyx_v_baseptr;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("set_array_base", 0);

  /* "numpy.pxd":967
 * cdef inline void set_array_base(ndarray arr, object base):
 *      cdef PyObject* baseptr
 *      if base is None:             # <<<<<<<<<<<<<<
 *          baseptr = NULL
 *      else:
 */
  __pyx_t_1 = (__pyx_v_base == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "numpy.pxd":968
 *      cdef PyObject* baseptr
 *      if base is None:
 *          baseptr = NULL             # <<<<<<<<<<<<<<
 *      else:
 *          Py_INCREF(base) # important to do this before decref below!
 */
    __pyx_v_baseptr = NULL;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "numpy.pxd":970
 *          baseptr = NULL
 *      else:
 *          Py_INCREF(base) # important to do this before decref below!             # <<<<<<<<<<<<<<
 *          baseptr = <PyObject*>base
 *      Py_XDECREF(arr.base)
 */
    Py_INCREF(__pyx_v_base);

    /* "numpy.pxd":971
 *      else:
 *          Py_INCREF(base) # important to do this before decref below!
 *          baseptr = <PyObject*>base             # <<<<<<<<<<<<<<
 *      Py_XDECREF(arr.base)
 *      arr.base = baseptr
 */
    __pyx_v_baseptr = ((PyObject *)__pyx_v_base);
  }
  __pyx_L3:;

  /* "numpy.pxd":972
 *          Py_INCREF(base) # important to do this before decref below!
 *          baseptr = <PyObject*>base
 *      Py_XDECREF(arr.base)             # <<<<<<<<<<<<<<
 *      arr.base = baseptr
 * 
 */
  Py_XDECREF(__pyx_v_arr->base);

  /* "numpy.pxd":973
 *          baseptr = <PyObject*>base
 *      Py_XDECREF(arr.base)
 *      arr.base = baseptr             # <<<<<<<<<<<<<<
 * 
 * cdef inline object get_array_base(ndarray arr):
 */
  __pyx_v_arr->base = __pyx_v_baseptr;

  __Pyx_RefNannyFinishContext();
}

/* "numpy.pxd":975
 *      arr.base = baseptr
 * 
 * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
 *     if arr.base is NULL:
 *         return None
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("get_array_base", 0);

  /* "numpy.pxd":976
 * 
 * cdef inline object get_array_base(ndarray arr):
 *     if arr.base is NULL:             # <<<<<<<<<<<<<<
 *         return None
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_arr->base == NULL) != 0);
  if (__pyx_t_1) {

    /* "numpy.pxd":977
 * cdef inline object get_array_base(ndarray arr):
 *     if arr.base is NULL:
 *         return None             # <<<<<<<<<<<<<<
 *     else:
 *         return <object>arr.base
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "numpy.pxd":979
 *         return None
 *     else:
 *         return <object>arr.base             # <<<<<<<<<<<<<<
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_arr->base));
    __pyx_r = ((PyObject *)__pyx_v_arr->base);
    goto __pyx_L0;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "string.from_py":13
 * 
 * @cname("__pyx_convert_string_from_py_")
 * cdef string __pyx_convert_string_from_py_(object o) except *:             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t length
 *     cdef char* data = __Pyx_PyObject_AsStringAndSize(o, &length)
 */

static std::string __pyx_convert_string_from_py_(PyObject *__pyx_v_o) {
  Py_ssize_t __pyx_v_length;
  char *__pyx_v_data;
  std::string __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_convert_string_from_py_", 0);

  /* "string.from_py":15
 * cdef string __pyx_convert_string_from_py_(object o) except *:
 *     cdef Py_ssize_t length
 *     cdef char* data = __Pyx_PyObject_AsStringAndSize(o, &length)             # <<<<<<<<<<<<<<
 *     return string(data, length)
 * 
 */
  __pyx_v_data = __Pyx_PyObject_AsStringAndSize(__pyx_v_o, (&__pyx_v_length));

  /* "string.from_py":16
 *     cdef Py_ssize_t length
 *     cdef char* data = __Pyx_PyObject_AsStringAndSize(o, &length)
 *     return string(data, length)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = std::string(__pyx_v_data, __pyx_v_length);
  goto __pyx_L0;

  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vector.from_py":46
 * 
 * @cname("__pyx_convert_vector_from_py_std_3a__3a_string")
 * cdef vector[X] __pyx_convert_vector_from_py_std_3a__3a_string(object o) except *:             # <<<<<<<<<<<<<<
 *     cdef vector[X] v
 *     for item in o:
 */

static std::vector<std::string> __pyx_convert_vector_from_py_std_3a__3a_string(PyObject *__pyx_v_o) {
  std::vector<std::string> __pyx_v_v;
  PyObject *__pyx_v_item = NULL;
  std::vector<std::string> __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  std::string __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_vector_from_py_std_3a__3a_string", 0);

  /* "vector.from_py":48
 * cdef vector[X] __pyx_convert_vector_from_py_std_3a__3a_string(object o) except *:
 *     cdef vector[X] v
 *     for item in o:             # <<<<<<<<<<<<<<
 *         v.push_back(X_from_py(item))
 *     return v
 */
  if (PyList_CheckExact(__pyx_v_o) || PyTuple_CheckExact(__pyx_v_o)) {
    __pyx_t_1 = __pyx_v_o; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) {
      if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) {
      if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[2]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF(__pyx_v_item);
    __pyx_v_item = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "vector.from_py":49
 *     cdef vector[X] v
 *     for item in o:
 *         v.push_back(X_from_py(item))             # <<<<<<<<<<<<<<
 *     return v
 * 
 */
    __pyx_t_5 = __pyx_convert_string_from_py_(__pyx_v_item); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_v.push_back(__pyx_t_5);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vector.from_py":50
 *     for item in o:
 *         v.push_back(X_from_py(item))
 *     return v             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_v;
  goto __pyx_L0;

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("vector.from_py.__pyx_convert_vector_from_py_std_3a__3a_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "map.from_py":200
 * 
 * @cname("__pyx_convert_map_from_py_std_3a__3a_string____int")
 * cdef map[X,Y] __pyx_convert_map_from_py_std_3a__3a_string____int(object o) except *:             # <<<<<<<<<<<<<<
 *     cdef dict d = o
 *     cdef map[X,Y] m
 */

static std::map<std::string,int> __pyx_convert_map_from_py_std_3a__3a_string____int(PyObject *__pyx_v_o) {
  PyObject *__pyx_v_d = 0;
  std::map<std::string,int> __pyx_v_m;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_value = NULL;
  std::map<std::string,int> __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  std::string __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_map_from_py_std_3a__3a_string____int", 0);

  /* "map.from_py":201
 * @cname("__pyx_convert_map_from_py_std_3a__3a_string____int")
 * cdef map[X,Y] __pyx_convert_map_from_py_std_3a__3a_string____int(object o) except *:
 *     cdef dict d = o             # <<<<<<<<<<<<<<
 *     cdef map[X,Y] m
 *     for key, value in d.iteritems():
 */
  if (!(likely(PyDict_CheckExact(__pyx_v_o))||((__pyx_v_o) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected dict, got %.200s", Py_TYPE(__pyx_v_o)->tp_name), 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_INCREF(__pyx_v_o);
  __pyx_v_d = ((PyObject*)__pyx_v_o);

  /* "map.from_py":203
 *     cdef dict d = o
 *     cdef map[X,Y] m
 *     for key, value in d.iteritems():             # <<<<<<<<<<<<<<
 *         m.insert(pair[X,Y](X_from_py(key), Y_from_py(value)))
 *     return m
 */
  __pyx_t_2 = 0;
  if (unlikely(((PyObject *)__pyx_v_d) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "iteritems");
    {__pyx_filename = __pyx_f[3]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_5 = __Pyx_dict_iterator(((PyObject *)__pyx_v_d), 1, ((PyObject *)__pyx_n_s__iteritems), (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_5;
  __pyx_t_5 = 0;
  while (1) {
    __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, &__pyx_t_6, NULL, __pyx_t_4);
    if (unlikely(__pyx_t_7 == 0)) break;
    if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_XDECREF(__pyx_v_key);
    __pyx_v_key = __pyx_t_5;
    __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_v_value);
    __pyx_v_value = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "map.from_py":204
 *     cdef map[X,Y] m
 *     for key, value in d.iteritems():
 *         m.insert(pair[X,Y](X_from_py(key), Y_from_py(value)))             # <<<<<<<<<<<<<<
 *     return m
 * 
 */
    __pyx_t_8 = __pyx_convert_string_from_py_(__pyx_v_key); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_v_value); if (unlikely(__pyx_t_9 == -1 && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_m.insert(std::pair<std::string,int>(__pyx_t_8, __pyx_t_9));
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "map.from_py":205
 *     for key, value in d.iteritems():
 *         m.insert(pair[X,Y](X_from_py(key), Y_from_py(value)))
 *     return m             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_m;
  goto __pyx_L0;

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("map.from_py.__pyx_convert_map_from_py_std_3a__3a_string____int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "string.to_py":30
 * 
 * @cname("__pyx_convert_string_to_py_")
 * cdef object __pyx_convert_string_to_py_(string& s):             # <<<<<<<<<<<<<<
 *     return __Pyx_PyObject_FromStringAndSize(s.data(), s.size())
 * 
 */

static PyObject *__pyx_convert_string_to_py_(const std::string &__pyx_v_s) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_string_to_py_", 0);

  /* "string.to_py":31
 * @cname("__pyx_convert_string_to_py_")
 * cdef object __pyx_convert_string_to_py_(string& s):
 *     return __Pyx_PyObject_FromStringAndSize(s.data(), s.size())             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("string.to_py.__pyx_convert_string_to_py_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vector.to_py":63
 * 
 * @cname("__pyx_convert_vector_to_py_std_3a__3a_string")
 * cdef object __pyx_convert_vector_to_py_std_3a__3a_string(vector[X]& v):             # <<<<<<<<<<<<<<
 *     return [X_to_py(v[i]) for i in range(v.size())]
 * 
 */

static PyObject *__pyx_convert_vector_to_py_std_3a__3a_string(const std::vector<std::string> &__pyx_v_v) {
  size_t __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_std_3a__3a_string", 0);

  /* "vector.to_py":64
 * @cname("__pyx_convert_vector_to_py_std_3a__3a_string")
 * cdef object __pyx_convert_vector_to_py_std_3a__3a_string(vector[X]& v):
 *     return [X_to_py(v[i]) for i in range(v.size())]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_v_v.size();
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;
    __pyx_t_4 = __pyx_convert_string_to_py_((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("vector.to_py.__pyx_convert_vector_to_py_std_3a__3a_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vector.to_py":63
 * 
 * @cname("__pyx_convert_vector_to_py_float")
 * cdef object __pyx_convert_vector_to_py_float(vector[X]& v):             # <<<<<<<<<<<<<<
 *     return [X_to_py(v[i]) for i in range(v.size())]
 * 
 */

static PyObject *__pyx_convert_vector_to_py_float(const std::vector<float> &__pyx_v_v) {
  size_t __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_float", 0);

  /* "vector.to_py":64
 * @cname("__pyx_convert_vector_to_py_float")
 * cdef object __pyx_convert_vector_to_py_float(vector[X]& v):
 *     return [X_to_py(v[i]) for i in range(v.size())]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_v_v.size();
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;
    __pyx_t_4 = PyFloat_FromDouble((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("vector.to_py.__pyx_convert_vector_to_py_float", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vector.to_py":63
 * 
 * @cname("__pyx_convert_vector_to_py_int")
 * cdef object __pyx_convert_vector_to_py_int(vector[X]& v):             # <<<<<<<<<<<<<<
 *     return [X_to_py(v[i]) for i in range(v.size())]
 * 
 */

static PyObject *__pyx_convert_vector_to_py_int(const std::vector<int> &__pyx_v_v) {
  size_t __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_int", 0);

  /* "vector.to_py":64
 * @cname("__pyx_convert_vector_to_py_int")
 * cdef object __pyx_convert_vector_to_py_int(vector[X]& v):
 *     return [X_to_py(v[i]) for i in range(v.size())]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_v_v.size();
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;
    __pyx_t_4 = PyInt_FromLong((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("vector.to_py.__pyx_convert_vector_to_py_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_5vcfnp___pyx_scope_struct_7_eff_default_transformer *__pyx_freelist_5vcfnp___pyx_scope_struct_7_eff_default_transformer[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct_7_eff_default_transformer = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_7_eff_default_transformer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_7_eff_default_transformer *p;
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct_7_eff_default_transformer > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_7_eff_default_transformer)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct_7_eff_default_transformer[--__pyx_freecount_5vcfnp___pyx_scope_struct_7_eff_default_transformer];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_7_eff_default_transformer));
    PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  p = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_7_eff_default_transformer *)o);
  p->__pyx_v_fills = 0;
  p->__pyx_v_prog_eff_main = 0;
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_7_eff_default_transformer(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_7_eff_default_transformer *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_7_eff_default_transformer *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_fills);
  Py_CLEAR(p->__pyx_v_prog_eff_main);
  if ((__pyx_freecount_5vcfnp___pyx_scope_struct_7_eff_default_transformer < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_7_eff_default_transformer))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct_7_eff_default_transformer[__pyx_freecount_5vcfnp___pyx_scope_struct_7_eff_default_transformer++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_7_eff_default_transformer *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct_7_eff_default_transformer(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_7_eff_default_transformer *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_7_eff_default_transformer *)o;
  if (p->__pyx_v_fills) {
    e = (*v)(p->__pyx_v_fills, a); if (e) return e;
  }
  if (p->__pyx_v_prog_eff_main) {
    e = (*v)(p->__pyx_v_prog_eff_main, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5vcfnp___pyx_scope_struct_7_eff_default_transformer(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_7_eff_default_transformer *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_7_eff_default_transformer *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->__pyx_v_fills);
  p->__pyx_v_fills = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_prog_eff_main);
  p->__pyx_v_prog_eff_main = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_5vcfnp___pyx_scope_struct_7_eff_default_transformer[] = {
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct_7_eff_default_transformer = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct_7_eff_default_transformer"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_7_eff_default_transformer), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_7_eff_default_transformer, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5vcfnp___pyx_scope_struct_7_eff_default_transformer, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct_7_eff_default_transformer, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5vcfnp___pyx_scope_struct_7_eff_default_transformer, /*tp_methods*/
  0, /*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_5vcfnp___pyx_scope_struct_7_eff_default_transformer, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static struct __pyx_obj_5vcfnp___pyx_scope_struct___iter_withprogress *__pyx_freelist_5vcfnp___pyx_scope_struct___iter_withprogress[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct___iter_withprogress = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct___iter_withprogress(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct___iter_withprogress *p;
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct___iter_withprogress > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct___iter_withprogress)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct___iter_withprogress[--__pyx_freecount_5vcfnp___pyx_scope_struct___iter_withprogress];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct___iter_withprogress));
    PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  p = ((struct __pyx_obj_5vcfnp___pyx_scope_struct___iter_withprogress *)o);
  p->__pyx_v_after = 0;
  p->__pyx_v_after_all = 0;
  p->__pyx_v_before = 0;
  p->__pyx_v_before_all = 0;
  p->__pyx_v_iterable = 0;
  p->__pyx_v_logstream = 0;
  p->__pyx_v_o = 0;
  p->__pyx_t_0 = 0;
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct___iter_withprogress(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct___iter_withprogress *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct___iter_withprogress *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_after);
  Py_CLEAR(p->__pyx_v_after_all);
  Py_CLEAR(p->__pyx_v_before);
  Py_CLEAR(p->__pyx_v_before_all);
  Py_CLEAR(p->__pyx_v_iterable);
  Py_CLEAR(p->__pyx_v_logstream);
  Py_CLEAR(p->__pyx_v_o);
  Py_CLEAR(p->__pyx_t_0);
  if ((__pyx_freecount_5vcfnp___pyx_scope_struct___iter_withprogress < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct___iter_withprogress))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct___iter_withprogress[__pyx_freecount_5vcfnp___pyx_scope_struct___iter_withprogress++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct___iter_withprogress *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct___iter_withprogress(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct___iter_withprogress *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct___iter_withprogress *)o;
  if (p->__pyx_v_after) {
    e = (*v)(p->__pyx_v_after, a); if (e) return e;
  }
  if (p->__pyx_v_after_all) {
    e = (*v)(p->__pyx_v_after_all, a); if (e) return e;
  }
  if (p->__pyx_v_before) {
    e = (*v)(p->__pyx_v_before, a); if (e) return e;
  }
  if (p->__pyx_v_before_all) {
    e = (*v)(p->__pyx_v_before_all, a); if (e) return e;
  }
  if (p->__pyx_v_iterable) {
    e = (*v)(p->__pyx_v_iterable, a); if (e) return e;
  }
  if (p->__pyx_v_logstream) {
    e = (*v)(p->__pyx_v_logstream, a); if (e) return e;
  }
  if (p->__pyx_v_o) {
    e = (*v)(p->__pyx_v_o, a); if (e) return e;
  }
  if (p->__pyx_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5vcfnp___pyx_scope_struct___iter_withprogress(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct___iter_withprogress *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct___iter_withprogress *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->__pyx_v_after);
  p->__pyx_v_after = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_after_all);
  p->__pyx_v_after_all = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_before);
  p->__pyx_v_before = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_before_all);
  p->__pyx_v_before_all = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_iterable);
  p->__pyx_v_iterable = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_logstream);
  p->__pyx_v_logstream = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_o);
  p->__pyx_v_o = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_0);
  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_5vcfnp___pyx_scope_struct___iter_withprogress[] = {
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct___iter_withprogress = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct___iter_withprogress"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct___iter_withprogress), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct___iter_withprogress, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5vcfnp___pyx_scope_struct___iter_withprogress, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct___iter_withprogress, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5vcfnp___pyx_scope_struct___iter_withprogress, /*tp_methods*/
  0, /*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_5vcfnp___pyx_scope_struct___iter_withprogress, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static struct __pyx_obj_5vcfnp___pyx_scope_struct_1__itervariants *__pyx_freelist_5vcfnp___pyx_scope_struct_1__itervariants[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct_1__itervariants = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_1__itervariants(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_1__itervariants *p;
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct_1__itervariants > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_1__itervariants)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct_1__itervariants[--__pyx_freecount_5vcfnp___pyx_scope_struct_1__itervariants];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_1__itervariants));
    PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  p = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_1__itervariants *)o);
  new((void*)&(p->__pyx_v_arities)) std::map<std::string,int>();
  new((void*)&(p->__pyx_v_fields)) std::vector<std::string>();
  new((void*)&(p->__pyx_v_filterIds)) std::vector<std::string>();
  p->__pyx_v_current_filename = 0;
  p->__pyx_v_filenames = 0;
  p->__pyx_v_fills = 0;
  p->__pyx_v_region = 0;
  p->__pyx_t_0 = 0;
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_1__itervariants(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_1__itervariants *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_1__itervariants *)o;
  PyObject_GC_UnTrack(o);
  p->__pyx_v_arities.std::map<std::string,int>::~map();
  p->__pyx_v_fields.std::vector<std::string>::~vector();
  p->__pyx_v_filterIds.std::vector<std::string>::~vector();
  Py_CLEAR(p->__pyx_v_current_filename);
  Py_CLEAR(p->__pyx_v_filenames);
  Py_CLEAR(p->__pyx_v_fills);
  Py_CLEAR(p->__pyx_v_region);
  Py_CLEAR(p->__pyx_t_0);
  if ((__pyx_freecount_5vcfnp___pyx_scope_struct_1__itervariants < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_1__itervariants))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct_1__itervariants[__pyx_freecount_5vcfnp___pyx_scope_struct_1__itervariants++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_1__itervariants *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct_1__itervariants(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_1__itervariants *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_1__itervariants *)o;
  if (p->__pyx_v_current_filename) {
    e = (*v)(p->__pyx_v_current_filename, a); if (e) return e;
  }
  if (p->__pyx_v_filenames) {
    e = (*v)(p->__pyx_v_filenames, a); if (e) return e;
  }
  if (p->__pyx_v_fills) {
    e = (*v)(p->__pyx_v_fills, a); if (e) return e;
  }
  if (p->__pyx_v_region) {
    e = (*v)(p->__pyx_v_region, a); if (e) return e;
  }
  if (p->__pyx_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5vcfnp___pyx_scope_struct_1__itervariants(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_1__itervariants *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_1__itervariants *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->__pyx_v_current_filename);
  p->__pyx_v_current_filename = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_filenames);
  p->__pyx_v_filenames = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_fills);
  p->__pyx_v_fills = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_region);
  p->__pyx_v_region = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_0);
  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_5vcfnp___pyx_scope_struct_1__itervariants[] = {
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct_1__itervariants = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct_1__itervariants"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_1__itervariants), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_1__itervariants, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5vcfnp___pyx_scope_struct_1__itervariants, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct_1__itervariants, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5vcfnp___pyx_scope_struct_1__itervariants, /*tp_methods*/
  0, /*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_5vcfnp___pyx_scope_struct_1__itervariants, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static struct __pyx_obj_5vcfnp___pyx_scope_struct_9_genexpr *__pyx_freelist_5vcfnp___pyx_scope_struct_9_genexpr[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct_9_genexpr = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_9_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_9_genexpr *p;
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct_9_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_9_genexpr)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct_9_genexpr[--__pyx_freecount_5vcfnp___pyx_scope_struct_9_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_9_genexpr));
    PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  p = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_9_genexpr *)o);
  p->__pyx_outer_scope = 0;
  p->__pyx_v_fill = 0;
  p->__pyx_v_i = 0;
  p->__pyx_v_v = 0;
  p->__pyx_t_0 = 0;
  p->__pyx_t_1 = 0;
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_9_genexpr(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_9_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_9_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_fill);
  Py_CLEAR(p->__pyx_v_i);
  Py_CLEAR(p->__pyx_v_v);
  Py_CLEAR(p->__pyx_t_0);
  Py_CLEAR(p->__pyx_t_1);
  if ((__pyx_freecount_5vcfnp___pyx_scope_struct_9_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_9_genexpr))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct_9_genexpr[__pyx_freecount_5vcfnp___pyx_scope_struct_9_genexpr++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_9_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct_9_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_9_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_9_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_fill) {
    e = (*v)(p->__pyx_v_fill, a); if (e) return e;
  }
  if (p->__pyx_v_i) {
    e = (*v)(p->__pyx_v_i, a); if (e) return e;
  }
  if (p->__pyx_v_v) {
    e = (*v)(p->__pyx_v_v, a); if (e) return e;
  }
  if (p->__pyx_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  if (p->__pyx_t_1) {
    e = (*v)(p->__pyx_t_1, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5vcfnp___pyx_scope_struct_9_genexpr(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_9_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_9_genexpr *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->__pyx_outer_scope);
  p->__pyx_outer_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_8__transformer *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_fill);
  p->__pyx_v_fill = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_i);
  p->__pyx_v_i = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_v);
  p->__pyx_v_v = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_0);
  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_1);
  p->__pyx_t_1 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_5vcfnp___pyx_scope_struct_9_genexpr[] = {
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct_9_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct_9_genexpr"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_9_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_9_genexpr, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5vcfnp___pyx_scope_struct_9_genexpr, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct_9_genexpr, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5vcfnp___pyx_scope_struct_9_genexpr, /*tp_methods*/
  0, /*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_5vcfnp___pyx_scope_struct_9_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static struct __pyx_obj_5vcfnp___pyx_scope_struct_5__itercalldata *__pyx_freelist_5vcfnp___pyx_scope_struct_5__itercalldata[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct_5__itercalldata = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_5__itercalldata(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_5__itercalldata *p;
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct_5__itercalldata > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_5__itercalldata)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct_5__itercalldata[--__pyx_freecount_5vcfnp___pyx_scope_struct_5__itercalldata];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_5__itercalldata));
    PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  p = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_5__itercalldata *)o);
  new((void*)&(p->__pyx_v_arities)) std::map<std::string,int>();
  new((void*)&(p->__pyx_v_fields)) std::vector<std::string>();
  new((void*)&(p->__pyx_v_samples)) std::vector<std::string>();
  p->__pyx_v_current_filename = 0;
  p->__pyx_v_filenames = 0;
  p->__pyx_v_fills = 0;
  p->__pyx_v_region = 0;
  p->__pyx_t_0 = 0;
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_5__itercalldata(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_5__itercalldata *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_5__itercalldata *)o;
  PyObject_GC_UnTrack(o);
  p->__pyx_v_arities.std::map<std::string,int>::~map();
  p->__pyx_v_fields.std::vector<std::string>::~vector();
  p->__pyx_v_samples.std::vector<std::string>::~vector();
  Py_CLEAR(p->__pyx_v_current_filename);
  Py_CLEAR(p->__pyx_v_filenames);
  Py_CLEAR(p->__pyx_v_fills);
  Py_CLEAR(p->__pyx_v_region);
  Py_CLEAR(p->__pyx_t_0);
  if ((__pyx_freecount_5vcfnp___pyx_scope_struct_5__itercalldata < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_5__itercalldata))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct_5__itercalldata[__pyx_freecount_5vcfnp___pyx_scope_struct_5__itercalldata++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_5__itercalldata *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct_5__itercalldata(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_5__itercalldata *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_5__itercalldata *)o;
  if (p->__pyx_v_current_filename) {
    e = (*v)(p->__pyx_v_current_filename, a); if (e) return e;
  }
  if (p->__pyx_v_filenames) {
    e = (*v)(p->__pyx_v_filenames, a); if (e) return e;
  }
  if (p->__pyx_v_fills) {
    e = (*v)(p->__pyx_v_fills, a); if (e) return e;
  }
  if (p->__pyx_v_region) {
    e = (*v)(p->__pyx_v_region, a); if (e) return e;
  }
  if (p->__pyx_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5vcfnp___pyx_scope_struct_5__itercalldata(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_5__itercalldata *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_5__itercalldata *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->__pyx_v_current_filename);
  p->__pyx_v_current_filename = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_filenames);
  p->__pyx_v_filenames = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_fills);
  p->__pyx_v_fills = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_region);
  p->__pyx_v_region = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_0);
  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_5vcfnp___pyx_scope_struct_5__itercalldata[] = {
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct_5__itercalldata = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct_5__itercalldata"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_5__itercalldata), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_5__itercalldata, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5vcfnp___pyx_scope_struct_5__itercalldata, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct_5__itercalldata, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5vcfnp___pyx_scope_struct_5__itercalldata, /*tp_methods*/
  0, /*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_5vcfnp___pyx_scope_struct_5__itercalldata, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static struct __pyx_obj_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition *__pyx_freelist_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition *p;
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition[--__pyx_freecount_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition));
    PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  p = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition *)o);
  new((void*)&(p->__pyx_v_arities)) std::map<std::string,int>();
  new((void*)&(p->__pyx_v_fields)) std::vector<std::string>();
  new((void*)&(p->__pyx_v_samples)) std::vector<std::string>();
  p->__pyx_v_condition = 0;
  p->__pyx_v_current_filename = 0;
  p->__pyx_v_filenames = 0;
  p->__pyx_v_fills = 0;
  p->__pyx_v_region = 0;
  p->__pyx_t_1 = 0;
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition *)o;
  PyObject_GC_UnTrack(o);
  p->__pyx_v_arities.std::map<std::string,int>::~map();
  p->__pyx_v_fields.std::vector<std::string>::~vector();
  p->__pyx_v_samples.std::vector<std::string>::~vector();
  Py_CLEAR(p->__pyx_v_condition);
  Py_CLEAR(p->__pyx_v_current_filename);
  Py_CLEAR(p->__pyx_v_filenames);
  Py_CLEAR(p->__pyx_v_fills);
  Py_CLEAR(p->__pyx_v_region);
  Py_CLEAR(p->__pyx_t_1);
  if ((__pyx_freecount_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition[__pyx_freecount_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition *)o;
  if (p->__pyx_v_condition) {
    e = (*v)(p->__pyx_v_condition, a); if (e) return e;
  }
  if (p->__pyx_v_current_filename) {
    e = (*v)(p->__pyx_v_current_filename, a); if (e) return e;
  }
  if (p->__pyx_v_filenames) {
    e = (*v)(p->__pyx_v_filenames, a); if (e) return e;
  }
  if (p->__pyx_v_fills) {
    e = (*v)(p->__pyx_v_fills, a); if (e) return e;
  }
  if (p->__pyx_v_region) {
    e = (*v)(p->__pyx_v_region, a); if (e) return e;
  }
  if (p->__pyx_t_1) {
    e = (*v)(p->__pyx_t_1, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->__pyx_v_condition);
  p->__pyx_v_condition = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_current_filename);
  p->__pyx_v_current_filename = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_filenames);
  p->__pyx_v_filenames = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_fills);
  p->__pyx_v_fills = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_region);
  p->__pyx_v_region = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_1);
  p->__pyx_t_1 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition[] = {
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct_6__itercalldata_with_condition"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition, /*tp_methods*/
  0, /*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_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static struct __pyx_obj_5vcfnp___pyx_scope_struct_2__itervariants_with_condition *__pyx_freelist_5vcfnp___pyx_scope_struct_2__itervariants_with_condition[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct_2__itervariants_with_condition = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_2__itervariants_with_condition(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_2__itervariants_with_condition *p;
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct_2__itervariants_with_condition > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_2__itervariants_with_condition)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct_2__itervariants_with_condition[--__pyx_freecount_5vcfnp___pyx_scope_struct_2__itervariants_with_condition];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_2__itervariants_with_condition));
    PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  p = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_2__itervariants_with_condition *)o);
  new((void*)&(p->__pyx_v_arities)) std::map<std::string,int>();
  new((void*)&(p->__pyx_v_fields)) std::vector<std::string>();
  new((void*)&(p->__pyx_v_filterIds)) std::vector<std::string>();
  p->__pyx_v_condition = 0;
  p->__pyx_v_current_filename = 0;
  p->__pyx_v_filenames = 0;
  p->__pyx_v_fills = 0;
  p->__pyx_v_region = 0;
  p->__pyx_t_1 = 0;
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_2__itervariants_with_condition(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_2__itervariants_with_condition *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_2__itervariants_with_condition *)o;
  PyObject_GC_UnTrack(o);
  p->__pyx_v_arities.std::map<std::string,int>::~map();
  p->__pyx_v_fields.std::vector<std::string>::~vector();
  p->__pyx_v_filterIds.std::vector<std::string>::~vector();
  Py_CLEAR(p->__pyx_v_condition);
  Py_CLEAR(p->__pyx_v_current_filename);
  Py_CLEAR(p->__pyx_v_filenames);
  Py_CLEAR(p->__pyx_v_fills);
  Py_CLEAR(p->__pyx_v_region);
  Py_CLEAR(p->__pyx_t_1);
  if ((__pyx_freecount_5vcfnp___pyx_scope_struct_2__itervariants_with_condition < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_2__itervariants_with_condition))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct_2__itervariants_with_condition[__pyx_freecount_5vcfnp___pyx_scope_struct_2__itervariants_with_condition++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_2__itervariants_with_condition *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct_2__itervariants_with_condition(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_2__itervariants_with_condition *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_2__itervariants_with_condition *)o;
  if (p->__pyx_v_condition) {
    e = (*v)(p->__pyx_v_condition, a); if (e) return e;
  }
  if (p->__pyx_v_current_filename) {
    e = (*v)(p->__pyx_v_current_filename, a); if (e) return e;
  }
  if (p->__pyx_v_filenames) {
    e = (*v)(p->__pyx_v_filenames, a); if (e) return e;
  }
  if (p->__pyx_v_fills) {
    e = (*v)(p->__pyx_v_fills, a); if (e) return e;
  }
  if (p->__pyx_v_region) {
    e = (*v)(p->__pyx_v_region, a); if (e) return e;
  }
  if (p->__pyx_t_1) {
    e = (*v)(p->__pyx_t_1, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5vcfnp___pyx_scope_struct_2__itervariants_with_condition(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_2__itervariants_with_condition *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_2__itervariants_with_condition *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->__pyx_v_condition);
  p->__pyx_v_condition = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_current_filename);
  p->__pyx_v_current_filename = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_filenames);
  p->__pyx_v_filenames = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_fills);
  p->__pyx_v_fills = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_region);
  p->__pyx_v_region = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_1);
  p->__pyx_t_1 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_5vcfnp___pyx_scope_struct_2__itervariants_with_condition[] = {
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct_2__itervariants_with_condition = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct_2__itervariants_with_condition"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_2__itervariants_with_condition), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_2__itervariants_with_condition, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5vcfnp___pyx_scope_struct_2__itervariants_with_condition, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct_2__itervariants_with_condition, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5vcfnp___pyx_scope_struct_2__itervariants_with_condition, /*tp_methods*/
  0, /*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_5vcfnp___pyx_scope_struct_2__itervariants_with_condition, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static struct __pyx_obj_5vcfnp___pyx_scope_struct_3__iterinfo *__pyx_freelist_5vcfnp___pyx_scope_struct_3__iterinfo[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct_3__iterinfo = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_3__iterinfo(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_3__iterinfo *p;
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct_3__iterinfo > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_3__iterinfo)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct_3__iterinfo[--__pyx_freecount_5vcfnp___pyx_scope_struct_3__iterinfo];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_3__iterinfo));
    PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  p = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_3__iterinfo *)o);
  new((void*)&(p->__pyx_v_arities)) std::map<std::string,int>();
  new((void*)&(p->__pyx_v_fields)) std::vector<std::string>();
  p->__pyx_v_current_filename = 0;
  p->__pyx_v_filenames = 0;
  p->__pyx_v_fills = 0;
  p->__pyx_v_infoTypes = 0;
  p->__pyx_v_region = 0;
  p->__pyx_v_transformers = 0;
  p->__pyx_t_0 = 0;
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_3__iterinfo(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_3__iterinfo *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_3__iterinfo *)o;
  PyObject_GC_UnTrack(o);
  p->__pyx_v_arities.std::map<std::string,int>::~map();
  p->__pyx_v_fields.std::vector<std::string>::~vector();
  Py_CLEAR(p->__pyx_v_current_filename);
  Py_CLEAR(p->__pyx_v_filenames);
  Py_CLEAR(p->__pyx_v_fills);
  Py_CLEAR(p->__pyx_v_infoTypes);
  Py_CLEAR(p->__pyx_v_region);
  Py_CLEAR(p->__pyx_v_transformers);
  Py_CLEAR(p->__pyx_t_0);
  if ((__pyx_freecount_5vcfnp___pyx_scope_struct_3__iterinfo < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_3__iterinfo))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct_3__iterinfo[__pyx_freecount_5vcfnp___pyx_scope_struct_3__iterinfo++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_3__iterinfo *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct_3__iterinfo(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_3__iterinfo *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_3__iterinfo *)o;
  if (p->__pyx_v_current_filename) {
    e = (*v)(p->__pyx_v_current_filename, a); if (e) return e;
  }
  if (p->__pyx_v_filenames) {
    e = (*v)(p->__pyx_v_filenames, a); if (e) return e;
  }
  if (p->__pyx_v_fills) {
    e = (*v)(p->__pyx_v_fills, a); if (e) return e;
  }
  if (p->__pyx_v_infoTypes) {
    e = (*v)(p->__pyx_v_infoTypes, a); if (e) return e;
  }
  if (p->__pyx_v_region) {
    e = (*v)(p->__pyx_v_region, a); if (e) return e;
  }
  if (p->__pyx_v_transformers) {
    e = (*v)(p->__pyx_v_transformers, a); if (e) return e;
  }
  if (p->__pyx_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5vcfnp___pyx_scope_struct_3__iterinfo(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_3__iterinfo *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_3__iterinfo *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->__pyx_v_current_filename);
  p->__pyx_v_current_filename = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_filenames);
  p->__pyx_v_filenames = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_fills);
  p->__pyx_v_fills = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_infoTypes);
  p->__pyx_v_infoTypes = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_region);
  p->__pyx_v_region = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_transformers);
  p->__pyx_v_transformers = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_0);
  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_5vcfnp___pyx_scope_struct_3__iterinfo[] = {
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct_3__iterinfo = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct_3__iterinfo"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_3__iterinfo), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_3__iterinfo, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5vcfnp___pyx_scope_struct_3__iterinfo, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct_3__iterinfo, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5vcfnp___pyx_scope_struct_3__iterinfo, /*tp_methods*/
  0, /*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_5vcfnp___pyx_scope_struct_3__iterinfo, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static struct __pyx_obj_5vcfnp___pyx_scope_struct_8__transformer *__pyx_freelist_5vcfnp___pyx_scope_struct_8__transformer[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct_8__transformer = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_8__transformer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_8__transformer *p;
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct_8__transformer > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_8__transformer)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct_8__transformer[--__pyx_freecount_5vcfnp___pyx_scope_struct_8__transformer];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_8__transformer));
    PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  p = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_8__transformer *)o);
  p->__pyx_outer_scope = 0;
  p->__pyx_v_eff = 0;
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_8__transformer(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_8__transformer *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_8__transformer *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_eff);
  if ((__pyx_freecount_5vcfnp___pyx_scope_struct_8__transformer < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_8__transformer))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct_8__transformer[__pyx_freecount_5vcfnp___pyx_scope_struct_8__transformer++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_8__transformer *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct_8__transformer(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_8__transformer *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_8__transformer *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_eff) {
    e = (*v)(p->__pyx_v_eff, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5vcfnp___pyx_scope_struct_8__transformer(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_8__transformer *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_8__transformer *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->__pyx_outer_scope);
  p->__pyx_outer_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_7_eff_default_transformer *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_eff);
  p->__pyx_v_eff = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_5vcfnp___pyx_scope_struct_8__transformer[] = {
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct_8__transformer = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct_8__transformer"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_8__transformer), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_8__transformer, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5vcfnp___pyx_scope_struct_8__transformer, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct_8__transformer, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5vcfnp___pyx_scope_struct_8__transformer, /*tp_methods*/
  0, /*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_5vcfnp___pyx_scope_struct_8__transformer, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static struct __pyx_obj_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition *__pyx_freelist_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition *p;
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition[--__pyx_freecount_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition));
    PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  p = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition *)o);
  new((void*)&(p->__pyx_v_arities)) std::map<std::string,int>();
  new((void*)&(p->__pyx_v_fields)) std::vector<std::string>();
  p->__pyx_v_condition = 0;
  p->__pyx_v_current_filename = 0;
  p->__pyx_v_filenames = 0;
  p->__pyx_v_fills = 0;
  p->__pyx_v_infoTypes = 0;
  p->__pyx_v_region = 0;
  p->__pyx_v_transformers = 0;
  p->__pyx_t_1 = 0;
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition *)o;
  PyObject_GC_UnTrack(o);
  p->__pyx_v_arities.std::map<std::string,int>::~map();
  p->__pyx_v_fields.std::vector<std::string>::~vector();
  Py_CLEAR(p->__pyx_v_condition);
  Py_CLEAR(p->__pyx_v_current_filename);
  Py_CLEAR(p->__pyx_v_filenames);
  Py_CLEAR(p->__pyx_v_fills);
  Py_CLEAR(p->__pyx_v_infoTypes);
  Py_CLEAR(p->__pyx_v_region);
  Py_CLEAR(p->__pyx_v_transformers);
  Py_CLEAR(p->__pyx_t_1);
  if ((__pyx_freecount_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition[__pyx_freecount_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition *)o;
  if (p->__pyx_v_condition) {
    e = (*v)(p->__pyx_v_condition, a); if (e) return e;
  }
  if (p->__pyx_v_current_filename) {
    e = (*v)(p->__pyx_v_current_filename, a); if (e) return e;
  }
  if (p->__pyx_v_filenames) {
    e = (*v)(p->__pyx_v_filenames, a); if (e) return e;
  }
  if (p->__pyx_v_fills) {
    e = (*v)(p->__pyx_v_fills, a); if (e) return e;
  }
  if (p->__pyx_v_infoTypes) {
    e = (*v)(p->__pyx_v_infoTypes, a); if (e) return e;
  }
  if (p->__pyx_v_region) {
    e = (*v)(p->__pyx_v_region, a); if (e) return e;
  }
  if (p->__pyx_v_transformers) {
    e = (*v)(p->__pyx_v_transformers, a); if (e) return e;
  }
  if (p->__pyx_t_1) {
    e = (*v)(p->__pyx_t_1, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->__pyx_v_condition);
  p->__pyx_v_condition = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_current_filename);
  p->__pyx_v_current_filename = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_filenames);
  p->__pyx_v_filenames = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_fills);
  p->__pyx_v_fills = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_infoTypes);
  p->__pyx_v_infoTypes = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_region);
  p->__pyx_v_region = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_transformers);
  p->__pyx_v_transformers = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_1);
  p->__pyx_t_1 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition[] = {
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct_4__iterinfo_with_condition"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition, /*tp_methods*/
  0, /*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_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef __pyx_moduledef = {
  #if PY_VERSION_HEX < 0x03020000
    { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
  #else
    PyModuleDef_HEAD_INIT,
  #endif
    __Pyx_NAMESTR("vcfnp"),
    __Pyx_DOCSTR(__pyx_k_49), /* m_doc */
    -1, /* m_size */
    __pyx_methods /* m_methods */,
    NULL, /* m_reload */
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_kp_s_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 0, 1, 0},
  {&__pyx_kp_u_100, __pyx_k_100, sizeof(__pyx_k_100), 0, 1, 0, 0},
  {&__pyx_kp_s_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 0, 1, 0},
  {&__pyx_n_s_13, __pyx_k_13, sizeof(__pyx_k_13), 0, 0, 1, 1},
  {&__pyx_kp_s_15, __pyx_k_15, sizeof(__pyx_k_15), 0, 0, 1, 0},
  {&__pyx_kp_s_16, __pyx_k_16, sizeof(__pyx_k_16), 0, 0, 1, 0},
  {&__pyx_n_s_17, __pyx_k_17, sizeof(__pyx_k_17), 0, 0, 1, 1},
  {&__pyx_n_s_18, __pyx_k_18, sizeof(__pyx_k_18), 0, 0, 1, 1},
  {&__pyx_kp_s_19, __pyx_k_19, sizeof(__pyx_k_19), 0, 0, 1, 0},
  {&__pyx_kp_s_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 1, 0},
  {&__pyx_kp_b_20, __pyx_k_20, sizeof(__pyx_k_20), 0, 0, 0, 0},
  {&__pyx_kp_s_20, __pyx_k_20, sizeof(__pyx_k_20), 0, 0, 1, 0},
  {&__pyx_n_s_21, __pyx_k_21, sizeof(__pyx_k_21), 0, 0, 1, 1},
  {&__pyx_n_s_22, __pyx_k_22, sizeof(__pyx_k_22), 0, 0, 1, 1},
  {&__pyx_kp_b_23, __pyx_k_23, sizeof(__pyx_k_23), 0, 0, 0, 0},
  {&__pyx_kp_s_23, __pyx_k_23, sizeof(__pyx_k_23), 0, 0, 1, 0},
  {&__pyx_kp_s_27, __pyx_k_27, sizeof(__pyx_k_27), 0, 0, 1, 0},
  {&__pyx_kp_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 0},
  {&__pyx_kp_s_31, __pyx_k_31, sizeof(__pyx_k_31), 0, 0, 1, 0},
  {&__pyx_kp_s_35, __pyx_k_35, sizeof(__pyx_k_35), 0, 0, 1, 0},
  {&__pyx_n_s_36, __pyx_k_36, sizeof(__pyx_k_36), 0, 0, 1, 1},
  {&__pyx_kp_u_37, __pyx_k_37, sizeof(__pyx_k_37), 0, 1, 0, 0},
  {&__pyx_kp_u_39, __pyx_k_39, sizeof(__pyx_k_39), 0, 1, 0, 0},
  {&__pyx_kp_u_41, __pyx_k_41, sizeof(__pyx_k_41), 0, 1, 0, 0},
  {&__pyx_kp_u_43, __pyx_k_43, sizeof(__pyx_k_43), 0, 1, 0, 0},
  {&__pyx_kp_u_44, __pyx_k_44, sizeof(__pyx_k_44), 0, 1, 0, 0},
  {&__pyx_kp_u_47, __pyx_k_47, sizeof(__pyx_k_47), 0, 1, 0, 0},
  {&__pyx_n_s_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 0, 1, 1},
  {&__pyx_kp_s_50, __pyx_k_50, sizeof(__pyx_k_50), 0, 0, 1, 0},
  {&__pyx_kp_b_53, __pyx_k_53, sizeof(__pyx_k_53), 0, 0, 0, 0},
  {&__pyx_n_s_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 0, 1, 1},
  {&__pyx_n_s_7, __pyx_k_7, sizeof(__pyx_k_7), 0, 0, 1, 1},
  {&__pyx_n_s_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 1},
  {&__pyx_n_s_92, __pyx_k_92, sizeof(__pyx_k_92), 0, 0, 1, 1},
  {&__pyx_kp_u_93, __pyx_k_93, sizeof(__pyx_k_93), 0, 1, 0, 0},
  {&__pyx_kp_u_94, __pyx_k_94, sizeof(__pyx_k_94), 0, 1, 0, 0},
  {&__pyx_kp_u_95, __pyx_k_95, sizeof(__pyx_k_95), 0, 1, 0, 0},
  {&__pyx_kp_u_96, __pyx_k_96, sizeof(__pyx_k_96), 0, 1, 0, 0},
  {&__pyx_kp_u_97, __pyx_k_97, sizeof(__pyx_k_97), 0, 1, 0, 0},
  {&__pyx_kp_u_98, __pyx_k_98, sizeof(__pyx_k_98), 0, 1, 0, 0},
  {&__pyx_kp_u_99, __pyx_k_99, sizeof(__pyx_k_99), 0, 1, 0, 0},
  {&__pyx_n_s__A, __pyx_k__A, sizeof(__pyx_k__A), 0, 0, 1, 1},
  {&__pyx_n_s__AC, __pyx_k__AC, sizeof(__pyx_k__AC), 0, 0, 1, 1},
  {&__pyx_n_s__AD, __pyx_k__AD, sizeof(__pyx_k__AD), 0, 0, 1, 1},
  {&__pyx_n_b__ALT, __pyx_k__ALT, sizeof(__pyx_k__ALT), 0, 0, 0, 1},
  {&__pyx_n_s__ALT, __pyx_k__ALT, sizeof(__pyx_k__ALT), 0, 0, 1, 1},
  {&__pyx_n_s__AN, __pyx_k__AN, sizeof(__pyx_k__AN), 0, 0, 1, 1},
  {&__pyx_n_s__Amino_Acid_Change, __pyx_k__Amino_Acid_Change, sizeof(__pyx_k__Amino_Acid_Change), 0, 0, 1, 1},
  {&__pyx_n_s__Amino_Acid_Length, __pyx_k__Amino_Acid_Length, sizeof(__pyx_k__Amino_Acid_Length), 0, 0, 1, 1},
  {&__pyx_n_s__C, __pyx_k__C, sizeof(__pyx_k__C), 0, 0, 1, 1},
  {&__pyx_n_s__CALLDATA_FIELDS, __pyx_k__CALLDATA_FIELDS, sizeof(__pyx_k__CALLDATA_FIELDS), 0, 0, 1, 1},
  {&__pyx_n_b__CHROM, __pyx_k__CHROM, sizeof(__pyx_k__CHROM), 0, 0, 0, 1},
  {&__pyx_n_s__CHROM, __pyx_k__CHROM, sizeof(__pyx_k__CHROM), 0, 0, 1, 1},
  {&__pyx_n_s__CODING, __pyx_k__CODING, sizeof(__pyx_k__CODING), 0, 0, 1, 1},
  {&__pyx_n_s__Codon_Change, __pyx_k__Codon_Change, sizeof(__pyx_k__Codon_Change), 0, 0, 1, 1},
  {&__pyx_n_s__DEFAULT_FILL_MAP, __pyx_k__DEFAULT_FILL_MAP, sizeof(__pyx_k__DEFAULT_FILL_MAP), 0, 0, 1, 1},
  {&__pyx_n_s__DEFAULT_INFO_DTYPE, __pyx_k__DEFAULT_INFO_DTYPE, sizeof(__pyx_k__DEFAULT_INFO_DTYPE), 0, 0, 1, 1},
  {&__pyx_n_s__DEFAULT_TYPE_MAP, __pyx_k__DEFAULT_TYPE_MAP, sizeof(__pyx_k__DEFAULT_TYPE_MAP), 0, 0, 1, 1},
  {&__pyx_n_s__DP, __pyx_k__DP, sizeof(__pyx_k__DP), 0, 0, 1, 1},
  {&__pyx_n_s__EFF_DEFAULT_DTYPE, __pyx_k__EFF_DEFAULT_DTYPE, sizeof(__pyx_k__EFF_DEFAULT_DTYPE), 0, 0, 1, 1},
  {&__pyx_n_s__EFF_DEFAULT_FILLS, __pyx_k__EFF_DEFAULT_FILLS, sizeof(__pyx_k__EFF_DEFAULT_FILLS), 0, 0, 1, 1},
  {&__pyx_n_s__Effect, __pyx_k__Effect, sizeof(__pyx_k__Effect), 0, 0, 1, 1},
  {&__pyx_n_s__Effect_Impact, __pyx_k__Effect_Impact, sizeof(__pyx_k__Effect_Impact), 0, 0, 1, 1},
  {&__pyx_n_s__Exception, __pyx_k__Exception, sizeof(__pyx_k__Exception), 0, 0, 1, 1},
  {&__pyx_n_s__Exon, __pyx_k__Exon, sizeof(__pyx_k__Exon), 0, 0, 1, 1},
  {&__pyx_n_b__FILTER, __pyx_k__FILTER, sizeof(__pyx_k__FILTER), 0, 0, 0, 1},
  {&__pyx_n_s__FILTER, __pyx_k__FILTER, sizeof(__pyx_k__FILTER), 0, 0, 1, 1},
  {&__pyx_n_s__Flag, __pyx_k__Flag, sizeof(__pyx_k__Flag), 0, 0, 1, 1},
  {&__pyx_n_s__Float, __pyx_k__Float, sizeof(__pyx_k__Float), 0, 0, 1, 1},
  {&__pyx_n_s__Functional_Class, __pyx_k__Functional_Class, sizeof(__pyx_k__Functional_Class), 0, 0, 1, 1},
  {&__pyx_n_s__G, __pyx_k__G, sizeof(__pyx_k__G), 0, 0, 1, 1},
  {&__pyx_n_s__GQ, __pyx_k__GQ, sizeof(__pyx_k__GQ), 0, 0, 1, 1},
  {&__pyx_n_b__GT, __pyx_k__GT, sizeof(__pyx_k__GT), 0, 0, 0, 1},
  {&__pyx_n_s__GT, __pyx_k__GT, sizeof(__pyx_k__GT), 0, 0, 1, 1},
  {&__pyx_n_s__Gene_Coding, __pyx_k__Gene_Coding, sizeof(__pyx_k__Gene_Coding), 0, 0, 1, 1},
  {&__pyx_n_s__Gene_Name, __pyx_k__Gene_Name, sizeof(__pyx_k__Gene_Name), 0, 0, 1, 1},
  {&__pyx_n_s__HRun, __pyx_k__HRun, sizeof(__pyx_k__HRun), 0, 0, 1, 1},
  {&__pyx_n_b__ID, __pyx_k__ID, sizeof(__pyx_k__ID), 0, 0, 0, 1},
  {&__pyx_n_s__ID, __pyx_k__ID, sizeof(__pyx_k__ID), 0, 0, 1, 1},
  {&__pyx_n_b__INFO, __pyx_k__INFO, sizeof(__pyx_k__INFO), 0, 0, 0, 1},
  {&__pyx_n_s__Integer, __pyx_k__Integer, sizeof(__pyx_k__Integer), 0, 0, 1, 1},
  {&__pyx_n_s__MLEAC, __pyx_k__MLEAC, sizeof(__pyx_k__MLEAC), 0, 0, 1, 1},
  {&__pyx_n_s__MLPSAC, __pyx_k__MLPSAC, sizeof(__pyx_k__MLPSAC), 0, 0, 1, 1},
  {&__pyx_n_s__MLPSAF, __pyx_k__MLPSAF, sizeof(__pyx_k__MLPSAF), 0, 0, 1, 1},
  {&__pyx_n_s__MQ, __pyx_k__MQ, sizeof(__pyx_k__MQ), 0, 0, 1, 1},
  {&__pyx_n_s__MQ0, __pyx_k__MQ0, sizeof(__pyx_k__MQ0), 0, 0, 1, 1},
  {&__pyx_n_s__PASS, __pyx_k__PASS, sizeof(__pyx_k__PASS), 0, 0, 1, 1},
  {&__pyx_n_s__PL, __pyx_k__PL, sizeof(__pyx_k__PL), 0, 0, 1, 1},
  {&__pyx_n_b__POS, __pyx_k__POS, sizeof(__pyx_k__POS), 0, 0, 0, 1},
  {&__pyx_n_s__POS, __pyx_k__POS, sizeof(__pyx_k__POS), 0, 0, 1, 1},
  {&__pyx_n_s__QD, __pyx_k__QD, sizeof(__pyx_k__QD), 0, 0, 1, 1},
  {&__pyx_n_b__QUAL, __pyx_k__QUAL, sizeof(__pyx_k__QUAL), 0, 0, 0, 1},
  {&__pyx_n_s__QUAL, __pyx_k__QUAL, sizeof(__pyx_k__QUAL), 0, 0, 1, 1},
  {&__pyx_n_b__REF, __pyx_k__REF, sizeof(__pyx_k__REF), 0, 0, 0, 1},
  {&__pyx_n_s__REF, __pyx_k__REF, sizeof(__pyx_k__REF), 0, 0, 1, 1},
  {&__pyx_n_s__RPA, __pyx_k__RPA, sizeof(__pyx_k__RPA), 0, 0, 1, 1},
  {&__pyx_n_s__RuntimeError, __pyx_k__RuntimeError, sizeof(__pyx_k__RuntimeError), 0, 0, 1, 1},
  {&__pyx_n_s__String, __pyx_k__String, sizeof(__pyx_k__String), 0, 0, 1, 1},
  {&__pyx_n_s__T, __pyx_k__T, sizeof(__pyx_k__T), 0, 0, 1, 1},
  {&__pyx_n_s__TYPESTRING2KEY, __pyx_k__TYPESTRING2KEY, sizeof(__pyx_k__TYPESTRING2KEY), 0, 0, 1, 1},
  {&__pyx_n_s__Transcript_BioType, __pyx_k__Transcript_BioType, sizeof(__pyx_k__Transcript_BioType), 0, 0, 1, 1},
  {&__pyx_n_s__Transcript_ID, __pyx_k__Transcript_ID, sizeof(__pyx_k__Transcript_ID), 0, 0, 1, 1},
  {&__pyx_n_s__VARIANT_FIELDS, __pyx_k__VARIANT_FIELDS, sizeof(__pyx_k__VARIANT_FIELDS), 0, 0, 1, 1},
  {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1},
  {&__pyx_n_s____import__, __pyx_k____import__, sizeof(__pyx_k____import__), 0, 0, 1, 1},
  {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1},
  {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1},
  {&__pyx_n_s____version__, __pyx_k____version__, sizeof(__pyx_k____version__), 0, 0, 1, 1},
  {&__pyx_n_s___fromiter, __pyx_k___fromiter, sizeof(__pyx_k___fromiter), 0, 0, 1, 1},
  {&__pyx_n_s___iter_withprogress, __pyx_k___iter_withprogress, sizeof(__pyx_k___iter_withprogress), 0, 0, 1, 1},
  {&__pyx_n_s___itercalldata, __pyx_k___itercalldata, sizeof(__pyx_k___itercalldata), 0, 0, 1, 1},
  {&__pyx_n_s___iterinfo, __pyx_k___iterinfo, sizeof(__pyx_k___iterinfo), 0, 0, 1, 1},
  {&__pyx_n_s___itervariants, __pyx_k___itervariants, sizeof(__pyx_k___itervariants), 0, 0, 1, 1},
  {&__pyx_n_s___transformer, __pyx_k___transformer, sizeof(__pyx_k___transformer), 0, 0, 1, 1},
  {&__pyx_n_s__a, __pyx_k__a, sizeof(__pyx_k__a), 0, 0, 1, 1},
  {&__pyx_n_s__a12, __pyx_k__a12, sizeof(__pyx_k__a12), 0, 0, 1, 1},
  {&__pyx_n_s__a14, __pyx_k__a14, sizeof(__pyx_k__a14), 0, 0, 1, 1},
  {&__pyx_n_s__a20, __pyx_k__a20, sizeof(__pyx_k__a20), 0, 0, 1, 1},
  {&__pyx_n_s__a33, __pyx_k__a33, sizeof(__pyx_k__a33), 0, 0, 1, 1},
  {&__pyx_n_s__a6, __pyx_k__a6, sizeof(__pyx_k__a6), 0, 0, 1, 1},
  {&__pyx_n_s__a7, __pyx_k__a7, sizeof(__pyx_k__a7), 0, 0, 1, 1},
  {&__pyx_n_s__a8, __pyx_k__a8, sizeof(__pyx_k__a8), 0, 0, 1, 1},
  {&__pyx_n_s__after, __pyx_k__after, sizeof(__pyx_k__after), 0, 0, 1, 1},
  {&__pyx_n_s__after_all, __pyx_k__after_all, sizeof(__pyx_k__after_all), 0, 0, 1, 1},
  {&__pyx_n_s__all_samples, __pyx_k__all_samples, sizeof(__pyx_k__all_samples), 0, 0, 1, 1},
  {&__pyx_n_s__args, __pyx_k__args, sizeof(__pyx_k__args), 0, 0, 1, 1},
  {&__pyx_n_s__arities, __pyx_k__arities, sizeof(__pyx_k__arities), 0, 0, 1, 1},
  {&__pyx_n_s__b, __pyx_k__b, sizeof(__pyx_k__b), 0, 0, 1, 1},
  {&__pyx_n_s__b1, __pyx_k__b1, sizeof(__pyx_k__b1), 0, 0, 1, 1},
  {&__pyx_n_s__before, __pyx_k__before, sizeof(__pyx_k__before), 0, 0, 1, 1},
  {&__pyx_n_s__before_all, __pyx_k__before_all, sizeof(__pyx_k__before_all), 0, 0, 1, 1},
  {&__pyx_n_s__calldata, __pyx_k__calldata, sizeof(__pyx_k__calldata), 0, 0, 1, 1},
  {&__pyx_n_s__cell_dtype, __pyx_k__cell_dtype, sizeof(__pyx_k__cell_dtype), 0, 0, 1, 1},
  {&__pyx_n_s__close, __pyx_k__close, sizeof(__pyx_k__close), 0, 0, 1, 1},
  {&__pyx_n_s__cols, __pyx_k__cols, sizeof(__pyx_k__cols), 0, 0, 1, 1},
  {&__pyx_n_s__compile, __pyx_k__compile, sizeof(__pyx_k__compile), 0, 0, 1, 1},
  {&__pyx_n_s__condition, __pyx_k__condition, sizeof(__pyx_k__condition), 0, 0, 1, 1},
  {&__pyx_n_s__count, __pyx_k__count, sizeof(__pyx_k__count), 0, 0, 1, 1},
  {&__pyx_n_s__current_filename, __pyx_k__current_filename, sizeof(__pyx_k__current_filename), 0, 0, 1, 1},
  {&__pyx_n_s__dtype, __pyx_k__dtype, sizeof(__pyx_k__dtype), 0, 0, 1, 1},
  {&__pyx_n_s__dtypes, __pyx_k__dtypes, sizeof(__pyx_k__dtypes), 0, 0, 1, 1},
  {&__pyx_n_s__eff, __pyx_k__eff, sizeof(__pyx_k__eff), 0, 0, 1, 1},
  {&__pyx_n_s__end, __pyx_k__end, sizeof(__pyx_k__end), 0, 0, 1, 1},
  {&__pyx_n_s__enumerate, __pyx_k__enumerate, sizeof(__pyx_k__enumerate), 0, 0, 1, 1},
  {&__pyx_n_s__exclude_fields, __pyx_k__exclude_fields, sizeof(__pyx_k__exclude_fields), 0, 0, 1, 1},
  {&__pyx_n_s__exists, __pyx_k__exists, sizeof(__pyx_k__exists), 0, 0, 1, 1},
  {&__pyx_n_s__f, __pyx_k__f, sizeof(__pyx_k__f), 0, 0, 1, 1},
  {&__pyx_n_s__f2, __pyx_k__f2, sizeof(__pyx_k__f2), 0, 0, 1, 1},
  {&__pyx_n_s__f4, __pyx_k__f4, sizeof(__pyx_k__f4), 0, 0, 1, 1},
  {&__pyx_n_s__fields, __pyx_k__fields, sizeof(__pyx_k__fields), 0, 0, 1, 1},
  {&__pyx_n_s__file, __pyx_k__file, sizeof(__pyx_k__file), 0, 0, 1, 1},
  {&__pyx_n_s__filename, __pyx_k__filename, sizeof(__pyx_k__filename), 0, 0, 1, 1},
  {&__pyx_n_s__filenames, __pyx_k__filenames, sizeof(__pyx_k__filenames), 0, 0, 1, 1},
  {&__pyx_n_s__fills, __pyx_k__fills, sizeof(__pyx_k__fills), 0, 0, 1, 1},
  {&__pyx_n_s__filterIds, __pyx_k__filterIds, sizeof(__pyx_k__filterIds), 0, 0, 1, 1},
  {&__pyx_n_s__flt, __pyx_k__flt, sizeof(__pyx_k__flt), 0, 0, 1, 1},
  {&__pyx_n_s__fn, __pyx_k__fn, sizeof(__pyx_k__fn), 0, 0, 1, 1},
  {&__pyx_n_s__formatCounts, __pyx_k__formatCounts, sizeof(__pyx_k__formatCounts), 0, 0, 1, 1},
  {&__pyx_n_s__formatIds, __pyx_k__formatIds, sizeof(__pyx_k__formatIds), 0, 0, 1, 1},
  {&__pyx_n_s__formatTypes, __pyx_k__formatTypes, sizeof(__pyx_k__formatTypes), 0, 0, 1, 1},
  {&__pyx_n_s__fromiter, __pyx_k__fromiter, sizeof(__pyx_k__fromiter), 0, 0, 1, 1},
  {&__pyx_n_s__genexpr, __pyx_k__genexpr, sizeof(__pyx_k__genexpr), 0, 0, 1, 1},
  {&__pyx_n_b__genotype, __pyx_k__genotype, sizeof(__pyx_k__genotype), 0, 0, 0, 1},
  {&__pyx_n_s__genotype, __pyx_k__genotype, sizeof(__pyx_k__genotype), 0, 0, 1, 1},
  {&__pyx_n_s__group, __pyx_k__group, sizeof(__pyx_k__group), 0, 0, 1, 1},
  {&__pyx_n_s__i, __pyx_k__i, sizeof(__pyx_k__i), 0, 0, 1, 1},
  {&__pyx_n_s__i1, __pyx_k__i1, sizeof(__pyx_k__i1), 0, 0, 1, 1},
  {&__pyx_n_s__i4, __pyx_k__i4, sizeof(__pyx_k__i4), 0, 0, 1, 1},
  {&__pyx_n_s__info, __pyx_k__info, sizeof(__pyx_k__info), 0, 0, 1, 1},
  {&__pyx_n_s__infoCounts, __pyx_k__infoCounts, sizeof(__pyx_k__infoCounts), 0, 0, 1, 1},
  {&__pyx_n_s__infoIds, __pyx_k__infoIds, sizeof(__pyx_k__infoIds), 0, 0, 1, 1},
  {&__pyx_n_s__infoTypes, __pyx_k__infoTypes, sizeof(__pyx_k__infoTypes), 0, 0, 1, 1},
  {&__pyx_n_b__is_called, __pyx_k__is_called, sizeof(__pyx_k__is_called), 0, 0, 0, 1},
  {&__pyx_n_s__is_called, __pyx_k__is_called, sizeof(__pyx_k__is_called), 0, 0, 1, 1},
  {&__pyx_n_b__is_phased, __pyx_k__is_phased, sizeof(__pyx_k__is_phased), 0, 0, 0, 1},
  {&__pyx_n_s__is_phased, __pyx_k__is_phased, sizeof(__pyx_k__is_phased), 0, 0, 1, 1},
  {&__pyx_n_b__is_snp, __pyx_k__is_snp, sizeof(__pyx_k__is_snp), 0, 0, 0, 1},
  {&__pyx_n_s__is_snp, __pyx_k__is_snp, sizeof(__pyx_k__is_snp), 0, 0, 1, 1},
  {&__pyx_n_s__islice, __pyx_k__islice, sizeof(__pyx_k__islice), 0, 0, 1, 1},
  {&__pyx_n_s__it, __pyx_k__it, sizeof(__pyx_k__it), 0, 0, 1, 1},
  {&__pyx_n_s__iterable, __pyx_k__iterable, sizeof(__pyx_k__iterable), 0, 0, 1, 1},
  {&__pyx_n_s__iteritems, __pyx_k__iteritems, sizeof(__pyx_k__iteritems), 0, 0, 1, 1},
  {&__pyx_n_s__itertools, __pyx_k__itertools, sizeof(__pyx_k__itertools), 0, 0, 1, 1},
  {&__pyx_n_s__join, __pyx_k__join, sizeof(__pyx_k__join), 0, 0, 1, 1},
  {&__pyx_n_s__logstream, __pyx_k__logstream, sizeof(__pyx_k__logstream), 0, 0, 1, 1},
  {&__pyx_n_s__match, __pyx_k__match, sizeof(__pyx_k__match), 0, 0, 1, 1},
  {&__pyx_n_s__match_eff_main, __pyx_k__match_eff_main, sizeof(__pyx_k__match_eff_main), 0, 0, 1, 1},
  {&__pyx_n_s__n, __pyx_k__n, sizeof(__pyx_k__n), 0, 0, 1, 1},
  {&__pyx_n_s__np, __pyx_k__np, sizeof(__pyx_k__np), 0, 0, 1, 1},
  {&__pyx_n_b__num_alleles, __pyx_k__num_alleles, sizeof(__pyx_k__num_alleles), 0, 0, 0, 1},
  {&__pyx_n_s__num_alleles, __pyx_k__num_alleles, sizeof(__pyx_k__num_alleles), 0, 0, 1, 1},
  {&__pyx_n_s__numpy, __pyx_k__numpy, sizeof(__pyx_k__numpy), 0, 0, 1, 1},
  {&__pyx_n_s__o, __pyx_k__o, sizeof(__pyx_k__o), 0, 0, 1, 1},
  {&__pyx_n_s__os, __pyx_k__os, sizeof(__pyx_k__os), 0, 0, 1, 1},
  {&__pyx_n_s__path, __pyx_k__path, sizeof(__pyx_k__path), 0, 0, 1, 1},
  {&__pyx_n_s__ploidy, __pyx_k__ploidy, sizeof(__pyx_k__ploidy), 0, 0, 1, 1},
  {&__pyx_n_s__print, __pyx_k__print, sizeof(__pyx_k__print), 0, 0, 1, 1},
  {&__pyx_n_s__prog_eff_main, __pyx_k__prog_eff_main, sizeof(__pyx_k__prog_eff_main), 0, 0, 1, 1},
  {&__pyx_n_s__progress, __pyx_k__progress, sizeof(__pyx_k__progress), 0, 0, 1, 1},
  {&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1},
  {&__pyx_n_s__re, __pyx_k__re, sizeof(__pyx_k__re), 0, 0, 1, 1},
  {&__pyx_n_s__region, __pyx_k__region, sizeof(__pyx_k__region), 0, 0, 1, 1},
  {&__pyx_n_s__reshape, __pyx_k__reshape, sizeof(__pyx_k__reshape), 0, 0, 1, 1},
  {&__pyx_n_s__result, __pyx_k__result, sizeof(__pyx_k__result), 0, 0, 1, 1},
  {&__pyx_n_s__rows, __pyx_k__rows, sizeof(__pyx_k__rows), 0, 0, 1, 1},
  {&__pyx_n_s__s, __pyx_k__s, sizeof(__pyx_k__s), 0, 0, 1, 1},
  {&__pyx_n_s__sampleNames, __pyx_k__sampleNames, sizeof(__pyx_k__sampleNames), 0, 0, 1, 1},
  {&__pyx_n_s__samples, __pyx_k__samples, sizeof(__pyx_k__samples), 0, 0, 1, 1},
  {&__pyx_n_s__send, __pyx_k__send, sizeof(__pyx_k__send), 0, 0, 1, 1},
  {&__pyx_n_s__size, __pyx_k__size, sizeof(__pyx_k__size), 0, 0, 1, 1},
  {&__pyx_n_s__slice, __pyx_k__slice, sizeof(__pyx_k__slice), 0, 0, 1, 1},
  {&__pyx_n_s__sorted, __pyx_k__sorted, sizeof(__pyx_k__sorted), 0, 0, 1, 1},
  {&__pyx_n_s__split, __pyx_k__split, sizeof(__pyx_k__split), 0, 0, 1, 1},
  {&__pyx_n_s__stderr, __pyx_k__stderr, sizeof(__pyx_k__stderr), 0, 0, 1, 1},
  {&__pyx_n_s__sys, __pyx_k__sys, sizeof(__pyx_k__sys), 0, 0, 1, 1},
  {&__pyx_n_s__t, __pyx_k__t, sizeof(__pyx_k__t), 0, 0, 1, 1},
  {&__pyx_n_s__throw, __pyx_k__throw, sizeof(__pyx_k__throw), 0, 0, 1, 1},
  {&__pyx_n_s__time, __pyx_k__time, sizeof(__pyx_k__time), 0, 0, 1, 1},
  {&__pyx_n_s__transformers, __pyx_k__transformers, sizeof(__pyx_k__transformers), 0, 0, 1, 1},
  {&__pyx_n_s__u1, __pyx_k__u1, sizeof(__pyx_k__u1), 0, 0, 1, 1},
  {&__pyx_n_s__u2, __pyx_k__u2, sizeof(__pyx_k__u2), 0, 0, 1, 1},
  {&__pyx_n_s__vals, __pyx_k__vals, sizeof(__pyx_k__vals), 0, 0, 1, 1},
  {&__pyx_n_s__var, __pyx_k__var, sizeof(__pyx_k__var), 0, 0, 1, 1},
  {&__pyx_n_s__variantFile, __pyx_k__variantFile, sizeof(__pyx_k__variantFile), 0, 0, 1, 1},
  {&__pyx_n_s__variants, __pyx_k__variants, sizeof(__pyx_k__variants), 0, 0, 1, 1},
  {&__pyx_n_s__vcf, __pyx_k__vcf, sizeof(__pyx_k__vcf), 0, 0, 1, 1},
  {&__pyx_n_s__vcf_count, __pyx_k__vcf_count, sizeof(__pyx_k__vcf_count), 0, 0, 1, 1},
  {&__pyx_n_s__vcf_type, __pyx_k__vcf_type, sizeof(__pyx_k__vcf_type), 0, 0, 1, 1},
  {&__pyx_n_s__vcf_types, __pyx_k__vcf_types, sizeof(__pyx_k__vcf_types), 0, 0, 1, 1},
  {&__pyx_n_s__vcfnp, __pyx_k__vcfnp, sizeof(__pyx_k__vcfnp), 0, 0, 1, 1},
  {&__pyx_n_s__view, __pyx_k__view, sizeof(__pyx_k__view), 0, 0, 1, 1},
  {&__pyx_n_s__view2d, __pyx_k__view2d, sizeof(__pyx_k__view2d), 0, 0, 1, 1},
  {&__pyx_n_s__zip, __pyx_k__zip, sizeof(__pyx_k__zip), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_Exception = __Pyx_GetBuiltinName(__pyx_n_s__Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_sorted = __Pyx_GetBuiltinName(__pyx_n_s__sorted); if (!__pyx_builtin_sorted) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s__enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s__zip); if (!__pyx_builtin_zip) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s__RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  return 0;
  __pyx_L1_error:;
  return -1;
}

static int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "vcfnp.pyx":273
 *         if f == 'FILTER':
 *             filterIds = PyVariantCallFile(filenames[0]).filterIds
 *             t = [('PASS', 'b1')]             # <<<<<<<<<<<<<<
 *             t += [(flt, 'b1') for flt in sorted(filterIds)]
 *             dtypes[f] = t
 */
  __pyx_k_tuple_4 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__PASS), ((PyObject *)__pyx_n_s__b1)); if (unlikely(!__pyx_k_tuple_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_4);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_4));

  /* "vcfnp.pyx":1182
 *             return -1
 *         else:
 *             return (-1,) * ploidy             # <<<<<<<<<<<<<<
 *     else:
 *         split(gts.at(0), GT_DELIMS, allele_strings)
 */
  __pyx_k_tuple_24 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_24);
  __Pyx_INCREF(__pyx_int_neg_1);
  PyTuple_SET_ITEM(__pyx_k_tuple_24, 0, __pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_k_tuple_24);

  /* "vcfnp.pyx":1351
 *                 else (1 if v == 'CODING' else 0) if i == 8
 *                 else v
 *                 for i, (v, fill) in enumerate(zip(eff, fills)[:11])             # <<<<<<<<<<<<<<
 *             )
 *             return result
 */
  __pyx_k_slice_26 = PySlice_New(Py_None, __pyx_int_11, Py_None); if (unlikely(!__pyx_k_slice_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_slice_26);
  __Pyx_GIVEREF(__pyx_k_slice_26);

  /* "vcfnp.pyx":1345
 *         else:
 *             match_eff_main = prog_eff_main.match(vals[0]) # ignore all but first effect
 *             eff = [match_eff_main.group(1)] + match_eff_main.group(2).split('|')             # <<<<<<<<<<<<<<
 *             result = tuple(
 *                 fill if v == ''
 */
  __pyx_k_tuple_28 = PyTuple_Pack(1, __pyx_int_1); if (unlikely(!__pyx_k_tuple_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_28);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_28));
  __pyx_k_tuple_29 = PyTuple_Pack(1, __pyx_int_2); if (unlikely(!__pyx_k_tuple_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_29);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_29));
  __pyx_k_tuple_30 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_23)); if (unlikely(!__pyx_k_tuple_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_30);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_30));

  /* "vcfnp.pyx":1339
 * 
 *     """
 *     prog_eff_main = re.compile(r'([^(]+)\(([^)]+)\)')             # <<<<<<<<<<<<<<
 *     def _transformer(vals):
 *         if len(vals) == 0:
 */
  __pyx_k_tuple_32 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_31)); if (unlikely(!__pyx_k_tuple_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_32);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_32));

  /* "vcfnp.pyx":1340
 *     """
 *     prog_eff_main = re.compile(r'([^(]+)\(([^)]+)\)')
 *     def _transformer(vals):             # <<<<<<<<<<<<<<
 *         if len(vals) == 0:
 *             return fills
 */
  __pyx_k_tuple_33 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__vals), ((PyObject *)__pyx_n_s__match_eff_main), ((PyObject *)__pyx_n_s__eff), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__genexpr), ((PyObject *)__pyx_n_s__genexpr)); if (unlikely(!__pyx_k_tuple_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_33);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_33));
  __pyx_k_codeobj_34 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_35, __pyx_n_s___transformer, 1340, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "numpy.pxd":215
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not C contiguous")             # <<<<<<<<<<<<<<
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 */
  __pyx_k_tuple_38 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_37)); if (unlikely(!__pyx_k_tuple_38)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_38);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_38));

  /* "numpy.pxd":219
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not Fortran contiguous")             # <<<<<<<<<<<<<<
 * 
 *             info.buf = PyArray_DATA(self)
 */
  __pyx_k_tuple_40 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_39)); if (unlikely(!__pyx_k_tuple_40)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_40);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_40));

  /* "numpy.pxd":257
 *                 if ((descr.byteorder == c'>' and little_endian) or
 *                     (descr.byteorder == c'<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
 *                 if   t == NPY_BYTE:        f = "b"
 *                 elif t == NPY_UBYTE:       f = "B"
 */
  __pyx_k_tuple_42 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_41)); if (unlikely(!__pyx_k_tuple_42)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_42);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_42));

  /* "numpy.pxd":799
 * 
 *         if (end - f) - (new_offset - offset[0]) < 15:
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")             # <<<<<<<<<<<<<<
 * 
 *         if ((child.byteorder == c'>' and little_endian) or
 */
  __pyx_k_tuple_45 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_44)); if (unlikely(!__pyx_k_tuple_45)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_45);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_45));

  /* "numpy.pxd":803
 *         if ((child.byteorder == c'>' and little_endian) or
 *             (child.byteorder == c'<' and not little_endian)):
 *             raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
 *             # One could encode it in the format string and have Cython
 *             # complain instead, BUT: < and > in format strings also imply
 */
  __pyx_k_tuple_46 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_41)); if (unlikely(!__pyx_k_tuple_46)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_46);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_46));

  /* "numpy.pxd":823
 *             t = child.type_num
 *             if end - f < 5:
 *                 raise RuntimeError(u"Format string allocated too short.")             # <<<<<<<<<<<<<<
 * 
 *             # Until ticket #99 is fixed, use integers to avoid warnings
 */
  __pyx_k_tuple_48 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_47)); if (unlikely(!__pyx_k_tuple_48)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_48);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_48));

  /* "vcfnp.pyx":56
 * 
 * # these are the possible fields in the variants array
 * VARIANT_FIELDS = ('CHROM', 'POS', 'ID', 'REF', 'ALT', 'QUAL', 'FILTER',             # <<<<<<<<<<<<<<
 *                   'num_alleles', 'is_snp')
 * 
 */
  __pyx_k_tuple_51 = PyTuple_Pack(9, ((PyObject *)__pyx_n_s__CHROM), ((PyObject *)__pyx_n_s__POS), ((PyObject *)__pyx_n_s__ID), ((PyObject *)__pyx_n_s__REF), ((PyObject *)__pyx_n_s__ALT), ((PyObject *)__pyx_n_s__QUAL), ((PyObject *)__pyx_n_s__FILTER), ((PyObject *)__pyx_n_s__num_alleles), ((PyObject *)__pyx_n_s__is_snp)); if (unlikely(!__pyx_k_tuple_51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_51);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_51));

  /* "vcfnp.pyx":127
 *                      }
 * 
 * CALLDATA_FIELDS = ('is_called', 'is_phased', 'genotype')             # <<<<<<<<<<<<<<
 * 
 * DEFAULT_CALLDATA_DTYPE = {
 */
  __pyx_k_tuple_52 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__is_called), ((PyObject *)__pyx_n_s__is_phased), ((PyObject *)__pyx_n_s__genotype)); if (unlikely(!__pyx_k_tuple_52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_52);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_52));

  /* "vcfnp.pyx":176
 * 
 * 
 * def variants(filename,             # <<<<<<<<<<<<<<
 *              region=None,
 *              fields=None,
 */
  __pyx_k_tuple_54 = PyTuple_Pack(21, ((PyObject *)__pyx_n_s__filename), ((PyObject *)__pyx_n_s__region), ((PyObject *)__pyx_n_s__fields), ((PyObject *)__pyx_n_s__exclude_fields), ((PyObject *)__pyx_n_s__dtypes), ((PyObject *)__pyx_n_s__arities), ((PyObject *)__pyx_n_s__fills), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__progress), ((PyObject *)__pyx_n_s__logstream), ((PyObject *)__pyx_n_s__condition), ((PyObject *)__pyx_n_s__slice), ((PyObject *)__pyx_n_s__filenames), ((PyObject *)__pyx_n_s__fn), ((PyObject *)__pyx_n_s__f), ((PyObject *)__pyx_n_s__filterIds), ((PyObject *)__pyx_n_s__t), ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__it), ((PyObject *)__pyx_n_s__flt)); if (unlikely(!__pyx_k_tuple_54)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_54);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_54));
  __pyx_k_codeobj_55 = (PyObject*)__Pyx_PyCode_New(12, 0, 21, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_35, __pyx_n_s__variants, 176, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":322
 * 
 * 
 * def _fromiter(it, dtype, count, int progress=0, logstream=sys.stderr):             # <<<<<<<<<<<<<<
 *     if progress > 0:
 *         it = _iter_withprogress(it, progress, logstream)
 */
  __pyx_k_tuple_56 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__it), ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__progress), ((PyObject *)__pyx_n_s__logstream), ((PyObject *)__pyx_n_s__a)); if (unlikely(!__pyx_k_tuple_56)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_56);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_56));
  __pyx_k_codeobj_57 = (PyObject*)__Pyx_PyCode_New(5, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_35, __pyx_n_s___fromiter, 322, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":333
 * 
 * 
 * def _iter_withprogress(iterable, int progress, logstream):             # <<<<<<<<<<<<<<
 *     cdef int i
 *     before_all = time.time()
 */
  __pyx_k_tuple_58 = PyTuple_Pack(9, ((PyObject *)__pyx_n_s__iterable), ((PyObject *)__pyx_n_s__progress), ((PyObject *)__pyx_n_s__logstream), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__before_all), ((PyObject *)__pyx_n_s__before), ((PyObject *)__pyx_n_s__o), ((PyObject *)__pyx_n_s__after), ((PyObject *)__pyx_n_s__after_all)); if (unlikely(!__pyx_k_tuple_58)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_58);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_58));
  __pyx_k_codeobj_59 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_58, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_35, __pyx_n_s___iter_withprogress, 333, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":348
 * 
 * 
 * def _itervariants(filenames,             # <<<<<<<<<<<<<<
 *                  region,
 *                  vector[string] fields,
 */
  __pyx_k_tuple_60 = PyTuple_Pack(9, ((PyObject *)__pyx_n_s__filenames), ((PyObject *)__pyx_n_s__region), ((PyObject *)__pyx_n_s__fields), ((PyObject *)__pyx_n_s__arities), ((PyObject *)__pyx_n_s__fills), ((PyObject *)__pyx_n_s__variantFile), ((PyObject *)__pyx_n_s__var), ((PyObject *)__pyx_n_s__filterIds), ((PyObject *)__pyx_n_s__current_filename)); if (unlikely(!__pyx_k_tuple_60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_60);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_60));
  __pyx_k_codeobj_61 = (PyObject*)__Pyx_PyCode_New(5, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_60, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_35, __pyx_n_s___itervariants, 348, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_61)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":374
 * 
 * 
 * def _itervariants_with_condition(filenames,             # <<<<<<<<<<<<<<
 *                                  region,
 *                                  vector[string] fields,
 */
  __pyx_k_tuple_62 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__filenames), ((PyObject *)__pyx_n_s__region), ((PyObject *)__pyx_n_s__fields), ((PyObject *)__pyx_n_s__arities), ((PyObject *)__pyx_n_s__fills), ((PyObject *)__pyx_n_s__condition), ((PyObject *)__pyx_n_s__variantFile), ((PyObject *)__pyx_n_s__var), ((PyObject *)__pyx_n_s__filterIds), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__current_filename)); if (unlikely(!__pyx_k_tuple_62)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_62);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_62));
  __pyx_k_codeobj_63 = (PyObject*)__Pyx_PyCode_New(6, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_62, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_35, __pyx_n_s_8, 374, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":487
 * 
 * 
 * def info(filename,             # <<<<<<<<<<<<<<
 *          region=None,
 *          fields=None,
 */
  __pyx_k_tuple_64 = PyTuple_Pack(27, ((PyObject *)__pyx_n_s__filename), ((PyObject *)__pyx_n_s__region), ((PyObject *)__pyx_n_s__fields), ((PyObject *)__pyx_n_s__exclude_fields), ((PyObject *)__pyx_n_s__dtypes), ((PyObject *)__pyx_n_s__arities), ((PyObject *)__pyx_n_s__fills), ((PyObject *)__pyx_n_s__transformers), ((PyObject *)__pyx_n_s__vcf_types), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__progress), ((PyObject *)__pyx_n_s__logstream), ((PyObject *)__pyx_n_s__condition), ((PyObject *)__pyx_n_s__slice), ((PyObject *)__pyx_n_s__filenames), ((PyObject *)__pyx_n_s__fn), ((PyObject *)__pyx_n_s__vcf), ((PyObject *)__pyx_n_s__infoIds), ((PyObject *)__pyx_n_s__infoTypes), ((PyObject *)__pyx_n_s__infoCounts), ((PyObject *)__pyx_n_s__f), ((PyObject *)__pyx_n_s__vcf_type), ((PyObject *)__pyx_n_s__vcf_count), ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__t), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__it)); if (unlikely(!__pyx_k_tuple_64)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_64);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_64));
  __pyx_k_codeobj_65 = (PyObject*)__Pyx_PyCode_New(14, 0, 27, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_35, __pyx_n_s__info, 487, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_65)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":657
 * 
 * 
 * def _iterinfo(filenames,             # <<<<<<<<<<<<<<
 *              region,
 *              vector[string] fields,
 */
  __pyx_k_tuple_66 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__filenames), ((PyObject *)__pyx_n_s__region), ((PyObject *)__pyx_n_s__fields), ((PyObject *)__pyx_n_s__arities), ((PyObject *)__pyx_n_s__fills), ((PyObject *)__pyx_n_s__infoTypes), ((PyObject *)__pyx_n_s__transformers), ((PyObject *)__pyx_n_s__variantFile), ((PyObject *)__pyx_n_s__var), ((PyObject *)__pyx_n_s__current_filename)); if (unlikely(!__pyx_k_tuple_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_66);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_66));
  __pyx_k_codeobj_67 = (PyObject*)__Pyx_PyCode_New(7, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_35, __pyx_n_s___iterinfo, 657, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_67)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":682
 * 
 * 
 * def _iterinfo_with_condition(filenames,             # <<<<<<<<<<<<<<
 *                              region,
 *                              vector[string] fields,
 */
  __pyx_k_tuple_68 = PyTuple_Pack(13, ((PyObject *)__pyx_n_s__filenames), ((PyObject *)__pyx_n_s__region), ((PyObject *)__pyx_n_s__fields), ((PyObject *)__pyx_n_s__arities), ((PyObject *)__pyx_n_s__fills), ((PyObject *)__pyx_n_s__infoTypes), ((PyObject *)__pyx_n_s__transformers), ((PyObject *)__pyx_n_s__condition), ((PyObject *)__pyx_n_s__variantFile), ((PyObject *)__pyx_n_s__var), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__current_filename)); if (unlikely(!__pyx_k_tuple_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_68);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_68));
  __pyx_k_codeobj_69 = (PyObject*)__Pyx_PyCode_New(8, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_35, __pyx_n_s_13, 682, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":856
 * 
 * 
 * def calldata(filename,             # <<<<<<<<<<<<<<
 *              region=None,
 *              samples=None,
 */
  __pyx_k_tuple_70 = PyTuple_Pack(30, ((PyObject *)__pyx_n_s__filename), ((PyObject *)__pyx_n_s__region), ((PyObject *)__pyx_n_s__samples), ((PyObject *)__pyx_n_s__ploidy), ((PyObject *)__pyx_n_s__fields), ((PyObject *)__pyx_n_s__exclude_fields), ((PyObject *)__pyx_n_s__dtypes), ((PyObject *)__pyx_n_s__arities), ((PyObject *)__pyx_n_s__fills), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__progress), ((PyObject *)__pyx_n_s__logstream), ((PyObject *)__pyx_n_s__condition), ((PyObject *)__pyx_n_s__slice), ((PyObject *)__pyx_n_s__filenames), ((PyObject *)__pyx_n_s__fn), ((PyObject *)__pyx_n_s__vcf), ((PyObject *)__pyx_n_s__formatIds), ((PyObject *)__pyx_n_s__formatTypes), ((PyObject *)__pyx_n_s__formatCounts), ((PyObject *)__pyx_n_s__all_samples), ((PyObject *)__pyx_n_s__s), ((PyObject *)__pyx_n_s__f), ((PyObject *)__pyx_n_s__vcf_type), ((PyObject *)__pyx_n_s__vcf_count), ((PyObject *)__pyx_n_s__cell_dtype), ((PyObject *)__pyx_n_s__t), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__it)); if (unlikely(!__pyx_k_tuple_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_70);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_70));
  __pyx_k_codeobj_71 = (PyObject*)__Pyx_PyCode_New(14, 0, 30, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_70, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_35, __pyx_n_s__calldata, 856, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":1044
 * 
 * 
 * def _itercalldata(filenames,             # <<<<<<<<<<<<<<
 *                   region,
 *                   vector[string] samples,
 */
  __pyx_k_tuple_72 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__filenames), ((PyObject *)__pyx_n_s__region), ((PyObject *)__pyx_n_s__samples), ((PyObject *)__pyx_n_s__ploidy), ((PyObject *)__pyx_n_s__fields), ((PyObject *)__pyx_n_s__arities), ((PyObject *)__pyx_n_s__fills), ((PyObject *)__pyx_n_s__variantFile), ((PyObject *)__pyx_n_s__var), ((PyObject *)__pyx_n_s__current_filename)); if (unlikely(!__pyx_k_tuple_72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_72);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_72));
  __pyx_k_codeobj_73 = (PyObject*)__Pyx_PyCode_New(7, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_72, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_35, __pyx_n_s___itercalldata, 1044, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_73)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":1071
 * 
 * 
 * def _itercalldata_with_condition(filenames,             # <<<<<<<<<<<<<<
 *                                  region,
 *                                  vector[string] samples,
 */
  __pyx_k_tuple_74 = PyTuple_Pack(13, ((PyObject *)__pyx_n_s__filenames), ((PyObject *)__pyx_n_s__region), ((PyObject *)__pyx_n_s__samples), ((PyObject *)__pyx_n_s__ploidy), ((PyObject *)__pyx_n_s__fields), ((PyObject *)__pyx_n_s__arities), ((PyObject *)__pyx_n_s__fills), ((PyObject *)__pyx_n_s__condition), ((PyObject *)__pyx_n_s__variantFile), ((PyObject *)__pyx_n_s__var), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__current_filename)); if (unlikely(!__pyx_k_tuple_74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_74);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_74));
  __pyx_k_codeobj_75 = (PyObject*)__Pyx_PyCode_New(8, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_74, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_35, __pyx_n_s_22, 1071, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":1231
 * 
 * 
 * def view2d(a):             # <<<<<<<<<<<<<<
 *     """
 *     Utility function to view a structured 1D array where all fields have a
 */
  __pyx_k_tuple_76 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__a), ((PyObject *)__pyx_n_s__rows), ((PyObject *)__pyx_n_s__cols), ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__b)); if (unlikely(!__pyx_k_tuple_76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_76);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_76));
  __pyx_k_codeobj_77 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_76, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_35, __pyx_n_s__view2d, 1231, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":1316
 * 
 * EFF_DEFAULT_DTYPE = [
 *     ('Effect', 'a33'),             # <<<<<<<<<<<<<<
 *     ('Effect_Impact', 'a8'),
 *     ('Functional_Class', 'a8'),
 */
  __pyx_k_tuple_78 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__Effect), ((PyObject *)__pyx_n_s__a33)); if (unlikely(!__pyx_k_tuple_78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_78);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_78));

  /* "vcfnp.pyx":1317
 * EFF_DEFAULT_DTYPE = [
 *     ('Effect', 'a33'),
 *     ('Effect_Impact', 'a8'),             # <<<<<<<<<<<<<<
 *     ('Functional_Class', 'a8'),
 *     ('Codon_Change', 'a7'), # N.B., will lose information for indels
 */
  __pyx_k_tuple_79 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__Effect_Impact), ((PyObject *)__pyx_n_s__a8)); if (unlikely(!__pyx_k_tuple_79)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_79);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_79));

  /* "vcfnp.pyx":1318
 *     ('Effect', 'a33'),
 *     ('Effect_Impact', 'a8'),
 *     ('Functional_Class', 'a8'),             # <<<<<<<<<<<<<<
 *     ('Codon_Change', 'a7'), # N.B., will lose information for indels
 *     ('Amino_Acid_Change', 'a6'), # N.B., will lose information for indels
 */
  __pyx_k_tuple_80 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__Functional_Class), ((PyObject *)__pyx_n_s__a8)); if (unlikely(!__pyx_k_tuple_80)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_80);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_80));

  /* "vcfnp.pyx":1319
 *     ('Effect_Impact', 'a8'),
 *     ('Functional_Class', 'a8'),
 *     ('Codon_Change', 'a7'), # N.B., will lose information for indels             # <<<<<<<<<<<<<<
 *     ('Amino_Acid_Change', 'a6'), # N.B., will lose information for indels
 *     ('Amino_Acid_Length', 'i4'),
 */
  __pyx_k_tuple_81 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__Codon_Change), ((PyObject *)__pyx_n_s__a7)); if (unlikely(!__pyx_k_tuple_81)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_81);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_81));

  /* "vcfnp.pyx":1320
 *     ('Functional_Class', 'a8'),
 *     ('Codon_Change', 'a7'), # N.B., will lose information for indels
 *     ('Amino_Acid_Change', 'a6'), # N.B., will lose information for indels             # <<<<<<<<<<<<<<
 *     ('Amino_Acid_Length', 'i4'),
 *     ('Gene_Name', 'a14'), # N.B., may be too short for some species
 */
  __pyx_k_tuple_82 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__Amino_Acid_Change), ((PyObject *)__pyx_n_s__a6)); if (unlikely(!__pyx_k_tuple_82)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_82);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_82));

  /* "vcfnp.pyx":1321
 *     ('Codon_Change', 'a7'), # N.B., will lose information for indels
 *     ('Amino_Acid_Change', 'a6'), # N.B., will lose information for indels
 *     ('Amino_Acid_Length', 'i4'),             # <<<<<<<<<<<<<<
 *     ('Gene_Name', 'a14'), # N.B., may be too short for some species
 *     ('Transcript_BioType', 'a20'),
 */
  __pyx_k_tuple_83 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__Amino_Acid_Length), ((PyObject *)__pyx_n_s__i4)); if (unlikely(!__pyx_k_tuple_83)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_83);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_83));

  /* "vcfnp.pyx":1322
 *     ('Amino_Acid_Change', 'a6'), # N.B., will lose information for indels
 *     ('Amino_Acid_Length', 'i4'),
 *     ('Gene_Name', 'a14'), # N.B., may be too short for some species             # <<<<<<<<<<<<<<
 *     ('Transcript_BioType', 'a20'),
 *     ('Gene_Coding', 'i1'),
 */
  __pyx_k_tuple_84 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__Gene_Name), ((PyObject *)__pyx_n_s__a14)); if (unlikely(!__pyx_k_tuple_84)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_84);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_84));

  /* "vcfnp.pyx":1323
 *     ('Amino_Acid_Length', 'i4'),
 *     ('Gene_Name', 'a14'), # N.B., may be too short for some species
 *     ('Transcript_BioType', 'a20'),             # <<<<<<<<<<<<<<
 *     ('Gene_Coding', 'i1'),
 *     ('Transcript_ID', 'a20'),
 */
  __pyx_k_tuple_85 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__Transcript_BioType), ((PyObject *)__pyx_n_s__a20)); if (unlikely(!__pyx_k_tuple_85)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_85);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_85));

  /* "vcfnp.pyx":1324
 *     ('Gene_Name', 'a14'), # N.B., may be too short for some species
 *     ('Transcript_BioType', 'a20'),
 *     ('Gene_Coding', 'i1'),             # <<<<<<<<<<<<<<
 *     ('Transcript_ID', 'a20'),
 *     ('Exon', 'i1')
 */
  __pyx_k_tuple_86 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__Gene_Coding), ((PyObject *)__pyx_n_s__i1)); if (unlikely(!__pyx_k_tuple_86)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_86);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_86));

  /* "vcfnp.pyx":1325
 *     ('Transcript_BioType', 'a20'),
 *     ('Gene_Coding', 'i1'),
 *     ('Transcript_ID', 'a20'),             # <<<<<<<<<<<<<<
 *     ('Exon', 'i1')
 * ]
 */
  __pyx_k_tuple_87 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__Transcript_ID), ((PyObject *)__pyx_n_s__a20)); if (unlikely(!__pyx_k_tuple_87)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_87);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_87));

  /* "vcfnp.pyx":1326
 *     ('Gene_Coding', 'i1'),
 *     ('Transcript_ID', 'a20'),
 *     ('Exon', 'i1')             # <<<<<<<<<<<<<<
 * ]
 * 
 */
  __pyx_k_tuple_88 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__Exon), ((PyObject *)__pyx_n_s__i1)); if (unlikely(!__pyx_k_tuple_88)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_88);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_88));

  /* "vcfnp.pyx":1330
 * 
 * 
 * EFF_DEFAULT_FILLS = ('.', '.', '.', '.', '.', -1, '.', '.', -1, '.', -1)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_k_tuple_89 = PyTuple_Pack(11, ((PyObject *)__pyx_kp_s_20), ((PyObject *)__pyx_kp_s_20), ((PyObject *)__pyx_kp_s_20), ((PyObject *)__pyx_kp_s_20), ((PyObject *)__pyx_kp_s_20), __pyx_int_neg_1, ((PyObject *)__pyx_kp_s_20), ((PyObject *)__pyx_kp_s_20), __pyx_int_neg_1, ((PyObject *)__pyx_kp_s_20), __pyx_int_neg_1); if (unlikely(!__pyx_k_tuple_89)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_89);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_89));

  /* "vcfnp.pyx":1333
 * 
 * 
 * def eff_default_transformer(fills=EFF_DEFAULT_FILLS):             # <<<<<<<<<<<<<<
 *     """
 *     Return a simple transformer function for parsing EFF annotations. N.B.,
 */
  __pyx_k_tuple_90 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__fills), ((PyObject *)__pyx_n_s__prog_eff_main), ((PyObject *)__pyx_n_s___transformer), ((PyObject *)__pyx_n_s___transformer)); if (unlikely(!__pyx_k_tuple_90)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_90);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_90));
  __pyx_k_codeobj_91 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_90, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_35, __pyx_n_s_92, 1333, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_91)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_InitGlobals(void) {
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_11 = PyInt_FromLong(11); if (unlikely(!__pyx_int_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  return 0;
  __pyx_L1_error:;
  return -1;
}

#if PY_MAJOR_VERSION < 3
PyMODINIT_FUNC initvcfnp(void); /*proto*/
PyMODINIT_FUNC initvcfnp(void)
#else
PyMODINIT_FUNC PyInit_vcfnp(void); /*proto*/
PyMODINIT_FUNC PyInit_vcfnp(void)
#endif
{
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  #if CYTHON_REFNANNY
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
  if (!__Pyx_RefNanny) {
      PyErr_Clear();
      __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
      if (!__Pyx_RefNanny)
          Py_FatalError("failed to import 'refnanny' module");
  }
  #endif
  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_vcfnp(void)", 0);
  if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #ifdef __Pyx_CyFunction_USED
  if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  #ifdef WITH_THREAD /* Python build with threading support? */
  PyEval_InitThreads();
  #endif
  #endif
  /*--- Module creation code ---*/
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4(__Pyx_NAMESTR("vcfnp"), __pyx_methods, __Pyx_DOCSTR(__pyx_k_49), 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  Py_INCREF(__pyx_d);
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!PyDict_GetItemString(modules, "vcfnp")) {
      if (unlikely(PyDict_SetItemString(modules, "vcfnp", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
  }
  #endif
  __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #if CYTHON_COMPILING_IN_PYPY
  Py_INCREF(__pyx_b);
  #endif
  if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  /*--- Initialize various global constants etc. ---*/
  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  if (__pyx_module_is_main_vcfnp) {
    if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  }
  /*--- Builtin init code ---*/
  if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Constants init code ---*/
  if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Global init code ---*/
  /*--- Variable export code ---*/
  /*--- Function export code ---*/
  /*--- Type init code ---*/
  if (PyType_Ready(&__pyx_type_5vcfnp___pyx_scope_struct_7_eff_default_transformer) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5vcfnp___pyx_scope_struct_7_eff_default_transformer = &__pyx_type_5vcfnp___pyx_scope_struct_7_eff_default_transformer;
  if (PyType_Ready(&__pyx_type_5vcfnp___pyx_scope_struct___iter_withprogress) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5vcfnp___pyx_scope_struct___iter_withprogress = &__pyx_type_5vcfnp___pyx_scope_struct___iter_withprogress;
  if (PyType_Ready(&__pyx_type_5vcfnp___pyx_scope_struct_1__itervariants) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5vcfnp___pyx_scope_struct_1__itervariants = &__pyx_type_5vcfnp___pyx_scope_struct_1__itervariants;
  if (PyType_Ready(&__pyx_type_5vcfnp___pyx_scope_struct_9_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5vcfnp___pyx_scope_struct_9_genexpr = &__pyx_type_5vcfnp___pyx_scope_struct_9_genexpr;
  if (PyType_Ready(&__pyx_type_5vcfnp___pyx_scope_struct_5__itercalldata) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5vcfnp___pyx_scope_struct_5__itercalldata = &__pyx_type_5vcfnp___pyx_scope_struct_5__itercalldata;
  if (PyType_Ready(&__pyx_type_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition = &__pyx_type_5vcfnp___pyx_scope_struct_6__itercalldata_with_condition;
  if (PyType_Ready(&__pyx_type_5vcfnp___pyx_scope_struct_2__itervariants_with_condition) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5vcfnp___pyx_scope_struct_2__itervariants_with_condition = &__pyx_type_5vcfnp___pyx_scope_struct_2__itervariants_with_condition;
  if (PyType_Ready(&__pyx_type_5vcfnp___pyx_scope_struct_3__iterinfo) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5vcfnp___pyx_scope_struct_3__iterinfo = &__pyx_type_5vcfnp___pyx_scope_struct_3__iterinfo;
  if (PyType_Ready(&__pyx_type_5vcfnp___pyx_scope_struct_8__transformer) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5vcfnp___pyx_scope_struct_8__transformer = &__pyx_type_5vcfnp___pyx_scope_struct_8__transformer;
  if (PyType_Ready(&__pyx_type_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition = &__pyx_type_5vcfnp___pyx_scope_struct_4__iterinfo_with_condition;
  /*--- Type import code ---*/
  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", 
  #if CYTHON_COMPILING_IN_PYPY
  sizeof(PyTypeObject),
  #else
  sizeof(PyHeapTypeObject),
  #endif
  0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6vcflib_PyVariantCallFile = __Pyx_ImportType("vcflib", "PyVariantCallFile", sizeof(struct __pyx_obj_6vcflib_PyVariantCallFile), 1); if (unlikely(!__pyx_ptype_6vcflib_PyVariantCallFile)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Variable import code ---*/
  /*--- Function import code ---*/
  /*--- Execution code ---*/

  /* "vcfnp.pyx":9
 * 
 * 
 * __version__ = '0.11.1'             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s____version__, ((PyObject *)__pyx_kp_s_50)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":12
 * 
 * 
 * import re             # <<<<<<<<<<<<<<
 * import numpy as np
 * cimport numpy as np
 */
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__re), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__re, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":13
 * 
 * import re
 * import numpy as np             # <<<<<<<<<<<<<<
 * cimport numpy as np
 * from vcflib cimport (PyVariantCallFile, VariantCallFile, Variant,
 */
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":25
 * from libc.stdlib cimport atoi, atof
 * from cython.operator cimport dereference as deref
 * import sys             # <<<<<<<<<<<<<<
 * import time
 * from itertools import islice
 */
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__sys), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__sys, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":26
 * from cython.operator cimport dereference as deref
 * import sys
 * import time             # <<<<<<<<<<<<<<
 * from itertools import islice
 * import os
 */
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__time), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__time, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":27
 * import sys
 * import time
 * from itertools import islice             # <<<<<<<<<<<<<<
 * import os
 * 
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__islice));
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__islice));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__islice));
  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__itertools), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__islice); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__islice, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":28
 * import time
 * from itertools import islice
 * import os             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__os), 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__os, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":31
 * 
 * 
 * cdef size_t npos = -1             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_5vcfnp_npos = -1;

  /* "vcfnp.pyx":48
 * 
 * 
 * TYPESTRING2KEY = {             # <<<<<<<<<<<<<<
 *                   'Float': FIELD_FLOAT,
 *                   'Integer': FIELD_INTEGER,
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));

  /* "vcfnp.pyx":49
 * 
 * TYPESTRING2KEY = {
 *                   'Float': FIELD_FLOAT,             # <<<<<<<<<<<<<<
 *                   'Integer': FIELD_INTEGER,
 *                   'String': FIELD_STRING,
 */
  __pyx_t_1 = PyInt_FromLong(vcf::FIELD_FLOAT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__Float), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":50
 * TYPESTRING2KEY = {
 *                   'Float': FIELD_FLOAT,
 *                   'Integer': FIELD_INTEGER,             # <<<<<<<<<<<<<<
 *                   'String': FIELD_STRING,
 *                   'Flag': FIELD_BOOL,
 */
  __pyx_t_1 = PyInt_FromLong(vcf::FIELD_INTEGER); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__Integer), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":51
 *                   'Float': FIELD_FLOAT,
 *                   'Integer': FIELD_INTEGER,
 *                   'String': FIELD_STRING,             # <<<<<<<<<<<<<<
 *                   'Flag': FIELD_BOOL,
 *                   }
 */
  __pyx_t_1 = PyInt_FromLong(vcf::FIELD_STRING); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__String), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":52
 *                   'Integer': FIELD_INTEGER,
 *                   'String': FIELD_STRING,
 *                   'Flag': FIELD_BOOL,             # <<<<<<<<<<<<<<
 *                   }
 * 
 */
  __pyx_t_1 = PyInt_FromLong(vcf::FIELD_BOOL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__Flag), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__TYPESTRING2KEY, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "vcfnp.pyx":56
 * 
 * # these are the possible fields in the variants array
 * VARIANT_FIELDS = ('CHROM', 'POS', 'ID', 'REF', 'ALT', 'QUAL', 'FILTER',             # <<<<<<<<<<<<<<
 *                   'num_alleles', 'is_snp')
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__VARIANT_FIELDS, ((PyObject *)__pyx_k_tuple_51)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":61
 * 
 * # default dtypes for the variants array fields
 * DEFAULT_VARIANT_DTYPE = {             # <<<<<<<<<<<<<<
 *                          'CHROM': 'a12',
 *                          'POS': 'i4',
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__CHROM), ((PyObject *)__pyx_n_s__a12)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__POS), ((PyObject *)__pyx_n_s__i4)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__ID), ((PyObject *)__pyx_n_s__a12)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__REF), ((PyObject *)__pyx_n_s__a12)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__ALT), ((PyObject *)__pyx_n_s__a12)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__QUAL), ((PyObject *)__pyx_n_s__f4)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__num_alleles), ((PyObject *)__pyx_n_s__u1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__is_snp), ((PyObject *)__pyx_n_s__b1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_5, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "vcfnp.pyx":74
 * 
 * # default arities for the variants array fields
 * DEFAULT_VARIANT_ARITY = {             # <<<<<<<<<<<<<<
 *                          'CHROM': 1,
 *                          'POS': 1,
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__CHROM), __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__POS), __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__ID), __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__REF), __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__ALT), __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__QUAL), __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__num_alleles), __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__is_snp), __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_6, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "vcfnp.pyx":87
 * 
 * # default fill values for the variants fields if values are missing
 * DEFAULT_VARIANT_FILL = {'CHROM': '',             # <<<<<<<<<<<<<<
 *                         'POS': 0,
 *                         'ID': '',
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__CHROM), ((PyObject *)__pyx_kp_s_27)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__POS), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__ID), ((PyObject *)__pyx_kp_s_27)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__REF), ((PyObject *)__pyx_kp_s_27)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__ALT), ((PyObject *)__pyx_kp_s_27)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__QUAL), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__num_alleles), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":94
 *                         'QUAL': 0,
 *                         'num_alleles': 0,
 *                         'is_snp': False}             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__is_snp), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_7, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "vcfnp.pyx":98
 * 
 * # default mapping from VCF field types to numpy dtypes
 * DEFAULT_TYPE_MAP = {FIELD_FLOAT: 'f4',             # <<<<<<<<<<<<<<
 *                     FIELD_INTEGER: 'i4',
 *                     FIELD_STRING: 'a12',
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_1 = PyInt_FromLong(vcf::FIELD_FLOAT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, ((PyObject *)__pyx_n_s__f4)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":99
 * # default mapping from VCF field types to numpy dtypes
 * DEFAULT_TYPE_MAP = {FIELD_FLOAT: 'f4',
 *                     FIELD_INTEGER: 'i4',             # <<<<<<<<<<<<<<
 *                     FIELD_STRING: 'a12',
 *                     FIELD_BOOL: 'b1',
 */
  __pyx_t_1 = PyInt_FromLong(vcf::FIELD_INTEGER); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, ((PyObject *)__pyx_n_s__i4)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":100
 * DEFAULT_TYPE_MAP = {FIELD_FLOAT: 'f4',
 *                     FIELD_INTEGER: 'i4',
 *                     FIELD_STRING: 'a12',             # <<<<<<<<<<<<<<
 *                     FIELD_BOOL: 'b1',
 *                     FIELD_UNKNOWN: 'a12' # leave as string
 */
  __pyx_t_1 = PyInt_FromLong(vcf::FIELD_STRING); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, ((PyObject *)__pyx_n_s__a12)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":101
 *                     FIELD_INTEGER: 'i4',
 *                     FIELD_STRING: 'a12',
 *                     FIELD_BOOL: 'b1',             # <<<<<<<<<<<<<<
 *                     FIELD_UNKNOWN: 'a12' # leave as string
 *                     }
 */
  __pyx_t_1 = PyInt_FromLong(vcf::FIELD_BOOL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, ((PyObject *)__pyx_n_s__b1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":102
 *                     FIELD_STRING: 'a12',
 *                     FIELD_BOOL: 'b1',
 *                     FIELD_UNKNOWN: 'a12' # leave as string             # <<<<<<<<<<<<<<
 *                     }
 * 
 */
  __pyx_t_1 = PyInt_FromLong(vcf::FIELD_UNKNOWN); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, ((PyObject *)__pyx_n_s__a12)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__DEFAULT_TYPE_MAP, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "vcfnp.pyx":107
 * 
 * # default mapping from VCF field types to fill values for missing values
 * DEFAULT_FILL_MAP = {FIELD_FLOAT: 0.,             # <<<<<<<<<<<<<<
 *                     FIELD_INTEGER: 0,
 *                     FIELD_STRING: '.',
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_1 = PyInt_FromLong(vcf::FIELD_FLOAT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyFloat_FromDouble(0.); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "vcfnp.pyx":108
 * # default mapping from VCF field types to fill values for missing values
 * DEFAULT_FILL_MAP = {FIELD_FLOAT: 0.,
 *                     FIELD_INTEGER: 0,             # <<<<<<<<<<<<<<
 *                     FIELD_STRING: '.',
 *                     FIELD_BOOL: False,
 */
  __pyx_t_3 = PyInt_FromLong(vcf::FIELD_INTEGER); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "vcfnp.pyx":109
 * DEFAULT_FILL_MAP = {FIELD_FLOAT: 0.,
 *                     FIELD_INTEGER: 0,
 *                     FIELD_STRING: '.',             # <<<<<<<<<<<<<<
 *                     FIELD_BOOL: False,
 *                     FIELD_UNKNOWN: ''
 */
  __pyx_t_3 = PyInt_FromLong(vcf::FIELD_STRING); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_kp_s_20)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "vcfnp.pyx":110
 *                     FIELD_INTEGER: 0,
 *                     FIELD_STRING: '.',
 *                     FIELD_BOOL: False,             # <<<<<<<<<<<<<<
 *                     FIELD_UNKNOWN: ''
 *                     }
 */
  __pyx_t_3 = PyInt_FromLong(vcf::FIELD_BOOL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":111
 *                     FIELD_STRING: '.',
 *                     FIELD_BOOL: False,
 *                     FIELD_UNKNOWN: ''             # <<<<<<<<<<<<<<
 *                     }
 * 
 */
  __pyx_t_1 = PyInt_FromLong(vcf::FIELD_UNKNOWN); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, ((PyObject *)__pyx_kp_s_27)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__DEFAULT_FILL_MAP, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "vcfnp.pyx":117
 * # default dtypes for some known INFO fields where we know that lower
 * # precision is acceptable
 * DEFAULT_INFO_DTYPE = {             # <<<<<<<<<<<<<<
 *                      'AC': 'u2',
 *                      'AN': 'u2',
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__AC), ((PyObject *)__pyx_n_s__u2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__AN), ((PyObject *)__pyx_n_s__u2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__HRun), ((PyObject *)__pyx_n_s__u2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__MLEAC), ((PyObject *)__pyx_n_s__u2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__MQ), ((PyObject *)__pyx_n_s__f2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__QD), ((PyObject *)__pyx_n_s__f2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__RPA), ((PyObject *)__pyx_n_s__u2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__DEFAULT_INFO_DTYPE, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "vcfnp.pyx":127
 *                      }
 * 
 * CALLDATA_FIELDS = ('is_called', 'is_phased', 'genotype')             # <<<<<<<<<<<<<<
 * 
 * DEFAULT_CALLDATA_DTYPE = {
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__CALLDATA_FIELDS, ((PyObject *)__pyx_k_tuple_52)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":129
 * CALLDATA_FIELDS = ('is_called', 'is_phased', 'genotype')
 * 
 * DEFAULT_CALLDATA_DTYPE = {             # <<<<<<<<<<<<<<
 *                         'is_called': 'b1',
 *                         'is_phased': 'b1',
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__is_called), ((PyObject *)__pyx_n_s__b1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__is_phased), ((PyObject *)__pyx_n_s__b1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__genotype), ((PyObject *)__pyx_n_s__i1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__AD), ((PyObject *)__pyx_n_s__u2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__DP), ((PyObject *)__pyx_n_s__u2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__GQ), ((PyObject *)__pyx_n_s__u1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__MLPSAC), ((PyObject *)__pyx_n_s__u1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__MLPSAF), ((PyObject *)__pyx_n_s__f2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__MQ0), ((PyObject *)__pyx_n_s__u2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__PL), ((PyObject *)__pyx_n_s__u2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_17, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "vcfnp.pyx":143
 *                         }
 * 
 * DEFAULT_CALLDATA_FILL = {             # <<<<<<<<<<<<<<
 *                        'is_called': False,
 *                        'is_phased': False,
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));

  /* "vcfnp.pyx":144
 * 
 * DEFAULT_CALLDATA_FILL = {
 *                        'is_called': False,             # <<<<<<<<<<<<<<
 *                        'is_phased': False,
 *                        'genotype': -1,
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__is_called), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":145
 * DEFAULT_CALLDATA_FILL = {
 *                        'is_called': False,
 *                        'is_phased': False,             # <<<<<<<<<<<<<<
 *                        'genotype': -1,
 *                        }
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__is_phased), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__genotype), __pyx_int_neg_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_21, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "vcfnp.pyx":149
 *                        }
 * 
 * DEFAULT_CALLDATA_ARITY = {             # <<<<<<<<<<<<<<
 *                        'is_called': 1,
 *                        'is_phased': 1,
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__is_called), __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__is_phased), __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_18, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "vcfnp.pyx":156
 * 
 * 
 * cdef char SEMICOLON = ';'             # <<<<<<<<<<<<<<
 * cdef string DOT = '.'
 * cdef string GT_DELIMS = '/|'
 */
  __pyx_v_5vcfnp_SEMICOLON = ';';

  /* "vcfnp.pyx":157
 * 
 * cdef char SEMICOLON = ';'
 * cdef string DOT = '.'             # <<<<<<<<<<<<<<
 * cdef string GT_DELIMS = '/|'
 * cdef string FIELD_NAME_CHROM = 'CHROM'
 */
  __pyx_t_4 = __pyx_convert_string_from_py_(((PyObject *)__pyx_kp_b_20)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_5vcfnp_DOT = __pyx_t_4;

  /* "vcfnp.pyx":158
 * cdef char SEMICOLON = ';'
 * cdef string DOT = '.'
 * cdef string GT_DELIMS = '/|'             # <<<<<<<<<<<<<<
 * cdef string FIELD_NAME_CHROM = 'CHROM'
 * cdef string FIELD_NAME_POS = 'POS'
 */
  __pyx_t_4 = __pyx_convert_string_from_py_(((PyObject *)__pyx_kp_b_53)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_5vcfnp_GT_DELIMS = __pyx_t_4;

  /* "vcfnp.pyx":159
 * cdef string DOT = '.'
 * cdef string GT_DELIMS = '/|'
 * cdef string FIELD_NAME_CHROM = 'CHROM'             # <<<<<<<<<<<<<<
 * cdef string FIELD_NAME_POS = 'POS'
 * cdef string FIELD_NAME_ID = 'ID'
 */
  __pyx_t_4 = __pyx_convert_string_from_py_(((PyObject *)__pyx_n_b__CHROM)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_5vcfnp_FIELD_NAME_CHROM = __pyx_t_4;

  /* "vcfnp.pyx":160
 * cdef string GT_DELIMS = '/|'
 * cdef string FIELD_NAME_CHROM = 'CHROM'
 * cdef string FIELD_NAME_POS = 'POS'             # <<<<<<<<<<<<<<
 * cdef string FIELD_NAME_ID = 'ID'
 * cdef string FIELD_NAME_REF = 'REF'
 */
  __pyx_t_4 = __pyx_convert_string_from_py_(((PyObject *)__pyx_n_b__POS)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_5vcfnp_FIELD_NAME_POS = __pyx_t_4;

  /* "vcfnp.pyx":161
 * cdef string FIELD_NAME_CHROM = 'CHROM'
 * cdef string FIELD_NAME_POS = 'POS'
 * cdef string FIELD_NAME_ID = 'ID'             # <<<<<<<<<<<<<<
 * cdef string FIELD_NAME_REF = 'REF'
 * cdef string FIELD_NAME_ALT = 'ALT'
 */
  __pyx_t_4 = __pyx_convert_string_from_py_(((PyObject *)__pyx_n_b__ID)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_5vcfnp_FIELD_NAME_ID = __pyx_t_4;

  /* "vcfnp.pyx":162
 * cdef string FIELD_NAME_POS = 'POS'
 * cdef string FIELD_NAME_ID = 'ID'
 * cdef string FIELD_NAME_REF = 'REF'             # <<<<<<<<<<<<<<
 * cdef string FIELD_NAME_ALT = 'ALT'
 * cdef string FIELD_NAME_QUAL = 'QUAL'
 */
  __pyx_t_4 = __pyx_convert_string_from_py_(((PyObject *)__pyx_n_b__REF)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_5vcfnp_FIELD_NAME_REF = __pyx_t_4;

  /* "vcfnp.pyx":163
 * cdef string FIELD_NAME_ID = 'ID'
 * cdef string FIELD_NAME_REF = 'REF'
 * cdef string FIELD_NAME_ALT = 'ALT'             # <<<<<<<<<<<<<<
 * cdef string FIELD_NAME_QUAL = 'QUAL'
 * cdef string FIELD_NAME_FILTER = 'FILTER'
 */
  __pyx_t_4 = __pyx_convert_string_from_py_(((PyObject *)__pyx_n_b__ALT)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_5vcfnp_FIELD_NAME_ALT = __pyx_t_4;

  /* "vcfnp.pyx":164
 * cdef string FIELD_NAME_REF = 'REF'
 * cdef string FIELD_NAME_ALT = 'ALT'
 * cdef string FIELD_NAME_QUAL = 'QUAL'             # <<<<<<<<<<<<<<
 * cdef string FIELD_NAME_FILTER = 'FILTER'
 * cdef string FIELD_NAME_INFO = 'INFO'
 */
  __pyx_t_4 = __pyx_convert_string_from_py_(((PyObject *)__pyx_n_b__QUAL)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_5vcfnp_FIELD_NAME_QUAL = __pyx_t_4;

  /* "vcfnp.pyx":165
 * cdef string FIELD_NAME_ALT = 'ALT'
 * cdef string FIELD_NAME_QUAL = 'QUAL'
 * cdef string FIELD_NAME_FILTER = 'FILTER'             # <<<<<<<<<<<<<<
 * cdef string FIELD_NAME_INFO = 'INFO'
 * cdef string FIELD_NAME_NUM_ALLELES = 'num_alleles'
 */
  __pyx_t_4 = __pyx_convert_string_from_py_(((PyObject *)__pyx_n_b__FILTER)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_5vcfnp_FIELD_NAME_FILTER = __pyx_t_4;

  /* "vcfnp.pyx":166
 * cdef string FIELD_NAME_QUAL = 'QUAL'
 * cdef string FIELD_NAME_FILTER = 'FILTER'
 * cdef string FIELD_NAME_INFO = 'INFO'             # <<<<<<<<<<<<<<
 * cdef string FIELD_NAME_NUM_ALLELES = 'num_alleles'
 * cdef string FIELD_NAME_IS_SNP = 'is_snp'
 */
  __pyx_t_4 = __pyx_convert_string_from_py_(((PyObject *)__pyx_n_b__INFO)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_5vcfnp_FIELD_NAME_INFO = __pyx_t_4;

  /* "vcfnp.pyx":167
 * cdef string FIELD_NAME_FILTER = 'FILTER'
 * cdef string FIELD_NAME_INFO = 'INFO'
 * cdef string FIELD_NAME_NUM_ALLELES = 'num_alleles'             # <<<<<<<<<<<<<<
 * cdef string FIELD_NAME_IS_SNP = 'is_snp'
 * cdef string FIELD_NAME_IS_CALLED = 'is_called'
 */
  __pyx_t_4 = __pyx_convert_string_from_py_(((PyObject *)__pyx_n_b__num_alleles)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_5vcfnp_FIELD_NAME_NUM_ALLELES = __pyx_t_4;

  /* "vcfnp.pyx":168
 * cdef string FIELD_NAME_INFO = 'INFO'
 * cdef string FIELD_NAME_NUM_ALLELES = 'num_alleles'
 * cdef string FIELD_NAME_IS_SNP = 'is_snp'             # <<<<<<<<<<<<<<
 * cdef string FIELD_NAME_IS_CALLED = 'is_called'
 * cdef string FIELD_NAME_IS_PHASED = 'is_phased'
 */
  __pyx_t_4 = __pyx_convert_string_from_py_(((PyObject *)__pyx_n_b__is_snp)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_5vcfnp_FIELD_NAME_IS_SNP = __pyx_t_4;

  /* "vcfnp.pyx":169
 * cdef string FIELD_NAME_NUM_ALLELES = 'num_alleles'
 * cdef string FIELD_NAME_IS_SNP = 'is_snp'
 * cdef string FIELD_NAME_IS_CALLED = 'is_called'             # <<<<<<<<<<<<<<
 * cdef string FIELD_NAME_IS_PHASED = 'is_phased'
 * cdef string FIELD_NAME_GENOTYPE = 'genotype'
 */
  __pyx_t_4 = __pyx_convert_string_from_py_(((PyObject *)__pyx_n_b__is_called)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_5vcfnp_FIELD_NAME_IS_CALLED = __pyx_t_4;

  /* "vcfnp.pyx":170
 * cdef string FIELD_NAME_IS_SNP = 'is_snp'
 * cdef string FIELD_NAME_IS_CALLED = 'is_called'
 * cdef string FIELD_NAME_IS_PHASED = 'is_phased'             # <<<<<<<<<<<<<<
 * cdef string FIELD_NAME_GENOTYPE = 'genotype'
 * cdef string FIELD_NAME_GT = 'GT'
 */
  __pyx_t_4 = __pyx_convert_string_from_py_(((PyObject *)__pyx_n_b__is_phased)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_5vcfnp_FIELD_NAME_IS_PHASED = __pyx_t_4;

  /* "vcfnp.pyx":171
 * cdef string FIELD_NAME_IS_CALLED = 'is_called'
 * cdef string FIELD_NAME_IS_PHASED = 'is_phased'
 * cdef string FIELD_NAME_GENOTYPE = 'genotype'             # <<<<<<<<<<<<<<
 * cdef string FIELD_NAME_GT = 'GT'
 * 
 */
  __pyx_t_4 = __pyx_convert_string_from_py_(((PyObject *)__pyx_n_b__genotype)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_5vcfnp_FIELD_NAME_GENOTYPE = __pyx_t_4;

  /* "vcfnp.pyx":172
 * cdef string FIELD_NAME_IS_PHASED = 'is_phased'
 * cdef string FIELD_NAME_GENOTYPE = 'genotype'
 * cdef string FIELD_NAME_GT = 'GT'             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_4 = __pyx_convert_string_from_py_(((PyObject *)__pyx_n_b__GT)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_5vcfnp_FIELD_NAME_GT = __pyx_t_4;

  /* "vcfnp.pyx":185
 *              count=None,
 *              progress=0,
 *              logstream=sys.stderr,             # <<<<<<<<<<<<<<
 *              condition=None,
 *              slice=None
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__sys); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__stderr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_k_1 = __pyx_t_1;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "vcfnp.pyx":176
 * 
 * 
 * def variants(filename,             # <<<<<<<<<<<<<<
 *              region=None,
 *              fields=None,
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_1variants, NULL, __pyx_n_s__vcfnp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__variants, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":322
 * 
 * 
 * def _fromiter(it, dtype, count, int progress=0, logstream=sys.stderr):             # <<<<<<<<<<<<<<
 *     if progress > 0:
 *         it = _iter_withprogress(it, progress, logstream)
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__stderr); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_k_9 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_3_fromiter, NULL, __pyx_n_s__vcfnp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s___fromiter, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":333
 * 
 * 
 * def _iter_withprogress(iterable, int progress, logstream):             # <<<<<<<<<<<<<<
 *     cdef int i
 *     before_all = time.time()
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_5_iter_withprogress, NULL, __pyx_n_s__vcfnp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s___iter_withprogress, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":348
 * 
 * 
 * def _itervariants(filenames,             # <<<<<<<<<<<<<<
 *                  region,
 *                  vector[string] fields,
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_8_itervariants, NULL, __pyx_n_s__vcfnp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s___itervariants, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":374
 * 
 * 
 * def _itervariants_with_condition(filenames,             # <<<<<<<<<<<<<<
 *                                  region,
 *                                  vector[string] fields,
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_11_itervariants_with_condition, NULL, __pyx_n_s__vcfnp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_8, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":498
 *          count=None,
 *          progress=0,
 *          logstream=sys.stderr,             # <<<<<<<<<<<<<<
 *          condition=None,
 *          slice=None,
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__sys); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__stderr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_k_12 = __pyx_t_1;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "vcfnp.pyx":487
 * 
 * 
 * def info(filename,             # <<<<<<<<<<<<<<
 *          region=None,
 *          fields=None,
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_14info, NULL, __pyx_n_s__vcfnp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__info, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":657
 * 
 * 
 * def _iterinfo(filenames,             # <<<<<<<<<<<<<<
 *              region,
 *              vector[string] fields,
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_16_iterinfo, NULL, __pyx_n_s__vcfnp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s___iterinfo, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":682
 * 
 * 
 * def _iterinfo_with_condition(filenames,             # <<<<<<<<<<<<<<
 *                              region,
 *                              vector[string] fields,
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_19_iterinfo_with_condition, NULL, __pyx_n_s__vcfnp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_13, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":867
 *              count=None,
 *              progress=0,
 *              logstream=sys.stderr,             # <<<<<<<<<<<<<<
 *              condition=None,
 *              slice=None,
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__stderr); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_k_14 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "vcfnp.pyx":856
 * 
 * 
 * def calldata(filename,             # <<<<<<<<<<<<<<
 *              region=None,
 *              samples=None,
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_22calldata, NULL, __pyx_n_s__vcfnp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__calldata, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":1044
 * 
 * 
 * def _itercalldata(filenames,             # <<<<<<<<<<<<<<
 *                   region,
 *                   vector[string] samples,
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_24_itercalldata, NULL, __pyx_n_s__vcfnp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s___itercalldata, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":1071
 * 
 * 
 * def _itercalldata_with_condition(filenames,             # <<<<<<<<<<<<<<
 *                                  region,
 *                                  vector[string] samples,
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_27_itercalldata_with_condition, NULL, __pyx_n_s__vcfnp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_22, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":1231
 * 
 * 
 * def view2d(a):             # <<<<<<<<<<<<<<
 *     """
 *     Utility function to view a structured 1D array where all fields have a
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_30view2d, NULL, __pyx_n_s__vcfnp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__view2d, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":1326
 *     ('Gene_Coding', 'i1'),
 *     ('Transcript_ID', 'a20'),
 *     ('Exon', 'i1')             # <<<<<<<<<<<<<<
 * ]
 * 
 */
  __pyx_t_2 = PyList_New(11); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_78));
  PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_k_tuple_78));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_78));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_79));
  PyList_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_k_tuple_79));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_79));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_80));
  PyList_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_k_tuple_80));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_80));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_81));
  PyList_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_k_tuple_81));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_81));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_82));
  PyList_SET_ITEM(__pyx_t_2, 4, ((PyObject *)__pyx_k_tuple_82));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_82));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_83));
  PyList_SET_ITEM(__pyx_t_2, 5, ((PyObject *)__pyx_k_tuple_83));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_83));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_84));
  PyList_SET_ITEM(__pyx_t_2, 6, ((PyObject *)__pyx_k_tuple_84));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_84));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_85));
  PyList_SET_ITEM(__pyx_t_2, 7, ((PyObject *)__pyx_k_tuple_85));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_85));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_86));
  PyList_SET_ITEM(__pyx_t_2, 8, ((PyObject *)__pyx_k_tuple_86));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_86));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_87));
  PyList_SET_ITEM(__pyx_t_2, 9, ((PyObject *)__pyx_k_tuple_87));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_87));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_88));
  PyList_SET_ITEM(__pyx_t_2, 10, ((PyObject *)__pyx_k_tuple_88));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_88));
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__EFF_DEFAULT_DTYPE, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "vcfnp.pyx":1330
 * 
 * 
 * EFF_DEFAULT_FILLS = ('.', '.', '.', '.', '.', -1, '.', '.', -1, '.', -1)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s__EFF_DEFAULT_FILLS, ((PyObject *)__pyx_k_tuple_89)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":1333
 * 
 * 
 * def eff_default_transformer(fills=EFF_DEFAULT_FILLS):             # <<<<<<<<<<<<<<
 *     """
 *     Return a simple transformer function for parsing EFF annotations. N.B.,
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__EFF_DEFAULT_FILLS); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k_25 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_32eff_default_transformer, NULL, __pyx_n_s__vcfnp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_92, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":1
 * # cython: profile = False             # <<<<<<<<<<<<<<
 * 
 * """
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_93), ((PyObject *)__pyx_kp_u_94)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_95), ((PyObject *)__pyx_kp_u_96)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_97), ((PyObject *)__pyx_kp_u_98)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_99), ((PyObject *)__pyx_kp_u_100)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_d, __pyx_n_s____test__, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "vector.to_py":63
 * 
 * @cname("__pyx_convert_vector_to_py_int")
 * cdef object __pyx_convert_vector_to_py_int(vector[X]& v):             # <<<<<<<<<<<<<<
 *     return [X_to_py(v[i]) for i in range(v.size())]
 * 
 */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  if (__pyx_m) {
    __Pyx_AddTraceback("init vcfnp", __pyx_clineno, __pyx_lineno, __pyx_filename);
    Py_DECREF(__pyx_m); __pyx_m = 0;
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init vcfnp");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if PY_MAJOR_VERSION < 3
  return;
  #else
  return __pyx_m;
  #endif
}

/* Runtime support code */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule((char *)modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif /* CYTHON_REFNANNY */

static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
    if (unlikely(!result)) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%s() got an unexpected keyword argument '%s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%s() takes %s %" CYTHON_FORMAT_SSIZE_T "d positional argument%s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
    PyObject *result;
#if CYTHON_COMPILING_IN_CPYTHON
    result = PyDict_GetItem(__pyx_d, name);
    if (result) {
        Py_INCREF(result);
    } else {
#else
    result = PyObject_GetItem(__pyx_d, name);
    if (!result) {
        PyErr_Clear();
#endif
        result = __Pyx_GetBuiltinName(name);
    }
    return result;
}

static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_Restore(type, value, tb);
#endif
}
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(type, value, tb);
#endif
}

#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    #if PY_VERSION_HEX < 0x02050000
    if (PyClass_Check(type)) {
    #else
    if (PyType_Check(type)) {
    #endif
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        #if PY_VERSION_HEX < 0x02050000
        if (PyInstance_Check(type)) {
            type = (PyObject*) ((PyInstanceObject*)type)->in_class;
            Py_INCREF(type);
        } else {
            type = 0;
            PyErr_SetString(PyExc_TypeError,
                "raise: exception must be an old-style class or instance");
            goto raise_error;
        }
        #else
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
        #endif
    }
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else /* Python 3+ */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *args;
        if (!value)
            args = PyTuple_New(0);
        else if (PyTuple_Check(value)) {
            Py_INCREF(value);
            args = value;
        } else
            args = PyTuple_Pack(1, value);
        if (!args)
            goto bad;
        owned_instance = PyEval_CallObject(type, args);
        Py_DECREF(args);
        if (!owned_instance)
            goto bad;
        value = owned_instance;
        if (!PyExceptionInstance_Check(value)) {
            PyErr_Format(PyExc_TypeError,
                         "calling %R should have returned an instance of "
                         "BaseException, not %R",
                         type, Py_TYPE(value));
            goto bad;
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
#if PY_VERSION_HEX >= 0x03030000
    if (cause) {
#else
    if (cause && cause != Py_None) {
#endif
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
        PyThreadState *tstate = PyThreadState_GET();
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!j) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o);
    if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o);
    if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (PyErr_ExceptionMatches(PyExc_OverflowError))
                        PyErr_Clear();
                    else
                        return NULL;
                }
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (is_list || PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

static CYTHON_INLINE int __Pyx_mod_int(int a, int b) {
    int r = a % b;
    r += ((r != 0) & ((r ^ b) < 0)) * b;
    return r;
}

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

static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
        PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
        int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyMappingMethods* mp;
#if PY_MAJOR_VERSION < 3
    PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
    if (likely(ms && ms->sq_slice)) {
        if (!has_cstart) {
            if (_py_start && (*_py_start != Py_None)) {
                cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
                if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstart = 0;
        }
        if (!has_cstop) {
            if (_py_stop && (*_py_stop != Py_None)) {
                cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
                if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstop = PY_SSIZE_T_MAX;
        }
        if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
            Py_ssize_t l = ms->sq_length(obj);
            if (likely(l >= 0)) {
                if (cstop < 0) {
                    cstop += l;
                    if (cstop < 0) cstop = 0;
                }
                if (cstart < 0) {
                    cstart += l;
                    if (cstart < 0) cstart = 0;
                }
            } else {
                if (PyErr_ExceptionMatches(PyExc_OverflowError))
                    PyErr_Clear();
                else
                    goto bad;
            }
        }
        return ms->sq_slice(obj, cstart, cstop);
    }
#endif
    mp = Py_TYPE(obj)->tp_as_mapping;
    if (likely(mp && mp->mp_subscript))
#endif
    {
        PyObject* result;
        PyObject *py_slice, *py_start, *py_stop;
        if (_py_slice) {
            py_slice = *_py_slice;
        } else {
            PyObject* owned_start = NULL;
            PyObject* owned_stop = NULL;
            if (_py_start) {
                py_start = *_py_start;
            } else {
                if (has_cstart) {
                    owned_start = py_start = PyInt_FromSsize_t(cstart);
                    if (unlikely(!py_start)) goto bad;
                } else
                    py_start = Py_None;
            }
            if (_py_stop) {
                py_stop = *_py_stop;
            } else {
                if (has_cstop) {
                    owned_stop = py_stop = PyInt_FromSsize_t(cstop);
                    if (unlikely(!py_stop)) {
                        Py_XDECREF(owned_start);
                        goto bad;
                    }
                } else
                    py_stop = Py_None;
            }
            py_slice = PySlice_New(py_start, py_stop, Py_None);
            Py_XDECREF(owned_start);
            Py_XDECREF(owned_stop);
            if (unlikely(!py_slice)) goto bad;
        }
#if CYTHON_COMPILING_IN_CPYTHON
        result = mp->mp_subscript(obj, py_slice);
#else
        result = PyObject_GetItem(obj, py_slice);
#endif
        if (!_py_slice) {
            Py_DECREF(py_slice);
        }
        return result;
    }
    PyErr_Format(PyExc_TypeError,
        "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
bad:
    return NULL;
}

static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        if (PyBytes_GET_SIZE(s1) != PyBytes_GET_SIZE(s2)) {
            return (equals == Py_NE);
        } else if (PyBytes_GET_SIZE(s1) == 1) {
            if (equals == Py_EQ)
                return (PyBytes_AS_STRING(s1)[0] == PyBytes_AS_STRING(s2)[0]);
            else
                return (PyBytes_AS_STRING(s1)[0] != PyBytes_AS_STRING(s2)[0]);
        } else {
            int result = memcmp(PyBytes_AS_STRING(s1), PyBytes_AS_STRING(s2), (size_t)PyBytes_GET_SIZE(s1));
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
                                  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
    #if PY_MAJOR_VERSION < 3
    ctx = PyString_FromString(name);
    #else
    ctx = PyUnicode_FromString(name);
    #endif
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
    if (!ctx) {
        PyErr_WriteUnraisable(Py_None);
    } else {
        PyErr_WriteUnraisable(ctx);
        Py_DECREF(ctx);
    }
}

static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
}

static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%s to unpack",
                 index, (index == 1) ? "" : "s");
}

static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    } else {
        return __Pyx_IterFinish();
    }
    return 0;
}

static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
{
    if (unlikely(op->func_doc == NULL)) {
        if (op->func.m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
            op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
#else
            op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
#endif
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp = op->func_doc;
    if (value == NULL)
        value = Py_None; /* Mark as deleted */
    Py_INCREF(value);
    op->func_doc = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_name == NULL)) {
#if PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = op->func_name;
    Py_INCREF(value);
    op->func_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op)
{
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = op->func_qualname;
    Py_INCREF(value);
    op->func_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
{
    PyObject *self;
    self = m->func_closure;
    if (self == NULL)
        self = Py_None;
    Py_INCREF(self);
    return self;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    tmp = op->func_dict;
    Py_INCREF(value);
    op->func_dict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(CYTHON_UNUSED __pyx_CyFunctionObject *op)
{
    PyObject* dict = PyModule_GetDict(__pyx_m);
    Py_XINCREF(dict);
    return dict;
}
static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op)
{
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    Py_DECREF(res);
    return 0;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyTuple_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_tuple;
    op->defaults_tuple = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_kwdict;
    op->defaults_kwdict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value || value == Py_None) {
        value = NULL;
    } else if (!PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    tmp = op->func_annotations;
    op->func_annotations = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) {
    PyObject* result = op->func_annotations;
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
    {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {0, 0, 0, 0, 0}
};
#ifndef PY_WRITE_RESTRICTED /* < Py2.5 */
#define PY_WRITE_RESTRICTED WRITE_RESTRICTED
#endif
static PyMemberDef __pyx_CyFunction_members[] = {
    {(char *) "__module__", T_OBJECT, offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED, 0},
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromString(m->func.m_ml->ml_name);
#else
    return PyString_FromString(m->func.m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* code) {
    __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
    if (op == NULL)
        return NULL;
    op->flags = flags;
    op->func_weakreflist = NULL;
    op->func.m_ml = ml;
    op->func.m_self = (PyObject *) op;
    Py_XINCREF(closure);
    op->func_closure = closure;
    Py_XINCREF(module);
    op->func.m_module = module;
    op->func_dict = NULL;
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
    op->func_classobj = NULL;
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    PyObject_GC_Track(op);
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
    Py_CLEAR(m->func.m_module);
    Py_CLEAR(m->func_dict);
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_code);
    Py_CLEAR(m->func_classobj);
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyMem_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    if (m->func_weakreflist != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    PyObject_GC_Del(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    Py_VISIT(m->func_closure);
    Py_VISIT(m->func.m_module);
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_code);
    Py_VISIT(m->func_classobj);
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
{
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
        Py_INCREF(func);
        return func;
    }
    if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
        if (type == NULL)
            type = (PyObject *)(Py_TYPE(obj));
        return PyMethod_New(func,
                            type, (PyObject *)(Py_TYPE(type)));
    }
    if (obj == Py_None)
        obj = NULL;
    return PyMethod_New(func, obj, type);
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (void *)op);
#endif
}
#if CYTHON_COMPILING_IN_PYPY
static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    Py_ssize_t size;
    switch (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)) {
    case METH_VARARGS:
        if (likely(kw == NULL) || PyDict_Size(kw) == 0)
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL) || PyDict_Size(kw) == 0) {
            size = PyTuple_GET_SIZE(arg);
            if (size == 0)
                return (*meth)(self, NULL);
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%zd given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL) || PyDict_Size(kw) == 0) {
            size = PyTuple_GET_SIZE(arg);
            if (size == 1)
                return (*meth)(self, PyTuple_GET_ITEM(arg, 0));
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%zd given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags in "
                        "__Pyx_CyFunction_Call. METH_OLDARGS is no "
                        "longer supported!");
        return NULL;
    }
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
    return NULL;
}
#else
static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
	return PyCFunction_Call(func, arg, kw);
}
#endif
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    __Pyx_NAMESTR("cython_function_or_method"), /*tp_name*/
    sizeof(__pyx_CyFunctionObject),   /*tp_basicsize*/
    0,                                  /*tp_itemsize*/
    (destructor) __Pyx_CyFunction_dealloc, /*tp_dealloc*/
    0,                                  /*tp_print*/
    0,                                  /*tp_getattr*/
    0,                                  /*tp_setattr*/
#if PY_MAJOR_VERSION < 3
    0,                                  /*tp_compare*/
#else
    0,                                  /*reserved*/
#endif
    (reprfunc) __Pyx_CyFunction_repr,   /*tp_repr*/
    0,                                  /*tp_as_number*/
    0,                                  /*tp_as_sequence*/
    0,                                  /*tp_as_mapping*/
    0,                                  /*tp_hash*/
    __Pyx_CyFunction_Call,              /*tp_call*/
    0,                                  /*tp_str*/
    0,                                  /*tp_getattro*/
    0,                                  /*tp_setattro*/
    0,                                  /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags*/
    0,                                  /*tp_doc*/
    (traverseproc) __Pyx_CyFunction_traverse,   /*tp_traverse*/
    (inquiry) __Pyx_CyFunction_clear,   /*tp_clear*/
    0,                                  /*tp_richcompare*/
    offsetof(__pyx_CyFunctionObject, func_weakreflist), /* tp_weaklistoffse */
    0,                                  /*tp_iter*/
    0,                                  /*tp_iternext*/
    __pyx_CyFunction_methods,           /*tp_methods*/
    __pyx_CyFunction_members,           /*tp_members*/
    __pyx_CyFunction_getsets,           /*tp_getset*/
    0,                                  /*tp_base*/
    0,                                  /*tp_dict*/
    __Pyx_CyFunction_descr_get,         /*tp_descr_get*/
    0,                                  /*tp_descr_set*/
    offsetof(__pyx_CyFunctionObject, func_dict),/*tp_dictoffset*/
    0,                                  /*tp_init*/
    0,                                  /*tp_alloc*/
    0,                                  /*tp_new*/
    0,                                  /*tp_free*/
    0,                                  /*tp_is_gc*/
    0,                                  /*tp_bases*/
    0,                                  /*tp_mro*/
    0,                                  /*tp_cache*/
    0,                                  /*tp_subclasses*/
    0,                                  /*tp_weaklist*/
    0,                                  /*tp_del*/
#if PY_VERSION_HEX >= 0x02060000
    0,                                  /*tp_version_tag*/
#endif
};
static int __Pyx_CyFunction_init(void) {
#if !CYTHON_COMPILING_IN_PYPY
    __pyx_CyFunctionType_type.tp_call = PyCFunction_Call;
#endif
    if (PyType_Ready(&__pyx_CyFunctionType_type) < 0)
        return -1;
    __pyx_CyFunctionType = &__pyx_CyFunctionType_type;
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyMem_Malloc(size);
    if (!m->defaults)
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    if (unlikely(!type)) {
        PyErr_Format(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(PyObject_TypeCheck(obj, type)))
        return 1;
    PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
                 Py_TYPE(obj)->tp_name, type->tp_name);
    return 0;
}

static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
    if (t == Py_None) {
      __Pyx_RaiseNoneNotIterableError();
    } else if (PyTuple_GET_SIZE(t) < index) {
      __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
    } else {
      __Pyx_RaiseTooManyValuesError(index);
    }
}

static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
                                             int is_tuple, int has_known_size, int decref_tuple) {
    Py_ssize_t index;
    PyObject *value1 = NULL, *value2 = NULL, *iter = NULL;
    if (!is_tuple && unlikely(!PyTuple_Check(tuple))) {
        iternextfunc iternext;
        iter = PyObject_GetIter(tuple);
        if (unlikely(!iter)) goto bad;
        if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
        iternext = Py_TYPE(iter)->tp_iternext;
        value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
        value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
        if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
        Py_DECREF(iter);
    } else {
        if (!has_known_size && unlikely(PyTuple_GET_SIZE(tuple) != 2)) {
            __Pyx_UnpackTupleError(tuple, 2);
            goto bad;
        }
#if CYTHON_COMPILING_IN_PYPY
        value1 = PySequence_ITEM(tuple, 0);
        if (unlikely(!value1)) goto bad;
        value2 = PySequence_ITEM(tuple, 1);
        if (unlikely(!value2)) goto bad;
#else
        value1 = PyTuple_GET_ITEM(tuple, 0);
        value2 = PyTuple_GET_ITEM(tuple, 1);
        Py_INCREF(value1);
        Py_INCREF(value2);
#endif
        if (decref_tuple) { Py_DECREF(tuple); }
    }
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
unpacking_failed:
    if (!has_known_size && __Pyx_IterFinish() == 0)
        __Pyx_RaiseNeedMoreValuesError(index);
bad:
    Py_XDECREF(iter);
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
}

static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_source_is_dict) {
    is_dict = is_dict || likely(PyDict_CheckExact(iterable));
    *p_source_is_dict = is_dict;
#if !CYTHON_COMPILING_IN_PYPY
    if (is_dict) {
        *p_orig_length = PyDict_Size(iterable);
        Py_INCREF(iterable);
        return iterable;
    }
#endif
    *p_orig_length = 0;
    if (method_name) {
        PyObject* iter;
        iterable = __Pyx_PyObject_CallMethod0(iterable, method_name);
        if (!iterable)
            return NULL;
#if !CYTHON_COMPILING_IN_PYPY
        if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable))
            return iterable;
#endif
        iter = PyObject_GetIter(iterable);
        Py_DECREF(iterable);
        return iter;
    }
    return PyObject_GetIter(iterable);
}
static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* iter_obj, Py_ssize_t orig_length, Py_ssize_t* ppos,
                                              PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) {
    PyObject* next_item;
#if !CYTHON_COMPILING_IN_PYPY
    if (source_is_dict) {
        PyObject *key, *value;
        if (unlikely(orig_length != PyDict_Size(iter_obj))) {
            PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration");
            return -1;
        }
        if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) {
            return 0;
        }
        if (pitem) {
            PyObject* tuple = PyTuple_New(2);
            if (unlikely(!tuple)) {
                return -1;
            }
            Py_INCREF(key);
            Py_INCREF(value);
            PyTuple_SET_ITEM(tuple, 0, key);
            PyTuple_SET_ITEM(tuple, 1, value);
            *pitem = tuple;
        } else {
            if (pkey) {
                Py_INCREF(key);
                *pkey = key;
            }
            if (pvalue) {
                Py_INCREF(value);
                *pvalue = value;
            }
        }
        return 1;
    } else if (PyTuple_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyTuple_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else if (PyList_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyList_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else
#endif
    {
        next_item = PyIter_Next(iter_obj);
        if (unlikely(!next_item)) {
            return __Pyx_IterFinish();
        }
    }
    if (pitem) {
        *pitem = next_item;
    } else if (pkey && pvalue) {
        if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1))
            return -1;
    } else if (pkey) {
        *pkey = next_item;
    } else {
        *pvalue = next_item;
    }
    return 1;
}

static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    #if PY_VERSION_HEX < 0x03030000
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s____import__);
    if (!py_import)
        goto bad;
    #endif
    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;
    #if PY_VERSION_HEX >= 0x02050000
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if (strchr(__Pyx_MODULE_NAME, '.')) {
                #if PY_VERSION_HEX < 0x03030000
                PyObject *py_level = PyInt_FromLong(1);
                if (!py_level)
                    goto bad;
                module = PyObject_CallFunctionObjArgs(py_import,
                    name, global_dict, empty_dict, list, py_level, NULL);
                Py_DECREF(py_level);
                #else
                module = PyImport_ImportModuleLevelObject(
                    name, global_dict, empty_dict, list, 1);
                #endif
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0; /* try absolute import on failure */
        }
        #endif
        if (!module) {
            #if PY_VERSION_HEX < 0x03030000
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
    #else
    if (level>0) {
        PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4.");
        goto bad;
    }
    module = PyObject_CallFunctionObjArgs(py_import,
        name, global_dict, empty_dict, list, NULL);
    #endif
bad:
    #if PY_VERSION_HEX < 0x03030000
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3
static PyObject *__Pyx_GetStdout(void) {
    PyObject *f = PySys_GetObject((char *)"stdout");
    if (!f) {
        PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout");
    }
    return f;
}
static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) {
    int i;
    if (!f) {
        if (!(f = __Pyx_GetStdout()))
            return -1;
    }
    Py_INCREF(f);
    for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) {
        PyObject* v;
        if (PyFile_SoftSpace(f, 1)) {
            if (PyFile_WriteString(" ", f) < 0)
                goto error;
        }
        v = PyTuple_GET_ITEM(arg_tuple, i);
        if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0)
            goto error;
        if (PyString_Check(v)) {
            char *s = PyString_AsString(v);
            Py_ssize_t len = PyString_Size(v);
            if (len > 0 &&
                isspace(Py_CHARMASK(s[len-1])) &&
                s[len-1] != ' ')
                    PyFile_SoftSpace(f, 0);
        }
    }
    if (newline) {
        if (PyFile_WriteString("\n", f) < 0)
            goto error;
        PyFile_SoftSpace(f, 0);
    }
    Py_DECREF(f);
    return 0;
error:
    Py_DECREF(f);
    return -1;
}
#else /* Python 3 has a print function */
static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) {
    PyObject* kwargs = 0;
    PyObject* result = 0;
    PyObject* end_string;
    if (unlikely(!__pyx_print)) {
        __pyx_print = PyObject_GetAttr(__pyx_b, __pyx_n_s__print);
        if (!__pyx_print)
            return -1;
    }
    if (stream) {
        kwargs = PyDict_New();
        if (unlikely(!kwargs))
            return -1;
        if (unlikely(PyDict_SetItem(kwargs, __pyx_n_s__file, stream) < 0))
            goto bad;
        if (!newline) {
            end_string = PyUnicode_FromStringAndSize(" ", 1);
            if (unlikely(!end_string))
                goto bad;
            if (PyDict_SetItem(kwargs, __pyx_n_s__end, end_string) < 0) {
                Py_DECREF(end_string);
                goto bad;
            }
            Py_DECREF(end_string);
        }
    } else if (!newline) {
        if (unlikely(!__pyx_print_kwargs)) {
            __pyx_print_kwargs = PyDict_New();
            if (unlikely(!__pyx_print_kwargs))
                return -1;
            end_string = PyUnicode_FromStringAndSize(" ", 1);
            if (unlikely(!end_string))
                return -1;
            if (PyDict_SetItem(__pyx_print_kwargs, __pyx_n_s__end, end_string) < 0) {
                Py_DECREF(end_string);
                return -1;
            }
            Py_DECREF(end_string);
        }
        kwargs = __pyx_print_kwargs;
    }
    result = PyObject_Call(__pyx_print, arg_tuple, kwargs);
    if (unlikely(kwargs) && (kwargs != __pyx_print_kwargs))
        Py_DECREF(kwargs);
    if (!result)
        return -1;
    Py_DECREF(result);
    return 0;
bad:
    if (kwargs != __pyx_print_kwargs)
        Py_XDECREF(kwargs);
    return -1;
}
#endif

#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3
static int __Pyx_PrintOne(PyObject* f, PyObject *o) {
    if (!f) {
        if (!(f = __Pyx_GetStdout()))
            return -1;
    }
    Py_INCREF(f);
    if (PyFile_SoftSpace(f, 0)) {
        if (PyFile_WriteString(" ", f) < 0)
            goto error;
    }
    if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0)
        goto error;
    if (PyFile_WriteString("\n", f) < 0)
        goto error;
    Py_DECREF(f);
    return 0;
error:
    Py_DECREF(f);
    return -1;
    /* the line below is just to avoid C compiler
     * warnings about unused functions */
    return __Pyx_Print(f, NULL, 0);
}
#else /* Python 3 has a print function */
static int __Pyx_PrintOne(PyObject* stream, PyObject *o) {
    int res;
    PyObject* arg_tuple = PyTuple_Pack(1, o);
    if (unlikely(!arg_tuple))
        return -1;
    res = __Pyx_Print(stream, arg_tuple, 1);
    Py_DECREF(arg_tuple);
    return res;
}
#endif

#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
      return ::std::complex< float >(x, y);
    }
  #else
    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
      return x + y*(__pyx_t_float_complex)_Complex_I;
    }
  #endif
#else
    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
      __pyx_t_float_complex z;
      z.real = x;
      z.imag = y;
      return z;
    }
#endif

#if CYTHON_CCOMPLEX
#else
    static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
       return (a.real == b.real) && (a.imag == b.imag);
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        z.real = a.real + b.real;
        z.imag = a.imag + b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        z.real = a.real - b.real;
        z.imag = a.imag - b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        z.real = a.real * b.real - a.imag * b.imag;
        z.imag = a.real * b.imag + a.imag * b.real;
        return z;
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        float denom = b.real * b.real + b.imag * b.imag;
        z.real = (a.real * b.real + a.imag * b.imag) / denom;
        z.imag = (a.imag * b.real - a.real * b.imag) / denom;
        return z;
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex a) {
        __pyx_t_float_complex z;
        z.real = -a.real;
        z.imag = -a.imag;
        return z;
    }
    static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex a) {
       return (a.real == 0) && (a.imag == 0);
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex a) {
        __pyx_t_float_complex z;
        z.real =  a.real;
        z.imag = -a.imag;
        return z;
    }
    #if 1
        static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex z) {
          #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
            return sqrtf(z.real*z.real + z.imag*z.imag);
          #else
            return hypotf(z.real, z.imag);
          #endif
        }
        static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
            __pyx_t_float_complex z;
            float r, lnr, theta, z_r, z_theta;
            if (b.imag == 0 && b.real == (int)b.real) {
                if (b.real < 0) {
                    float denom = a.real * a.real + a.imag * a.imag;
                    a.real = a.real / denom;
                    a.imag = -a.imag / denom;
                    b.real = -b.real;
                }
                switch ((int)b.real) {
                    case 0:
                        z.real = 1;
                        z.imag = 0;
                        return z;
                    case 1:
                        return a;
                    case 2:
                        z = __Pyx_c_prodf(a, a);
                        return __Pyx_c_prodf(a, a);
                    case 3:
                        z = __Pyx_c_prodf(a, a);
                        return __Pyx_c_prodf(z, a);
                    case 4:
                        z = __Pyx_c_prodf(a, a);
                        return __Pyx_c_prodf(z, z);
                }
            }
            if (a.imag == 0) {
                if (a.real == 0) {
                    return a;
                }
                r = a.real;
                theta = 0;
            } else {
                r = __Pyx_c_absf(a);
                theta = atan2f(a.imag, a.real);
            }
            lnr = logf(r);
            z_r = expf(lnr * b.real - theta * b.imag);
            z_theta = theta * b.real + lnr * b.imag;
            z.real = z_r * cosf(z_theta);
            z.imag = z_r * sinf(z_theta);
            return z;
        }
    #endif
#endif

#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
      return ::std::complex< double >(x, y);
    }
  #else
    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
      return x + y*(__pyx_t_double_complex)_Complex_I;
    }
  #endif
#else
    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
      __pyx_t_double_complex z;
      z.real = x;
      z.imag = y;
      return z;
    }
#endif

#if CYTHON_CCOMPLEX
#else
    static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex a, __pyx_t_double_complex b) {
       return (a.real == b.real) && (a.imag == b.imag);
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        z.real = a.real + b.real;
        z.imag = a.imag + b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        z.real = a.real - b.real;
        z.imag = a.imag - b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        z.real = a.real * b.real - a.imag * b.imag;
        z.imag = a.real * b.imag + a.imag * b.real;
        return z;
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        double denom = b.real * b.real + b.imag * b.imag;
        z.real = (a.real * b.real + a.imag * b.imag) / denom;
        z.imag = (a.imag * b.real - a.real * b.imag) / denom;
        return z;
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex a) {
        __pyx_t_double_complex z;
        z.real = -a.real;
        z.imag = -a.imag;
        return z;
    }
    static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex a) {
       return (a.real == 0) && (a.imag == 0);
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex a) {
        __pyx_t_double_complex z;
        z.real =  a.real;
        z.imag = -a.imag;
        return z;
    }
    #if 1
        static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex z) {
          #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
            return sqrt(z.real*z.real + z.imag*z.imag);
          #else
            return hypot(z.real, z.imag);
          #endif
        }
        static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex a, __pyx_t_double_complex b) {
            __pyx_t_double_complex z;
            double r, lnr, theta, z_r, z_theta;
            if (b.imag == 0 && b.real == (int)b.real) {
                if (b.real < 0) {
                    double denom = a.real * a.real + a.imag * a.imag;
                    a.real = a.real / denom;
                    a.imag = -a.imag / denom;
                    b.real = -b.real;
                }
                switch ((int)b.real) {
                    case 0:
                        z.real = 1;
                        z.imag = 0;
                        return z;
                    case 1:
                        return a;
                    case 2:
                        z = __Pyx_c_prod(a, a);
                        return __Pyx_c_prod(a, a);
                    case 3:
                        z = __Pyx_c_prod(a, a);
                        return __Pyx_c_prod(z, a);
                    case 4:
                        z = __Pyx_c_prod(a, a);
                        return __Pyx_c_prod(z, z);
                }
            }
            if (a.imag == 0) {
                if (a.real == 0) {
                    return a;
                }
                r = a.real;
                theta = 0;
            } else {
                r = __Pyx_c_abs(a);
                theta = atan2(a.imag, a.real);
            }
            lnr = log(r);
            z_r = exp(lnr * b.real - theta * b.imag);
            z_theta = theta * b.real + lnr * b.imag;
            z.real = z_r * cos(z_theta);
            z.imag = z_r * sin(z_theta);
            return z;
        }
    #endif
#endif

static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
    const unsigned char neg_one = (unsigned char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned char" :
                    "value too large to convert to unsigned char");
            }
            return (unsigned char)-1;
        }
        return (unsigned char)val;
    }
    return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
    const unsigned short neg_one = (unsigned short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned short" :
                    "value too large to convert to unsigned short");
            }
            return (unsigned short)-1;
        }
        return (unsigned short)val;
    }
    return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
    const unsigned int neg_one = (unsigned int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned int" :
                    "value too large to convert to unsigned int");
            }
            return (unsigned int)-1;
        }
        return (unsigned int)val;
    }
    return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
    const char neg_one = (char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to char" :
                    "value too large to convert to char");
            }
            return (char)-1;
        }
        return (char)val;
    }
    return (char)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
    const short neg_one = (short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to short" :
                    "value too large to convert to short");
            }
            return (short)-1;
        }
        return (short)val;
    }
    return (short)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
    const int neg_one = (int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to int" :
                    "value too large to convert to int");
            }
            return (int)-1;
        }
        return (int)val;
    }
    return (int)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
    const signed char neg_one = (signed char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed char" :
                    "value too large to convert to signed char");
            }
            return (signed char)-1;
        }
        return (signed char)val;
    }
    return (signed char)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
    const signed short neg_one = (signed short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed short" :
                    "value too large to convert to signed short");
            }
            return (signed short)-1;
        }
        return (signed short)val;
    }
    return (signed short)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
    const signed int neg_one = (signed int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed int" :
                    "value too large to convert to signed int");
            }
            return (signed int)-1;
        }
        return (signed int)val;
    }
    return (signed int)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) {
    const int neg_one = (int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to int" :
                    "value too large to convert to int");
            }
            return (int)-1;
        }
        return (int)val;
    }
    return (int)__Pyx_PyInt_AsLong(x);
}

#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
#include "longintrepr.h"
#endif
#endif
static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
    const unsigned long neg_one = (unsigned long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to unsigned long");
            return (unsigned long)-1;
        }
        return (unsigned long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(unsigned long)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return (unsigned long) ((PyLongObject*)x)->ob_digit[0];
                }
            }
#endif
#endif
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to unsigned long");
                return (unsigned long)-1;
            }
            return (unsigned long)PyLong_AsUnsignedLong(x);
        } else {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(unsigned long)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return +(unsigned long) ((PyLongObject*)x)->ob_digit[0];
                    case -1: return -(unsigned long) ((PyLongObject*)x)->ob_digit[0];
                }
            }
#endif
#endif
            return (unsigned long)PyLong_AsLong(x);
        }
    } else {
        unsigned long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (unsigned long)-1;
        val = __Pyx_PyInt_AsUnsignedLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
#include "longintrepr.h"
#endif
#endif
static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
    const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to unsigned PY_LONG_LONG");
            return (unsigned PY_LONG_LONG)-1;
        }
        return (unsigned PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(unsigned PY_LONG_LONG)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return (unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
                }
            }
#endif
#endif
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to unsigned PY_LONG_LONG");
                return (unsigned PY_LONG_LONG)-1;
            }
            return (unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(unsigned PY_LONG_LONG)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return +(unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
                    case -1: return -(unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
                }
            }
#endif
#endif
            return (unsigned PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        unsigned PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (unsigned PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsUnsignedLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
#include "longintrepr.h"
#endif
#endif
static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
    const long neg_one = (long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to long");
            return (long)-1;
        }
        return (long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(long)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return (long) ((PyLongObject*)x)->ob_digit[0];
                }
            }
#endif
#endif
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to long");
                return (long)-1;
            }
            return (long)PyLong_AsUnsignedLong(x);
        } else {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(long)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return +(long) ((PyLongObject*)x)->ob_digit[0];
                    case -1: return -(long) ((PyLongObject*)x)->ob_digit[0];
                }
            }
#endif
#endif
            return (long)PyLong_AsLong(x);
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (long)-1;
        val = __Pyx_PyInt_AsLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
#include "longintrepr.h"
#endif
#endif
static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
    const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to PY_LONG_LONG");
            return (PY_LONG_LONG)-1;
        }
        return (PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(PY_LONG_LONG)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return (PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
                }
            }
#endif
#endif
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to PY_LONG_LONG");
                return (PY_LONG_LONG)-1;
            }
            return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(PY_LONG_LONG)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return +(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
                    case -1: return -(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
                }
            }
#endif
#endif
            return (PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
#include "longintrepr.h"
#endif
#endif
static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
    const signed long neg_one = (signed long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to signed long");
            return (signed long)-1;
        }
        return (signed long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(signed long)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return (signed long) ((PyLongObject*)x)->ob_digit[0];
                }
            }
#endif
#endif
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to signed long");
                return (signed long)-1;
            }
            return (signed long)PyLong_AsUnsignedLong(x);
        } else {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(signed long)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return +(signed long) ((PyLongObject*)x)->ob_digit[0];
                    case -1: return -(signed long) ((PyLongObject*)x)->ob_digit[0];
                }
            }
#endif
#endif
            return (signed long)PyLong_AsLong(x);
        }
    } else {
        signed long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (signed long)-1;
        val = __Pyx_PyInt_AsSignedLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
#include "longintrepr.h"
#endif
#endif
static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
    const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to signed PY_LONG_LONG");
            return (signed PY_LONG_LONG)-1;
        }
        return (signed PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(signed PY_LONG_LONG)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return (signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
                }
            }
#endif
#endif
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to signed PY_LONG_LONG");
                return (signed PY_LONG_LONG)-1;
            }
            return (signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(signed PY_LONG_LONG)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return +(signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
                    case -1: return -(signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
                }
            }
#endif
#endif
            return (signed PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        signed PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (signed PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsSignedLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = *type;
    tstate->exc_value = *value;
    tstate->exc_traceback = *tb;
#else
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
#endif
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}

static PyObject *__Pyx_Generator_Next(PyObject *self);
static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value);
static PyObject *__Pyx_Generator_Close(PyObject *self);
static PyObject *__Pyx_Generator_Throw(PyObject *gen, PyObject *args);
static PyTypeObject *__pyx_GeneratorType = 0;
#define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
#define __Pyx_Generator_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
#if 1 || PY_VERSION_HEX < 0x030300B0
static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue) {
    PyObject *et, *ev, *tb;
    PyObject *value = NULL;
    __Pyx_ErrFetch(&et, &ev, &tb);
    if (!et) {
        Py_XDECREF(tb);
        Py_XDECREF(ev);
        Py_INCREF(Py_None);
        *pvalue = Py_None;
        return 0;
    }
    if (unlikely(et != PyExc_StopIteration) &&
            unlikely(!PyErr_GivenExceptionMatches(et, PyExc_StopIteration))) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    if (likely(et == PyExc_StopIteration)) {
        if (likely(!ev) || !PyObject_IsInstance(ev, PyExc_StopIteration)) {
            if (!ev) {
                Py_INCREF(Py_None);
                ev = Py_None;
            }
            Py_XDECREF(tb);
            Py_DECREF(et);
            *pvalue = ev;
            return 0;
        }
    }
    PyErr_NormalizeException(&et, &ev, &tb);
    if (unlikely(!PyObject_IsInstance(ev, PyExc_StopIteration))) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    Py_XDECREF(tb);
    Py_DECREF(et);
#if PY_VERSION_HEX >= 0x030300A0
    value = ((PyStopIterationObject *)ev)->value;
    Py_INCREF(value);
    Py_DECREF(ev);
#else
    {
        PyObject* args = PyObject_GetAttr(ev, __pyx_n_s__args);
        Py_DECREF(ev);
        if (likely(args)) {
            value = PyObject_GetItem(args, 0);
            Py_DECREF(args);
        }
        if (unlikely(!value)) {
            __Pyx_ErrRestore(NULL, NULL, NULL);
            Py_INCREF(Py_None);
            value = Py_None;
        }
    }
#endif
    *pvalue = value;
    return 0;
}
#endif
static CYTHON_INLINE
void __Pyx_Generator_ExceptionClear(__pyx_GeneratorObject *self) {
    PyObject *exc_type = self->exc_type;
    PyObject *exc_value = self->exc_value;
    PyObject *exc_traceback = self->exc_traceback;
    self->exc_type = NULL;
    self->exc_value = NULL;
    self->exc_traceback = NULL;
    Py_XDECREF(exc_type);
    Py_XDECREF(exc_value);
    Py_XDECREF(exc_traceback);
}
static CYTHON_INLINE
int __Pyx_Generator_CheckRunning(__pyx_GeneratorObject *gen) {
    if (unlikely(gen->is_running)) {
        PyErr_SetString(PyExc_ValueError,
                        "generator already executing");
        return 1;
    }
    return 0;
}
static CYTHON_INLINE
PyObject *__Pyx_Generator_SendEx(__pyx_GeneratorObject *self, PyObject *value) {
    PyObject *retval;
    assert(!self->is_running);
    if (unlikely(self->resume_label == 0)) {
        if (unlikely(value && value != Py_None)) {
            PyErr_SetString(PyExc_TypeError,
                            "can't send non-None value to a "
                            "just-started generator");
            return NULL;
        }
    }
    if (unlikely(self->resume_label == -1)) {
        PyErr_SetNone(PyExc_StopIteration);
        return NULL;
    }
    if (value) {
#if CYTHON_COMPILING_IN_PYPY
#else
        /* Generators always return to their most recent caller, not
         * necessarily their creator. */
        if (self->exc_traceback) {
            PyThreadState *tstate = PyThreadState_GET();
            PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
            PyFrameObject *f = tb->tb_frame;
            Py_XINCREF(tstate->frame);
            assert(f->f_back == NULL);
            f->f_back = tstate->frame;
        }
#endif
        __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
                            &self->exc_traceback);
    } else {
        __Pyx_Generator_ExceptionClear(self);
    }
    self->is_running = 1;
    retval = self->body((PyObject *) self, value);
    self->is_running = 0;
    if (retval) {
        __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
                            &self->exc_traceback);
#if CYTHON_COMPILING_IN_PYPY
#else
        /* Don't keep the reference to f_back any longer than necessary.  It
         * may keep a chain of frames alive or it could create a reference
         * cycle. */
        if (self->exc_traceback) {
            PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
            PyFrameObject *f = tb->tb_frame;
            Py_CLEAR(f->f_back);
        }
#endif
    } else {
        __Pyx_Generator_ExceptionClear(self);
    }
    return retval;
}
static CYTHON_INLINE
PyObject *__Pyx_Generator_FinishDelegation(__pyx_GeneratorObject *gen) {
    PyObject *ret;
    PyObject *val = NULL;
    __Pyx_Generator_Undelegate(gen);
    __Pyx_PyGen_FetchStopIterationValue(&val);
    ret = __Pyx_Generator_SendEx(gen, val);
    Py_XDECREF(val);
    return ret;
}
static PyObject *__Pyx_Generator_Next(PyObject *self) {
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(__Pyx_Generator_CheckRunning(gen)))
        return NULL;
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        ret = Py_TYPE(yf)->tp_iternext(yf);
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        return __Pyx_Generator_FinishDelegation(gen);
    }
    return __Pyx_Generator_SendEx(gen, Py_None);
}
static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value) {
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(__Pyx_Generator_CheckRunning(gen)))
        return NULL;
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Generator_Send(yf, value);
        } else {
            if (value == Py_None)
                ret = PyIter_Next(yf);
            else
                ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s__send, value);
        }
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        return __Pyx_Generator_FinishDelegation(gen);
    }
    return __Pyx_Generator_SendEx(gen, value);
}
static int __Pyx_Generator_CloseIter(__pyx_GeneratorObject *gen, PyObject *yf) {
    PyObject *retval = NULL;
    int err = 0;
    if (__Pyx_Generator_CheckExact(yf)) {
        retval = __Pyx_Generator_Close(yf);
        if (!retval)
            return -1;
    } else {
        PyObject *meth;
        gen->is_running = 1;
        meth = PyObject_GetAttr(yf, __pyx_n_s__close);
        if (unlikely(!meth)) {
            if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                PyErr_WriteUnraisable(yf);
            }
            PyErr_Clear();
        } else {
            retval = PyObject_CallFunction(meth, NULL);
            Py_DECREF(meth);
            if (!retval)
                err = -1;
        }
        gen->is_running = 0;
    }
    Py_XDECREF(retval);
    return err;
}
static PyObject *__Pyx_Generator_Close(PyObject *self) {
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
    PyObject *retval, *raised_exception;
    PyObject *yf = gen->yieldfrom;
    int err = 0;
    if (unlikely(__Pyx_Generator_CheckRunning(gen)))
        return NULL;
    if (yf) {
        Py_INCREF(yf);
        err = __Pyx_Generator_CloseIter(gen, yf);
        __Pyx_Generator_Undelegate(gen);
        Py_DECREF(yf);
    }
    if (err == 0)
#if PY_VERSION_HEX < 0x02050000
        PyErr_SetNone(PyExc_StopIteration);
#else
        PyErr_SetNone(PyExc_GeneratorExit);
#endif
    retval = __Pyx_Generator_SendEx(gen, NULL);
    if (retval) {
        Py_DECREF(retval);
        PyErr_SetString(PyExc_RuntimeError,
                        "generator ignored GeneratorExit");
        return NULL;
    }
    raised_exception = PyErr_Occurred();
    if (!raised_exception
        || raised_exception == PyExc_StopIteration
#if PY_VERSION_HEX >= 0x02050000
        || raised_exception == PyExc_GeneratorExit
        || PyErr_GivenExceptionMatches(raised_exception, PyExc_GeneratorExit)
#endif
        || PyErr_GivenExceptionMatches(raised_exception, PyExc_StopIteration))
    {
        if (raised_exception) PyErr_Clear();      /* ignore these errors */
        Py_INCREF(Py_None);
        return Py_None;
    }
    return NULL;
}
static PyObject *__Pyx_Generator_Throw(PyObject *self, PyObject *args) {
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
    PyObject *typ;
    PyObject *tb = NULL;
    PyObject *val = NULL;
    PyObject *yf = gen->yieldfrom;
    if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
        return NULL;
    if (unlikely(__Pyx_Generator_CheckRunning(gen)))
        return NULL;
    if (yf) {
        PyObject *ret;
        Py_INCREF(yf);
#if PY_VERSION_HEX >= 0x02050000
        if (PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit)) {
            int err = __Pyx_Generator_CloseIter(gen, yf);
            Py_DECREF(yf);
            __Pyx_Generator_Undelegate(gen);
            if (err < 0)
                return __Pyx_Generator_SendEx(gen, NULL);
            goto throw_here;
        }
#endif
        gen->is_running = 1;
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Generator_Throw(yf, args);
        } else {
            PyObject *meth = PyObject_GetAttr(yf, __pyx_n_s__throw);
            if (unlikely(!meth)) {
                Py_DECREF(yf);
                if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                    gen->is_running = 0;
                    return NULL;
                }
                PyErr_Clear();
                __Pyx_Generator_Undelegate(gen);
                gen->is_running = 0;
                goto throw_here;
            }
            ret = PyObject_CallObject(meth, args);
            Py_DECREF(meth);
        }
        gen->is_running = 0;
        Py_DECREF(yf);
        if (!ret) {
            ret = __Pyx_Generator_FinishDelegation(gen);
        }
        return ret;
    }
throw_here:
    __Pyx_Raise(typ, val, tb, NULL);
    return __Pyx_Generator_SendEx(gen, NULL);
}
static int __Pyx_Generator_traverse(PyObject *self, visitproc visit, void *arg) {
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
    Py_VISIT(gen->closure);
    Py_VISIT(gen->classobj);
    Py_VISIT(gen->yieldfrom);
    Py_VISIT(gen->exc_type);
    Py_VISIT(gen->exc_value);
    Py_VISIT(gen->exc_traceback);
    return 0;
}
static int __Pyx_Generator_clear(PyObject *self) {
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
    Py_CLEAR(gen->closure);
    Py_CLEAR(gen->classobj);
    Py_CLEAR(gen->yieldfrom);
    Py_CLEAR(gen->exc_type);
    Py_CLEAR(gen->exc_value);
    Py_CLEAR(gen->exc_traceback);
    return 0;
}
static void __Pyx_Generator_dealloc(PyObject *self) {
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
    PyObject_GC_UnTrack(gen);
    if (gen->gi_weakreflist != NULL)
        PyObject_ClearWeakRefs(self);
    PyObject_GC_Track(self);
    if (gen->resume_label > 0) {
        Py_TYPE(gen)->tp_del(self);
        if (self->ob_refcnt > 0)
            return;                     /* resurrected.  :( */
    }
    PyObject_GC_UnTrack(self);
    __Pyx_Generator_clear(self);
    PyObject_GC_Del(gen);
}
static void __Pyx_Generator_del(PyObject *self) {
    PyObject *res;
    PyObject *error_type, *error_value, *error_traceback;
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
    if (gen->resume_label <= 0)
        return ;
    assert(self->ob_refcnt == 0);
    self->ob_refcnt = 1;
    __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
    res = __Pyx_Generator_Close(self);
    if (res == NULL)
        PyErr_WriteUnraisable(self);
    else
        Py_DECREF(res);
    __Pyx_ErrRestore(error_type, error_value, error_traceback);
    /* Undo the temporary resurrection; can't use DECREF here, it would
     * cause a recursive call.
     */
    assert(self->ob_refcnt > 0);
    if (--self->ob_refcnt == 0)
        return; /* this is the normal path out */
    /* close() resurrected it!  Make it look like the original Py_DECREF
     * never happened.
     */
    {
        Py_ssize_t refcnt = self->ob_refcnt;
        _Py_NewReference(self);
        self->ob_refcnt = refcnt;
    }
#if CYTHON_COMPILING_IN_CPYTHON
    assert(PyType_IS_GC(self->ob_type) &&
           _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
    /* If Py_REF_DEBUG, _Py_NewReference bumped _Py_RefTotal, so
     * we need to undo that. */
    _Py_DEC_REFTOTAL;
#endif
    /* If Py_TRACE_REFS, _Py_NewReference re-added self to the object
     * chain, so no more to do there.
     * If COUNT_ALLOCS, the original decref bumped tp_frees, and
     * _Py_NewReference bumped tp_allocs:  both of those need to be
     * undone.
     */
#ifdef COUNT_ALLOCS
    --Py_TYPE(self)->tp_frees;
    --Py_TYPE(self)->tp_allocs;
#endif
}
static PyMemberDef __pyx_Generator_memberlist[] = {
    {(char *) "gi_running",
#if PY_VERSION_HEX >= 0x02060000
     T_BOOL,
#else
     T_BYTE,
#endif
     offsetof(__pyx_GeneratorObject, is_running),
     READONLY,
     NULL},
    {0, 0, 0, 0, 0}
};
static PyMethodDef __pyx_Generator_methods[] = {
    {__Pyx_NAMESTR("send"), (PyCFunction) __Pyx_Generator_Send, METH_O, 0},
    {__Pyx_NAMESTR("throw"), (PyCFunction) __Pyx_Generator_Throw, METH_VARARGS, 0},
    {__Pyx_NAMESTR("close"), (PyCFunction) __Pyx_Generator_Close, METH_NOARGS, 0},
    {0, 0, 0, 0}
};
static PyTypeObject __pyx_GeneratorType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    __Pyx_NAMESTR("generator"),         /*tp_name*/
    sizeof(__pyx_GeneratorObject),      /*tp_basicsize*/
    0,                                  /*tp_itemsize*/
    (destructor) __Pyx_Generator_dealloc,/*tp_dealloc*/
    0,                                  /*tp_print*/
    0,                                  /*tp_getattr*/
    0,                                  /*tp_setattr*/
#if PY_MAJOR_VERSION < 3
    0,                                  /*tp_compare*/
#else
    0,                                  /*reserved*/
#endif
    0,                                   /*tp_repr*/
    0,                                  /*tp_as_number*/
    0,                                  /*tp_as_sequence*/
    0,                                  /*tp_as_mapping*/
    0,                                  /*tp_hash*/
    0,                                  /*tp_call*/
    0,                                  /*tp_str*/
    0,                                  /*tp_getattro*/
    0,                                  /*tp_setattro*/
    0,                                  /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags*/
    0,                                  /*tp_doc*/
    (traverseproc) __Pyx_Generator_traverse,   /*tp_traverse*/
    0,                                  /*tp_clear*/
    0,                                  /*tp_richcompare*/
    offsetof(__pyx_GeneratorObject, gi_weakreflist), /* tp_weaklistoffse */
    0,                                  /*tp_iter*/
    (iternextfunc) __Pyx_Generator_Next, /*tp_iternext*/
    __pyx_Generator_methods,            /*tp_methods*/
    __pyx_Generator_memberlist,         /*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*/
    0,                                  /*tp_new*/
    0,                                  /*tp_free*/
    0,                                  /*tp_is_gc*/
    0,                                  /*tp_bases*/
    0,                                  /*tp_mro*/
    0,                                  /*tp_cache*/
    0,                                  /*tp_subclasses*/
    0,                                  /*tp_weaklist*/
    __Pyx_Generator_del,                /*tp_del*/
#if PY_VERSION_HEX >= 0x02060000
    0,                                  /*tp_version_tag*/
#endif
};
static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
                                                  PyObject *closure) {
    __pyx_GeneratorObject *gen =
        PyObject_GC_New(__pyx_GeneratorObject, &__pyx_GeneratorType_type);
    if (gen == NULL)
        return NULL;
    gen->body = body;
    gen->closure = closure;
    Py_XINCREF(closure);
    gen->is_running = 0;
    gen->resume_label = 0;
    gen->classobj = NULL;
    gen->yieldfrom = NULL;
    gen->exc_type = NULL;
    gen->exc_value = NULL;
    gen->exc_traceback = NULL;
    gen->gi_weakreflist = NULL;
    PyObject_GC_Track(gen);
    return gen;
}
static int __pyx_Generator_init(void) {
    __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr;
    __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
    if (PyType_Ready(&__pyx_GeneratorType_type)) {
        return -1;
    }
    __pyx_GeneratorType = &__pyx_GeneratorType_type;
    return 0;
}

static int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        #if PY_VERSION_HEX < 0x02050000
        return PyErr_Warn(NULL, message);
        #else
        return PyErr_WarnEx(NULL, message, 1);
        #endif
    }
    return 0;
}

#ifndef __PYX_HAVE_RT_ImportModule
#define __PYX_HAVE_RT_ImportModule
static PyObject *__Pyx_ImportModule(const char *name) {
    PyObject *py_name = 0;
    PyObject *py_module = 0;
    py_name = __Pyx_PyIdentifier_FromString(name);
    if (!py_name)
        goto bad;
    py_module = PyImport_Import(py_name);
    Py_DECREF(py_name);
    return py_module;
bad:
    Py_XDECREF(py_name);
    return 0;
}
#endif

#ifndef __PYX_HAVE_RT_ImportType
#define __PYX_HAVE_RT_ImportType
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
    size_t size, int strict)
{
    PyObject *py_module = 0;
    PyObject *result = 0;
    PyObject *py_name = 0;
    char warning[200];
    Py_ssize_t basicsize;
#ifdef Py_LIMITED_API
    PyObject *py_basicsize;
#endif
    py_module = __Pyx_ImportModule(module_name);
    if (!py_module)
        goto bad;
    py_name = __Pyx_PyIdentifier_FromString(class_name);
    if (!py_name)
        goto bad;
    result = PyObject_GetAttr(py_module, py_name);
    Py_DECREF(py_name);
    py_name = 0;
    Py_DECREF(py_module);
    py_module = 0;
    if (!result)
        goto bad;
    if (!PyType_Check(result)) {
        PyErr_Format(PyExc_TypeError,
            "%s.%s is not a type object",
            module_name, class_name);
        goto bad;
    }
#ifndef Py_LIMITED_API
    basicsize = ((PyTypeObject *)result)->tp_basicsize;
#else
    py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
    if (!py_basicsize)
        goto bad;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = 0;
    if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
#endif
    if (!strict && (size_t)basicsize > size) {
        PyOS_snprintf(warning, sizeof(warning),
            "%s.%s size changed, may indicate binary incompatibility",
            module_name, class_name);
        #if PY_VERSION_HEX < 0x02050000
        if (PyErr_Warn(NULL, warning) < 0) goto bad;
        #else
        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
        #endif
    }
    else if ((size_t)basicsize != size) {
        PyErr_Format(PyExc_ValueError,
            "%s.%s has the wrong size, try recompiling",
            module_name, class_name);
        goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(py_module);
    Py_XDECREF(result);
    return NULL;
}
#endif

static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = (start + end) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, new_max*sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(filename);
    #else
    py_srcfile = PyUnicode_FromString(filename);
    #endif
    if (!py_srcfile) goto bad;
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    py_code = __Pyx_PyCode_New(
        0,            /*int argcount,*/
        0,            /*int kwonlyargcount,*/
        0,            /*int nlocals,*/
        0,            /*int stacksize,*/
        0,            /*int flags,*/
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,      /*int firstlineno,*/
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    Py_DECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_globals = 0;
    PyFrameObject *py_frame = 0;
    py_code = __pyx_find_code_object(c_line ? c_line : py_line);
    if (!py_code) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
    }
    py_globals = PyModule_GetDict(__pyx_m);
    if (!py_globals) 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 = py_line;
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else  /* Python 3+ has unicode identifiers */
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        ++t;
    }
    return 0;
}

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, strlen(c_str));
}
static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
#if PY_VERSION_HEX < 0x03030000
        char* defenc_c;
        PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
        if (!defenc) return NULL;
        defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        {
            char* end = defenc_c + PyBytes_GET_SIZE(defenc);
            char* c;
            for (c = defenc_c; c < end; c++) {
                if ((unsigned char) (*c) >= 128) {
                    PyUnicode_AsASCIIString(o);
                    return NULL;
                }
            }
        }
#endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/
        *length = PyBytes_GET_SIZE(defenc);
        return defenc_c;
#else /* PY_VERSION_HEX < 0x03030000 */
        if (PyUnicode_READY(o) == -1) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        if (PyUnicode_IS_ASCII(o)) {
            *length = PyUnicode_GET_DATA_SIZE(o);
            return PyUnicode_AsUTF8(o);
        } else {
            PyUnicode_AsASCIIString(o);
            return NULL;
        }
#else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */
        return PyUnicode_AsUTF8AndSize(o, length);
#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */
#endif /* PY_VERSION_HEX < 0x03030000 */
    } else
#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII  || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (r < 0) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
  PyNumberMethods *m;
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (PyInt_Check(x) || PyLong_Check(x))
#else
  if (PyLong_Check(x))
#endif
    return Py_INCREF(x), x;
  m = Py_TYPE(x)->tp_as_number;
#if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = PyNumber_Long(x);
  }
#else
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Long(x);
  }
#endif
  if (res) {
#if PY_MAJOR_VERSION < 3
    if (!PyInt_Check(res) && !PyLong_Check(res)) {
#else
    if (!PyLong_Check(res)) {
#endif
      PyErr_Format(PyExc_TypeError,
                   "__%s__ returned non-%s (type %.200s)",
                   name, name, Py_TYPE(res)->tp_name);
      Py_DECREF(res);
      return NULL;
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject* x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
#if PY_VERSION_HEX < 0x02050000
   if (ival <= LONG_MAX)
       return PyInt_FromLong((long)ival);
   else {
       unsigned char *bytes = (unsigned char *) &ival;
       int one = 1; int little = (int)*(unsigned char*)&one;
       return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0);
   }
#else
   return PyInt_FromSize_t(ival);
#endif
}
static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
   unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
   if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) {
       if ((val != (unsigned PY_LONG_LONG)-1) || !PyErr_Occurred())
           PyErr_SetString(PyExc_OverflowError,
                           "value too large to convert to size_t");
       return (size_t)-1;
   }
   return (size_t)val;
}


#endif /* Py_PYTHON_H */
