/* Generated by Cython 0.20.1 on Thu Feb 20 13:14:15 2014 */

#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
#define CYTHON_ABI "0_20_1"
#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 CYTHON_COMPILING_IN_PYPY
#define Py_OptimizeFlag 0
#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_As_int(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+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyClass_Type
#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)
  #define __Pyx_DefaultClassType PyType_Type
#endif
#if PY_VERSION_HEX < 0x02060000
  #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 < 0x02060000 && !defined(Py_TPFLAGS_IS_ABSTRACT)
  #define Py_TPFLAGS_IS_ABSTRACT 0
#endif
#if PY_VERSION_HEX < 0x030400a1 && !defined(Py_TPFLAGS_HAVE_FINALIZE)
  #define Py_TPFLAGS_HAVE_FINALIZE 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_KIND(u)         PyUnicode_KIND(u)
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #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_KIND(u)         (sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#define __Pyx_PyString_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#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) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#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
  #define PyNumber_Int                 PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_VERSION_HEX < 0x030200A4
  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) && _MSC_VER >= 1400
    #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"
#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
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (    \
    (sizeof(type) < sizeof(Py_ssize_t))  ||             \
    (sizeof(type) > sizeof(Py_ssize_t) &&               \
          likely(v < (type)PY_SSIZE_T_MAX ||            \
                 v == (type)PY_SSIZE_T_MAX)  &&         \
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||       \
                                v == (type)PY_SSIZE_T_MIN)))  ||  \
    (sizeof(type) == sizeof(Py_ssize_t) &&              \
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||        \
                               v == (type)PY_SSIZE_T_MAX)))  )
static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#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_AsSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
#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_PyByteArray_FromUString(s)   __Pyx_PyByteArray_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);
#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(void) {
    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 '%.200s' 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(void) {
    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",
  "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_6vcflib_PyVariantCallFile;
struct __pyx_obj_5vcfnp___pyx_scope_struct___variants_arities;
struct __pyx_obj_5vcfnp___pyx_scope_struct_1_genexpr;
struct __pyx_obj_5vcfnp___pyx_scope_struct_2__variants_fills;
struct __pyx_obj_5vcfnp___pyx_scope_struct_3_genexpr;
struct __pyx_obj_5vcfnp___pyx_scope_struct_4__info_transformers;
struct __pyx_obj_5vcfnp___pyx_scope_struct_5_genexpr;
struct __pyx_obj_5vcfnp___pyx_scope_struct_6__setup_variants;
struct __pyx_obj_5vcfnp___pyx_scope_struct_7_genexpr;
struct __pyx_obj_5vcfnp___pyx_scope_struct_8_genexpr;
struct __pyx_obj_5vcfnp___pyx_scope_struct_9__iter_withprogress;
struct __pyx_obj_5vcfnp___pyx_scope_struct_10_itervariants;
struct __pyx_obj_5vcfnp___pyx_scope_struct_11_itervariants_with_condition;
struct __pyx_obj_5vcfnp___pyx_scope_struct_12__calldata_arities;
struct __pyx_obj_5vcfnp___pyx_scope_struct_13_genexpr;
struct __pyx_obj_5vcfnp___pyx_scope_struct_14__calldata_fills;
struct __pyx_obj_5vcfnp___pyx_scope_struct_15_genexpr;
struct __pyx_obj_5vcfnp___pyx_scope_struct_16__build_calldata;
struct __pyx_obj_5vcfnp___pyx_scope_struct_17_genexpr;
struct __pyx_obj_5vcfnp___pyx_scope_struct_18_genexpr;
struct __pyx_obj_5vcfnp___pyx_scope_struct_19_itercalldata;
struct __pyx_obj_5vcfnp___pyx_scope_struct_20_itercalldata_with_condition;
struct __pyx_obj_5vcfnp___pyx_scope_struct_21_eff_default_transformer;
struct __pyx_obj_5vcfnp___pyx_scope_struct_22__transformer;
struct __pyx_obj_5vcfnp___pyx_scope_struct_23_genexpr;
struct __pyx_obj_5vcfnp___pyx_scope_struct_24___iter__;
struct __pyx_obj_5vcfnp___pyx_scope_struct_25_genexpr;
struct __pyx_obj_5vcfnp___pyx_scope_struct_26_genexpr;
struct __pyx_obj_5vcfnp___pyx_scope_struct_27_itervariantstable;

/* "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;

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


/* "vcfnp.pyx":219
 * 
 * 
 * def _variants_arities(fields, arities, infoCounts):             # <<<<<<<<<<<<<<
 *     if arities is None:
 *         arities = dict()
 */
struct __pyx_obj_5vcfnp___pyx_scope_struct___variants_arities {
  PyObject_HEAD
  PyObject *__pyx_v_arities;
  PyObject *__pyx_v_fields;
};


/* "vcfnp.pyx":236
 *             else:
 *                 arities[f] = vcf_count
 *     arities = tuple(arities[f] for f in fields)             # <<<<<<<<<<<<<<
 *     return arities
 * 
 */
struct __pyx_obj_5vcfnp___pyx_scope_struct_1_genexpr {
  PyObject_HEAD
  struct __pyx_obj_5vcfnp___pyx_scope_struct___variants_arities *__pyx_outer_scope;
  PyObject *__pyx_v_f;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "vcfnp.pyx":240
 * 
 * 
 * def _variants_fills(fields, fills, infoTypes):             # <<<<<<<<<<<<<<
 *     if fills is None:
 *         fills = dict()
 */
struct __pyx_obj_5vcfnp___pyx_scope_struct_2__variants_fills {
  PyObject_HEAD
  PyObject *__pyx_v_fields;
  PyObject *__pyx_v_fills;
};


/* "vcfnp.pyx":251
 *             else:
 *                 fills[f] = DEFAULT_FILL_MAP[vcf_type]
 *     fills = tuple(fills[f] for f in fields)             # <<<<<<<<<<<<<<
 *     return fills
 * 
 */
struct __pyx_obj_5vcfnp___pyx_scope_struct_3_genexpr {
  PyObject_HEAD
  struct __pyx_obj_5vcfnp___pyx_scope_struct_2__variants_fills *__pyx_outer_scope;
  PyObject *__pyx_v_f;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "vcfnp.pyx":255
 * 
 * 
 * def _info_transformers(fields, transformers):             # <<<<<<<<<<<<<<
 *     if transformers is None:
 *         transformers = dict()
 */
struct __pyx_obj_5vcfnp___pyx_scope_struct_4__info_transformers {
  PyObject_HEAD
  PyObject *__pyx_v_fields;
  PyObject *__pyx_v_transformers;
};


/* "vcfnp.pyx":261
 *         if f not in transformers:
 *             transformers[f] = None
 *     return tuple(transformers[f] for f in fields)             # <<<<<<<<<<<<<<
 * 
 * 
 */
struct __pyx_obj_5vcfnp___pyx_scope_struct_5_genexpr {
  PyObject_HEAD
  struct __pyx_obj_5vcfnp___pyx_scope_struct_4__info_transformers *__pyx_outer_scope;
  PyObject *__pyx_v_f;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "vcfnp.pyx":309
 * 
 * 
 * def _setup_variants(filename,             # <<<<<<<<<<<<<<
 *                     region,
 *                     fields,
 */
struct __pyx_obj_5vcfnp___pyx_scope_struct_6__setup_variants {
  PyObject_HEAD
  PyObject *__pyx_v_fields;
  PyObject *__pyx_v_infoCounts;
  PyObject *__pyx_v_infoTypes;
};


/* "vcfnp.pyx":352
 *             infoTypes[f] = TYPESTRING2KEY[vcf_types[f]]
 * 
 *     infoTypes = tuple(infoTypes[f] if f in infoTypes else -1 for f in fields)             # <<<<<<<<<<<<<<
 *     infoCounts = tuple(infoCounts[f] if f in infoCounts else -1 for f in fields)
 * 
 */
struct __pyx_obj_5vcfnp___pyx_scope_struct_7_genexpr {
  PyObject_HEAD
  struct __pyx_obj_5vcfnp___pyx_scope_struct_6__setup_variants *__pyx_outer_scope;
  PyObject *__pyx_v_f;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "vcfnp.pyx":353
 * 
 *     infoTypes = tuple(infoTypes[f] if f in infoTypes else -1 for f in fields)
 *     infoCounts = tuple(infoCounts[f] if f in infoCounts else -1 for f in fields)             # <<<<<<<<<<<<<<
 * 
 *     # determine expected number of values for each field
 */
struct __pyx_obj_5vcfnp___pyx_scope_struct_8_genexpr {
  PyObject_HEAD
  struct __pyx_obj_5vcfnp___pyx_scope_struct_6__setup_variants *__pyx_outer_scope;
  PyObject *__pyx_v_f;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


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


/* "vcfnp.pyx":626
 * 
 * 
 * def itervariants(filenames,             # <<<<<<<<<<<<<<
 *                  region,
 *                  list fieldspec,
 */
struct __pyx_obj_5vcfnp___pyx_scope_struct_10_itervariants {
  PyObject_HEAD
  PyObject *__pyx_v_current_filename;
  PyObject *__pyx_v_fieldspec;
  PyObject *__pyx_v_filenames;
  PyObject *__pyx_v_filterIds;
  int __pyx_v_flatten_filter;
  PyObject *__pyx_v_parseInfo;
  PyObject *__pyx_v_region;
  bool __pyx_v_region_set;
  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":653
 * 
 * 
 * def itervariants_with_condition(filenames,             # <<<<<<<<<<<<<<
 *                                 region,
 *                                 list fieldspec,
 */
struct __pyx_obj_5vcfnp___pyx_scope_struct_11_itervariants_with_condition {
  PyObject_HEAD
  PyObject *__pyx_v_condition;
  PyObject *__pyx_v_current_filename;
  PyObject *__pyx_v_fieldspec;
  PyObject *__pyx_v_filenames;
  PyObject *__pyx_v_filterIds;
  int __pyx_v_flatten_filter;
  long __pyx_v_i;
  long __pyx_v_n;
  PyObject *__pyx_v_parseInfo;
  PyObject *__pyx_v_region;
  bool __pyx_v_region_set;
  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":902
 * 
 * 
 * def _calldata_arities(fields, arities, formatCounts, ploidy):             # <<<<<<<<<<<<<<
 *     if arities is None:
 *         arities = dict()
 */
struct __pyx_obj_5vcfnp___pyx_scope_struct_12__calldata_arities {
  PyObject_HEAD
  PyObject *__pyx_v_arities;
  PyObject *__pyx_v_fields;
};


/* "vcfnp.pyx":923
 *             else:
 *                 arities[f] = vcf_count
 *     return tuple(arities[f] for f in fields)             # <<<<<<<<<<<<<<
 * 
 * 
 */
struct __pyx_obj_5vcfnp___pyx_scope_struct_13_genexpr {
  PyObject_HEAD
  struct __pyx_obj_5vcfnp___pyx_scope_struct_12__calldata_arities *__pyx_outer_scope;
  PyObject *__pyx_v_f;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "vcfnp.pyx":926
 * 
 * 
 * def _calldata_fills(fields, fills, formatTypes, ploidy):             # <<<<<<<<<<<<<<
 *     if fills is None:
 *         fills = dict()
 */
struct __pyx_obj_5vcfnp___pyx_scope_struct_14__calldata_fills {
  PyObject_HEAD
  PyObject *__pyx_v_fields;
  PyObject *__pyx_v_fills;
};


/* "vcfnp.pyx":937
 *             else:
 *                 fills[f] = DEFAULT_FILL_MAP[vcf_type]
 *     return tuple(fills[f] for f in fields)             # <<<<<<<<<<<<<<
 * 
 * 
 */
struct __pyx_obj_5vcfnp___pyx_scope_struct_15_genexpr {
  PyObject_HEAD
  struct __pyx_obj_5vcfnp___pyx_scope_struct_14__calldata_fills *__pyx_outer_scope;
  PyObject *__pyx_v_f;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "vcfnp.pyx":1190
 * 
 * 
 * def _build_calldata(filename,             # <<<<<<<<<<<<<<
 *                     region=None,
 *                     samples=None,
 */
struct __pyx_obj_5vcfnp___pyx_scope_struct_16__build_calldata {
  PyObject_HEAD
  PyObject *__pyx_v_fields;
  PyObject *__pyx_v_formatCounts;
  PyObject *__pyx_v_formatTypes;
};


/* "vcfnp.pyx":1242
 *             formatTypes[f] = TYPESTRING2KEY[vcf_types[f]]
 * 
 *     formatTypes = tuple(formatTypes[f] if f in formatTypes else -1 for f in fields)             # <<<<<<<<<<<<<<
 *     formatCounts = tuple(formatCounts[f] if f in formatCounts else -1 for f in fields)
 * 
 */
struct __pyx_obj_5vcfnp___pyx_scope_struct_17_genexpr {
  PyObject_HEAD
  struct __pyx_obj_5vcfnp___pyx_scope_struct_16__build_calldata *__pyx_outer_scope;
  PyObject *__pyx_v_f;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "vcfnp.pyx":1243
 * 
 *     formatTypes = tuple(formatTypes[f] if f in formatTypes else -1 for f in fields)
 *     formatCounts = tuple(formatCounts[f] if f in formatCounts else -1 for f in fields)             # <<<<<<<<<<<<<<
 * 
 *     # determine expected number of values for each field
 */
struct __pyx_obj_5vcfnp___pyx_scope_struct_18_genexpr {
  PyObject_HEAD
  struct __pyx_obj_5vcfnp___pyx_scope_struct_16__build_calldata *__pyx_outer_scope;
  PyObject *__pyx_v_f;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "vcfnp.pyx":1405
 * 
 * 
 * def itercalldata(filenames,             # <<<<<<<<<<<<<<
 *                   region,
 *                   tuple samples,
 */
struct __pyx_obj_5vcfnp___pyx_scope_struct_19_itercalldata {
  PyObject_HEAD
  PyObject *__pyx_v_current_filename;
  PyObject *__pyx_v_fieldspec;
  PyObject *__pyx_v_filenames;
  int __pyx_v_ploidy;
  PyObject *__pyx_v_region;
  bool __pyx_v_region_set;
  PyObject *__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 *);
};


/* "vcfnp.pyx":1431
 * 
 * 
 * def itercalldata_with_condition(filenames,             # <<<<<<<<<<<<<<
 *                                  region,
 *                                  tuple samples,
 */
struct __pyx_obj_5vcfnp___pyx_scope_struct_20_itercalldata_with_condition {
  PyObject_HEAD
  PyObject *__pyx_v_condition;
  PyObject *__pyx_v_current_filename;
  PyObject *__pyx_v_fieldspec;
  PyObject *__pyx_v_filenames;
  long __pyx_v_i;
  long __pyx_v_n;
  int __pyx_v_ploidy;
  PyObject *__pyx_v_region;
  bool __pyx_v_region_set;
  PyObject *__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":1658
 * 
 * 
 * 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_21_eff_default_transformer {
  PyObject_HEAD
  PyObject *__pyx_v_fills;
  PyObject *__pyx_v_prog_eff_main;
};


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


/* "vcfnp.pyx":1672
 *             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_23_genexpr {
  PyObject_HEAD
  struct __pyx_obj_5vcfnp___pyx_scope_struct_22__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":1701
 *         self.fill = fill
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 * 
 *         filenames = _filenames_from_arg(self.filename)
 */
struct __pyx_obj_5vcfnp___pyx_scope_struct_24___iter__ {
  PyObject_HEAD
  PyObject *__pyx_v_fields;
  PyObject *__pyx_v_info_types;
  PyObject *__pyx_v_self;
};


/* "vcfnp.pyx":1728
 *             arities = (None,) * len(fields)
 *         else:
 *             arities = tuple(self.arities.get(f) for f in fields)             # <<<<<<<<<<<<<<
 * 
 *         # determine if we need to parse the INFO field
 */
struct __pyx_obj_5vcfnp___pyx_scope_struct_25_genexpr {
  PyObject_HEAD
  struct __pyx_obj_5vcfnp___pyx_scope_struct_24___iter__ *__pyx_outer_scope;
  PyObject *__pyx_v_f;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "vcfnp.pyx":1734
 * 
 *         # convert to tuple
 *         info_types = tuple(info_types[f] if f in info_types else -1 for f in fields)             # <<<<<<<<<<<<<<
 * 
 *         # make header row
 */
struct __pyx_obj_5vcfnp___pyx_scope_struct_26_genexpr {
  PyObject_HEAD
  struct __pyx_obj_5vcfnp___pyx_scope_struct_24___iter__ *__pyx_outer_scope;
  PyObject *__pyx_v_f;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "vcfnp.pyx":1761
 * 
 * 
 * def itervariantstable(filenames, region, fields, arities, info_types, parse_info, filter_ids, flatten_filter, fill):             # <<<<<<<<<<<<<<
 *     cdef VariantCallFile *variantFile
 *     cdef Variant *var
 */
struct __pyx_obj_5vcfnp___pyx_scope_struct_27_itervariantstable {
  PyObject_HEAD
  PyObject *__pyx_v_arities;
  PyObject *__pyx_v_current_filename;
  PyObject *__pyx_v_fields;
  PyObject *__pyx_v_filenames;
  PyObject *__pyx_v_fill;
  PyObject *__pyx_v_filter_ids;
  PyObject *__pyx_v_flatten_filter;
  PyObject *__pyx_v_info_types;
  PyObject *__pyx_v_parse_info;
  PyObject *__pyx_v_region;
  bool __pyx_v_region_set;
  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 *);
};

#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_XDECREF_SET(r, v) do {                            \
        PyObject *tmp = (PyObject *) r;                         \
        r = v; __Pyx_XDECREF(tmp);                              \
    } while (0)
#define __Pyx_DECREF_SET(r, v) do {                             \
        PyObject *tmp = (PyObject *) r;                         \
        r = v; __Pyx_DECREF(tmp);                               \
    } while (0)
#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_RaiseArgtupleInvalid(const char* func_name, int exact,
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*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 CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*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

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); /*proto*/
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif

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*/

#include <string.h>

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

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

#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
#else
#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
#endif

#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 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*/

#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) : \
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) : \
               __Pyx_GetItemInt_Generic(o, to_py_func(i))))
#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \
    (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \
    (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
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 PY_VERSION_HEX < 0x02050000
#ifndef PyAnySet_CheckExact
#define PyAnySet_CheckExact(ob) \
    ((ob)->ob_type == &PySet_Type || \
     (ob)->ob_type == &PyFrozenSet_Type)
#define PySet_New(iterable) \
    PyObject_CallFunctionObjArgs((PyObject *)&PySet_Type, (iterable), NULL)
#define Pyx_PyFrozenSet_New(iterable) \
    PyObject_CallFunctionObjArgs((PyObject *)&PyFrozenSet_Type, (iterable), NULL)
#define PySet_Size(anyset) \
    PyObject_Size((anyset))
#define PySet_Contains(anyset, key) \
    PySequence_Contains((anyset), (key))
#define PySet_Pop(set) \
    PyObject_CallMethod((set), (char*)"pop", NULL)
static CYTHON_INLINE int PySet_Clear(PyObject *set) {
    PyObject *ret = PyObject_CallMethod(set, (char*)"clear", NULL);
    if (!ret) return -1;
    Py_DECREF(ret); return 0;
}
static CYTHON_INLINE int PySet_Discard(PyObject *set, PyObject *key) {
    PyObject *ret = PyObject_CallMethod(set, (char*)"discard", (char*)"(O)", key);
    if (!ret) return -1;
    Py_DECREF(ret); return 0;
}
static CYTHON_INLINE int PySet_Add(PyObject *set, PyObject *key) {
    PyObject *ret = PyObject_CallMethod(set, (char*)"add", (char*)"(O)", key);
    if (!ret) return -1;
    Py_DECREF(ret); return 0;
}
#endif /* PyAnySet_CheckExact (<= Py2.4) */
#endif /* < Py2.5  */

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 = __Pyx_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 CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); /*proto*/

#if PY_MAJOR_VERSION < 3
#define __Pyx_PyString_Join __Pyx_PyBytes_Join
#define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v))
#else
#define __Pyx_PyString_Join PyUnicode_Join
#define __Pyx_PyBaseString_Join PyUnicode_Join
#endif
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION < 3
    #define __Pyx_PyBytes_Join _PyString_Join
    #else
    #define __Pyx_PyBytes_Join _PyBytes_Join
    #endif
#else
static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values); /*proto*/
#endif

static CYTHON_INLINE long __Pyx_mod_long(long, long); /* proto */

#ifndef __PYX_FORCE_INIT_THREADS
  #define __PYX_FORCE_INIT_THREADS 0
#endif

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

static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject* none = _PyList_Extend((PyListObject*)L, v);
    if (unlikely(!none))
        return -1;
    Py_DECREF(none);
    return 0;
#else
    return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);
#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);

static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); /*proto*/

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

static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);

#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;
    PyObject *func_dict;
    PyObject *func_weakreflist;
    PyObject *func_name;
    PyObject *func_qualname;
    PyObject *func_doc;
    PyObject *func_globals;
    PyObject *func_code;
    PyObject *func_closure;
    PyObject *func_classobj; /* No-args super() class cell */
    void *defaults;
    int defaults_pyobjects;
    int flags;
    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, globals, code) \
    __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code)
static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *self,
                                      PyObject *module, PyObject *globals,
                                      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);

#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL)
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_setattro))
        return tp->tp_setattro(obj, attr_name, value);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_setattr))
        return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
#endif
    return PyObject_SetAttr(obj, attr_name, value);
}
#else
#define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
#endif

static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);

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

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

static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);

static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
                                           PyObject *mkw, PyObject *modname, PyObject *doc); /*proto*/
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
                                      PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); /*proto*/

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

static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);

static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);

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*/

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);

#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

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);

#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(__clang__)) && 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 PyObject* __Pyx_PyInt_From_ptrdiff_t(ptrdiff_t value);

static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(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;
} __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___variants_arities = 0;
static PyTypeObject *__pyx_ptype_5vcfnp___pyx_scope_struct_1_genexpr = 0;
static PyTypeObject *__pyx_ptype_5vcfnp___pyx_scope_struct_2__variants_fills = 0;
static PyTypeObject *__pyx_ptype_5vcfnp___pyx_scope_struct_3_genexpr = 0;
static PyTypeObject *__pyx_ptype_5vcfnp___pyx_scope_struct_4__info_transformers = 0;
static PyTypeObject *__pyx_ptype_5vcfnp___pyx_scope_struct_5_genexpr = 0;
static PyTypeObject *__pyx_ptype_5vcfnp___pyx_scope_struct_6__setup_variants = 0;
static PyTypeObject *__pyx_ptype_5vcfnp___pyx_scope_struct_7_genexpr = 0;
static PyTypeObject *__pyx_ptype_5vcfnp___pyx_scope_struct_8_genexpr = 0;
static PyTypeObject *__pyx_ptype_5vcfnp___pyx_scope_struct_9__iter_withprogress = 0;
static PyTypeObject *__pyx_ptype_5vcfnp___pyx_scope_struct_10_itervariants = 0;
static PyTypeObject *__pyx_ptype_5vcfnp___pyx_scope_struct_11_itervariants_with_condition = 0;
static PyTypeObject *__pyx_ptype_5vcfnp___pyx_scope_struct_12__calldata_arities = 0;
static PyTypeObject *__pyx_ptype_5vcfnp___pyx_scope_struct_13_genexpr = 0;
static PyTypeObject *__pyx_ptype_5vcfnp___pyx_scope_struct_14__calldata_fills = 0;
static PyTypeObject *__pyx_ptype_5vcfnp___pyx_scope_struct_15_genexpr = 0;
static PyTypeObject *__pyx_ptype_5vcfnp___pyx_scope_struct_16__build_calldata = 0;
static PyTypeObject *__pyx_ptype_5vcfnp___pyx_scope_struct_17_genexpr = 0;
static PyTypeObject *__pyx_ptype_5vcfnp___pyx_scope_struct_18_genexpr = 0;
static PyTypeObject *__pyx_ptype_5vcfnp___pyx_scope_struct_19_itercalldata = 0;
static PyTypeObject *__pyx_ptype_5vcfnp___pyx_scope_struct_20_itercalldata_with_condition = 0;
static PyTypeObject *__pyx_ptype_5vcfnp___pyx_scope_struct_21_eff_default_transformer = 0;
static PyTypeObject *__pyx_ptype_5vcfnp___pyx_scope_struct_22__transformer = 0;
static PyTypeObject *__pyx_ptype_5vcfnp___pyx_scope_struct_23_genexpr = 0;
static PyTypeObject *__pyx_ptype_5vcfnp___pyx_scope_struct_24___iter__ = 0;
static PyTypeObject *__pyx_ptype_5vcfnp___pyx_scope_struct_25_genexpr = 0;
static PyTypeObject *__pyx_ptype_5vcfnp___pyx_scope_struct_26_genexpr = 0;
static PyTypeObject *__pyx_ptype_5vcfnp___pyx_scope_struct_27_itervariantstable = 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_SVLEN;
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__mkvrow(vcf::Variant *, PyObject *, PyObject *, int); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkvval(vcf::Variant *, std::string, int, PyObject *, 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__svlen(vcf::Variant *, int, PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__svlen_single(std::string, std::vector<std::string> &, PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__svlen_multi(std::string, std::vector<std::string> &, 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, PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkval_string_multi(std::vector<std::string> &, int, PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkval_double(std::vector<std::string> &, int, PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkval_double_single(std::vector<std::string> &, PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkval_double_multi(std::vector<std::string> &, int, PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkval_long(std::vector<std::string> &, int, PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkval_long_single(std::vector<std::string> &, PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkval_long_multi(std::vector<std::string> &, int, PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkcrow(vcf::Variant *, PyObject *, int, PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkcvals(vcf::Variant *, std::string, int, PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkcval(std::map<std::string,std::vector<std::string> > &, int, std::string, int, PyObject *, int); /*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 CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkvtblrow(vcf::Variant *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mktblval_multi(std::vector<std::string> &, int, PyObject *); /*proto*/
static std::string __pyx_convert_string_from_py_(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_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_object;
static PyObject *__pyx_builtin_zip;
static PyObject *__pyx_builtin_Exception;
static PyObject *__pyx_builtin_sorted;
static PyObject *__pyx_builtin_any;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_StopIteration;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_RuntimeError;
static PyObject *__pyx_pf_5vcfnp__variants_fields(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fields, PyObject *__pyx_v_exclude_fields, PyObject *__pyx_v_infoIds); /* proto */
static PyObject *__pyx_pf_5vcfnp_17_variants_arities_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_5vcfnp_2_variants_arities(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fields, PyObject *__pyx_v_arities, PyObject *__pyx_v_infoCounts); /* proto */
static PyObject *__pyx_pf_5vcfnp_15_variants_fills_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_5vcfnp_4_variants_fills(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fields, PyObject *__pyx_v_fills, PyObject *__pyx_v_infoTypes); /* proto */
static PyObject *__pyx_pf_5vcfnp_18_info_transformers_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_5vcfnp_6_info_transformers(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fields, PyObject *__pyx_v_transformers); /* proto */
static PyObject *__pyx_pf_5vcfnp_8_variants_dtype(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fields, PyObject *__pyx_v_dtypes, PyObject *__pyx_v_arities, PyObject *__pyx_v_filterIds, PyObject *__pyx_v_flatten_filter, PyObject *__pyx_v_infoTypes); /* proto */
static PyObject *__pyx_pf_5vcfnp_10_filenames_from_arg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename); /* proto */
static PyObject *__pyx_pf_5vcfnp_15_setup_variants_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_5vcfnp_15_setup_variants_3genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_5vcfnp_12_setup_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_arities, PyObject *__pyx_v_fills, PyObject *__pyx_v_transformers, PyObject *__pyx_v_vcf_types, PyObject *__pyx_v_flatten_filter); /* proto */
static PyObject *__pyx_pf_5vcfnp_14log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_logstream, PyObject *__pyx_v_msg); /* proto */
static PyObject *__pyx_pf_5vcfnp_16variants(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_flatten_filter, PyObject *__pyx_v_verbose, PyObject *__pyx_v_cache, PyObject *__pyx_v_cachedir, PyObject *__pyx_v_skip_cached); /* proto */
static PyObject *__pyx_pf_5vcfnp_18_mk_cache_fn(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_vcf_fn, PyObject *__pyx_v_type, PyObject *__pyx_v_region, PyObject *__pyx_v_cachedir); /* proto */
static PyObject *__pyx_pf_5vcfnp_20_build_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_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_flatten_filter, PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_cache); /* proto */
static PyObject *__pyx_pf_5vcfnp_22_fromiter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_it, PyObject *__pyx_v_dtype, PyObject *__pyx_v_count, long __pyx_v_progress, PyObject *__pyx_v_logstream); /* proto */
static PyObject *__pyx_pf_5vcfnp_24_iter_withprogress(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_iterable, long __pyx_v_progress, PyObject *__pyx_v_logstream); /* proto */
static PyObject *__pyx_pf_5vcfnp_27itervariants(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filenames, PyObject *__pyx_v_region, PyObject *__pyx_v_fieldspec, PyObject *__pyx_v_filterIds, int __pyx_v_flatten_filter, PyObject *__pyx_v_parseInfo); /* proto */
static PyObject *__pyx_pf_5vcfnp_30itervariants_with_condition(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filenames, PyObject *__pyx_v_region, PyObject *__pyx_v_fieldspec, PyObject *__pyx_v_filterIds, int __pyx_v_flatten_filter, PyObject *__pyx_v_parseInfo, PyObject *__pyx_v_condition); /* proto */
static PyObject *__pyx_pf_5vcfnp_33_warn_duplicates(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fields); /* proto */
static PyObject *__pyx_pf_5vcfnp_35_calldata_fields(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fields, PyObject *__pyx_v_exclude_fields, PyObject *__pyx_v_formatIds); /* proto */
static PyObject *__pyx_pf_5vcfnp_17_calldata_arities_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_5vcfnp_37_calldata_arities(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fields, PyObject *__pyx_v_arities, PyObject *__pyx_v_formatCounts, PyObject *__pyx_v_ploidy); /* proto */
static PyObject *__pyx_pf_5vcfnp_15_calldata_fills_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_5vcfnp_39_calldata_fills(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fields, PyObject *__pyx_v_fills, PyObject *__pyx_v_formatTypes, PyObject *__pyx_v_ploidy); /* proto */
static PyObject *__pyx_pf_5vcfnp_41_calldata_dtype(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fields, PyObject *__pyx_v_dtypes, PyObject *__pyx_v_formatTypes, PyObject *__pyx_v_arities, PyObject *__pyx_v_samples, PyObject *__pyx_v_ploidy); /* proto */
static PyObject *__pyx_pf_5vcfnp_43calldata(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_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_verbose, PyObject *__pyx_v_cache, PyObject *__pyx_v_cachedir, PyObject *__pyx_v_skip_cached); /* proto */
static PyObject *__pyx_pf_5vcfnp_15_build_calldata_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_5vcfnp_15_build_calldata_3genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_5vcfnp_45_build_calldata(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_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_verbose); /* proto */
static PyObject *__pyx_pf_5vcfnp_47calldata_2d(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_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_verbose, PyObject *__pyx_v_cache, PyObject *__pyx_v_cachedir, PyObject *__pyx_v_skip_cached); /* proto */
static PyObject *__pyx_pf_5vcfnp_49_build_calldata_2d(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_5vcfnp_51itercalldata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filenames, PyObject *__pyx_v_region, PyObject *__pyx_v_samples, int __pyx_v_ploidy, PyObject *__pyx_v_fieldspec); /* proto */
static PyObject *__pyx_pf_5vcfnp_54itercalldata_with_condition(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filenames, PyObject *__pyx_v_region, PyObject *__pyx_v_samples, int __pyx_v_ploidy, PyObject *__pyx_v_fieldspec, PyObject *__pyx_v_condition); /* proto */
static PyObject *__pyx_pf_5vcfnp_57view2d(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_59eff_default_transformer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fills); /* proto */
static PyObject *__pyx_pf_5vcfnp_13VariantsTable___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_region, PyObject *__pyx_v_fields, PyObject *__pyx_v_exclude_fields, PyObject *__pyx_v_arities, PyObject *__pyx_v_flatten_filter, PyObject *__pyx_v_fill); /* proto */
static PyObject *__pyx_pf_5vcfnp_13VariantsTable_8__iter___genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_5vcfnp_13VariantsTable_8__iter___3genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_5vcfnp_13VariantsTable_2__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5vcfnp_61itervariantstable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filenames, PyObject *__pyx_v_region, PyObject *__pyx_v_fields, PyObject *__pyx_v_arities, PyObject *__pyx_v_info_types, PyObject *__pyx_v_parse_info, PyObject *__pyx_v_filter_ids, PyObject *__pyx_v_flatten_filter, PyObject *__pyx_v_fill); /* 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___variants_arities(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_1_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_2__variants_fills(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_3_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_4__info_transformers(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_5_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_6__setup_variants(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_7_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_8_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_9__iter_withprogress(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_10_itervariants(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_11_itervariants_with_condition(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_12__calldata_arities(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_13_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_14__calldata_fills(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_15_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_16__build_calldata(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_17_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_18_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_19_itercalldata(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_20_itercalldata_with_condition(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_21_eff_default_transformer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_22__transformer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_23_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_24___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_25_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_26_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_27_itervariantstable(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
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_m[] = "m";
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_AC[] = "AC";
static char __pyx_k_AD[] = "AD";
static char __pyx_k_AF[] = "AF";
static char __pyx_k_AN[] = "AN";
static char __pyx_k_DP[] = "DP";
static char __pyx_k_FS[] = "FS";
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_RU[] = "RU";
static char __pyx_k_Zd[] = "Zd";
static char __pyx_k_Zf[] = "Zf";
static char __pyx_k_Zg[] = "Zg";
static char __pyx_k__2[] = " :: ";
static char __pyx_k__3[] = " ";
static char __pyx_k__6[] = ":";
static char __pyx_k__7[] = "_";
static char __pyx_k__9[] = "-";
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_nm[] = "nm";
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_1_9[] = "1.9";
static char __pyx_k_ALT[] = "ALT";
static char __pyx_k_C2d[] = "C2d";
static char __pyx_k_MQ0[] = "MQ0";
static char __pyx_k_OND[] = "OND";
static char __pyx_k_POS[] = "POS";
static char __pyx_k_REF[] = "REF";
static char __pyx_k_RPA[] = "RPA";
static char __pyx_k__13[] = "/";
static char __pyx_k__14[] = ".";
static char __pyx_k__20[] = "|";
static char __pyx_k__24[] = "";
static char __pyx_k__28[] = "([^(]+)\\(([^)]+)\\)";
static char __pyx_k__33[] = ",";
static char __pyx_k__42[] = "/|";
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_a_d[] = "a%d";
static char __pyx_k_any[] = "any";
static char __pyx_k_doc[] = "__doc__";
static char __pyx_k_eff[] = "eff";
static char __pyx_k_end[] = "end";
static char __pyx_k_flt[] = "flt";
static char __pyx_k_get[] = "get";
static char __pyx_k_log[] = "log";
static char __pyx_k_msg[] = "msg";
static char __pyx_k_now[] = "now";
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_Dels[] = "Dels";
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_data[] = "data";
static char __pyx_k_file[] = "file";
static char __pyx_k_fill[] = "fill";
static char __pyx_k_init[] = "__init__";
static char __pyx_k_iter[] = "__iter__";
static char __pyx_k_join[] = "join";
static char __pyx_k_load[] = "load";
static char __pyx_k_main[] = "__main__";
static char __pyx_k_path[] = "path";
static char __pyx_k_rows[] = "rows";
static char __pyx_k_save[] = "save";
static char __pyx_k_self[] = "self";
static char __pyx_k_send[] = "send";
static char __pyx_k_size[] = "size";
static char __pyx_k_test[] = "__test__";
static char __pyx_k_time[] = "time";
static char __pyx_k_type[] = "type";
static char __pyx_k_vals[] = "vals";
static char __pyx_k_view[] = "view";
static char __pyx_k_ABHet[] = "ABHet";
static char __pyx_k_ABHom[] = "ABHom";
static char __pyx_k_CHROM[] = "CHROM";
static char __pyx_k_Float[] = "Float";
static char __pyx_k_MLEAC[] = "MLEAC";
static char __pyx_k_MLEAF[] = "MLEAF";
static char __pyx_k_after[] = "after";
static char __pyx_k_cache[] = "cache";
static char __pyx_k_chain[] = "chain";
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_flush[] = "flush";
static char __pyx_k_group[] = "group";
static char __pyx_k_isdir[] = "isdir";
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_s_npy[] = "%s.npy";
static char __pyx_k_slice[] = "slice";
static char __pyx_k_split[] = "split";
static char __pyx_k_svlen[] = "svlen";
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_append[] = "append";
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_header[] = "header";
static char __pyx_k_import[] = "__import__";
static char __pyx_k_is_snp[] = "is_snp";
static char __pyx_k_islice[] = "islice";
static char __pyx_k_kwargs[] = "kwargs";
static char __pyx_k_module[] = "__module__";
static char __pyx_k_object[] = "object";
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_vcf_fn[] = "vcf_fn";
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_prepare[] = "__prepare__";
static char __pyx_k_replace[] = "replace";
static char __pyx_k_reshape[] = "reshape";
static char __pyx_k_s_s_npy[] = "%s.%s.npy";
static char __pyx_k_samples[] = "samples";
static char __pyx_k_vcfnp_2[] = "vcfnp";
static char __pyx_k_verbose[] = "verbose";
static char __pyx_k_version[] = "__version__";
static char __pyx_k_visited[] = "visited";
static char __pyx_k_FILTER_2[] = "FILTER_";
static char __pyx_k_cache_fn[] = "cache_fn";
static char __pyx_k_cachedir[] = "cachedir";
static char __pyx_k_calldata[] = "calldata";
static char __pyx_k_datetime[] = "datetime";
static char __pyx_k_filename[] = "filename";
static char __pyx_k_fromiter[] = "_fromiter";
static char __pyx_k_genotype[] = "genotype";
static char __pyx_k_getmtime[] = "getmtime";
static char __pyx_k_info_ids[] = "info_ids";
static char __pyx_k_iterable[] = "iterable";
static char __pyx_k_makedirs[] = "makedirs";
static char __pyx_k_progress[] = "progress";
static char __pyx_k_qualname[] = "__qualname__";
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_MQRankSum[] = "MQRankSum";
static char __pyx_k_after_all[] = "after_all";
static char __pyx_k_condition[] = "condition";
static char __pyx_k_enumerate[] = "enumerate";
static char __pyx_k_fieldspec[] = "fieldspec";
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_itertools[] = "itertools";
static char __pyx_k_logstream[] = "logstream";
static char __pyx_k_metaclass[] = "__metaclass__";
static char __pyx_k_parseInfo[] = "parseInfo";
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_before_all[] = "before_all";
static char __pyx_k_cell_dtype[] = "cell_dtype";
static char __pyx_k_filter_ids[] = "filter_ids";
static char __pyx_k_fromiter_2[] = "fromiter";
static char __pyx_k_infoCounts[] = "infoCounts";
static char __pyx_k_info_types[] = "info_types";
static char __pyx_k_parse_info[] = "parse_info";
static char __pyx_k_region_set[] = "region_set";
static char __pyx_k_Gene_Coding[] = "Gene_Coding";
static char __pyx_k_MQ0Fraction[] = "MQ0Fraction";
static char __pyx_k_VariantType[] = "VariantType";
static char __pyx_k_all_samples[] = "all_samples";
static char __pyx_k_calldata_2d[] = "calldata_2d";
static char __pyx_k_formatTypes[] = "formatTypes";
static char __pyx_k_mk_cache_fn[] = "_mk_cache_fn";
static char __pyx_k_num_alleles[] = "num_alleles";
static char __pyx_k_sampleNames[] = "sampleNames";
static char __pyx_k_skip_cached[] = "skip_cached";
static char __pyx_k_transformer[] = "_transformer";
static char __pyx_k_variantFile[] = "variantFile";
static char __pyx_k_vcfnp_cache[] = ".vcfnp_cache";
static char __pyx_k_BaseQRankSum[] = "BaseQRankSum";
static char __pyx_k_Codon_Change[] = "Codon_Change";
static char __pyx_k_RuntimeError[] = "RuntimeError";
static char __pyx_k_formatCounts[] = "formatCounts";
static char __pyx_k_itercalldata[] = "itercalldata";
static char __pyx_k_itervariants[] = "itervariants";
static char __pyx_k_transformers[] = "transformers";
static char __pyx_k_Effect_Impact[] = "Effect_Impact";
static char __pyx_k_StopIteration[] = "StopIteration";
static char __pyx_k_Transcript_ID[] = "Transcript_ID";
static char __pyx_k_VariantsTable[] = "VariantsTable";
static char __pyx_k_prog_eff_main[] = "prog_eff_main";
static char __pyx_k_HaplotypeScore[] = "HaplotypeScore";
static char __pyx_k_ReadPosRankSum[] = "ReadPosRankSum";
static char __pyx_k_TYPESTRING2KEY[] = "TYPESTRING2KEY";
static char __pyx_k_build_calldata[] = "_build_calldata";
static char __pyx_k_build_variants[] = "_build_variants";
static char __pyx_k_calldata_dtype[] = "_calldata_dtype";
static char __pyx_k_calldata_fills[] = "_calldata_fills";
static char __pyx_k_exclude_fields[] = "exclude_fields";
static char __pyx_k_flatten_filter[] = "flatten_filter";
static char __pyx_k_match_eff_main[] = "match_eff_main";
static char __pyx_k_setup_variants[] = "_setup_variants";
static char __pyx_k_variants_dtype[] = "_variants_dtype";
static char __pyx_k_variants_fills[] = "_variants_fills";
static char __pyx_k_ClippingRankSum[] = "ClippingRankSum";
static char __pyx_k_InbreedingCoeff[] = "InbreedingCoeff";
static char __pyx_k_cachedir_suffix[] = "cachedir_suffix";
static char __pyx_k_calldata_fields[] = "_calldata_fields";
static char __pyx_k_saving_to_cache[] = "saving to cache";
static char __pyx_k_variants_fields[] = "_variants_fields";
static char __pyx_k_warn_duplicates[] = "_warn_duplicates";
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_calldata_arities[] = "_calldata_arities";
static char __pyx_k_current_filename[] = "current_filename";
static char __pyx_k_file_not_found_s[] = "file not found: %s";
static char __pyx_k_unknown_sample_s[] = "unknown sample: %s";
static char __pyx_k_variants_arities[] = "_variants_arities";
static char __pyx_k_view2d_line_1556[] = "view2d (line 1556)";
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_build_calldata_2d[] = "_build_calldata_2d";
static char __pyx_k_calldata_line_964[] = "calldata (line 964)";
static char __pyx_k_info_transformers[] = "_info_transformers";
static char __pyx_k_iter_withprogress[] = "_iter_withprogress";
static char __pyx_k_itervariantstable[] = "itervariantstable";
static char __pyx_k_variants_line_372[] = "variants (line 372)";
static char __pyx_k_DEFAULT_INFO_DTYPE[] = "DEFAULT_INFO_DTYPE";
static char __pyx_k_Transcript_BioType[] = "Transcript_BioType";
static char __pyx_k_filenames_from_arg[] = "_filenames_from_arg";
static char __pyx_k_loading_from_cache[] = "loading from cache";
static char __pyx_k_skipping_from_cache[] = "skipping from cache";
static char __pyx_k_DEFAULT_VARIANT_FILL[] = "DEFAULT_VARIANT_FILL";
static char __pyx_k_VariantsTable___init[] = "VariantsTable.__init__";
static char __pyx_k_VariantsTable___iter[] = "VariantsTable.__iter__";
static char __pyx_k_DEFAULT_CALLDATA_FILL[] = "DEFAULT_CALLDATA_FILL";
static char __pyx_k_DEFAULT_VARIANT_ARITY[] = "DEFAULT_VARIANT_ARITY";
static char __pyx_k_DEFAULT_VARIANT_DTYPE[] = "DEFAULT_VARIANT_DTYPE";
static char __pyx_k_loading_calldata_from[] = "loading calldata from";
static char __pyx_k_loading_variants_from[] = "loading variants from";
static char __pyx_k_DEFAULT_CALLDATA_ARITY[] = "DEFAULT_CALLDATA_ARITY";
static char __pyx_k_DEFAULT_CALLDATA_DTYPE[] = "DEFAULT_CALLDATA_DTYPE";
static char __pyx_k_s_rows_in_2fs_d_rows_s[] = "%s rows in %.2fs (%d rows/s)";
static char __pyx_k_STANDARD_VARIANT_FIELDS[] = "STANDARD_VARIANT_FIELDS";
static char __pyx_k_eff_default_transformer[] = "eff_default_transformer";
static char __pyx_k_STANDARD_CALLDATA_FIELDS[] = "STANDARD_CALLDATA_FIELDS";
static char __pyx_k_itercalldata_with_condition[] = "itercalldata_with_condition";
static char __pyx_k_itervariants_with_condition[] = "itervariants_with_condition";
static char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous";
static char __pyx_k_Load_an_numpy_structured_array[] = "\n    Load an numpy structured array with data from the fixed fields of a VCF file\n    (including 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    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    flatten_filter: bool\n        Return FILTER as multiple boolean fields, e.g., FILTER_PASS, FILTER_LowQuality, etc.\n    verbose: bool\n        Log more messages.\n    cache: bool\n        If True, save the resulting numpy array to disk, and load from the cache if present rather than rebuilding\n        from the VCF.\n    cache""dir: string\n        Manually specify the directory to use to store cache files.\n    skip_cached: bool\n        If True and cache file is fresh, do not load and return None.\n\n    Examples\n    --------\n\n        >>> from vcfnp import variants\n        >>> V = variants('fixture/sample.vcf')\n        >>> V\n        array([ ('19', 111, '.', 'A', 'C', 9.600000381469727, (False, False, False), 2, True, 0, '.', 0, 0.0, 0, False, 0, False, 0),\n               ('19', 112, '.', 'A', 'G', 10.0, (False, False, False), 2, True, 0, '.', 0, 0.0, 0, False, 0, False, 0),\n               ('20', 14370, 'rs6054257', 'G', 'A', 29.0, (False, False, True), 2, True, 0, '.', 0, 0.5, 0, True, 14, True, 3),\n               ('20', 17330, '.', 'T', 'A', 3.0, (True, False, False), 2, True, 0, '.', 0, 0.017000000923871994, 0, False, 11, False, 3),\n               ('20', 1110696, 'rs6040355', 'A', 'G', 67.0, (False, False, True), 3, True, 0, 'T', 0, 0.3330000042915344, 0, True, 10, False, 2),\n               ('20', 1230237, '.', 'T', '.', 47.0, (False, False, True), 2, False, 0, 'T', 0, 0.0, 0, False, 13, False, 3),\n               ('20', 1234567, 'microsat1', 'G', 'GA', 50.0, (False, False, True), 3, False, 1, 'G', 3, 0.0, 6, False, 9, False, 3),\n               ('20', 1235237, '.', 'T', '.', 0.0, (False, False, False), 2, False, 0, '.', 0, 0.0, 0, False, 0, False, 0),\n               ('X', 10, 'rsTest', 'AC', 'A', 10.0, (False, False, True), 3, False, -1, '.', 0, 0.0, 0, False, 0, False, 0)],\n              dtype=[('CHROM', 'S12'), ('POS', '<i4'), ('ID', 'S12'), ('REF', 'S12'), ('ALT', 'S12'), ('QUAL', '<f4'), ('FILTER', [('q10', '?'), ('s50', '?'), ('PASS', '?')]), ('num_alleles', 'u1'), ('is_snp', '?'), ('svlen', '<i4'), ('AA', 'S12'), ('AC', '<u2'), ('AF', '<f4'), ('AN', '<u2'), ('DB', '?'), ('DP', '<i4'), ('H2', '?'), ('NS', '<i4')])\n        >>> V['QUAL']\n        array([  9.60000038,  10.        ,  29.        ,   3.        ,\n                67.        ,  47.        ,  50.        ,   ""0.        ,  10.        ], dtype=float32)\n        >>> V['FILTER']['PASS']\n        array([False, False,  True, False,  True,  True,  True, False,  True], dtype=bool)\n        >>> V['AF']\n        array([ 0.   ,  0.   ,  0.5  ,  0.017,  0.333,  0.   ,  0.   ,  0.   ,  0.   ], dtype=float32)\n\n    ";
static char __pyx_k_eff_default_transformer_locals[] = "eff_default_transformer.<locals>._transformer";
static char __pyx_k_Load_a_numpy_1_dimensional_stru[] = "\n    Load a numpy 1-dimensional 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    vcf_types: dict or dict-like\n        Dictionary containing field:string mappings used to override any\n        bogus type declarations in the VCF header\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    verbose: bool\n        Log more messages.\n    cache: bool\n        If True, save the resulting numpy array to disk, and load from the cache if present rather than rebuilding\n        from the VCF.\n    cachedir: string\n        Manually specify the directory to use to store cache files.\n    skip_cached: bool\n        If True and cache file is fresh, do not load and return None.\n\n    Examples\n    --------\n\n        >>> from vcfnp import calldata, view2d\n        >>> C = calldata('fixture/sample.vcf')\n        >>> C\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, 0, '0/1', [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, 0, '0/1', [3, 3])),\n               ((True, True, [0, 0], 1, 48, '0|0', [51, 51]), (True, True, [1, 0], 8, 48, '1|0', [51, 51]), (True, False, [1, 1], 5, 43, '1/1', [0, 0])),\n               ((True, True, [0, 0], 3, 49, '0|0', [58, 50]), (True, True, [0, 1], 5, 3, '0|1', [65, 3]), (True, False, [0, 0], 3, 41, '0/0', [0, 0])),\n               ((True, True, [1, 2], 6, 21, '1|2', [23, 27]), (True, True, [2, 1], 0, 2, '2|1', [18, 2]), (True, False, [2, 2], 4, 35, '2/2', [0, 0])),\n               ((True, True, [0, 0], 0, 54, '0|0', [56, 60]), (True, True, [0, 0], 4, 48, '0|0', [51, 51]), (True, False, [0, 0], 2, 61, '0/0', [0, 0])),\n               ((True, False, [0, 1], 4, 0, '0/1', [0, 0]), (True, False, [0, 2], 2, 17, '0/2', [0, 0]), (False, False, [-1, -1], 3, 40, './.', [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, 0, '0/1', [0, 0]), (True, True, [0, 2], 0, 0, '0|2', [0, 0]))],\n              dtype=[('NA00001', [('is_called', '?'), ('is_phased', '?'), ('genotype', 'i1', (2,)), ('DP', '<u2'), ('GQ', 'u1'), ('GT', 'S3'), ('HQ', '<i4', (2,))]), ('NA00002', [('is_called', '?'), ('is_phased', '?'), ('genotype', 'i1', (2,)), ('DP', '<u2'), ('GQ', 'u1'), ('GT', 'S3'), ('HQ', '<i4', (2,))]), ('NA00003', [('is_called', '?'), ('is_phased', '?'), ('genotype', 'i1', (2,)), ('DP', '<u2'), ('GQ', 'u1'), ('GT', 'S3'), ('HQ', '<i4', (2,))])])\n        >>> C['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], 1, 48, '0|0', [51, 51]),\n               (True, Tr""ue, [0, 0], 3, 49, '0|0', [58, 50]),\n               (True, True, [1, 2], 6, 21, '1|2', [23, 27]),\n               (True, True, [0, 0], 0, 54, '0|0', [56, 60]),\n               (True, False, [0, 1], 4, 0, '0/1', [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', '?'), ('is_phased', '?'), ('genotype', 'i1', (2,)), ('DP', '<u2'), ('GQ', 'u1'), ('GT', 'S3'), ('HQ', '<i4', (2,))])\n        >>> C2d = view2d(C)\n        >>> C2d\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, 0, '0/1', [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, 0, '0/1', [3, 3])],\n               [(True, True, [0, 0], 1, 48, '0|0', [51, 51]),\n                (True, True, [1, 0], 8, 48, '1|0', [51, 51]),\n                (True, False, [1, 1], 5, 43, '1/1', [0, 0])],\n               [(True, True, [0, 0], 3, 49, '0|0', [58, 50]),\n                (True, True, [0, 1], 5, 3, '0|1', [65, 3]),\n                (True, False, [0, 0], 3, 41, '0/0', [0, 0])],\n               [(True, True, [1, 2], 6, 21, '1|2', [23, 27]),\n                (True, True, [2, 1], 0, 2, '2|1', [18, 2]),\n                (True, False, [2, 2], 4, 35, '2/2', [0, 0])],\n               [(True, True, [0, 0], 0, 54, '0|0', [56, 60]),\n                (True, True, [0, 0], 4, 48, '0|0', [51, 51]),\n                (True, False, [0, 0], 2, 61, '0/0', [0, 0])],\n               [(True, False, [0, 1], 4, 0, '0/1', [0, 0]),\n                (True, False, [0, 2], 2, 17, '0/2', [0, 0]),\n                (False, False, [-1, -1], 3, 40, './.', [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, F""alse, [-1, -1], 0, 0, './.', [0, 0])],\n               [(True, False, [0, -1], 0, 0, '0', [0, 0]),\n                (True, False, [0, 1], 0, 0, '0/1', [0, 0]),\n                (True, True, [0, 2], 0, 0, '0|2', [0, 0])]],\n              dtype=[('is_called', '?'), ('is_phased', '?'), ('genotype', 'i1', (2,)), ('DP', '<u2'), ('GQ', 'u1'), ('GT', 'S3'), ('HQ', '<i4', (2,))])\n        >>> C2d['genotype']\n        array([[[ 0,  0],\n                [ 0,  0],\n                [ 0,  1]],\n\n               [[ 0,  0],\n                [ 0,  0],\n                [ 0,  1]],\n\n               [[ 0,  0],\n                [ 1,  0],\n                [ 1,  1]],\n\n               [[ 0,  0],\n                [ 0,  1],\n                [ 0,  0]],\n\n               [[ 1,  2],\n                [ 2,  1],\n                [ 2,  2]],\n\n               [[ 0,  0],\n                [ 0,  0],\n                [ 0,  0]],\n\n               [[ 0,  1],\n                [ 0,  2],\n                [-1, -1]],\n\n               [[ 0,  0],\n                [ 0,  0],\n                [-1, -1]],\n\n               [[ 0, -1],\n                [ 0,  1],\n                [ 0,  2]]], dtype=int8)\n        >>> C2d['genotype'][3, :]\n        array([[0, 0],\n               [0, 1],\n               [0, 0]], dtype=int8)\n\n    ";
static char __pyx_k_Utility_function_to_view_a_stru[] = "\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_Utility_functions_to_extract_da[] = "\nUtility functions to extract data from a VCF file and load into a numpy array.\n\n";
static char __pyx_k_WARNING_duplicate_definition_in[] = "WARNING: duplicate definition in header: %s";
static char __pyx_k_WARNING_no_definition_found_for[] = "WARNING: no definition found for field %s";
static char __pyx_k_home_aliman_src_github_alimanfo[] = "/home/aliman/src/github/alimanfoo/vcfnp/vcfnp.pyx";
static char __pyx_k_s_rows_in_2fs_batch_in_2fs_d_ro[] = "%s rows in %.2fs; batch in %.2fs (%d rows/s)";
static char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)";
static char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd";
static char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported";
static char __pyx_k_WARNING_no_INFO_definition_found[] = "WARNING: no INFO definition found for field %s";
static char __pyx_k_caching_only_supported_when_load[] = "caching only supported when loading from a single VCF file";
static char __pyx_k_filename_argument_must_be_basest[] = "filename argument must be basestring, list or tuple";
static char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous";
static char __pyx_k_no_cache_file_found_or_cache_out[] = "no cache file found or cache out of date";
static char __pyx_k_unexpected_error_cache_directory[] = "unexpected error, cache directory is not a directory: %s";
static char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short.";
static PyObject *__pyx_kp_s_1_9;
static PyObject *__pyx_n_s_A;
static PyObject *__pyx_n_s_ABHet;
static PyObject *__pyx_n_s_ABHom;
static PyObject *__pyx_n_s_AC;
static PyObject *__pyx_n_s_AD;
static PyObject *__pyx_n_s_AF;
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_BaseQRankSum;
static PyObject *__pyx_n_s_C;
static PyObject *__pyx_n_s_C2d;
static PyObject *__pyx_n_b_CHROM;
static PyObject *__pyx_n_s_CHROM;
static PyObject *__pyx_n_s_CODING;
static PyObject *__pyx_n_s_ClippingRankSum;
static PyObject *__pyx_n_s_Codon_Change;
static PyObject *__pyx_n_s_DEFAULT_CALLDATA_ARITY;
static PyObject *__pyx_n_s_DEFAULT_CALLDATA_DTYPE;
static PyObject *__pyx_n_s_DEFAULT_CALLDATA_FILL;
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_DEFAULT_VARIANT_ARITY;
static PyObject *__pyx_n_s_DEFAULT_VARIANT_DTYPE;
static PyObject *__pyx_n_s_DEFAULT_VARIANT_FILL;
static PyObject *__pyx_n_s_DP;
static PyObject *__pyx_n_s_Dels;
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_FILTER_2;
static PyObject *__pyx_n_s_FS;
static PyObject *__pyx_n_s_Flag;
static PyObject *__pyx_n_s_Float;
static PyObject *__pyx_kp_u_Format_string_allocated_too_shor;
static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2;
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_s_HaplotypeScore;
static PyObject *__pyx_n_b_ID;
static PyObject *__pyx_n_s_ID;
static PyObject *__pyx_n_b_INFO;
static PyObject *__pyx_n_s_InbreedingCoeff;
static PyObject *__pyx_n_s_Integer;
static PyObject *__pyx_kp_u_Load_a_numpy_1_dimensional_stru;
static PyObject *__pyx_kp_u_Load_an_numpy_structured_array;
static PyObject *__pyx_n_s_MLEAC;
static PyObject *__pyx_n_s_MLEAF;
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_MQ0Fraction;
static PyObject *__pyx_n_s_MQRankSum;
static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor;
static PyObject *__pyx_n_s_OND;
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_RU;
static PyObject *__pyx_n_s_ReadPosRankSum;
static PyObject *__pyx_n_s_RuntimeError;
static PyObject *__pyx_n_s_STANDARD_CALLDATA_FIELDS;
static PyObject *__pyx_n_s_STANDARD_VARIANT_FIELDS;
static PyObject *__pyx_n_s_StopIteration;
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_kp_u_Utility_function_to_view_a_stru;
static PyObject *__pyx_n_s_ValueError;
static PyObject *__pyx_n_s_VariantType;
static PyObject *__pyx_n_s_VariantsTable;
static PyObject *__pyx_n_s_VariantsTable___init;
static PyObject *__pyx_n_s_VariantsTable___iter;
static PyObject *__pyx_kp_s_WARNING_duplicate_definition_in;
static PyObject *__pyx_kp_s_WARNING_no_INFO_definition_found;
static PyObject *__pyx_kp_s_WARNING_no_definition_found_for;
static PyObject *__pyx_kp_s__13;
static PyObject *__pyx_kp_b__14;
static PyObject *__pyx_kp_s__14;
static PyObject *__pyx_kp_s__2;
static PyObject *__pyx_kp_b__20;
static PyObject *__pyx_kp_s__20;
static PyObject *__pyx_kp_s__24;
static PyObject *__pyx_kp_s__28;
static PyObject *__pyx_kp_s__3;
static PyObject *__pyx_kp_s__33;
static PyObject *__pyx_kp_b__42;
static PyObject *__pyx_kp_s__6;
static PyObject *__pyx_n_s__7;
static PyObject *__pyx_kp_s__9;
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_kp_s_a_d;
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_any;
static PyObject *__pyx_n_s_append;
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_build_calldata;
static PyObject *__pyx_n_s_build_calldata_2d;
static PyObject *__pyx_n_s_build_variants;
static PyObject *__pyx_n_s_cache;
static PyObject *__pyx_n_s_cache_fn;
static PyObject *__pyx_n_s_cachedir;
static PyObject *__pyx_n_s_cachedir_suffix;
static PyObject *__pyx_kp_s_caching_only_supported_when_load;
static PyObject *__pyx_n_s_calldata;
static PyObject *__pyx_n_s_calldata_2d;
static PyObject *__pyx_n_s_calldata_arities;
static PyObject *__pyx_n_s_calldata_dtype;
static PyObject *__pyx_n_s_calldata_fields;
static PyObject *__pyx_n_s_calldata_fills;
static PyObject *__pyx_kp_u_calldata_line_964;
static PyObject *__pyx_n_s_cell_dtype;
static PyObject *__pyx_n_s_chain;
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_data;
static PyObject *__pyx_n_s_datetime;
static PyObject *__pyx_n_s_doc;
static PyObject *__pyx_n_s_dtype;
static PyObject *__pyx_n_s_dtypes;
static PyObject *__pyx_n_s_eff;
static PyObject *__pyx_n_s_eff_default_transformer;
static PyObject *__pyx_n_s_eff_default_transformer_locals;
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_fieldspec;
static PyObject *__pyx_n_s_file;
static PyObject *__pyx_kp_s_file_not_found_s;
static PyObject *__pyx_n_s_filename;
static PyObject *__pyx_kp_s_filename_argument_must_be_basest;
static PyObject *__pyx_n_s_filenames;
static PyObject *__pyx_n_s_filenames_from_arg;
static PyObject *__pyx_n_s_fill;
static PyObject *__pyx_n_s_fills;
static PyObject *__pyx_n_s_filterIds;
static PyObject *__pyx_n_s_filter_ids;
static PyObject *__pyx_n_s_flatten_filter;
static PyObject *__pyx_n_s_flt;
static PyObject *__pyx_n_s_flush;
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_fromiter_2;
static PyObject *__pyx_n_s_genexpr;
static PyObject *__pyx_n_b_genotype;
static PyObject *__pyx_n_s_genotype;
static PyObject *__pyx_n_s_get;
static PyObject *__pyx_n_s_getmtime;
static PyObject *__pyx_n_s_group;
static PyObject *__pyx_n_s_header;
static PyObject *__pyx_kp_s_home_aliman_src_github_alimanfo;
static PyObject *__pyx_n_s_i;
static PyObject *__pyx_n_s_i1;
static PyObject *__pyx_n_s_i4;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_infoCounts;
static PyObject *__pyx_n_s_infoIds;
static PyObject *__pyx_n_s_infoTypes;
static PyObject *__pyx_n_s_info_ids;
static PyObject *__pyx_n_s_info_transformers;
static PyObject *__pyx_n_s_info_types;
static PyObject *__pyx_n_s_init;
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_isdir;
static PyObject *__pyx_n_s_islice;
static PyObject *__pyx_n_s_it;
static PyObject *__pyx_n_s_iter;
static PyObject *__pyx_n_s_iter_withprogress;
static PyObject *__pyx_n_s_iterable;
static PyObject *__pyx_n_s_itercalldata;
static PyObject *__pyx_n_s_itercalldata_with_condition;
static PyObject *__pyx_n_s_itertools;
static PyObject *__pyx_n_s_itervariants;
static PyObject *__pyx_n_s_itervariants_with_condition;
static PyObject *__pyx_n_s_itervariantstable;
static PyObject *__pyx_n_s_join;
static PyObject *__pyx_n_s_kwargs;
static PyObject *__pyx_n_s_load;
static PyObject *__pyx_kp_s_loading_calldata_from;
static PyObject *__pyx_kp_s_loading_from_cache;
static PyObject *__pyx_kp_s_loading_variants_from;
static PyObject *__pyx_n_s_log;
static PyObject *__pyx_n_s_logstream;
static PyObject *__pyx_n_s_m;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_makedirs;
static PyObject *__pyx_n_s_match;
static PyObject *__pyx_n_s_match_eff_main;
static PyObject *__pyx_n_s_metaclass;
static PyObject *__pyx_n_s_mk_cache_fn;
static PyObject *__pyx_n_s_module;
static PyObject *__pyx_n_s_msg;
static PyObject *__pyx_n_s_n;
static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous;
static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou;
static PyObject *__pyx_n_s_nm;
static PyObject *__pyx_kp_s_no_cache_file_found_or_cache_out;
static PyObject *__pyx_n_s_now;
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_object;
static PyObject *__pyx_n_s_os;
static PyObject *__pyx_n_s_parseInfo;
static PyObject *__pyx_n_s_parse_info;
static PyObject *__pyx_n_s_path;
static PyObject *__pyx_n_s_ploidy;
static PyObject *__pyx_n_s_prepare;
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_qualname;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_re;
static PyObject *__pyx_n_s_region;
static PyObject *__pyx_n_s_region_set;
static PyObject *__pyx_n_s_replace;
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_kp_s_s_npy;
static PyObject *__pyx_kp_s_s_rows_in_2fs_batch_in_2fs_d_ro;
static PyObject *__pyx_kp_s_s_rows_in_2fs_d_rows_s;
static PyObject *__pyx_kp_s_s_s_npy;
static PyObject *__pyx_n_s_sampleNames;
static PyObject *__pyx_n_s_samples;
static PyObject *__pyx_n_s_save;
static PyObject *__pyx_kp_s_saving_to_cache;
static PyObject *__pyx_n_s_self;
static PyObject *__pyx_n_s_send;
static PyObject *__pyx_n_s_setup_variants;
static PyObject *__pyx_n_s_size;
static PyObject *__pyx_n_s_skip_cached;
static PyObject *__pyx_kp_s_skipping_from_cache;
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_b_svlen;
static PyObject *__pyx_n_s_svlen;
static PyObject *__pyx_n_s_sys;
static PyObject *__pyx_n_s_t;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_throw;
static PyObject *__pyx_n_s_time;
static PyObject *__pyx_n_s_transformer;
static PyObject *__pyx_n_s_transformers;
static PyObject *__pyx_n_s_type;
static PyObject *__pyx_n_s_u1;
static PyObject *__pyx_n_s_u2;
static PyObject *__pyx_kp_s_unexpected_error_cache_directory;
static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd;
static PyObject *__pyx_kp_s_unknown_sample_s;
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_variants_arities;
static PyObject *__pyx_n_s_variants_dtype;
static PyObject *__pyx_n_s_variants_fields;
static PyObject *__pyx_n_s_variants_fills;
static PyObject *__pyx_kp_u_variants_line_372;
static PyObject *__pyx_n_s_vcf;
static PyObject *__pyx_n_s_vcf_count;
static PyObject *__pyx_n_s_vcf_fn;
static PyObject *__pyx_n_s_vcf_type;
static PyObject *__pyx_n_s_vcf_types;
static PyObject *__pyx_kp_s_vcfnp;
static PyObject *__pyx_n_s_vcfnp_2;
static PyObject *__pyx_kp_s_vcfnp_cache;
static PyObject *__pyx_n_s_verbose;
static PyObject *__pyx_n_s_version;
static PyObject *__pyx_n_s_view;
static PyObject *__pyx_n_s_view2d;
static PyObject *__pyx_kp_u_view2d_line_1556;
static PyObject *__pyx_n_s_visited;
static PyObject *__pyx_n_s_warn_duplicates;
static PyObject *__pyx_n_s_zip;
static PyObject *__pyx_float_0_;
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_10;
static PyObject *__pyx_int_11;
static PyObject *__pyx_int_15;
static PyObject *__pyx_int_neg_1;
static PyObject *__pyx_k__4;
static PyObject *__pyx_k__11;
static PyObject *__pyx_k__12;
static PyObject *__pyx_k__15;
static PyObject *__pyx_k__17;
static PyObject *__pyx_k__18;
static PyObject *__pyx_k__22;
static PyObject *__pyx_tuple_;
static PyObject *__pyx_tuple__5;
static PyObject *__pyx_tuple__8;
static PyObject *__pyx_slice__23;
static PyObject *__pyx_tuple__10;
static PyObject *__pyx_tuple__16;
static PyObject *__pyx_tuple__19;
static PyObject *__pyx_tuple__21;
static PyObject *__pyx_tuple__25;
static PyObject *__pyx_tuple__26;
static PyObject *__pyx_tuple__27;
static PyObject *__pyx_tuple__29;
static PyObject *__pyx_tuple__30;
static PyObject *__pyx_tuple__32;
static PyObject *__pyx_tuple__34;
static PyObject *__pyx_tuple__35;
static PyObject *__pyx_tuple__36;
static PyObject *__pyx_tuple__37;
static PyObject *__pyx_tuple__38;
static PyObject *__pyx_tuple__39;
static PyObject *__pyx_tuple__40;
static PyObject *__pyx_tuple__41;
static PyObject *__pyx_tuple__43;
static PyObject *__pyx_tuple__45;
static PyObject *__pyx_tuple__47;
static PyObject *__pyx_tuple__49;
static PyObject *__pyx_tuple__51;
static PyObject *__pyx_tuple__53;
static PyObject *__pyx_tuple__55;
static PyObject *__pyx_tuple__57;
static PyObject *__pyx_tuple__59;
static PyObject *__pyx_tuple__61;
static PyObject *__pyx_tuple__63;
static PyObject *__pyx_tuple__65;
static PyObject *__pyx_tuple__67;
static PyObject *__pyx_tuple__69;
static PyObject *__pyx_tuple__71;
static PyObject *__pyx_tuple__73;
static PyObject *__pyx_tuple__75;
static PyObject *__pyx_tuple__77;
static PyObject *__pyx_tuple__79;
static PyObject *__pyx_tuple__81;
static PyObject *__pyx_tuple__83;
static PyObject *__pyx_tuple__85;
static PyObject *__pyx_tuple__87;
static PyObject *__pyx_tuple__89;
static PyObject *__pyx_tuple__91;
static PyObject *__pyx_tuple__93;
static PyObject *__pyx_tuple__95;
static PyObject *__pyx_tuple__97;
static PyObject *__pyx_tuple__98;
static PyObject *__pyx_tuple__99;
static PyObject *__pyx_tuple__100;
static PyObject *__pyx_tuple__101;
static PyObject *__pyx_tuple__102;
static PyObject *__pyx_tuple__103;
static PyObject *__pyx_tuple__104;
static PyObject *__pyx_tuple__105;
static PyObject *__pyx_tuple__106;
static PyObject *__pyx_tuple__107;
static PyObject *__pyx_tuple__108;
static PyObject *__pyx_tuple__109;
static PyObject *__pyx_tuple__111;
static PyObject *__pyx_tuple__113;
static PyObject *__pyx_tuple__114;
static PyObject *__pyx_tuple__116;
static PyObject *__pyx_codeobj__31;
static PyObject *__pyx_codeobj__44;
static PyObject *__pyx_codeobj__46;
static PyObject *__pyx_codeobj__48;
static PyObject *__pyx_codeobj__50;
static PyObject *__pyx_codeobj__52;
static PyObject *__pyx_codeobj__54;
static PyObject *__pyx_codeobj__56;
static PyObject *__pyx_codeobj__58;
static PyObject *__pyx_codeobj__60;
static PyObject *__pyx_codeobj__62;
static PyObject *__pyx_codeobj__64;
static PyObject *__pyx_codeobj__66;
static PyObject *__pyx_codeobj__68;
static PyObject *__pyx_codeobj__70;
static PyObject *__pyx_codeobj__72;
static PyObject *__pyx_codeobj__74;
static PyObject *__pyx_codeobj__76;
static PyObject *__pyx_codeobj__78;
static PyObject *__pyx_codeobj__80;
static PyObject *__pyx_codeobj__82;
static PyObject *__pyx_codeobj__84;
static PyObject *__pyx_codeobj__86;
static PyObject *__pyx_codeobj__88;
static PyObject *__pyx_codeobj__90;
static PyObject *__pyx_codeobj__92;
static PyObject *__pyx_codeobj__94;
static PyObject *__pyx_codeobj__96;
static PyObject *__pyx_codeobj__110;
static PyObject *__pyx_codeobj__112;
static PyObject *__pyx_codeobj__115;
static PyObject *__pyx_codeobj__117;

/* "vcfnp.pyx":206
 * 
 * 
 * def _variants_fields(fields, exclude_fields, infoIds):             # <<<<<<<<<<<<<<
 *     if fields is None:
 *         fields = STANDARD_VARIANT_FIELDS + infoIds
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_1_variants_fields(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5vcfnp__variants_fields[] = "_variants_fields(fields, exclude_fields, infoIds)";
static PyMethodDef __pyx_mdef_5vcfnp_1_variants_fields = {__Pyx_NAMESTR("_variants_fields"), (PyCFunction)__pyx_pw_5vcfnp_1_variants_fields, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5vcfnp__variants_fields)};
static PyObject *__pyx_pw_5vcfnp_1_variants_fields(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_fields = 0;
  PyObject *__pyx_v_exclude_fields = 0;
  PyObject *__pyx_v_infoIds = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_variants_fields (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fields,&__pyx_n_s_exclude_fields,&__pyx_n_s_infoIds,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_fields)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exclude_fields)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_variants_fields", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_infoIds)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_variants_fields", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_variants_fields") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __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_fields = values[0];
    __pyx_v_exclude_fields = values[1];
    __pyx_v_infoIds = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_variants_fields", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vcfnp._variants_fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5vcfnp__variants_fields(__pyx_self, __pyx_v_fields, __pyx_v_exclude_fields, __pyx_v_infoIds);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vcfnp__variants_fields(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fields, PyObject *__pyx_v_exclude_fields, PyObject *__pyx_v_infoIds) {
  PyObject *__pyx_v_f = 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;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_variants_fields", 0);
  __Pyx_INCREF(__pyx_v_fields);

  /* "vcfnp.pyx":207
 * 
 * def _variants_fields(fields, exclude_fields, infoIds):
 *     if fields is None:             # <<<<<<<<<<<<<<
 *         fields = STANDARD_VARIANT_FIELDS + infoIds
 *     else:
 */
  __pyx_t_1 = (__pyx_v_fields == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "vcfnp.pyx":208
 * def _variants_fields(fields, exclude_fields, infoIds):
 *     if fields is None:
 *         fields = STANDARD_VARIANT_FIELDS + infoIds             # <<<<<<<<<<<<<<
 *     else:
 *         for f in fields:
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_STANDARD_VARIANT_FIELDS); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_v_infoIds); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_fields, __pyx_t_4);
    __pyx_t_4 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "vcfnp.pyx":210
 *         fields = STANDARD_VARIANT_FIELDS + infoIds
 *     else:
 *         for f in fields:             # <<<<<<<<<<<<<<
 *             if f not in STANDARD_VARIANT_FIELDS and f not in infoIds:
 *                 # support extracting INFO even if not declared in header, but warn...
 */
    if (PyList_CheckExact(__pyx_v_fields) || PyTuple_CheckExact(__pyx_v_fields)) {
      __pyx_t_4 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_fields); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext;
    }
    for (;;) {
      if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_4)) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_4)) {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        __pyx_t_3 = __pyx_t_6(__pyx_t_4);
        if (unlikely(!__pyx_t_3)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "vcfnp.pyx":211
 *     else:
 *         for f in fields:
 *             if f not in STANDARD_VARIANT_FIELDS and f not in infoIds:             # <<<<<<<<<<<<<<
 *                 # support extracting INFO even if not declared in header, but warn...
 *                 print >>sys.stderr, 'WARNING: no INFO definition found for field %s' % f
 */
      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_STANDARD_VARIANT_FIELDS); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_t_3, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if ((__pyx_t_2 != 0)) {
        __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_v_infoIds, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_7 = (__pyx_t_1 != 0);
      } else {
        __pyx_t_7 = (__pyx_t_2 != 0);
      }
      if (__pyx_t_7) {

        /* "vcfnp.pyx":213
 *             if f not in STANDARD_VARIANT_FIELDS and f not in infoIds:
 *                 # support extracting INFO even if not declared in header, but warn...
 *                 print >>sys.stderr, 'WARNING: no INFO definition found for field %s' % f             # <<<<<<<<<<<<<<
 *     if exclude_fields is not None:
 *         fields = [f for f in fields if f not in exclude_fields]
 */
        __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_stderr); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_WARNING_no_INFO_definition_found, __pyx_v_f); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        if (__Pyx_PrintOne(__pyx_t_8, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_L3:;

  /* "vcfnp.pyx":214
 *                 # support extracting INFO even if not declared in header, but warn...
 *                 print >>sys.stderr, 'WARNING: no INFO definition found for field %s' % f
 *     if exclude_fields is not None:             # <<<<<<<<<<<<<<
 *         fields = [f for f in fields if f not in exclude_fields]
 *     return tuple(fields)
 */
  __pyx_t_7 = (__pyx_v_exclude_fields != Py_None);
  __pyx_t_2 = (__pyx_t_7 != 0);
  if (__pyx_t_2) {

    /* "vcfnp.pyx":215
 *                 print >>sys.stderr, 'WARNING: no INFO definition found for field %s' % f
 *     if exclude_fields is not None:
 *         fields = [f for f in fields if f not in exclude_fields]             # <<<<<<<<<<<<<<
 *     return tuple(fields)
 * 
 */
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    if (PyList_CheckExact(__pyx_v_fields) || PyTuple_CheckExact(__pyx_v_fields)) {
      __pyx_t_8 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_8); __pyx_t_5 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_fields); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = Py_TYPE(__pyx_t_8)->tp_iternext;
    }
    for (;;) {
      if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_8)) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_8)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_8, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_8)) {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_8, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        __pyx_t_3 = __pyx_t_6(__pyx_t_8);
        if (unlikely(!__pyx_t_3)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_v_exclude_fields, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_7 = (__pyx_t_2 != 0);
      if (__pyx_t_7) {
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_v_f))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L10;
      }
      __pyx_L10:;
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF_SET(__pyx_v_fields, __pyx_t_4);
    __pyx_t_4 = 0;
    goto __pyx_L7;
  }
  __pyx_L7:;

  /* "vcfnp.pyx":216
 *     if exclude_fields is not None:
 *         fields = [f for f in fields if f not in exclude_fields]
 *     return tuple(fields)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_fields);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_fields);
  __Pyx_GIVEREF(__pyx_v_fields);
  __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "vcfnp.pyx":206
 * 
 * 
 * def _variants_fields(fields, exclude_fields, infoIds):             # <<<<<<<<<<<<<<
 *     if fields is None:
 *         fields = STANDARD_VARIANT_FIELDS + infoIds
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("vcfnp._variants_fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_f);
  __Pyx_XDECREF(__pyx_v_fields);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":219
 * 
 * 
 * def _variants_arities(fields, arities, infoCounts):             # <<<<<<<<<<<<<<
 *     if arities is None:
 *         arities = dict()
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_3_variants_arities(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5vcfnp_2_variants_arities[] = "_variants_arities(fields, arities, infoCounts)";
static PyMethodDef __pyx_mdef_5vcfnp_3_variants_arities = {__Pyx_NAMESTR("_variants_arities"), (PyCFunction)__pyx_pw_5vcfnp_3_variants_arities, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5vcfnp_2_variants_arities)};
static PyObject *__pyx_pw_5vcfnp_3_variants_arities(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_fields = 0;
  PyObject *__pyx_v_arities = 0;
  PyObject *__pyx_v_infoCounts = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_variants_arities (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fields,&__pyx_n_s_arities,&__pyx_n_s_infoCounts,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_fields)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arities)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_variants_arities", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_infoCounts)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_variants_arities", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_variants_arities") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __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_fields = values[0];
    __pyx_v_arities = values[1];
    __pyx_v_infoCounts = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_variants_arities", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vcfnp._variants_arities", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5vcfnp_2_variants_arities(__pyx_self, __pyx_v_fields, __pyx_v_arities, __pyx_v_infoCounts);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_5vcfnp_17_variants_arities_2generator6(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "vcfnp.pyx":236
 *             else:
 *                 arities[f] = vcf_count
 *     arities = tuple(arities[f] for f in fields)             # <<<<<<<<<<<<<<
 *     return arities
 * 
 */

static PyObject *__pyx_pf_5vcfnp_17_variants_arities_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_1_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_1_genexpr *)__pyx_tp_new_5vcfnp___pyx_scope_struct_1_genexpr(__pyx_ptype_5vcfnp___pyx_scope_struct_1_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___variants_arities *) __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_17_variants_arities_2generator6, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("vcfnp._variants_arities.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_17_variants_arities_2generator6(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5vcfnp___pyx_scope_struct_1_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_1_genexpr *)__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;
  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 = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields)) { __Pyx_RaiseClosureNameError("fields"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  if (PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields; __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_outer_scope->__pyx_v_fields); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __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 = 236; __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 = 236; __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 = 236; __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 = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_f);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_f, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_arities)) { __Pyx_RaiseClosureNameError("arities"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    __pyx_t_4 = PyObject_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_arities, __pyx_cur_scope->__pyx_v_f); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __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_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_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 = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __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":219
 * 
 * 
 * def _variants_arities(fields, arities, infoCounts):             # <<<<<<<<<<<<<<
 *     if arities is None:
 *         arities = dict()
 */

static PyObject *__pyx_pf_5vcfnp_2_variants_arities(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fields, PyObject *__pyx_v_arities, PyObject *__pyx_v_infoCounts) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct___variants_arities *__pyx_cur_scope;
  PyObject *__pyx_v_f = NULL;
  PyObject *__pyx_v_vcf_count = 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;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_variants_arities", 0);
  __pyx_cur_scope = (struct __pyx_obj_5vcfnp___pyx_scope_struct___variants_arities *)__pyx_tp_new_5vcfnp___pyx_scope_struct___variants_arities(__pyx_ptype_5vcfnp___pyx_scope_struct___variants_arities, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_fields = __pyx_v_fields;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fields);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fields);
  __pyx_cur_scope->__pyx_v_arities = __pyx_v_arities;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_arities);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_arities);

  /* "vcfnp.pyx":220
 * 
 * def _variants_arities(fields, arities, infoCounts):
 *     if arities is None:             # <<<<<<<<<<<<<<
 *         arities = dict()
 *     for f, vcf_count in zip(fields, infoCounts):
 */
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v_arities == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "vcfnp.pyx":221
 * def _variants_arities(fields, arities, infoCounts):
 *     if arities is None:
 *         arities = dict()             # <<<<<<<<<<<<<<
 *     for f, vcf_count in zip(fields, infoCounts):
 *         if f == 'FILTER':
 */
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_arities);
    __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_arities, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "vcfnp.pyx":222
 *     if arities is None:
 *         arities = dict()
 *     for f, vcf_count in zip(fields, infoCounts):             # <<<<<<<<<<<<<<
 *         if f == 'FILTER':
 *             arities[f] = 1 # one value
 */
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fields);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_v_fields);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fields);
  __Pyx_INCREF(__pyx_v_infoCounts);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_infoCounts);
  __Pyx_GIVEREF(__pyx_v_infoCounts);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_3)) {
      if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_3)) {
      if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_6(__pyx_t_3);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
      PyObject* sequence = __pyx_t_4;
      #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 = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_7 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_8);
      #else
      __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      #endif
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
      index = 0; __pyx_t_7 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_8);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_10 = NULL;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_10 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L7_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_7);
    __pyx_t_7 = 0;
    __Pyx_XDECREF_SET(__pyx_v_vcf_count, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "vcfnp.pyx":223
 *         arities = dict()
 *     for f, vcf_count in zip(fields, infoCounts):
 *         if f == 'FILTER':             # <<<<<<<<<<<<<<
 *             arities[f] = 1 # one value
 *         elif f not in arities:
 */
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_f, __pyx_n_s_FILTER, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_2) {

      /* "vcfnp.pyx":224
 *     for f, vcf_count in zip(fields, infoCounts):
 *         if f == 'FILTER':
 *             arities[f] = 1 # one value             # <<<<<<<<<<<<<<
 *         elif f not in arities:
 *             if f in STANDARD_VARIANT_FIELDS:
 */
      if (unlikely(PyObject_SetItem(__pyx_cur_scope->__pyx_v_arities, __pyx_v_f, __pyx_int_1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L8;
    }

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

      /* "vcfnp.pyx":226
 *             arities[f] = 1 # one value
 *         elif f not in arities:
 *             if f in STANDARD_VARIANT_FIELDS:             # <<<<<<<<<<<<<<
 *                 arities[f] = DEFAULT_VARIANT_ARITY[f]
 *             elif vcf_count == ALLELE_NUMBER:
 */
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_STANDARD_VARIANT_FIELDS); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_2 = (__pyx_t_1 != 0);
      if (__pyx_t_2) {

        /* "vcfnp.pyx":227
 *         elif f not in arities:
 *             if f in STANDARD_VARIANT_FIELDS:
 *                 arities[f] = DEFAULT_VARIANT_ARITY[f]             # <<<<<<<<<<<<<<
 *             elif vcf_count == ALLELE_NUMBER:
 *                 # default to 1 (biallelic)
 */
        __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_VARIANT_ARITY); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_8 = PyObject_GetItem(__pyx_t_4, __pyx_v_f); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(PyObject_SetItem(__pyx_cur_scope->__pyx_v_arities, __pyx_v_f, __pyx_t_8) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L9;
      }

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

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

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

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

        /* "vcfnp.pyx":235
 *                 arities[f] = 1
 *             else:
 *                 arities[f] = vcf_count             # <<<<<<<<<<<<<<
 *     arities = tuple(arities[f] for f in fields)
 *     return arities
 */
        if (unlikely(PyObject_SetItem(__pyx_cur_scope->__pyx_v_arities, __pyx_v_f, __pyx_v_vcf_count) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_L9:;
      goto __pyx_L8;
    }
    __pyx_L8:;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "vcfnp.pyx":236
 *             else:
 *                 arities[f] = vcf_count
 *     arities = tuple(arities[f] for f in fields)             # <<<<<<<<<<<<<<
 *     return arities
 * 
 */
  __pyx_t_3 = __pyx_pf_5vcfnp_17_variants_arities_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __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 = 236; __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 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_arities);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_arities, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "vcfnp.pyx":237
 *                 arities[f] = vcf_count
 *     arities = tuple(arities[f] for f in fields)
 *     return arities             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_arities);
  __pyx_r = __pyx_cur_scope->__pyx_v_arities;
  goto __pyx_L0;

  /* "vcfnp.pyx":219
 * 
 * 
 * def _variants_arities(fields, arities, infoCounts):             # <<<<<<<<<<<<<<
 *     if arities is None:
 *         arities = dict()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("vcfnp._variants_arities", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_f);
  __Pyx_XDECREF(__pyx_v_vcf_count);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":240
 * 
 * 
 * def _variants_fills(fields, fills, infoTypes):             # <<<<<<<<<<<<<<
 *     if fills is None:
 *         fills = dict()
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_5_variants_fills(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5vcfnp_4_variants_fills[] = "_variants_fills(fields, fills, infoTypes)";
static PyMethodDef __pyx_mdef_5vcfnp_5_variants_fills = {__Pyx_NAMESTR("_variants_fills"), (PyCFunction)__pyx_pw_5vcfnp_5_variants_fills, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5vcfnp_4_variants_fills)};
static PyObject *__pyx_pw_5vcfnp_5_variants_fills(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_fields = 0;
  PyObject *__pyx_v_fills = 0;
  PyObject *__pyx_v_infoTypes = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_variants_fills (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fields,&__pyx_n_s_fills,&__pyx_n_s_infoTypes,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_fields)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fills)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_variants_fills", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_infoTypes)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_variants_fills", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_variants_fills") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __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_fields = values[0];
    __pyx_v_fills = values[1];
    __pyx_v_infoTypes = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_variants_fills", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vcfnp._variants_fills", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5vcfnp_4_variants_fills(__pyx_self, __pyx_v_fields, __pyx_v_fills, __pyx_v_infoTypes);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_5vcfnp_15_variants_fills_2generator7(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "vcfnp.pyx":251
 *             else:
 *                 fills[f] = DEFAULT_FILL_MAP[vcf_type]
 *     fills = tuple(fills[f] for f in fields)             # <<<<<<<<<<<<<<
 *     return fills
 * 
 */

static PyObject *__pyx_pf_5vcfnp_15_variants_fills_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_3_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_3_genexpr *)__pyx_tp_new_5vcfnp___pyx_scope_struct_3_genexpr(__pyx_ptype_5vcfnp___pyx_scope_struct_3_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_2__variants_fills *) __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_15_variants_fills_2generator7, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("vcfnp._variants_fills.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_15_variants_fills_2generator7(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5vcfnp___pyx_scope_struct_3_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_3_genexpr *)__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;
  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 = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields)) { __Pyx_RaiseClosureNameError("fields"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  if (PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields; __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_outer_scope->__pyx_v_fields); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __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 = 251; __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 = 251; __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 = 251; __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 = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_f);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_f, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fills)) { __Pyx_RaiseClosureNameError("fills"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    __pyx_t_4 = PyObject_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fills, __pyx_cur_scope->__pyx_v_f); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __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_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_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 = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __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":240
 * 
 * 
 * def _variants_fills(fields, fills, infoTypes):             # <<<<<<<<<<<<<<
 *     if fills is None:
 *         fills = dict()
 */

static PyObject *__pyx_pf_5vcfnp_4_variants_fills(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fields, PyObject *__pyx_v_fills, PyObject *__pyx_v_infoTypes) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_2__variants_fills *__pyx_cur_scope;
  PyObject *__pyx_v_f = NULL;
  PyObject *__pyx_v_vcf_type = 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;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_variants_fills", 0);
  __pyx_cur_scope = (struct __pyx_obj_5vcfnp___pyx_scope_struct_2__variants_fills *)__pyx_tp_new_5vcfnp___pyx_scope_struct_2__variants_fills(__pyx_ptype_5vcfnp___pyx_scope_struct_2__variants_fills, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_fields = __pyx_v_fields;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fields);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fields);
  __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":241
 * 
 * def _variants_fills(fields, fills, infoTypes):
 *     if fills is None:             # <<<<<<<<<<<<<<
 *         fills = dict()
 *     for f, vcf_type in zip(fields, infoTypes):
 */
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v_fills == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "vcfnp.pyx":242
 * def _variants_fills(fields, fills, infoTypes):
 *     if fills is None:
 *         fills = dict()             # <<<<<<<<<<<<<<
 *     for f, vcf_type in zip(fields, infoTypes):
 *         if f == 'FILTER':
 */
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_fills);
    __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_fills, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "vcfnp.pyx":243
 *     if fills is None:
 *         fills = dict()
 *     for f, vcf_type in zip(fields, infoTypes):             # <<<<<<<<<<<<<<
 *         if f == 'FILTER':
 *             fills[f] = False
 */
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fields);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_v_fields);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fields);
  __Pyx_INCREF(__pyx_v_infoTypes);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_infoTypes);
  __Pyx_GIVEREF(__pyx_v_infoTypes);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_3)) {
      if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_3)) {
      if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_6(__pyx_t_3);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
      PyObject* sequence = __pyx_t_4;
      #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 = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_7 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_8);
      #else
      __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      #endif
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
      index = 0; __pyx_t_7 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_8);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_10 = NULL;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_10 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L7_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_7);
    __pyx_t_7 = 0;
    __Pyx_XDECREF_SET(__pyx_v_vcf_type, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "vcfnp.pyx":244
 *         fills = dict()
 *     for f, vcf_type in zip(fields, infoTypes):
 *         if f == 'FILTER':             # <<<<<<<<<<<<<<
 *             fills[f] = False
 *         elif f not in fills:
 */
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_f, __pyx_n_s_FILTER, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_2) {

      /* "vcfnp.pyx":245
 *     for f, vcf_type in zip(fields, infoTypes):
 *         if f == 'FILTER':
 *             fills[f] = False             # <<<<<<<<<<<<<<
 *         elif f not in fills:
 *             if f in STANDARD_VARIANT_FIELDS:
 */
      if (unlikely(PyObject_SetItem(__pyx_cur_scope->__pyx_v_fills, __pyx_v_f, Py_False) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L8;
    }

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

      /* "vcfnp.pyx":247
 *             fills[f] = False
 *         elif f not in fills:
 *             if f in STANDARD_VARIANT_FIELDS:             # <<<<<<<<<<<<<<
 *                 fills[f] = DEFAULT_VARIANT_FILL[f]
 *             else:
 */
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_STANDARD_VARIANT_FIELDS); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_2 = (__pyx_t_1 != 0);
      if (__pyx_t_2) {

        /* "vcfnp.pyx":248
 *         elif f not in fills:
 *             if f in STANDARD_VARIANT_FIELDS:
 *                 fills[f] = DEFAULT_VARIANT_FILL[f]             # <<<<<<<<<<<<<<
 *             else:
 *                 fills[f] = DEFAULT_FILL_MAP[vcf_type]
 */
        __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_VARIANT_FILL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_8 = PyObject_GetItem(__pyx_t_4, __pyx_v_f); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(PyObject_SetItem(__pyx_cur_scope->__pyx_v_fills, __pyx_v_f, __pyx_t_8) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L9;
      }
      /*else*/ {

        /* "vcfnp.pyx":250
 *                 fills[f] = DEFAULT_VARIANT_FILL[f]
 *             else:
 *                 fills[f] = DEFAULT_FILL_MAP[vcf_type]             # <<<<<<<<<<<<<<
 *     fills = tuple(fills[f] for f in fields)
 *     return fills
 */
        __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_FILL_MAP); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_4 = PyObject_GetItem(__pyx_t_8, __pyx_v_vcf_type); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(PyObject_SetItem(__pyx_cur_scope->__pyx_v_fills, __pyx_v_f, __pyx_t_4) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __pyx_L9:;
      goto __pyx_L8;
    }
    __pyx_L8:;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "vcfnp.pyx":251
 *             else:
 *                 fills[f] = DEFAULT_FILL_MAP[vcf_type]
 *     fills = tuple(fills[f] for f in fields)             # <<<<<<<<<<<<<<
 *     return fills
 * 
 */
  __pyx_t_3 = __pyx_pf_5vcfnp_15_variants_fills_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __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 = 251; __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 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_fills);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_fills, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "vcfnp.pyx":252
 *                 fills[f] = DEFAULT_FILL_MAP[vcf_type]
 *     fills = tuple(fills[f] for f in fields)
 *     return fills             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fills);
  __pyx_r = __pyx_cur_scope->__pyx_v_fills;
  goto __pyx_L0;

  /* "vcfnp.pyx":240
 * 
 * 
 * def _variants_fills(fields, fills, infoTypes):             # <<<<<<<<<<<<<<
 *     if fills is None:
 *         fills = dict()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("vcfnp._variants_fills", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_f);
  __Pyx_XDECREF(__pyx_v_vcf_type);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":255
 * 
 * 
 * def _info_transformers(fields, transformers):             # <<<<<<<<<<<<<<
 *     if transformers is None:
 *         transformers = dict()
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_7_info_transformers(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5vcfnp_6_info_transformers[] = "_info_transformers(fields, transformers)";
static PyMethodDef __pyx_mdef_5vcfnp_7_info_transformers = {__Pyx_NAMESTR("_info_transformers"), (PyCFunction)__pyx_pw_5vcfnp_7_info_transformers, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5vcfnp_6_info_transformers)};
static PyObject *__pyx_pw_5vcfnp_7_info_transformers(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_fields = 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("_info_transformers (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fields,&__pyx_n_s_transformers,0};
    PyObject* values[2] = {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  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_fields)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_transformers)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_info_transformers", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_info_transformers") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_fields = values[0];
    __pyx_v_transformers = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_info_transformers", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vcfnp._info_transformers", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5vcfnp_6_info_transformers(__pyx_self, __pyx_v_fields, __pyx_v_transformers);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_5vcfnp_18_info_transformers_2generator8(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "vcfnp.pyx":261
 *         if f not in transformers:
 *             transformers[f] = None
 *     return tuple(transformers[f] for f in fields)             # <<<<<<<<<<<<<<
 * 
 * 
 */

static PyObject *__pyx_pf_5vcfnp_18_info_transformers_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_5_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_5_genexpr *)__pyx_tp_new_5vcfnp___pyx_scope_struct_5_genexpr(__pyx_ptype_5vcfnp___pyx_scope_struct_5_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_4__info_transformers *) __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_18_info_transformers_2generator8, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("vcfnp._info_transformers.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_18_info_transformers_2generator8(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5vcfnp___pyx_scope_struct_5_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_5_genexpr *)__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;
  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 = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields)) { __Pyx_RaiseClosureNameError("fields"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  if (PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields; __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_outer_scope->__pyx_v_fields); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __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 = 261; __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 = 261; __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 = 261; __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 = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_f);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_f, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_transformers)) { __Pyx_RaiseClosureNameError("transformers"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    __pyx_t_4 = PyObject_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_transformers, __pyx_cur_scope->__pyx_v_f); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __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_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_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 = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __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":255
 * 
 * 
 * def _info_transformers(fields, transformers):             # <<<<<<<<<<<<<<
 *     if transformers is None:
 *         transformers = dict()
 */

static PyObject *__pyx_pf_5vcfnp_6_info_transformers(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fields, PyObject *__pyx_v_transformers) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_4__info_transformers *__pyx_cur_scope;
  PyObject *__pyx_v_f = 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_info_transformers", 0);
  __pyx_cur_scope = (struct __pyx_obj_5vcfnp___pyx_scope_struct_4__info_transformers *)__pyx_tp_new_5vcfnp___pyx_scope_struct_4__info_transformers(__pyx_ptype_5vcfnp___pyx_scope_struct_4__info_transformers, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_fields = __pyx_v_fields;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fields);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fields);
  __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);

  /* "vcfnp.pyx":256
 * 
 * def _info_transformers(fields, transformers):
 *     if transformers is None:             # <<<<<<<<<<<<<<
 *         transformers = dict()
 *     for f in fields:
 */
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v_transformers == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "vcfnp.pyx":257
 * def _info_transformers(fields, transformers):
 *     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 = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_transformers);
    __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_transformers, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "vcfnp.pyx":258
 *     if transformers is None:
 *         transformers = dict()
 *     for f in fields:             # <<<<<<<<<<<<<<
 *         if f not in transformers:
 *             transformers[f] = None
 */
  if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_fields) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_fields)) {
    __pyx_t_3 = __pyx_cur_scope->__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_cur_scope->__pyx_v_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_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 = 258; __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 = 258; __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 = 258; __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 = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_6 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_6)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_6);
    __pyx_t_6 = 0;

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

      /* "vcfnp.pyx":260
 *     for f in fields:
 *         if f not in transformers:
 *             transformers[f] = None             # <<<<<<<<<<<<<<
 *     return tuple(transformers[f] for f in fields)
 * 
 */
      if (unlikely(PyObject_SetItem(__pyx_cur_scope->__pyx_v_transformers, __pyx_v_f, Py_None) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L6;
    }
    __pyx_L6:;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "vcfnp.pyx":261
 *         if f not in transformers:
 *             transformers[f] = None
 *     return tuple(transformers[f] for f in fields)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __pyx_pf_5vcfnp_18_info_transformers_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "vcfnp.pyx":255
 * 
 * 
 * def _info_transformers(fields, transformers):             # <<<<<<<<<<<<<<
 *     if transformers is None:
 *         transformers = dict()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("vcfnp._info_transformers", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_f);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":264
 * 
 * 
 * def _variants_dtype(fields, dtypes, arities, filterIds, flatten_filter, infoTypes):             # <<<<<<<<<<<<<<
 * 
 *     dtype = list()
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_9_variants_dtype(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5vcfnp_8_variants_dtype[] = "_variants_dtype(fields, dtypes, arities, filterIds, flatten_filter, infoTypes)";
static PyMethodDef __pyx_mdef_5vcfnp_9_variants_dtype = {__Pyx_NAMESTR("_variants_dtype"), (PyCFunction)__pyx_pw_5vcfnp_9_variants_dtype, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5vcfnp_8_variants_dtype)};
static PyObject *__pyx_pw_5vcfnp_9_variants_dtype(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_fields = 0;
  PyObject *__pyx_v_dtypes = 0;
  PyObject *__pyx_v_arities = 0;
  PyObject *__pyx_v_filterIds = 0;
  PyObject *__pyx_v_flatten_filter = 0;
  PyObject *__pyx_v_infoTypes = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_variants_dtype (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fields,&__pyx_n_s_dtypes,&__pyx_n_s_arities,&__pyx_n_s_filterIds,&__pyx_n_s_flatten_filter,&__pyx_n_s_infoTypes,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_fields)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dtypes)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_variants_dtype", 1, 6, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arities)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_variants_dtype", 1, 6, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_filterIds)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_variants_dtype", 1, 6, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flatten_filter)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_variants_dtype", 1, 6, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __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("_variants_dtype", 1, 6, 6, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_variants_dtype") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __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_fields = values[0];
    __pyx_v_dtypes = values[1];
    __pyx_v_arities = values[2];
    __pyx_v_filterIds = values[3];
    __pyx_v_flatten_filter = values[4];
    __pyx_v_infoTypes = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_variants_dtype", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vcfnp._variants_dtype", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5vcfnp_8_variants_dtype(__pyx_self, __pyx_v_fields, __pyx_v_dtypes, __pyx_v_arities, __pyx_v_filterIds, __pyx_v_flatten_filter, __pyx_v_infoTypes);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vcfnp_8_variants_dtype(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fields, PyObject *__pyx_v_dtypes, PyObject *__pyx_v_arities, PyObject *__pyx_v_filterIds, PyObject *__pyx_v_flatten_filter, PyObject *__pyx_v_infoTypes) {
  PyObject *__pyx_v_dtype = NULL;
  PyObject *__pyx_v_f = NULL;
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_vcf_type = NULL;
  PyObject *__pyx_v_flt = NULL;
  PyObject *__pyx_v_nm = NULL;
  PyObject *__pyx_v_t = 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)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  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;
  Py_ssize_t __pyx_t_13;
  PyObject *(*__pyx_t_14)(PyObject *);
  int __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_variants_dtype", 0);

  /* "vcfnp.pyx":266
 * def _variants_dtype(fields, dtypes, arities, filterIds, flatten_filter, infoTypes):
 * 
 *     dtype = list()             # <<<<<<<<<<<<<<
 *     for f, n, vcf_type in zip(fields, arities, infoTypes):
 *         if f == 'FILTER' and flatten_filter:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_dtype = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "vcfnp.pyx":267
 * 
 *     dtype = list()
 *     for f, n, vcf_type in zip(fields, arities, infoTypes):             # <<<<<<<<<<<<<<
 *         if f == 'FILTER' and flatten_filter:
 *             # represent FILTER as multiple boolean fields
 */
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_fields);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_fields);
  __Pyx_GIVEREF(__pyx_v_fields);
  __Pyx_INCREF(__pyx_v_arities);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_arities);
  __Pyx_GIVEREF(__pyx_v_arities);
  __Pyx_INCREF(__pyx_v_infoTypes);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_infoTypes);
  __Pyx_GIVEREF(__pyx_v_infoTypes);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_1)) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_1)) {
      if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_2 = __pyx_t_4(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __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 != 3)) {
        if (size > 3) __Pyx_RaiseTooManyValuesError(3);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 2); 
      } else {
        __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
        __pyx_t_7 = PyList_GET_ITEM(sequence, 2); 
      }
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      #else
      __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __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 = 267; __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_5 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      index = 1; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      index = 2; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_9 = NULL;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_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 = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_XDECREF_SET(__pyx_v_vcf_type, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "vcfnp.pyx":268
 *     dtype = list()
 *     for f, n, vcf_type in zip(fields, arities, infoTypes):
 *         if f == 'FILTER' and flatten_filter:             # <<<<<<<<<<<<<<
 *             # represent FILTER as multiple boolean fields
 *             for flt in filterIds:
 */
    __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_v_f, __pyx_n_s_FILTER, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_10) {
      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_flatten_filter); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_12 = __pyx_t_11;
    } else {
      __pyx_t_12 = __pyx_t_10;
    }
    if (__pyx_t_12) {

      /* "vcfnp.pyx":270
 *         if f == 'FILTER' and flatten_filter:
 *             # represent FILTER as multiple boolean fields
 *             for flt in filterIds:             # <<<<<<<<<<<<<<
 *                 nm = 'FILTER_' + flt
 *                 dtype.append((nm, 'b1'))
 */
      if (PyList_CheckExact(__pyx_v_filterIds) || PyTuple_CheckExact(__pyx_v_filterIds)) {
        __pyx_t_2 = __pyx_v_filterIds; __Pyx_INCREF(__pyx_t_2); __pyx_t_13 = 0;
        __pyx_t_14 = NULL;
      } else {
        __pyx_t_13 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_filterIds); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_14 = Py_TYPE(__pyx_t_2)->tp_iternext;
      }
      for (;;) {
        if (!__pyx_t_14 && PyList_CheckExact(__pyx_t_2)) {
          if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_13); __Pyx_INCREF(__pyx_t_7); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else if (!__pyx_t_14 && PyTuple_CheckExact(__pyx_t_2)) {
          if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_13); __Pyx_INCREF(__pyx_t_7); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else {
          __pyx_t_7 = __pyx_t_14(__pyx_t_2);
          if (unlikely(!__pyx_t_7)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, 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_7);
        }
        __Pyx_XDECREF_SET(__pyx_v_flt, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "vcfnp.pyx":271
 *             # represent FILTER as multiple boolean fields
 *             for flt in filterIds:
 *                 nm = 'FILTER_' + flt             # <<<<<<<<<<<<<<
 *                 dtype.append((nm, 'b1'))
 *         elif f == 'FILTER' and not flatten_filter:
 */
        __pyx_t_7 = PyNumber_Add(__pyx_n_s_FILTER_2, __pyx_v_flt); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_XDECREF_SET(__pyx_v_nm, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "vcfnp.pyx":272
 *             for flt in filterIds:
 *                 nm = 'FILTER_' + flt
 *                 dtype.append((nm, 'b1'))             # <<<<<<<<<<<<<<
 *         elif f == 'FILTER' and not flatten_filter:
 *             # represent FILTER as a structured datatype
 */
        __pyx_t_7 = PyTuple_New(2); 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_INCREF(__pyx_v_nm);
        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_nm);
        __Pyx_GIVEREF(__pyx_v_nm);
        __Pyx_INCREF(__pyx_n_s_b1);
        PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_b1);
        __Pyx_GIVEREF(__pyx_n_s_b1);
        __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_dtype, __pyx_t_7); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L7;
    }

    /* "vcfnp.pyx":273
 *                 nm = 'FILTER_' + flt
 *                 dtype.append((nm, 'b1'))
 *         elif f == 'FILTER' and not flatten_filter:             # <<<<<<<<<<<<<<
 *             # represent FILTER as a structured datatype
 *             t = [(flt, 'b1') for flt in filterIds]
 */
    __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_v_f, __pyx_n_s_FILTER, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_12) {
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_flatten_filter); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_11 = (!__pyx_t_10);
      __pyx_t_10 = __pyx_t_11;
    } else {
      __pyx_t_10 = __pyx_t_12;
    }
    if (__pyx_t_10) {

      /* "vcfnp.pyx":275
 *         elif f == 'FILTER' and not flatten_filter:
 *             # represent FILTER as a structured datatype
 *             t = [(flt, 'b1') for flt in filterIds]             # <<<<<<<<<<<<<<
 *             dtype.append((f, t))
 *         else:
 */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      if (PyList_CheckExact(__pyx_v_filterIds) || PyTuple_CheckExact(__pyx_v_filterIds)) {
        __pyx_t_7 = __pyx_v_filterIds; __Pyx_INCREF(__pyx_t_7); __pyx_t_13 = 0;
        __pyx_t_14 = NULL;
      } else {
        __pyx_t_13 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_filterIds); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_14 = Py_TYPE(__pyx_t_7)->tp_iternext;
      }
      for (;;) {
        if (!__pyx_t_14 && PyList_CheckExact(__pyx_t_7)) {
          if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_13); __Pyx_INCREF(__pyx_t_6); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else if (!__pyx_t_14 && PyTuple_CheckExact(__pyx_t_7)) {
          if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_13); __Pyx_INCREF(__pyx_t_6); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else {
          __pyx_t_6 = __pyx_t_14(__pyx_t_7);
          if (unlikely(!__pyx_t_6)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_6);
        }
        __Pyx_XDECREF_SET(__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 = 275; __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(__pyx_n_s_b1);
        PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_b1);
        __Pyx_GIVEREF(__pyx_n_s_b1);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "vcfnp.pyx":276
 *             # represent FILTER as a structured datatype
 *             t = [(flt, 'b1') for flt in filterIds]
 *             dtype.append((f, t))             # <<<<<<<<<<<<<<
 *         else:
 *             if dtypes is not None and f in dtypes:
 */
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_f);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_f);
      __Pyx_GIVEREF(__pyx_v_f);
      __Pyx_INCREF(__pyx_v_t);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_t);
      __Pyx_GIVEREF(__pyx_v_t);
      __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_dtype, __pyx_t_2); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L7;
    }
    /*else*/ {

      /* "vcfnp.pyx":278
 *             dtype.append((f, t))
 *         else:
 *             if dtypes is not None and f in dtypes:             # <<<<<<<<<<<<<<
 *                 # user overrides default dtype
 *                 t = dtypes[f]
 */
      __pyx_t_10 = (__pyx_v_dtypes != Py_None);
      if ((__pyx_t_10 != 0)) {
        __pyx_t_12 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_v_dtypes, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_11 = (__pyx_t_12 != 0);
      } else {
        __pyx_t_11 = (__pyx_t_10 != 0);
      }
      if (__pyx_t_11) {

        /* "vcfnp.pyx":280
 *             if dtypes is not None and f in dtypes:
 *                 # user overrides default dtype
 *                 t = dtypes[f]             # <<<<<<<<<<<<<<
 *             elif f in STANDARD_VARIANT_FIELDS:
 *                 t = DEFAULT_VARIANT_DTYPE[f]
 */
        __pyx_t_2 = PyObject_GetItem(__pyx_v_dtypes, __pyx_v_f); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_2);
        __pyx_t_2 = 0;
        goto __pyx_L12;
      }

      /* "vcfnp.pyx":281
 *                 # user overrides default dtype
 *                 t = dtypes[f]
 *             elif f in STANDARD_VARIANT_FIELDS:             # <<<<<<<<<<<<<<
 *                 t = DEFAULT_VARIANT_DTYPE[f]
 *             elif f in DEFAULT_INFO_DTYPE:
 */
      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_STANDARD_VARIANT_FIELDS); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_11 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_10 = (__pyx_t_11 != 0);
      if (__pyx_t_10) {

        /* "vcfnp.pyx":282
 *                 t = dtypes[f]
 *             elif f in STANDARD_VARIANT_FIELDS:
 *                 t = DEFAULT_VARIANT_DTYPE[f]             # <<<<<<<<<<<<<<
 *             elif f in DEFAULT_INFO_DTYPE:
 *                 # known INFO field
 */
        __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_VARIANT_DTYPE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_7 = PyObject_GetItem(__pyx_t_2, __pyx_v_f); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_7);
        __pyx_t_7 = 0;
        goto __pyx_L12;
      }

      /* "vcfnp.pyx":283
 *             elif f in STANDARD_VARIANT_FIELDS:
 *                 t = DEFAULT_VARIANT_DTYPE[f]
 *             elif f in DEFAULT_INFO_DTYPE:             # <<<<<<<<<<<<<<
 *                 # known INFO field
 *                 t = DEFAULT_INFO_DTYPE[f]
 */
      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_INFO_DTYPE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_10 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_t_7, Py_EQ)); if (unlikely(__pyx_t_10 < 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;
      __pyx_t_11 = (__pyx_t_10 != 0);
      if (__pyx_t_11) {

        /* "vcfnp.pyx":285
 *             elif f in DEFAULT_INFO_DTYPE:
 *                 # known INFO field
 *                 t = DEFAULT_INFO_DTYPE[f]             # <<<<<<<<<<<<<<
 *             else:
 *                 t = DEFAULT_TYPE_MAP[vcf_type]
 */
        __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_INFO_DTYPE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_2 = PyObject_GetItem(__pyx_t_7, __pyx_v_f); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_2);
        __pyx_t_2 = 0;
        goto __pyx_L12;
      }
      /*else*/ {

        /* "vcfnp.pyx":287
 *                 t = DEFAULT_INFO_DTYPE[f]
 *             else:
 *                 t = DEFAULT_TYPE_MAP[vcf_type]             # <<<<<<<<<<<<<<
 *             if n == 1:
 *                 dtype.append((f, t))
 */
        __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_TYPE_MAP); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_7 = PyObject_GetItem(__pyx_t_2, __pyx_v_vcf_type); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_7);
        __pyx_t_7 = 0;
      }
      __pyx_L12:;

      /* "vcfnp.pyx":288
 *             else:
 *                 t = DEFAULT_TYPE_MAP[vcf_type]
 *             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 = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__pyx_t_11) {

        /* "vcfnp.pyx":289
 *                 t = DEFAULT_TYPE_MAP[vcf_type]
 *             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 = 289; __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_15 = __Pyx_PyList_Append(__pyx_v_dtype, __pyx_t_7); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L13;
      }
      /*else*/ {

        /* "vcfnp.pyx":291
 *                 dtype.append((f, t))
 *             else:
 *                 dtype.append((f, t, (n,)))             # <<<<<<<<<<<<<<
 * 
 *     return dtype
 */
        __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __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_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_v_f);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_f);
        __Pyx_GIVEREF(__pyx_v_f);
        __Pyx_INCREF(__pyx_v_t);
        PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_t);
        __Pyx_GIVEREF(__pyx_v_t);
        PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_7);
        __pyx_t_7 = 0;
        __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_dtype, __pyx_t_2); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __pyx_L13:;
    }
    __pyx_L7:;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":293
 *                 dtype.append((f, t, (n,)))
 * 
 *     return dtype             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_dtype);
  __pyx_r = __pyx_v_dtype;
  goto __pyx_L0;

  /* "vcfnp.pyx":264
 * 
 * 
 * def _variants_dtype(fields, dtypes, arities, filterIds, flatten_filter, infoTypes):             # <<<<<<<<<<<<<<
 * 
 *     dtype = list()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("vcfnp._variants_dtype", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dtype);
  __Pyx_XDECREF(__pyx_v_f);
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_vcf_type);
  __Pyx_XDECREF(__pyx_v_flt);
  __Pyx_XDECREF(__pyx_v_nm);
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":296
 * 
 * 
 * def _filenames_from_arg(filename):             # <<<<<<<<<<<<<<
 *     if isinstance(filename, basestring):
 *         filenames = [filename]
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_11_filenames_from_arg(PyObject *__pyx_self, PyObject *__pyx_v_filename); /*proto*/
static char __pyx_doc_5vcfnp_10_filenames_from_arg[] = "_filenames_from_arg(filename)";
static PyMethodDef __pyx_mdef_5vcfnp_11_filenames_from_arg = {__Pyx_NAMESTR("_filenames_from_arg"), (PyCFunction)__pyx_pw_5vcfnp_11_filenames_from_arg, METH_O, __Pyx_DOCSTR(__pyx_doc_5vcfnp_10_filenames_from_arg)};
static PyObject *__pyx_pw_5vcfnp_11_filenames_from_arg(PyObject *__pyx_self, PyObject *__pyx_v_filename) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_filenames_from_arg (wrapper)", 0);
  __pyx_r = __pyx_pf_5vcfnp_10_filenames_from_arg(__pyx_self, ((PyObject *)__pyx_v_filename));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vcfnp_10_filenames_from_arg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename) {
  PyObject *__pyx_v_filenames = NULL;
  PyObject *__pyx_v_fn = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_filenames_from_arg", 0);

  /* "vcfnp.pyx":297
 * 
 * def _filenames_from_arg(filename):
 *     if isinstance(filename, basestring):             # <<<<<<<<<<<<<<
 *         filenames = [filename]
 *     elif isinstance(filename, (list, tuple)):
 */
  __pyx_t_1 = __Pyx_PyBaseString_Check(__pyx_v_filename); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "vcfnp.pyx":298
 * def _filenames_from_arg(filename):
 *     if isinstance(filename, basestring):
 *         filenames = [filename]             # <<<<<<<<<<<<<<
 *     elif isinstance(filename, (list, tuple)):
 *         filenames = filename
 */
    __pyx_t_3 = PyList_New(1); 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_INCREF(__pyx_v_filename);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_filename);
    __Pyx_GIVEREF(__pyx_v_filename);
    __pyx_v_filenames = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3;
  }

  /* "vcfnp.pyx":299
 *     if isinstance(filename, basestring):
 *         filenames = [filename]
 *     elif isinstance(filename, (list, tuple)):             # <<<<<<<<<<<<<<
 *         filenames = filename
 *     else:
 */
  __pyx_t_2 = PyList_Check(__pyx_v_filename); 
  if (!__pyx_t_2) {
    __pyx_t_1 = PyTuple_Check(__pyx_v_filename); 
    __pyx_t_4 = __pyx_t_1;
  } else {
    __pyx_t_4 = __pyx_t_2;
  }
  __pyx_t_2 = (__pyx_t_4 != 0);
  if (__pyx_t_2) {

    /* "vcfnp.pyx":300
 *         filenames = [filename]
 *     elif isinstance(filename, (list, tuple)):
 *         filenames = filename             # <<<<<<<<<<<<<<
 *     else:
 *         raise Exception('filename argument must be basestring, list or tuple')
 */
    __Pyx_INCREF(__pyx_v_filename);
    __pyx_v_filenames = __pyx_v_filename;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "vcfnp.pyx":302
 *         filenames = filename
 *     else:
 *         raise Exception('filename argument must be basestring, list or tuple')             # <<<<<<<<<<<<<<
 *     for fn in filenames:
 *         if not os.path.exists(fn):
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __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[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L3:;

  /* "vcfnp.pyx":303
 *     else:
 *         raise Exception('filename argument must be basestring, list or tuple')
 *     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_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_filenames); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_3)) {
      if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_7 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_7 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_3)) {
      if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_7 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_7 = __pyx_t_6(__pyx_t_3);
      if (unlikely(!__pyx_t_7)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_7);
    }
    __Pyx_XDECREF_SET(__pyx_v_fn, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "vcfnp.pyx":304
 *         raise Exception('filename argument must be basestring, list or tuple')
 *     for fn in filenames:
 *         if not os.path.exists(fn):             # <<<<<<<<<<<<<<
 *             raise Exception('file not found: %s' % fn)
 *     return filenames
 */
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_path); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_exists); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_v_fn);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_fn);
    __Pyx_GIVEREF(__pyx_v_fn);
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_4 = ((!__pyx_t_2) != 0);
    if (__pyx_t_4) {

      /* "vcfnp.pyx":305
 *     for fn in filenames:
 *         if not os.path.exists(fn):
 *             raise Exception('file not found: %s' % fn)             # <<<<<<<<<<<<<<
 *     return filenames
 * 
 */
      __pyx_t_9 = __Pyx_PyString_Format(__pyx_kp_s_file_not_found_s, __pyx_v_fn); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = PyTuple_New(1); 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);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_9);
      __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "vcfnp.pyx":306
 *         if not os.path.exists(fn):
 *             raise Exception('file not found: %s' % fn)
 *     return filenames             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_filenames);
  __pyx_r = __pyx_v_filenames;
  goto __pyx_L0;

  /* "vcfnp.pyx":296
 * 
 * 
 * def _filenames_from_arg(filename):             # <<<<<<<<<<<<<<
 *     if isinstance(filename, basestring):
 *         filenames = [filename]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("vcfnp._filenames_from_arg", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_filenames);
  __Pyx_XDECREF(__pyx_v_fn);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":309
 * 
 * 
 * def _setup_variants(filename,             # <<<<<<<<<<<<<<
 *                     region,
 *                     fields,
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_13_setup_variants(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5vcfnp_12_setup_variants[] = "_setup_variants(filename, region, fields, exclude_fields, arities, fills, transformers, vcf_types, flatten_filter)";
static PyMethodDef __pyx_mdef_5vcfnp_13_setup_variants = {__Pyx_NAMESTR("_setup_variants"), (PyCFunction)__pyx_pw_5vcfnp_13_setup_variants, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5vcfnp_12_setup_variants)};
static PyObject *__pyx_pw_5vcfnp_13_setup_variants(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_arities = 0;
  PyObject *__pyx_v_fills = 0;
  PyObject *__pyx_v_transformers = 0;
  PyObject *__pyx_v_vcf_types = 0;
  PyObject *__pyx_v_flatten_filter = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_setup_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_arities,&__pyx_n_s_fills,&__pyx_n_s_transformers,&__pyx_n_s_vcf_types,&__pyx_n_s_flatten_filter,0};
    PyObject* values[9] = {0,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  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 (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_region)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_setup_variants", 1, 9, 9, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __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("_setup_variants", 1, 9, 9, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exclude_fields)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_setup_variants", 1, 9, 9, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arities)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_setup_variants", 1, 9, 9, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fills)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_setup_variants", 1, 9, 9, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __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("_setup_variants", 1, 9, 9, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  7:
        if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_vcf_types)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_setup_variants", 1, 9, 9, 7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  8:
        if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flatten_filter)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_setup_variants", 1, 9, 9, 8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_setup_variants") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 9) {
      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);
      values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
    }
    __pyx_v_filename = values[0];
    __pyx_v_region = values[1];
    __pyx_v_fields = values[2];
    __pyx_v_exclude_fields = values[3];
    __pyx_v_arities = values[4];
    __pyx_v_fills = values[5];
    __pyx_v_transformers = values[6];
    __pyx_v_vcf_types = values[7];
    __pyx_v_flatten_filter = values[8];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_setup_variants", 1, 9, 9, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vcfnp._setup_variants", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5vcfnp_12_setup_variants(__pyx_self, __pyx_v_filename, __pyx_v_region, __pyx_v_fields, __pyx_v_exclude_fields, __pyx_v_arities, __pyx_v_fills, __pyx_v_transformers, __pyx_v_vcf_types, __pyx_v_flatten_filter);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_5vcfnp_15_setup_variants_2generator9(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "vcfnp.pyx":352
 *             infoTypes[f] = TYPESTRING2KEY[vcf_types[f]]
 * 
 *     infoTypes = tuple(infoTypes[f] if f in infoTypes else -1 for f in fields)             # <<<<<<<<<<<<<<
 *     infoCounts = tuple(infoCounts[f] if f in infoCounts else -1 for f in fields)
 * 
 */

static PyObject *__pyx_pf_5vcfnp_15_setup_variants_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_7_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_7_genexpr *)__pyx_tp_new_5vcfnp___pyx_scope_struct_7_genexpr(__pyx_ptype_5vcfnp___pyx_scope_struct_7_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_6__setup_variants *) __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_15_setup_variants_2generator9, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("vcfnp._setup_variants.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_15_setup_variants_2generator9(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5vcfnp___pyx_scope_struct_7_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_7_genexpr *)__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;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = 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 = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields)) { __Pyx_RaiseClosureNameError("fields"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  if (PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields; __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_outer_scope->__pyx_v_fields); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __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 = 352; __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 = 352; __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 = 352; __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 = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_f);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_f, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_infoTypes)) { __Pyx_RaiseClosureNameError("infoTypes"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    __pyx_t_5 = (__Pyx_PySequence_Contains(__pyx_cur_scope->__pyx_v_f, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_infoTypes, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if ((__pyx_t_5 != 0)) {
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_infoTypes)) { __Pyx_RaiseClosureNameError("infoTypes"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
      __pyx_t_6 = PyObject_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_infoTypes, __pyx_cur_scope->__pyx_v_f); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 = __pyx_t_6;
      __pyx_t_6 = 0;
    } else {
      __Pyx_INCREF(__pyx_int_neg_1);
      __pyx_t_4 = __pyx_int_neg_1;
    }
    __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_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_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 = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __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;
}
static PyObject *__pyx_gb_5vcfnp_15_setup_variants_5generator10(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "vcfnp.pyx":353
 * 
 *     infoTypes = tuple(infoTypes[f] if f in infoTypes else -1 for f in fields)
 *     infoCounts = tuple(infoCounts[f] if f in infoCounts else -1 for f in fields)             # <<<<<<<<<<<<<<
 * 
 *     # determine expected number of values for each field
 */

static PyObject *__pyx_pf_5vcfnp_15_setup_variants_3genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_8_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_8_genexpr *)__pyx_tp_new_5vcfnp___pyx_scope_struct_8_genexpr(__pyx_ptype_5vcfnp___pyx_scope_struct_8_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_6__setup_variants *) __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_15_setup_variants_5generator10, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("vcfnp._setup_variants.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_15_setup_variants_5generator10(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5vcfnp___pyx_scope_struct_8_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_8_genexpr *)__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;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = 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 = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields)) { __Pyx_RaiseClosureNameError("fields"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  if (PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields; __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_outer_scope->__pyx_v_fields); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __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 = 353; __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 = 353; __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 = 353; __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 = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_f);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_f, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_infoCounts)) { __Pyx_RaiseClosureNameError("infoCounts"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    __pyx_t_5 = (__Pyx_PySequence_Contains(__pyx_cur_scope->__pyx_v_f, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_infoCounts, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if ((__pyx_t_5 != 0)) {
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_infoCounts)) { __Pyx_RaiseClosureNameError("infoCounts"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
      __pyx_t_6 = PyObject_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_infoCounts, __pyx_cur_scope->__pyx_v_f); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 = __pyx_t_6;
      __pyx_t_6 = 0;
    } else {
      __Pyx_INCREF(__pyx_int_neg_1);
      __pyx_t_4 = __pyx_int_neg_1;
    }
    __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_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_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 = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __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":309
 * 
 * 
 * def _setup_variants(filename,             # <<<<<<<<<<<<<<
 *                     region,
 *                     fields,
 */

static PyObject *__pyx_pf_5vcfnp_12_setup_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_arities, PyObject *__pyx_v_fills, PyObject *__pyx_v_transformers, PyObject *__pyx_v_vcf_types, PyObject *__pyx_v_flatten_filter) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_6__setup_variants *__pyx_cur_scope;
  PyObject *__pyx_v_filenames = NULL;
  struct __pyx_obj_6vcflib_PyVariantCallFile *__pyx_v_vcf = NULL;
  PyObject *__pyx_v_filterIds = NULL;
  PyObject *__pyx_v_infoIds = NULL;
  PyObject *__pyx_v_parseInfo = NULL;
  PyObject *__pyx_v_f = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_setup_variants", 0);
  __pyx_cur_scope = (struct __pyx_obj_5vcfnp___pyx_scope_struct_6__setup_variants *)__pyx_tp_new_5vcfnp___pyx_scope_struct_6__setup_variants(__pyx_ptype_5vcfnp___pyx_scope_struct_6__setup_variants, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_fields = __pyx_v_fields;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fields);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fields);
  __Pyx_INCREF(__pyx_v_arities);
  __Pyx_INCREF(__pyx_v_fills);
  __Pyx_INCREF(__pyx_v_transformers);

  /* "vcfnp.pyx":319
 *                     flatten_filter):
 * 
 *     filenames = _filenames_from_arg(filename)             # <<<<<<<<<<<<<<
 * 
 *     # extract definitions from VCF header
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_filenames_from_arg); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_filename);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_filename);
  __Pyx_GIVEREF(__pyx_v_filename);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_filenames = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "vcfnp.pyx":322
 * 
 *     # extract definitions from VCF header
 *     vcf = PyVariantCallFile(filenames[0])             # <<<<<<<<<<<<<<
 *     # FILTER definitions
 *     filterIds = vcf.filterIds
 */
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_filenames, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __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 = 322; __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 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6vcflib_PyVariantCallFile)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_vcf = ((struct __pyx_obj_6vcflib_PyVariantCallFile *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "vcfnp.pyx":324
 *     vcf = PyVariantCallFile(filenames[0])
 *     # FILTER definitions
 *     filterIds = vcf.filterIds             # <<<<<<<<<<<<<<
 *     _warn_duplicates(filterIds)
 *     filterIds = sorted(set(filterIds))
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_vcf), __pyx_n_s_filterIds); 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_v_filterIds = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "vcfnp.pyx":325
 *     # FILTER definitions
 *     filterIds = vcf.filterIds
 *     _warn_duplicates(filterIds)             # <<<<<<<<<<<<<<
 *     filterIds = sorted(set(filterIds))
 *     if 'PASS' not in filterIds:
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_warn_duplicates); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __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 = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_filterIds);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_filterIds);
  __Pyx_GIVEREF(__pyx_v_filterIds);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":326
 *     filterIds = vcf.filterIds
 *     _warn_duplicates(filterIds)
 *     filterIds = sorted(set(filterIds))             # <<<<<<<<<<<<<<
 *     if 'PASS' not in filterIds:
 *         filterIds.append('PASS')
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_filterIds);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_filterIds);
  __Pyx_GIVEREF(__pyx_v_filterIds);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_sorted, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF_SET(__pyx_v_filterIds, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "vcfnp.pyx":327
 *     _warn_duplicates(filterIds)
 *     filterIds = sorted(set(filterIds))
 *     if 'PASS' not in filterIds:             # <<<<<<<<<<<<<<
 *         filterIds.append('PASS')
 *     filterIds = tuple(filterIds)
 */
  __pyx_t_4 = (__Pyx_PySequence_Contains(__pyx_n_s_PASS, __pyx_v_filterIds, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

    /* "vcfnp.pyx":328
 *     filterIds = sorted(set(filterIds))
 *     if 'PASS' not in filterIds:
 *         filterIds.append('PASS')             # <<<<<<<<<<<<<<
 *     filterIds = tuple(filterIds)
 *     # INFO definitions
 */
    __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_filterIds, __pyx_n_s_PASS); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "vcfnp.pyx":329
 *     if 'PASS' not in filterIds:
 *         filterIds.append('PASS')
 *     filterIds = tuple(filterIds)             # <<<<<<<<<<<<<<
 *     # INFO definitions
 *     _warn_duplicates(vcf.infoIds)
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_filterIds);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_filterIds);
  __Pyx_GIVEREF(__pyx_v_filterIds);
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_filterIds, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "vcfnp.pyx":331
 *     filterIds = tuple(filterIds)
 *     # INFO definitions
 *     _warn_duplicates(vcf.infoIds)             # <<<<<<<<<<<<<<
 *     infoIds = tuple(sorted(set(vcf.infoIds)))
 *     infoTypes = vcf.infoTypes
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_warn_duplicates); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_vcf), __pyx_n_s_infoIds); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":332
 *     # INFO definitions
 *     _warn_duplicates(vcf.infoIds)
 *     infoIds = tuple(sorted(set(vcf.infoIds)))             # <<<<<<<<<<<<<<
 *     infoTypes = vcf.infoTypes
 *     infoCounts = vcf.infoCounts
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_vcf), __pyx_n_s_infoIds); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __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 = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_sorted, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __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 = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_infoIds = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "vcfnp.pyx":333
 *     _warn_duplicates(vcf.infoIds)
 *     infoIds = tuple(sorted(set(vcf.infoIds)))
 *     infoTypes = vcf.infoTypes             # <<<<<<<<<<<<<<
 *     infoCounts = vcf.infoCounts
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_vcf), __pyx_n_s_infoTypes); 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);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_cur_scope->__pyx_v_infoTypes = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "vcfnp.pyx":334
 *     infoIds = tuple(sorted(set(vcf.infoIds)))
 *     infoTypes = vcf.infoTypes
 *     infoCounts = vcf.infoCounts             # <<<<<<<<<<<<<<
 * 
 *     # determine fields to extract
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_vcf), __pyx_n_s_infoCounts); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_cur_scope->__pyx_v_infoCounts = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "vcfnp.pyx":337
 * 
 *     # determine fields to extract
 *     fields = _variants_fields(fields, exclude_fields, infoIds)             # <<<<<<<<<<<<<<
 * 
 *     # determine if we need to parse the INFO field
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_variants_fields); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fields);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_v_fields);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fields);
  __Pyx_INCREF(__pyx_v_exclude_fields);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_exclude_fields);
  __Pyx_GIVEREF(__pyx_v_exclude_fields);
  __Pyx_INCREF(__pyx_v_infoIds);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_infoIds);
  __Pyx_GIVEREF(__pyx_v_infoIds);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); 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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_fields);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_fields, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "vcfnp.pyx":340
 * 
 *     # determine if we need to parse the INFO field
 *     parseInfo = any([f not in STANDARD_VARIANT_FIELDS for f in fields])             # <<<<<<<<<<<<<<
 * 
 *     # support for working around VCFs with bad INFO headers
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_fields) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_fields)) {
    __pyx_t_3 = __pyx_cur_scope->__pyx_v_fields; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_fields); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_3)) {
      if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_3)) {
      if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_2 = __pyx_t_8(__pyx_t_3);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_STANDARD_VARIANT_FIELDS); 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_5 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_t_2, Py_NE)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_5); 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);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __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 = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_any, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_parseInfo = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "vcfnp.pyx":343
 * 
 *     # support for working around VCFs with bad INFO headers
 *     for f in fields:             # <<<<<<<<<<<<<<
 *         if f not in STANDARD_VARIANT_FIELDS and f not in infoIds:
 *             # fall back to unary string; can be overridden with vcf_types, dtypes and arities args
 */
  if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_fields) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_fields)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_fields; __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_fields); 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_8 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_1)) {
      if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_1)) {
      if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_3 = __pyx_t_8(__pyx_t_1);
      if (unlikely(!__pyx_t_3)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "vcfnp.pyx":344
 *     # support for working around VCFs with bad INFO headers
 *     for f in fields:
 *         if f not in STANDARD_VARIANT_FIELDS and f not in infoIds:             # <<<<<<<<<<<<<<
 *             # fall back to unary string; can be overridden with vcf_types, dtypes and arities args
 *             infoTypes[f] = FIELD_STRING
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_STANDARD_VARIANT_FIELDS); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_t_3, Py_NE)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if ((__pyx_t_5 != 0)) {
      __pyx_t_4 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_v_infoIds, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_9 = (__pyx_t_4 != 0);
    } else {
      __pyx_t_9 = (__pyx_t_5 != 0);
    }
    if (__pyx_t_9) {

      /* "vcfnp.pyx":346
 *         if f not in STANDARD_VARIANT_FIELDS and f not in infoIds:
 *             # fall back to unary string; can be overridden with vcf_types, dtypes and arities args
 *             infoTypes[f] = FIELD_STRING             # <<<<<<<<<<<<<<
 *             infoCounts[f] = 1
 *         if vcf_types is not None and f in vcf_types:
 */
      __pyx_t_3 = PyInt_FromLong(vcf::FIELD_STRING); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      if (unlikely(PyObject_SetItem(__pyx_cur_scope->__pyx_v_infoTypes, __pyx_v_f, __pyx_t_3) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "vcfnp.pyx":347
 *             # fall back to unary string; can be overridden with vcf_types, dtypes and arities args
 *             infoTypes[f] = FIELD_STRING
 *             infoCounts[f] = 1             # <<<<<<<<<<<<<<
 *         if vcf_types is not None and f in vcf_types:
 *             # override type declared in VCF header
 */
      if (unlikely(PyObject_SetItem(__pyx_cur_scope->__pyx_v_infoCounts, __pyx_v_f, __pyx_int_1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "vcfnp.pyx":348
 *             infoTypes[f] = FIELD_STRING
 *             infoCounts[f] = 1
 *         if vcf_types is not None and f in vcf_types:             # <<<<<<<<<<<<<<
 *             # override type declared in VCF header
 *             infoTypes[f] = TYPESTRING2KEY[vcf_types[f]]
 */
    __pyx_t_9 = (__pyx_v_vcf_types != Py_None);
    if ((__pyx_t_9 != 0)) {
      __pyx_t_5 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_v_vcf_types, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_4 = (__pyx_t_5 != 0);
    } else {
      __pyx_t_4 = (__pyx_t_9 != 0);
    }
    if (__pyx_t_4) {

      /* "vcfnp.pyx":350
 *         if vcf_types is not None and f in vcf_types:
 *             # override type declared in VCF header
 *             infoTypes[f] = TYPESTRING2KEY[vcf_types[f]]             # <<<<<<<<<<<<<<
 * 
 *     infoTypes = tuple(infoTypes[f] if f in infoTypes else -1 for f in fields)
 */
      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_TYPESTRING2KEY); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PyObject_GetItem(__pyx_v_vcf_types, __pyx_v_f); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_10 = PyObject_GetItem(__pyx_t_3, __pyx_t_2); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(PyObject_SetItem(__pyx_cur_scope->__pyx_v_infoTypes, __pyx_v_f, __pyx_t_10) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      goto __pyx_L9;
    }
    __pyx_L9:;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":352
 *             infoTypes[f] = TYPESTRING2KEY[vcf_types[f]]
 * 
 *     infoTypes = tuple(infoTypes[f] if f in infoTypes else -1 for f in fields)             # <<<<<<<<<<<<<<
 *     infoCounts = tuple(infoCounts[f] if f in infoCounts else -1 for f in fields)
 * 
 */
  __pyx_t_1 = __pyx_pf_5vcfnp_15_setup_variants_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __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);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_infoTypes);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_infoTypes, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "vcfnp.pyx":353
 * 
 *     infoTypes = tuple(infoTypes[f] if f in infoTypes else -1 for f in fields)
 *     infoCounts = tuple(infoCounts[f] if f in infoCounts else -1 for f in fields)             # <<<<<<<<<<<<<<
 * 
 *     # determine expected number of values for each field
 */
  __pyx_t_1 = __pyx_pf_5vcfnp_15_setup_variants_3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __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);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_infoCounts);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_infoCounts, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "vcfnp.pyx":356
 * 
 *     # determine expected number of values for each field
 *     arities = _variants_arities(fields, arities, infoCounts)             # <<<<<<<<<<<<<<
 * 
 *     # determine fill values to use where number of values is less than expectation
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_variants_arities); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fields);
  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_cur_scope->__pyx_v_fields);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fields);
  __Pyx_INCREF(__pyx_v_arities);
  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_arities);
  __Pyx_GIVEREF(__pyx_v_arities);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_infoCounts);
  PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_cur_scope->__pyx_v_infoCounts);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_infoCounts);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF_SET(__pyx_v_arities, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "vcfnp.pyx":359
 * 
 *     # determine fill values to use where number of values is less than expectation
 *     fills = _variants_fills(fields, fills, infoTypes)             # <<<<<<<<<<<<<<
 * 
 *     # initialise INFO field transformers
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_variants_fills); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fields);
  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_cur_scope->__pyx_v_fields);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fields);
  __Pyx_INCREF(__pyx_v_fills);
  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_fills);
  __Pyx_GIVEREF(__pyx_v_fills);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_infoTypes);
  PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_cur_scope->__pyx_v_infoTypes);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_infoTypes);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF_SET(__pyx_v_fills, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "vcfnp.pyx":362
 * 
 *     # initialise INFO field transformers
 *     transformers = _info_transformers(fields, transformers)             # <<<<<<<<<<<<<<
 * 
 *     return filenames, region, fields, arities, fills, infoTypes, transformers, parseInfo, filterIds, flatten_filter
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_info_transformers); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fields);
  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_cur_scope->__pyx_v_fields);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fields);
  __Pyx_INCREF(__pyx_v_transformers);
  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_transformers);
  __Pyx_GIVEREF(__pyx_v_transformers);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF_SET(__pyx_v_transformers, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "vcfnp.pyx":364
 *     transformers = _info_transformers(fields, transformers)
 * 
 *     return filenames, region, fields, arities, fills, infoTypes, transformers, parseInfo, filterIds, flatten_filter             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyTuple_New(10); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_filenames);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_filenames);
  __Pyx_GIVEREF(__pyx_v_filenames);
  __Pyx_INCREF(__pyx_v_region);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_region);
  __Pyx_GIVEREF(__pyx_v_region);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fields);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_cur_scope->__pyx_v_fields);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fields);
  __Pyx_INCREF(__pyx_v_arities);
  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_arities);
  __Pyx_GIVEREF(__pyx_v_arities);
  __Pyx_INCREF(__pyx_v_fills);
  PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_fills);
  __Pyx_GIVEREF(__pyx_v_fills);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_infoTypes);
  PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_cur_scope->__pyx_v_infoTypes);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_infoTypes);
  __Pyx_INCREF(__pyx_v_transformers);
  PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_v_transformers);
  __Pyx_GIVEREF(__pyx_v_transformers);
  __Pyx_INCREF(__pyx_v_parseInfo);
  PyTuple_SET_ITEM(__pyx_t_2, 7, __pyx_v_parseInfo);
  __Pyx_GIVEREF(__pyx_v_parseInfo);
  __Pyx_INCREF(__pyx_v_filterIds);
  PyTuple_SET_ITEM(__pyx_t_2, 8, __pyx_v_filterIds);
  __Pyx_GIVEREF(__pyx_v_filterIds);
  __Pyx_INCREF(__pyx_v_flatten_filter);
  PyTuple_SET_ITEM(__pyx_t_2, 9, __pyx_v_flatten_filter);
  __Pyx_GIVEREF(__pyx_v_flatten_filter);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vcfnp.pyx":309
 * 
 * 
 * def _setup_variants(filename,             # <<<<<<<<<<<<<<
 *                     region,
 *                     fields,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("vcfnp._setup_variants", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_filenames);
  __Pyx_XDECREF((PyObject *)__pyx_v_vcf);
  __Pyx_XDECREF(__pyx_v_filterIds);
  __Pyx_XDECREF(__pyx_v_infoIds);
  __Pyx_XDECREF(__pyx_v_parseInfo);
  __Pyx_XDECREF(__pyx_v_f);
  __Pyx_XDECREF(__pyx_v_arities);
  __Pyx_XDECREF(__pyx_v_fills);
  __Pyx_XDECREF(__pyx_v_transformers);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":367
 * 
 * 
 * def log(logstream, *msg):             # <<<<<<<<<<<<<<
 *     print >>logstream, '[vcfnp] ' + str(datetime.now()) + ' :: ' + ' '.join([str(m) for m in msg])
 *     sys.stderr.flush()
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_15log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5vcfnp_14log[] = "log(logstream, *msg)";
static PyMethodDef __pyx_mdef_5vcfnp_15log = {__Pyx_NAMESTR("log"), (PyCFunction)__pyx_pw_5vcfnp_15log, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5vcfnp_14log)};
static PyObject *__pyx_pw_5vcfnp_15log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_logstream = 0;
  PyObject *__pyx_v_msg = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("log (wrapper)", 0);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_msg = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_msg)) {
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_msg);
  } else {
    __pyx_v_msg = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_logstream,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_logstream)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "log") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_logstream = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("log", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_msg); __pyx_v_msg = 0;
  __Pyx_AddTraceback("vcfnp.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5vcfnp_14log(__pyx_self, __pyx_v_logstream, __pyx_v_msg);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_msg);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vcfnp_14log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_logstream, PyObject *__pyx_v_msg) {
  PyObject *__pyx_v_m = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  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 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("log", 0);

  /* "vcfnp.pyx":368
 * 
 * def log(logstream, *msg):
 *     print >>logstream, '[vcfnp] ' + str(datetime.now()) + ' :: ' + ' '.join([str(m) for m in msg])             # <<<<<<<<<<<<<<
 *     sys.stderr.flush()
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_now); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Add(__pyx_kp_s_vcfnp, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_kp_s__2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_v_msg; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
  for (;;) {
    if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #else
    __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF_SET(__pyx_v_m, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_m);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_m);
    __Pyx_GIVEREF(__pyx_v_m);
    __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __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;
  __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__3, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PrintOne(__pyx_v_logstream, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":369
 * def log(logstream, *msg):
 *     print >>logstream, '[vcfnp] ' + str(datetime.now()) + ' :: ' + ' '.join([str(m) for m in msg])
 *     sys.stderr.flush()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_stderr); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_flush); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "vcfnp.pyx":367
 * 
 * 
 * def log(logstream, *msg):             # <<<<<<<<<<<<<<
 *     print >>logstream, '[vcfnp] ' + str(datetime.now()) + ' :: ' + ' '.join([str(m) for m in msg])
 *     sys.stderr.flush()
 */

  /* function exit code */
  __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_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("vcfnp.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_m);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_17variants(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5vcfnp_16variants[] = "variants(filename, region=None, fields=None, exclude_fields=None, dtypes=None, arities=None, fills=None, transformers=None, vcf_types=None, count=None, progress=0, logstream=sys.stderr, condition=None, slice=None, flatten_filter=False, verbose=False, cache=False, cachedir=None, skip_cached=False)\n\n    Load an numpy structured array with data from the fixed fields of a VCF file\n    (including 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    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    flatten_filter: bool\n       "" Return FILTER as multiple boolean fields, e.g., FILTER_PASS, FILTER_LowQuality, etc.\n    verbose: bool\n        Log more messages.\n    cache: bool\n        If True, save the resulting numpy array to disk, and load from the cache if present rather than rebuilding\n        from the VCF.\n    cachedir: string\n        Manually specify the directory to use to store cache files.\n    skip_cached: bool\n        If True and cache file is fresh, do not load and return None.\n\n    Examples\n    --------\n\n        >>> from vcfnp import variants\n        >>> V = variants('fixture/sample.vcf')\n        >>> V\n        array([ ('19', 111, '.', 'A', 'C', 9.600000381469727, (False, False, False), 2, True, 0, '.', 0, 0.0, 0, False, 0, False, 0),\n               ('19', 112, '.', 'A', 'G', 10.0, (False, False, False), 2, True, 0, '.', 0, 0.0, 0, False, 0, False, 0),\n               ('20', 14370, 'rs6054257', 'G', 'A', 29.0, (False, False, True), 2, True, 0, '.', 0, 0.5, 0, True, 14, True, 3),\n               ('20', 17330, '.', 'T', 'A', 3.0, (True, False, False), 2, True, 0, '.', 0, 0.017000000923871994, 0, False, 11, False, 3),\n               ('20', 1110696, 'rs6040355', 'A', 'G', 67.0, (False, False, True), 3, True, 0, 'T', 0, 0.3330000042915344, 0, True, 10, False, 2),\n               ('20', 1230237, '.', 'T', '.', 47.0, (False, False, True), 2, False, 0, 'T', 0, 0.0, 0, False, 13, False, 3),\n               ('20', 1234567, 'microsat1', 'G', 'GA', 50.0, (False, False, True), 3, False, 1, 'G', 3, 0.0, 6, False, 9, False, 3),\n               ('20', 1235237, '.', 'T', '.', 0.0, (False, False, False), 2, False, 0, '.', 0, 0.0, 0, False, 0, False, 0),\n               ('X', 10, 'rsTest', 'AC', 'A', 10.0, (False, False, True), 3, False, -1, '.', 0, 0.0, 0, False, 0, False, 0)],\n              dtype=[('CHROM', 'S12'), ('POS', '<i4'), ('ID', 'S12'), ('REF', 'S12'), ('ALT', 'S12'), ('QUAL', '<f4'), ('FILTER', [('q10', '?'), ('s50', '?'), ('PASS', '?')]), ('num_alleles', 'u1'), ('is_snp""', '?'), ('svlen', '<i4'), ('AA', 'S12'), ('AC', '<u2'), ('AF', '<f4'), ('AN', '<u2'), ('DB', '?'), ('DP', '<i4'), ('H2', '?'), ('NS', '<i4')])\n        >>> V['QUAL']\n        array([  9.60000038,  10.        ,  29.        ,   3.        ,\n                67.        ,  47.        ,  50.        ,   0.        ,  10.        ], dtype=float32)\n        >>> V['FILTER']['PASS']\n        array([False, False,  True, False,  True,  True,  True, False,  True], dtype=bool)\n        >>> V['AF']\n        array([ 0.   ,  0.   ,  0.5  ,  0.017,  0.333,  0.   ,  0.   ,  0.   ,  0.   ], dtype=float32)\n\n    ";
static PyMethodDef __pyx_mdef_5vcfnp_17variants = {__Pyx_NAMESTR("variants"), (PyCFunction)__pyx_pw_5vcfnp_17variants, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5vcfnp_16variants)};
static PyObject *__pyx_pw_5vcfnp_17variants(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;
  PyObject *__pyx_v_flatten_filter = 0;
  PyObject *__pyx_v_verbose = 0;
  PyObject *__pyx_v_cache = 0;
  PyObject *__pyx_v_cachedir = 0;
  PyObject *__pyx_v_skip_cached = 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_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,&__pyx_n_s_flatten_filter,&__pyx_n_s_verbose,&__pyx_n_s_cache,&__pyx_n_s_cachedir,&__pyx_n_s_skip_cached,0};
    PyObject* values[19] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};

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

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

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

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

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

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

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

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

    /* "vcfnp.pyx":381
 *              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__4;

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

    /* "vcfnp.pyx":385
 *              logstream=sys.stderr,
 *              condition=None,
 *              slice=None,             # <<<<<<<<<<<<<<
 *              flatten_filter=False,
 *              verbose=False,
 */
    values[13] = ((PyObject *)Py_None);

    /* "vcfnp.pyx":386
 *              condition=None,
 *              slice=None,
 *              flatten_filter=False,             # <<<<<<<<<<<<<<
 *              verbose=False,
 *              cache=False,
 */
    values[14] = ((PyObject *)Py_False);

    /* "vcfnp.pyx":387
 *              slice=None,
 *              flatten_filter=False,
 *              verbose=False,             # <<<<<<<<<<<<<<
 *              cache=False,
 *              cachedir=None,
 */
    values[15] = ((PyObject *)Py_False);

    /* "vcfnp.pyx":388
 *              flatten_filter=False,
 *              verbose=False,
 *              cache=False,             # <<<<<<<<<<<<<<
 *              cachedir=None,
 *              skip_cached=False,
 */
    values[16] = ((PyObject *)Py_False);

    /* "vcfnp.pyx":389
 *              verbose=False,
 *              cache=False,
 *              cachedir=None,             # <<<<<<<<<<<<<<
 *              skip_cached=False,
 *              ):
 */
    values[17] = ((PyObject *)Py_None);

    /* "vcfnp.pyx":390
 *              cache=False,
 *              cachedir=None,
 *              skip_cached=False,             # <<<<<<<<<<<<<<
 *              ):
 *     """
 */
    values[18] = ((PyObject *)Py_False);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
        case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
        case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
        case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
        case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
        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--; }
        }
        case 14:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flatten_filter);
          if (value) { values[14] = value; kw_args--; }
        }
        case 15:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose);
          if (value) { values[15] = value; kw_args--; }
        }
        case 16:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cache);
          if (value) { values[16] = value; kw_args--; }
        }
        case 17:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cachedir);
          if (value) { values[17] = value; kw_args--; }
        }
        case 18:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_skip_cached);
          if (value) { values[18] = 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 = 372; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
        case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
        case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
        case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
        case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
        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];
    __pyx_v_flatten_filter = values[14];
    __pyx_v_verbose = values[15];
    __pyx_v_cache = values[16];
    __pyx_v_cachedir = values[17];
    __pyx_v_skip_cached = values[18];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("variants", 0, 1, 19, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __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_16variants(__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_v_flatten_filter, __pyx_v_verbose, __pyx_v_cache, __pyx_v_cachedir, __pyx_v_skip_cached);

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

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vcfnp_16variants(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_flatten_filter, PyObject *__pyx_v_verbose, PyObject *__pyx_v_cache, PyObject *__pyx_v_cachedir, PyObject *__pyx_v_skip_cached) {
  PyObject *__pyx_v_cache_fn = NULL;
  PyObject *__pyx_v_A = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("variants", 0);

  /* "vcfnp.pyx":470
 *     """
 * 
 *     if cache:             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(filename, (list, tuple)):
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_cache); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "vcfnp.pyx":472
 *     if cache:
 * 
 *         if isinstance(filename, (list, tuple)):             # <<<<<<<<<<<<<<
 *             raise Exception('caching only supported when loading from a single VCF file')
 * 
 */
    __pyx_t_1 = PyList_Check(__pyx_v_filename); 
    if (!__pyx_t_1) {
      __pyx_t_2 = PyTuple_Check(__pyx_v_filename); 
      __pyx_t_3 = __pyx_t_2;
    } else {
      __pyx_t_3 = __pyx_t_1;
    }
    __pyx_t_1 = (__pyx_t_3 != 0);
    if (__pyx_t_1) {

      /* "vcfnp.pyx":473
 * 
 *         if isinstance(filename, (list, tuple)):
 *             raise Exception('caching only supported when loading from a single VCF file')             # <<<<<<<<<<<<<<
 * 
 *         cache_fn = _mk_cache_fn(filename, type='variants', region=region, cachedir=cachedir)
 */
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __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[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }

    /* "vcfnp.pyx":475
 *             raise Exception('caching only supported when loading from a single VCF file')
 * 
 *         cache_fn = _mk_cache_fn(filename, type='variants', region=region, cachedir=cachedir)             # <<<<<<<<<<<<<<
 *         if not os.path.exists(cache_fn) or os.path.getmtime(filename) > os.path.getmtime(cache_fn):
 *             if verbose:
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_mk_cache_fn); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __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 = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_filename);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_filename);
    __Pyx_GIVEREF(__pyx_v_filename);
    __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_type, __pyx_n_s_variants) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_region, __pyx_v_region) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_cachedir, __pyx_v_cachedir) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_cache_fn = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "vcfnp.pyx":476
 * 
 *         cache_fn = _mk_cache_fn(filename, type='variants', region=region, cachedir=cachedir)
 *         if not os.path.exists(cache_fn) or os.path.getmtime(filename) > os.path.getmtime(cache_fn):             # <<<<<<<<<<<<<<
 *             if verbose:
 *                 log(logstream, 'no cache file found or cache out of date')
 */
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_path); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_exists); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __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 = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_cache_fn);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_cache_fn);
    __Pyx_GIVEREF(__pyx_v_cache_fn);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_3 = (!__pyx_t_1);
    if (!__pyx_t_3) {
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_path); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_getmtime); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __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 = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_v_filename);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_filename);
      __Pyx_GIVEREF(__pyx_v_filename);
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_path); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_getmtime); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_cache_fn);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_cache_fn);
      __Pyx_GIVEREF(__pyx_v_cache_fn);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyObject_RichCompare(__pyx_t_7, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_2 = __pyx_t_1;
    } else {
      __pyx_t_2 = __pyx_t_3;
    }
    if (__pyx_t_2) {

      /* "vcfnp.pyx":477
 *         cache_fn = _mk_cache_fn(filename, type='variants', region=region, cachedir=cachedir)
 *         if not os.path.exists(cache_fn) or os.path.getmtime(filename) > os.path.getmtime(cache_fn):
 *             if verbose:             # <<<<<<<<<<<<<<
 *                 log(logstream, 'no cache file found or cache out of date')
 *             A = _build_variants(filename,
 */
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_verbose); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_2) {

        /* "vcfnp.pyx":478
 *         if not os.path.exists(cache_fn) or os.path.getmtime(filename) > os.path.getmtime(cache_fn):
 *             if verbose:
 *                 log(logstream, 'no cache file found or cache out of date')             # <<<<<<<<<<<<<<
 *             A = _build_variants(filename,
 *                                 region=region,
 */
        __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_v_logstream);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_logstream);
        __Pyx_GIVEREF(__pyx_v_logstream);
        __Pyx_INCREF(__pyx_kp_s_no_cache_file_found_or_cache_out);
        PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_kp_s_no_cache_file_found_or_cache_out);
        __Pyx_GIVEREF(__pyx_kp_s_no_cache_file_found_or_cache_out);
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L6;
      }
      __pyx_L6:;

      /* "vcfnp.pyx":479
 *             if verbose:
 *                 log(logstream, 'no cache file found or cache out of date')
 *             A = _build_variants(filename,             # <<<<<<<<<<<<<<
 *                                 region=region,
 *                                 fields=fields,
 */
      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_build_variants); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_filename);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_filename);
      __Pyx_GIVEREF(__pyx_v_filename);
      __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);

      /* "vcfnp.pyx":480
 *                 log(logstream, 'no cache file found or cache out of date')
 *             A = _build_variants(filename,
 *                                 region=region,             # <<<<<<<<<<<<<<
 *                                 fields=fields,
 *                                 exclude_fields=exclude_fields,
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_region, __pyx_v_region) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":481
 *             A = _build_variants(filename,
 *                                 region=region,
 *                                 fields=fields,             # <<<<<<<<<<<<<<
 *                                 exclude_fields=exclude_fields,
 *                                 dtypes=dtypes,
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_fields, __pyx_v_fields) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":482
 *                                 region=region,
 *                                 fields=fields,
 *                                 exclude_fields=exclude_fields,             # <<<<<<<<<<<<<<
 *                                 dtypes=dtypes,
 *                                 arities=arities,
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_exclude_fields, __pyx_v_exclude_fields) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":483
 *                                 fields=fields,
 *                                 exclude_fields=exclude_fields,
 *                                 dtypes=dtypes,             # <<<<<<<<<<<<<<
 *                                 arities=arities,
 *                                 fills=fills,
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtypes, __pyx_v_dtypes) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":484
 *                                 exclude_fields=exclude_fields,
 *                                 dtypes=dtypes,
 *                                 arities=arities,             # <<<<<<<<<<<<<<
 *                                 fills=fills,
 *                                 transformers=transformers,
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_arities, __pyx_v_arities) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":485
 *                                 dtypes=dtypes,
 *                                 arities=arities,
 *                                 fills=fills,             # <<<<<<<<<<<<<<
 *                                 transformers=transformers,
 *                                 vcf_types=vcf_types,
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_fills, __pyx_v_fills) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":486
 *                                 arities=arities,
 *                                 fills=fills,
 *                                 transformers=transformers,             # <<<<<<<<<<<<<<
 *                                 vcf_types=vcf_types,
 *                                 count=count,
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_transformers, __pyx_v_transformers) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":487
 *                                 fills=fills,
 *                                 transformers=transformers,
 *                                 vcf_types=vcf_types,             # <<<<<<<<<<<<<<
 *                                 count=count,
 *                                 progress=progress,
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_vcf_types, __pyx_v_vcf_types) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":488
 *                                 transformers=transformers,
 *                                 vcf_types=vcf_types,
 *                                 count=count,             # <<<<<<<<<<<<<<
 *                                 progress=progress,
 *                                 logstream=logstream,
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_count, __pyx_v_count) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":489
 *                                 vcf_types=vcf_types,
 *                                 count=count,
 *                                 progress=progress,             # <<<<<<<<<<<<<<
 *                                 logstream=logstream,
 *                                 condition=condition,
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_progress, __pyx_v_progress) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":490
 *                                 count=count,
 *                                 progress=progress,
 *                                 logstream=logstream,             # <<<<<<<<<<<<<<
 *                                 condition=condition,
 *                                 slice=slice,
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_logstream, __pyx_v_logstream) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":491
 *                                 progress=progress,
 *                                 logstream=logstream,
 *                                 condition=condition,             # <<<<<<<<<<<<<<
 *                                 slice=slice,
 *                                 flatten_filter=flatten_filter,
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_condition, __pyx_v_condition) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":492
 *                                 logstream=logstream,
 *                                 condition=condition,
 *                                 slice=slice,             # <<<<<<<<<<<<<<
 *                                 flatten_filter=flatten_filter,
 *                                 verbose=verbose)
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_slice, __pyx_v_slice) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":493
 *                                 condition=condition,
 *                                 slice=slice,
 *                                 flatten_filter=flatten_filter,             # <<<<<<<<<<<<<<
 *                                 verbose=verbose)
 *             if verbose:
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_flatten_filter, __pyx_v_flatten_filter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":494
 *                                 slice=slice,
 *                                 flatten_filter=flatten_filter,
 *                                 verbose=verbose)             # <<<<<<<<<<<<<<
 *             if verbose:
 *                 log(logstream, 'saving to cache', cache_fn)
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_verbose, __pyx_v_verbose) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":479
 *             if verbose:
 *                 log(logstream, 'no cache file found or cache out of date')
 *             A = _build_variants(filename,             # <<<<<<<<<<<<<<
 *                                 region=region,
 *                                 fields=fields,
 */
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_A = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "vcfnp.pyx":495
 *                                 flatten_filter=flatten_filter,
 *                                 verbose=verbose)
 *             if verbose:             # <<<<<<<<<<<<<<
 *                 log(logstream, 'saving to cache', cache_fn)
 *             np.save(cache_fn, A)
 */
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_verbose); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_2) {

        /* "vcfnp.pyx":496
 *                                 verbose=verbose)
 *             if verbose:
 *                 log(logstream, 'saving to cache', cache_fn)             # <<<<<<<<<<<<<<
 *             np.save(cache_fn, A)
 *             return A
 */
        __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_v_logstream);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_logstream);
        __Pyx_GIVEREF(__pyx_v_logstream);
        __Pyx_INCREF(__pyx_kp_s_saving_to_cache);
        PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_kp_s_saving_to_cache);
        __Pyx_GIVEREF(__pyx_kp_s_saving_to_cache);
        __Pyx_INCREF(__pyx_v_cache_fn);
        PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_cache_fn);
        __Pyx_GIVEREF(__pyx_v_cache_fn);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        goto __pyx_L7;
      }
      __pyx_L7:;

      /* "vcfnp.pyx":497
 *             if verbose:
 *                 log(logstream, 'saving to cache', cache_fn)
 *             np.save(cache_fn, A)             # <<<<<<<<<<<<<<
 *             return A
 *         else:
 */
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_save); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __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 = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_cache_fn);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_cache_fn);
      __Pyx_GIVEREF(__pyx_v_cache_fn);
      __Pyx_INCREF(__pyx_v_A);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_A);
      __Pyx_GIVEREF(__pyx_v_A);
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __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;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "vcfnp.pyx":498
 *                 log(logstream, 'saving to cache', cache_fn)
 *             np.save(cache_fn, A)
 *             return A             # <<<<<<<<<<<<<<
 *         else:
 *             if skip_cached:
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_A);
      __pyx_r = __pyx_v_A;
      goto __pyx_L0;
    }
    /*else*/ {

      /* "vcfnp.pyx":500
 *             return A
 *         else:
 *             if skip_cached:             # <<<<<<<<<<<<<<
 *                 if verbose:
 *                     log(logstream, 'skipping from cache', cache_fn)
 */
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_skip_cached); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_2) {

        /* "vcfnp.pyx":501
 *         else:
 *             if skip_cached:
 *                 if verbose:             # <<<<<<<<<<<<<<
 *                     log(logstream, 'skipping from cache', cache_fn)
 *                 return None
 */
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_verbose); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (__pyx_t_2) {

          /* "vcfnp.pyx":502
 *             if skip_cached:
 *                 if verbose:
 *                     log(logstream, 'skipping from cache', cache_fn)             # <<<<<<<<<<<<<<
 *                 return None
 *             else:
 */
          __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_INCREF(__pyx_v_logstream);
          PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_logstream);
          __Pyx_GIVEREF(__pyx_v_logstream);
          __Pyx_INCREF(__pyx_kp_s_skipping_from_cache);
          PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_kp_s_skipping_from_cache);
          __Pyx_GIVEREF(__pyx_kp_s_skipping_from_cache);
          __Pyx_INCREF(__pyx_v_cache_fn);
          PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_cache_fn);
          __Pyx_GIVEREF(__pyx_v_cache_fn);
          __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          goto __pyx_L9;
        }
        __pyx_L9:;

        /* "vcfnp.pyx":503
 *                 if verbose:
 *                     log(logstream, 'skipping from cache', cache_fn)
 *                 return None             # <<<<<<<<<<<<<<
 *             else:
 *                 if verbose:
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_None);
        __pyx_r = Py_None;
        goto __pyx_L0;
      }
      /*else*/ {

        /* "vcfnp.pyx":505
 *                 return None
 *             else:
 *                 if verbose:             # <<<<<<<<<<<<<<
 *                     log(logstream, 'loading from cache', cache_fn)
 *                 A = np.load(cache_fn)
 */
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_verbose); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (__pyx_t_2) {

          /* "vcfnp.pyx":506
 *             else:
 *                 if verbose:
 *                     log(logstream, 'loading from cache', cache_fn)             # <<<<<<<<<<<<<<
 *                 A = np.load(cache_fn)
 *                 return A
 */
          __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_INCREF(__pyx_v_logstream);
          PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_logstream);
          __Pyx_GIVEREF(__pyx_v_logstream);
          __Pyx_INCREF(__pyx_kp_s_loading_from_cache);
          PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_kp_s_loading_from_cache);
          __Pyx_GIVEREF(__pyx_kp_s_loading_from_cache);
          __Pyx_INCREF(__pyx_v_cache_fn);
          PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_cache_fn);
          __Pyx_GIVEREF(__pyx_v_cache_fn);
          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __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;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          goto __pyx_L10;
        }
        __pyx_L10:;

        /* "vcfnp.pyx":507
 *                 if verbose:
 *                     log(logstream, 'loading from cache', cache_fn)
 *                 A = np.load(cache_fn)             # <<<<<<<<<<<<<<
 *                 return A
 * 
 */
        __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_load); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __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 = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_v_cache_fn);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_cache_fn);
        __Pyx_GIVEREF(__pyx_v_cache_fn);
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_v_A = __pyx_t_5;
        __pyx_t_5 = 0;

        /* "vcfnp.pyx":508
 *                     log(logstream, 'loading from cache', cache_fn)
 *                 A = np.load(cache_fn)
 *                 return A             # <<<<<<<<<<<<<<
 * 
 *     else:
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_v_A);
        __pyx_r = __pyx_v_A;
        goto __pyx_L0;
      }
    }
  }
  /*else*/ {

    /* "vcfnp.pyx":512
 *     else:
 * 
 *         A = _build_variants(filename,             # <<<<<<<<<<<<<<
 *                             region=region,
 *                             fields=fields,
 */
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_build_variants); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_filename);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_filename);
    __Pyx_GIVEREF(__pyx_v_filename);
    __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);

    /* "vcfnp.pyx":513
 * 
 *         A = _build_variants(filename,
 *                             region=region,             # <<<<<<<<<<<<<<
 *                             fields=fields,
 *                             exclude_fields=exclude_fields,
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_region, __pyx_v_region) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":514
 *         A = _build_variants(filename,
 *                             region=region,
 *                             fields=fields,             # <<<<<<<<<<<<<<
 *                             exclude_fields=exclude_fields,
 *                             dtypes=dtypes,
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_fields, __pyx_v_fields) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":515
 *                             region=region,
 *                             fields=fields,
 *                             exclude_fields=exclude_fields,             # <<<<<<<<<<<<<<
 *                             dtypes=dtypes,
 *                             arities=arities,
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_exclude_fields, __pyx_v_exclude_fields) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":516
 *                             fields=fields,
 *                             exclude_fields=exclude_fields,
 *                             dtypes=dtypes,             # <<<<<<<<<<<<<<
 *                             arities=arities,
 *                             fills=fills,
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtypes, __pyx_v_dtypes) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":517
 *                             exclude_fields=exclude_fields,
 *                             dtypes=dtypes,
 *                             arities=arities,             # <<<<<<<<<<<<<<
 *                             fills=fills,
 *                             transformers=transformers,
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_arities, __pyx_v_arities) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":518
 *                             dtypes=dtypes,
 *                             arities=arities,
 *                             fills=fills,             # <<<<<<<<<<<<<<
 *                             transformers=transformers,
 *                             vcf_types=vcf_types,
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_fills, __pyx_v_fills) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":519
 *                             arities=arities,
 *                             fills=fills,
 *                             transformers=transformers,             # <<<<<<<<<<<<<<
 *                             vcf_types=vcf_types,
 *                             count=count,
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_transformers, __pyx_v_transformers) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":520
 *                             fills=fills,
 *                             transformers=transformers,
 *                             vcf_types=vcf_types,             # <<<<<<<<<<<<<<
 *                             count=count,
 *                             progress=progress,
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_vcf_types, __pyx_v_vcf_types) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":521
 *                             transformers=transformers,
 *                             vcf_types=vcf_types,
 *                             count=count,             # <<<<<<<<<<<<<<
 *                             progress=progress,
 *                             logstream=logstream,
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_count, __pyx_v_count) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":522
 *                             vcf_types=vcf_types,
 *                             count=count,
 *                             progress=progress,             # <<<<<<<<<<<<<<
 *                             logstream=logstream,
 *                             condition=condition,
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_progress, __pyx_v_progress) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":523
 *                             count=count,
 *                             progress=progress,
 *                             logstream=logstream,             # <<<<<<<<<<<<<<
 *                             condition=condition,
 *                             slice=slice,
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_logstream, __pyx_v_logstream) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":524
 *                             progress=progress,
 *                             logstream=logstream,
 *                             condition=condition,             # <<<<<<<<<<<<<<
 *                             slice=slice,
 *                             flatten_filter=flatten_filter,
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_condition, __pyx_v_condition) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":525
 *                             logstream=logstream,
 *                             condition=condition,
 *                             slice=slice,             # <<<<<<<<<<<<<<
 *                             flatten_filter=flatten_filter,
 *                             verbose=verbose)
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_slice, __pyx_v_slice) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":526
 *                             condition=condition,
 *                             slice=slice,
 *                             flatten_filter=flatten_filter,             # <<<<<<<<<<<<<<
 *                             verbose=verbose)
 *         return A
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_flatten_filter, __pyx_v_flatten_filter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":527
 *                             slice=slice,
 *                             flatten_filter=flatten_filter,
 *                             verbose=verbose)             # <<<<<<<<<<<<<<
 *         return A
 * 
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_verbose, __pyx_v_verbose) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":512
 *     else:
 * 
 *         A = _build_variants(filename,             # <<<<<<<<<<<<<<
 *                             region=region,
 *                             fields=fields,
 */
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_A = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "vcfnp.pyx":528
 *                             flatten_filter=flatten_filter,
 *                             verbose=verbose)
 *         return A             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_A);
    __pyx_r = __pyx_v_A;
    goto __pyx_L0;
  }

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("vcfnp.variants", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_cache_fn);
  __Pyx_XDECREF(__pyx_v_A);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":534
 * 
 * 
 * def _mk_cache_fn(vcf_fn, type, region=None, cachedir=None):             # <<<<<<<<<<<<<<
 *     if cachedir is None:
 *         cachedir = vcf_fn + cachedir_suffix
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_19_mk_cache_fn(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5vcfnp_18_mk_cache_fn[] = "_mk_cache_fn(vcf_fn, type, region=None, cachedir=None)";
static PyMethodDef __pyx_mdef_5vcfnp_19_mk_cache_fn = {__Pyx_NAMESTR("_mk_cache_fn"), (PyCFunction)__pyx_pw_5vcfnp_19_mk_cache_fn, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5vcfnp_18_mk_cache_fn)};
static PyObject *__pyx_pw_5vcfnp_19_mk_cache_fn(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_vcf_fn = 0;
  PyObject *__pyx_v_type = 0;
  PyObject *__pyx_v_region = 0;
  PyObject *__pyx_v_cachedir = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_mk_cache_fn (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vcf_fn,&__pyx_n_s_type,&__pyx_n_s_region,&__pyx_n_s_cachedir,0};
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)Py_None);
    values[3] = ((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  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_vcf_fn)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_type)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_mk_cache_fn", 0, 2, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_region);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cachedir);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_mk_cache_fn") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        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);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_vcf_fn = values[0];
    __pyx_v_type = values[1];
    __pyx_v_region = values[2];
    __pyx_v_cachedir = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_mk_cache_fn", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vcfnp._mk_cache_fn", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5vcfnp_18_mk_cache_fn(__pyx_self, __pyx_v_vcf_fn, __pyx_v_type, __pyx_v_region, __pyx_v_cachedir);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vcfnp_18_mk_cache_fn(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_vcf_fn, PyObject *__pyx_v_type, PyObject *__pyx_v_region, PyObject *__pyx_v_cachedir) {
  PyObject *__pyx_v_cache_fn = 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;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_mk_cache_fn", 0);
  __Pyx_INCREF(__pyx_v_region);
  __Pyx_INCREF(__pyx_v_cachedir);

  /* "vcfnp.pyx":535
 * 
 * def _mk_cache_fn(vcf_fn, type, region=None, cachedir=None):
 *     if cachedir is None:             # <<<<<<<<<<<<<<
 *         cachedir = vcf_fn + cachedir_suffix
 *     if not os.path.exists(cachedir):
 */
  __pyx_t_1 = (__pyx_v_cachedir == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "vcfnp.pyx":536
 * def _mk_cache_fn(vcf_fn, type, region=None, cachedir=None):
 *     if cachedir is None:
 *         cachedir = vcf_fn + cachedir_suffix             # <<<<<<<<<<<<<<
 *     if not os.path.exists(cachedir):
 *         os.makedirs(cachedir)
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_cachedir_suffix); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyNumber_Add(__pyx_v_vcf_fn, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_cachedir, __pyx_t_4);
    __pyx_t_4 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "vcfnp.pyx":537
 *     if cachedir is None:
 *         cachedir = vcf_fn + cachedir_suffix
 *     if not os.path.exists(cachedir):             # <<<<<<<<<<<<<<
 *         os.makedirs(cachedir)
 *     else:
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_exists); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __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 = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_cachedir);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_cachedir);
  __Pyx_GIVEREF(__pyx_v_cachedir);
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = ((!__pyx_t_2) != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":538
 *         cachedir = vcf_fn + cachedir_suffix
 *     if not os.path.exists(cachedir):
 *         os.makedirs(cachedir)             # <<<<<<<<<<<<<<
 *     else:
 *         assert os.path.isdir(cachedir), 'unexpected error, cache directory is not a directory: %s' % cachedir
 */
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_makedirs); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_cachedir);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_cachedir);
    __Pyx_GIVEREF(__pyx_v_cachedir);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4;
  }
  /*else*/ {

    /* "vcfnp.pyx":540
 *         os.makedirs(cachedir)
 *     else:
 *         assert os.path.isdir(cachedir), 'unexpected error, cache directory is not a directory: %s' % cachedir             # <<<<<<<<<<<<<<
 *     if region is None:
 *         cache_fn = os.path.join(cachedir, '%s.npy' % type)
 */
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(!Py_OptimizeFlag)) {
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_path); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_isdir); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_cachedir);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_cachedir);
      __Pyx_GIVEREF(__pyx_v_cachedir);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __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_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) {
        __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_unexpected_error_cache_directory, __pyx_v_cachedir); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        PyErr_SetObject(PyExc_AssertionError, __pyx_t_3);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
    }
    #endif
  }
  __pyx_L4:;

  /* "vcfnp.pyx":541
 *     else:
 *         assert os.path.isdir(cachedir), 'unexpected error, cache directory is not a directory: %s' % cachedir
 *     if region is None:             # <<<<<<<<<<<<<<
 *         cache_fn = os.path.join(cachedir, '%s.npy' % type)
 *     else:
 */
  __pyx_t_1 = (__pyx_v_region == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "vcfnp.pyx":542
 *         assert os.path.isdir(cachedir), 'unexpected error, cache directory is not a directory: %s' % cachedir
 *     if region is None:
 *         cache_fn = os.path.join(cachedir, '%s.npy' % type)             # <<<<<<<<<<<<<<
 *     else:
 *         region = region.replace(':', '_').replace('-', '_')
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_path); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_join); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __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_PyString_Format(__pyx_kp_s_s_npy, __pyx_v_type); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_cachedir);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_cachedir);
    __Pyx_GIVEREF(__pyx_v_cachedir);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_cache_fn = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L5;
  }
  /*else*/ {

    /* "vcfnp.pyx":544
 *         cache_fn = os.path.join(cachedir, '%s.npy' % type)
 *     else:
 *         region = region.replace(':', '_').replace('-', '_')             # <<<<<<<<<<<<<<
 *         cache_fn = os.path.join(cachedir, '%s.%s.npy' % (type, region))
 *     return cache_fn
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_region, __pyx_n_s_replace); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_replace); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_region, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "vcfnp.pyx":545
 *     else:
 *         region = region.replace(':', '_').replace('-', '_')
 *         cache_fn = os.path.join(cachedir, '%s.%s.npy' % (type, region))             # <<<<<<<<<<<<<<
 *     return cache_fn
 * 
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_path); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_join); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_type);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_type);
    __Pyx_GIVEREF(__pyx_v_type);
    __Pyx_INCREF(__pyx_v_region);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_region);
    __Pyx_GIVEREF(__pyx_v_region);
    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_s_s_npy, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_cachedir);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_cachedir);
    __Pyx_GIVEREF(__pyx_v_cachedir);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __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_v_cache_fn = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_L5:;

  /* "vcfnp.pyx":546
 *         region = region.replace(':', '_').replace('-', '_')
 *         cache_fn = os.path.join(cachedir, '%s.%s.npy' % (type, region))
 *     return cache_fn             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_cache_fn);
  __pyx_r = __pyx_v_cache_fn;
  goto __pyx_L0;

  /* "vcfnp.pyx":534
 * 
 * 
 * def _mk_cache_fn(vcf_fn, type, region=None, cachedir=None):             # <<<<<<<<<<<<<<
 *     if cachedir is None:
 *         cachedir = vcf_fn + cachedir_suffix
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vcfnp._mk_cache_fn", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_cache_fn);
  __Pyx_XDECREF(__pyx_v_region);
  __Pyx_XDECREF(__pyx_v_cachedir);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_21_build_variants(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5vcfnp_20_build_variants[] = "_build_variants(filename, region=None, fields=None, exclude_fields=None, dtypes=None, arities=None, fills=None, transformers=None, vcf_types=None, count=None, progress=0, logstream=sys.stderr, condition=None, slice=None, flatten_filter=False, verbose=False, cache=False)";
static PyMethodDef __pyx_mdef_5vcfnp_21_build_variants = {__Pyx_NAMESTR("_build_variants"), (PyCFunction)__pyx_pw_5vcfnp_21_build_variants, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5vcfnp_20_build_variants)};
static PyObject *__pyx_pw_5vcfnp_21_build_variants(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;
  PyObject *__pyx_v_flatten_filter = 0;
  PyObject *__pyx_v_verbose = 0;
  CYTHON_UNUSED PyObject *__pyx_v_cache = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_build_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_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,&__pyx_n_s_flatten_filter,&__pyx_n_s_verbose,&__pyx_n_s_cache,0};
    PyObject* values[17] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};

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

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

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

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

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

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

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

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

    /* "vcfnp.pyx":558
 *                     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__11;

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

    /* "vcfnp.pyx":562
 *                     logstream=sys.stderr,
 *                     condition=None,
 *                     slice=None,             # <<<<<<<<<<<<<<
 *                     flatten_filter=False,
 *                     verbose=False,
 */
    values[13] = ((PyObject *)Py_None);

    /* "vcfnp.pyx":563
 *                     condition=None,
 *                     slice=None,
 *                     flatten_filter=False,             # <<<<<<<<<<<<<<
 *                     verbose=False,
 *                     cache=False,
 */
    values[14] = ((PyObject *)Py_False);

    /* "vcfnp.pyx":564
 *                     slice=None,
 *                     flatten_filter=False,
 *                     verbose=False,             # <<<<<<<<<<<<<<
 *                     cache=False,
 *                     ):
 */
    values[15] = ((PyObject *)Py_False);

    /* "vcfnp.pyx":565
 *                     flatten_filter=False,
 *                     verbose=False,
 *                     cache=False,             # <<<<<<<<<<<<<<
 *                     ):
 * 
 */
    values[16] = ((PyObject *)Py_False);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
        case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
        case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
        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--; }
        }
        case 14:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flatten_filter);
          if (value) { values[14] = value; kw_args--; }
        }
        case 15:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose);
          if (value) { values[15] = value; kw_args--; }
        }
        case 16:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cache);
          if (value) { values[16] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_build_variants") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
        case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
        case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
        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];
    __pyx_v_flatten_filter = values[14];
    __pyx_v_verbose = values[15];
    __pyx_v_cache = values[16];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_build_variants", 0, 1, 17, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vcfnp._build_variants", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5vcfnp_20_build_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_transformers, __pyx_v_vcf_types, __pyx_v_count, __pyx_v_progress, __pyx_v_logstream, __pyx_v_condition, __pyx_v_slice, __pyx_v_flatten_filter, __pyx_v_verbose, __pyx_v_cache);

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

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vcfnp_20_build_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_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_flatten_filter, PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_cache) {
  PyObject *__pyx_v_filenames = NULL;
  PyObject *__pyx_v_infoTypes = NULL;
  PyObject *__pyx_v_parseInfo = NULL;
  PyObject *__pyx_v_filterIds = NULL;
  PyObject *__pyx_v_fieldspec = NULL;
  PyObject *__pyx_v_dtype = NULL;
  PyObject *__pyx_v_it = 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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  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;
  PyObject *(*__pyx_t_14)(PyObject *);
  int __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_build_variants", 0);
  __Pyx_INCREF(__pyx_v_region);
  __Pyx_INCREF(__pyx_v_fields);
  __Pyx_INCREF(__pyx_v_arities);
  __Pyx_INCREF(__pyx_v_fills);
  __Pyx_INCREF(__pyx_v_transformers);
  __Pyx_INCREF(__pyx_v_flatten_filter);

  /* "vcfnp.pyx":568
 *                     ):
 * 
 *     if verbose:             # <<<<<<<<<<<<<<
 *         log(logstream, 'loading variants from', filename)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_verbose); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "vcfnp.pyx":569
 * 
 *     if verbose:
 *         log(logstream, 'loading variants from', filename)             # <<<<<<<<<<<<<<
 * 
 *     filenames, region, fields, arities, fills, infoTypes, transformers, parseInfo, filterIds, flatten_filter = _setup_variants(filename,
 */
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_logstream);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_logstream);
    __Pyx_GIVEREF(__pyx_v_logstream);
    __Pyx_INCREF(__pyx_kp_s_loading_variants_from);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_kp_s_loading_variants_from);
    __Pyx_GIVEREF(__pyx_kp_s_loading_variants_from);
    __Pyx_INCREF(__pyx_v_filename);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_filename);
    __Pyx_GIVEREF(__pyx_v_filename);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "vcfnp.pyx":571
 *         log(logstream, 'loading variants from', filename)
 * 
 *     filenames, region, fields, arities, fills, infoTypes, transformers, parseInfo, filterIds, flatten_filter = _setup_variants(filename,             # <<<<<<<<<<<<<<
 *                                                                                                                                region,
 *                                                                                                                                fields,
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_setup_variants); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);

  /* "vcfnp.pyx":579
 *                                                                                                                                transformers,
 *                                                                                                                                vcf_types,
 *                                                                                                                                flatten_filter)             # <<<<<<<<<<<<<<
 * 
 *     # zip up field parameters
 */
  __pyx_t_3 = PyTuple_New(9); 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_INCREF(__pyx_v_filename);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_filename);
  __Pyx_GIVEREF(__pyx_v_filename);
  __Pyx_INCREF(__pyx_v_region);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_region);
  __Pyx_GIVEREF(__pyx_v_region);
  __Pyx_INCREF(__pyx_v_fields);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_fields);
  __Pyx_GIVEREF(__pyx_v_fields);
  __Pyx_INCREF(__pyx_v_exclude_fields);
  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_exclude_fields);
  __Pyx_GIVEREF(__pyx_v_exclude_fields);
  __Pyx_INCREF(__pyx_v_arities);
  PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_arities);
  __Pyx_GIVEREF(__pyx_v_arities);
  __Pyx_INCREF(__pyx_v_fills);
  PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_fills);
  __Pyx_GIVEREF(__pyx_v_fills);
  __Pyx_INCREF(__pyx_v_transformers);
  PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_v_transformers);
  __Pyx_GIVEREF(__pyx_v_transformers);
  __Pyx_INCREF(__pyx_v_vcf_types);
  PyTuple_SET_ITEM(__pyx_t_3, 7, __pyx_v_vcf_types);
  __Pyx_GIVEREF(__pyx_v_vcf_types);
  __Pyx_INCREF(__pyx_v_flatten_filter);
  PyTuple_SET_ITEM(__pyx_t_3, 8, __pyx_v_flatten_filter);
  __Pyx_GIVEREF(__pyx_v_flatten_filter);

  /* "vcfnp.pyx":571
 *         log(logstream, 'loading variants from', filename)
 * 
 *     filenames, region, fields, arities, fills, infoTypes, transformers, parseInfo, filterIds, flatten_filter = _setup_variants(filename,             # <<<<<<<<<<<<<<
 *                                                                                                                                region,
 *                                                                                                                                fields,
 */
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  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 != 10)) {
      if (size > 10) __Pyx_RaiseTooManyValuesError(10);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    #if CYTHON_COMPILING_IN_CPYTHON
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_5 = PyTuple_GET_ITEM(sequence, 2); 
      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 3); 
      __pyx_t_7 = PyTuple_GET_ITEM(sequence, 4); 
      __pyx_t_8 = PyTuple_GET_ITEM(sequence, 5); 
      __pyx_t_9 = PyTuple_GET_ITEM(sequence, 6); 
      __pyx_t_10 = PyTuple_GET_ITEM(sequence, 7); 
      __pyx_t_11 = PyTuple_GET_ITEM(sequence, 8); 
      __pyx_t_12 = PyTuple_GET_ITEM(sequence, 9); 
    } else {
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
      __pyx_t_6 = PyList_GET_ITEM(sequence, 3); 
      __pyx_t_7 = PyList_GET_ITEM(sequence, 4); 
      __pyx_t_8 = PyList_GET_ITEM(sequence, 5); 
      __pyx_t_9 = PyList_GET_ITEM(sequence, 6); 
      __pyx_t_10 = PyList_GET_ITEM(sequence, 7); 
      __pyx_t_11 = PyList_GET_ITEM(sequence, 8); 
      __pyx_t_12 = PyList_GET_ITEM(sequence, 9); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_9);
    __Pyx_INCREF(__pyx_t_10);
    __Pyx_INCREF(__pyx_t_11);
    __Pyx_INCREF(__pyx_t_12);
    #else
    {
      Py_ssize_t i;
      PyObject** temps[10] = {&__pyx_t_3,&__pyx_t_4,&__pyx_t_5,&__pyx_t_6,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9,&__pyx_t_10,&__pyx_t_11,&__pyx_t_12};
      for (i=0; i < 10; i++) {
        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(item);
        *(temps[i]) = item;
      }
    }
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    Py_ssize_t index = -1;
    PyObject** temps[10] = {&__pyx_t_3,&__pyx_t_4,&__pyx_t_5,&__pyx_t_6,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9,&__pyx_t_10,&__pyx_t_11,&__pyx_t_12};
    __pyx_t_13 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext;
    for (index=0; index < 10; index++) {
      PyObject* item = __pyx_t_14(__pyx_t_13); if (unlikely(!item)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(item);
      *(temps[index]) = item;
    }
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_14 = NULL;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    goto __pyx_L5_unpacking_done;
    __pyx_L4_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __pyx_t_14 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L5_unpacking_done:;
  }
  __pyx_v_filenames = __pyx_t_3;
  __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_region, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_DECREF_SET(__pyx_v_fields, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_DECREF_SET(__pyx_v_arities, __pyx_t_6);
  __pyx_t_6 = 0;
  __Pyx_DECREF_SET(__pyx_v_fills, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_v_infoTypes = __pyx_t_8;
  __pyx_t_8 = 0;
  __Pyx_DECREF_SET(__pyx_v_transformers, __pyx_t_9);
  __pyx_t_9 = 0;
  __pyx_v_parseInfo = __pyx_t_10;
  __pyx_t_10 = 0;
  __pyx_v_filterIds = __pyx_t_11;
  __pyx_t_11 = 0;
  __Pyx_DECREF_SET(__pyx_v_flatten_filter, __pyx_t_12);
  __pyx_t_12 = 0;

  /* "vcfnp.pyx":582
 * 
 *     # zip up field parameters
 *     fieldspec = zip(fields, arities, fills, infoTypes, transformers)             # <<<<<<<<<<<<<<
 * 
 *     # create a numpy dtype
 */
  __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_fields);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_fields);
  __Pyx_GIVEREF(__pyx_v_fields);
  __Pyx_INCREF(__pyx_v_arities);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_arities);
  __Pyx_GIVEREF(__pyx_v_arities);
  __Pyx_INCREF(__pyx_v_fills);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_fills);
  __Pyx_GIVEREF(__pyx_v_fills);
  __Pyx_INCREF(__pyx_v_infoTypes);
  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_infoTypes);
  __Pyx_GIVEREF(__pyx_v_infoTypes);
  __Pyx_INCREF(__pyx_v_transformers);
  PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_transformers);
  __Pyx_GIVEREF(__pyx_v_transformers);
  __pyx_t_12 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_2, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_fieldspec = __pyx_t_12;
  __pyx_t_12 = 0;

  /* "vcfnp.pyx":585
 * 
 *     # create a numpy dtype
 *     dtype = _variants_dtype(fields, dtypes, arities, filterIds, flatten_filter, infoTypes)             # <<<<<<<<<<<<<<
 * 
 *     # set up iterator
 */
  __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_variants_dtype); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_2 = PyTuple_New(6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_fields);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_fields);
  __Pyx_GIVEREF(__pyx_v_fields);
  __Pyx_INCREF(__pyx_v_dtypes);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_dtypes);
  __Pyx_GIVEREF(__pyx_v_dtypes);
  __Pyx_INCREF(__pyx_v_arities);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_arities);
  __Pyx_GIVEREF(__pyx_v_arities);
  __Pyx_INCREF(__pyx_v_filterIds);
  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_filterIds);
  __Pyx_GIVEREF(__pyx_v_filterIds);
  __Pyx_INCREF(__pyx_v_flatten_filter);
  PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_flatten_filter);
  __Pyx_GIVEREF(__pyx_v_flatten_filter);
  __Pyx_INCREF(__pyx_v_infoTypes);
  PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_v_infoTypes);
  __Pyx_GIVEREF(__pyx_v_infoTypes);
  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_2, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_dtype = __pyx_t_11;
  __pyx_t_11 = 0;

  /* "vcfnp.pyx":588
 * 
 *     # set up iterator
 *     if condition is not None:             # <<<<<<<<<<<<<<
 *         it = itervariants_with_condition(filenames, region, fieldspec, filterIds, flatten_filter, parseInfo, condition)
 *     else:
 */
  __pyx_t_1 = (__pyx_v_condition != Py_None);
  __pyx_t_15 = (__pyx_t_1 != 0);
  if (__pyx_t_15) {

    /* "vcfnp.pyx":589
 *     # set up iterator
 *     if condition is not None:
 *         it = itervariants_with_condition(filenames, region, fieldspec, filterIds, flatten_filter, parseInfo, condition)             # <<<<<<<<<<<<<<
 *     else:
 *         it = itervariants(filenames, region, fieldspec, filterIds, flatten_filter, parseInfo)
 */
    __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_itervariants_with_condition); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_2 = PyTuple_New(7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_filenames);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_filenames);
    __Pyx_GIVEREF(__pyx_v_filenames);
    __Pyx_INCREF(__pyx_v_region);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_region);
    __Pyx_GIVEREF(__pyx_v_region);
    __Pyx_INCREF(__pyx_v_fieldspec);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_fieldspec);
    __Pyx_GIVEREF(__pyx_v_fieldspec);
    __Pyx_INCREF(__pyx_v_filterIds);
    PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_filterIds);
    __Pyx_GIVEREF(__pyx_v_filterIds);
    __Pyx_INCREF(__pyx_v_flatten_filter);
    PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_flatten_filter);
    __Pyx_GIVEREF(__pyx_v_flatten_filter);
    __Pyx_INCREF(__pyx_v_parseInfo);
    PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_v_parseInfo);
    __Pyx_GIVEREF(__pyx_v_parseInfo);
    __Pyx_INCREF(__pyx_v_condition);
    PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_v_condition);
    __Pyx_GIVEREF(__pyx_v_condition);
    __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_2, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_it = __pyx_t_12;
    __pyx_t_12 = 0;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "vcfnp.pyx":591
 *         it = itervariants_with_condition(filenames, region, fieldspec, filterIds, flatten_filter, parseInfo, condition)
 *     else:
 *         it = itervariants(filenames, region, fieldspec, filterIds, flatten_filter, parseInfo)             # <<<<<<<<<<<<<<
 * 
 *     # slice?
 */
    __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_itervariants); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_2 = PyTuple_New(6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_filenames);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_filenames);
    __Pyx_GIVEREF(__pyx_v_filenames);
    __Pyx_INCREF(__pyx_v_region);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_region);
    __Pyx_GIVEREF(__pyx_v_region);
    __Pyx_INCREF(__pyx_v_fieldspec);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_fieldspec);
    __Pyx_GIVEREF(__pyx_v_fieldspec);
    __Pyx_INCREF(__pyx_v_filterIds);
    PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_filterIds);
    __Pyx_GIVEREF(__pyx_v_filterIds);
    __Pyx_INCREF(__pyx_v_flatten_filter);
    PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_flatten_filter);
    __Pyx_GIVEREF(__pyx_v_flatten_filter);
    __Pyx_INCREF(__pyx_v_parseInfo);
    PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_v_parseInfo);
    __Pyx_GIVEREF(__pyx_v_parseInfo);
    __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_2, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_it = __pyx_t_11;
    __pyx_t_11 = 0;
  }
  __pyx_L6:;

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

    /* "vcfnp.pyx":595
 *     # slice?
 *     if slice:
 *         it = islice(it, *slice)             # <<<<<<<<<<<<<<
 * 
 *     # build an array from the iterator
 */
    __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_islice); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_it);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_it);
    __Pyx_GIVEREF(__pyx_v_it);
    __pyx_t_12 = PySequence_Tuple(__pyx_v_slice); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_10 = PyNumber_Add(__pyx_t_2, __pyx_t_12); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_10, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF_SET(__pyx_v_it, __pyx_t_12);
    __pyx_t_12 = 0;
    goto __pyx_L7;
  }
  __pyx_L7:;

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

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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("vcfnp._build_variants", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_filenames);
  __Pyx_XDECREF(__pyx_v_infoTypes);
  __Pyx_XDECREF(__pyx_v_parseInfo);
  __Pyx_XDECREF(__pyx_v_filterIds);
  __Pyx_XDECREF(__pyx_v_fieldspec);
  __Pyx_XDECREF(__pyx_v_dtype);
  __Pyx_XDECREF(__pyx_v_it);
  __Pyx_XDECREF(__pyx_v_region);
  __Pyx_XDECREF(__pyx_v_fields);
  __Pyx_XDECREF(__pyx_v_arities);
  __Pyx_XDECREF(__pyx_v_fills);
  __Pyx_XDECREF(__pyx_v_transformers);
  __Pyx_XDECREF(__pyx_v_flatten_filter);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_23_fromiter(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5vcfnp_22_fromiter[] = "_fromiter(it, dtype, count, long progress=0, logstream=sys.stderr)";
static PyMethodDef __pyx_mdef_5vcfnp_23_fromiter = {__Pyx_NAMESTR("_fromiter"), (PyCFunction)__pyx_pw_5vcfnp_23_fromiter, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5vcfnp_22_fromiter)};
static PyObject *__pyx_pw_5vcfnp_23_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;
  long __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__12;
    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 = 601; __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 = 601; __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 = 601; __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_As_long(values[3]); if (unlikely((__pyx_v_progress == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_progress = ((long)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 = 601; __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_22_fromiter(__pyx_self, __pyx_v_it, __pyx_v_dtype, __pyx_v_count, __pyx_v_progress, __pyx_v_logstream);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vcfnp_22_fromiter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_it, PyObject *__pyx_v_dtype, PyObject *__pyx_v_count, long __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":602
 * 
 * def _fromiter(it, dtype, count, long 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":603
 * def _fromiter(it, dtype, count, long 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 = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_progress); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __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 = 603; __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 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_it, __pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "vcfnp.pyx":604
 *     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":605
 *         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 = 605; __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_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __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 = 605; __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 = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_v_dtype) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_count, __pyx_v_count) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_a = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L4;
  }
  /*else*/ {

    /* "vcfnp.pyx":607
 *         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 = 607; __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_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __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 = 607; __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 = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_v_dtype) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_a = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  __pyx_L4:;

  /* "vcfnp.pyx":608
 *     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;

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

  /* function exit code */
  __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_26generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

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

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_25_iter_withprogress(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5vcfnp_24_iter_withprogress[] = "_iter_withprogress(iterable, long progress, logstream)";
static PyMethodDef __pyx_mdef_5vcfnp_25_iter_withprogress = {__Pyx_NAMESTR("_iter_withprogress"), (PyCFunction)__pyx_pw_5vcfnp_25_iter_withprogress, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5vcfnp_24_iter_withprogress)};
static PyObject *__pyx_pw_5vcfnp_25_iter_withprogress(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_iterable = 0;
  long __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 = 611; __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 = 611; __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 = 611; __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_As_long(values[1]); if (unlikely((__pyx_v_progress == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __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 = 611; __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_24_iter_withprogress(__pyx_self, __pyx_v_iterable, __pyx_v_progress, __pyx_v_logstream);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vcfnp_24_iter_withprogress(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_iterable, long __pyx_v_progress, PyObject *__pyx_v_logstream) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_9__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_9__iter_withprogress *)__pyx_tp_new_5vcfnp___pyx_scope_struct_9__iter_withprogress(__pyx_ptype_5vcfnp___pyx_scope_struct_9__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_26generator, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __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_26generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5vcfnp___pyx_scope_struct_9__iter_withprogress *__pyx_cur_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_9__iter_withprogress *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  long __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = 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 = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":613
 * def _iter_withprogress(iterable, long progress, logstream):
 *     cdef long i, n
 *     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 = 613; __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 = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __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":614
 *     cdef long i, n
 *     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":615
 *     before_all = time.time()
 *     before = before_all
 *     for i, o in enumerate(iterable):             # <<<<<<<<<<<<<<
 *         yield o
 *         n = i+1
 */
  __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 = 615; __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 = 615; __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 = 615; __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 = 615; __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 = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_2 = __pyx_t_5(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_o);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_o, __pyx_t_2);
    __Pyx_GIVEREF(__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":616
 *     before = before_all
 *     for i, o in enumerate(iterable):
 *         yield o             # <<<<<<<<<<<<<<
 *         n = i+1
 *         if n % progress == 0:
 */
    __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 = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":617
 *     for i, o in enumerate(iterable):
 *         yield o
 *         n = i+1             # <<<<<<<<<<<<<<
 *         if n % progress == 0:
 *             after = time.time()
 */
    __pyx_cur_scope->__pyx_v_n = (__pyx_cur_scope->__pyx_v_i + 1);

    /* "vcfnp.pyx":618
 *         yield o
 *         n = i+1
 *         if n % progress == 0:             # <<<<<<<<<<<<<<
 *             after = time.time()
 *             log(logstream, '%s rows in %.2fs; batch in %.2fs (%d rows/s)' % (n, after-before_all, after-before, progress/(after-before)))
 */
    if (unlikely(__pyx_cur_scope->__pyx_v_progress == 0)) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
      #endif
      PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
      #ifdef WITH_THREAD
      PyGILState_Release(__pyx_gilstate_save);
      #endif
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_6 = ((__Pyx_mod_long(__pyx_cur_scope->__pyx_v_n, __pyx_cur_scope->__pyx_v_progress) == 0) != 0);
    if (__pyx_t_6) {

      /* "vcfnp.pyx":619
 *         n = i+1
 *         if n % progress == 0:
 *             after = time.time()             # <<<<<<<<<<<<<<
 *             log(logstream, '%s rows in %.2fs; batch in %.2fs (%d rows/s)' % (n, 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 = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_after);
      __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_after, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;

      /* "vcfnp.pyx":620
 *         if n % progress == 0:
 *             after = time.time()
 *             log(logstream, '%s rows in %.2fs; batch in %.2fs (%d rows/s)' % (n, after-before_all, after-before, progress/(after-before)))             # <<<<<<<<<<<<<<
 *             before = after
 *     after_all = time.time()
 */
      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = __Pyx_PyInt_From_long(__pyx_cur_scope->__pyx_v_n); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_after, __pyx_cur_scope->__pyx_v_before_all); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_after, __pyx_cur_scope->__pyx_v_before); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = __Pyx_PyInt_From_long(__pyx_cur_scope->__pyx_v_progress); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_after, __pyx_cur_scope->__pyx_v_before); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_12 = __Pyx_PyNumber_Divide(__pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = PyTuple_New(4); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_t_12);
      __Pyx_GIVEREF(__pyx_t_12);
      __pyx_t_7 = 0;
      __pyx_t_8 = 0;
      __pyx_t_9 = 0;
      __pyx_t_12 = 0;
      __pyx_t_12 = __Pyx_PyString_Format(__pyx_kp_s_s_rows_in_2fs_batch_in_2fs_d_ro, __pyx_t_11); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_logstream);
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_cur_scope->__pyx_v_logstream);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_logstream);
      PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_12);
      __Pyx_GIVEREF(__pyx_t_12);
      __pyx_t_12 = 0;
      __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

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

  /* "vcfnp.pyx":622
 *             log(logstream, '%s rows in %.2fs; batch in %.2fs (%d rows/s)' % (n, after-before_all, after-before, progress/(after-before)))
 *             before = after
 *     after_all = time.time()             # <<<<<<<<<<<<<<
 *     log(logstream, '%s rows in %.2fs (%d rows/s)' % (n, after_all-before_all, n/(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 = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_time); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_after_all = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "vcfnp.pyx":623
 *             before = after
 *     after_all = time.time()
 *     log(logstream, '%s rows in %.2fs (%d rows/s)' % (n, after_all-before_all, n/(after_all-before_all)))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_12 = __Pyx_PyInt_From_long(__pyx_cur_scope->__pyx_v_n); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_11 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_after_all, __pyx_cur_scope->__pyx_v_before_all); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_cur_scope->__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_after_all, __pyx_cur_scope->__pyx_v_before_all); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_12);
  __Pyx_GIVEREF(__pyx_t_12);
  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_11);
  PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_8);
  __pyx_t_12 = 0;
  __pyx_t_11 = 0;
  __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_s_rows_in_2fs_d_rows_s, __pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_logstream);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_cur_scope->__pyx_v_logstream);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_logstream);
  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_8);
  __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

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

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __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_29generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "vcfnp.pyx":626
 * 
 * 
 * def itervariants(filenames,             # <<<<<<<<<<<<<<
 *                  region,
 *                  list fieldspec,
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_28itervariants(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5vcfnp_27itervariants[] = "itervariants(filenames, region, list fieldspec, tuple filterIds, bool flatten_filter, parseInfo)";
static PyMethodDef __pyx_mdef_5vcfnp_28itervariants = {__Pyx_NAMESTR("itervariants"), (PyCFunction)__pyx_pw_5vcfnp_28itervariants, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5vcfnp_27itervariants)};
static PyObject *__pyx_pw_5vcfnp_28itervariants(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_filenames = 0;
  PyObject *__pyx_v_region = 0;
  PyObject *__pyx_v_fieldspec = 0;
  PyObject *__pyx_v_filterIds = 0;
  int __pyx_v_flatten_filter;
  PyObject *__pyx_v_parseInfo = 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_fieldspec,&__pyx_n_s_filterIds,&__pyx_n_s_flatten_filter,&__pyx_n_s_parseInfo,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", 1, 6, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fieldspec)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("itervariants", 1, 6, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_filterIds)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("itervariants", 1, 6, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flatten_filter)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("itervariants", 1, 6, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_parseInfo)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("itervariants", 1, 6, 6, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __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 = 626; __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_fieldspec = ((PyObject*)values[2]);
    __pyx_v_filterIds = ((PyObject*)values[3]);
    __pyx_v_flatten_filter = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_flatten_filter == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_parseInfo = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("itervariants", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __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_fieldspec), (&PyList_Type), 1, "fieldspec", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filterIds), (&PyTuple_Type), 1, "filterIds", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vcfnp_27itervariants(__pyx_self, __pyx_v_filenames, __pyx_v_region, __pyx_v_fieldspec, __pyx_v_filterIds, __pyx_v_flatten_filter, __pyx_v_parseInfo);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vcfnp_27itervariants(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filenames, PyObject *__pyx_v_region, PyObject *__pyx_v_fieldspec, PyObject *__pyx_v_filterIds, int __pyx_v_flatten_filter, PyObject *__pyx_v_parseInfo) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_10_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_10_itervariants *)__pyx_tp_new_5vcfnp___pyx_scope_struct_10_itervariants(__pyx_ptype_5vcfnp___pyx_scope_struct_10_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_fieldspec = __pyx_v_fieldspec;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fieldspec);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fieldspec);
  __pyx_cur_scope->__pyx_v_filterIds = __pyx_v_filterIds;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_filterIds);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_filterIds);
  __pyx_cur_scope->__pyx_v_flatten_filter = __pyx_v_flatten_filter;
  __pyx_cur_scope->__pyx_v_parseInfo = __pyx_v_parseInfo;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_parseInfo);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_parseInfo);
  {
    __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5vcfnp_29generator1, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __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_29generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5vcfnp___pyx_scope_struct_10_itervariants *__pyx_cur_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_10_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;
  bool __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  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 = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":635
 *     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 = 635; __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 = 635; __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 = 635; __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 = 635; __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 = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_current_filename);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_current_filename, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;

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

    /* "vcfnp.pyx":637
 *     for current_filename in filenames:
 *         variantFile = new VariantCallFile()
 *         variantFile.open(current_filename)             # <<<<<<<<<<<<<<
 *         variantFile.parseInfo = parseInfo
 *         variantFile.parseSamples = False
 */
    __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 = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_cur_scope->__pyx_v_variantFile->open(__pyx_t_6);

    /* "vcfnp.pyx":638
 *         variantFile = new VariantCallFile()
 *         variantFile.open(current_filename)
 *         variantFile.parseInfo = parseInfo             # <<<<<<<<<<<<<<
 *         variantFile.parseSamples = False
 *         if region is not None:
 */
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_parseInfo); if (unlikely((__pyx_t_7 == (bool)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_cur_scope->__pyx_v_variantFile->parseInfo = __pyx_t_7;

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

    /* "vcfnp.pyx":640
 *         variantFile.parseInfo = parseInfo
 *         variantFile.parseSamples = False
 *         if region is not None:             # <<<<<<<<<<<<<<
 *             region_set = variantFile.setRegion(region)
 *             if not region_set:
 */
    __pyx_t_8 = (__pyx_cur_scope->__pyx_v_region != Py_None);
    __pyx_t_9 = (__pyx_t_8 != 0);
    if (__pyx_t_9) {

      /* "vcfnp.pyx":641
 *         variantFile.parseSamples = False
 *         if region is not None:
 *             region_set = variantFile.setRegion(region)             # <<<<<<<<<<<<<<
 *             if not region_set:
 *                 raise StopIteration
 */
      __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 = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_cur_scope->__pyx_v_region_set = __pyx_cur_scope->__pyx_v_variantFile->setRegion(__pyx_t_6);

      /* "vcfnp.pyx":642
 *         if region is not None:
 *             region_set = variantFile.setRegion(region)
 *             if not region_set:             # <<<<<<<<<<<<<<
 *                 raise StopIteration
 *         var = new Variant(deref(variantFile))
 */
      __pyx_t_9 = ((!(__pyx_cur_scope->__pyx_v_region_set != 0)) != 0);
      if (__pyx_t_9) {

        /* "vcfnp.pyx":643
 *             region_set = variantFile.setRegion(region)
 *             if not region_set:
 *                 raise StopIteration             # <<<<<<<<<<<<<<
 *         var = new Variant(deref(variantFile))
 * 
 */
        __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "vcfnp.pyx":644
 *             if not region_set:
 *                 raise StopIteration
 *         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":646
 *         var = new Variant(deref(variantFile))
 * 
 *         while _get_next_variant(variantFile, var):             # <<<<<<<<<<<<<<
 *             yield _mkvrow(var, fieldspec, filterIds, flatten_filter)
 * 
 */
    while (1) {
      __pyx_t_9 = (__pyx_f_5vcfnp__get_next_variant(__pyx_cur_scope->__pyx_v_variantFile, __pyx_cur_scope->__pyx_v_var) != 0);
      if (!__pyx_t_9) break;

      /* "vcfnp.pyx":647
 * 
 *         while _get_next_variant(variantFile, var):
 *             yield _mkvrow(var, fieldspec, filterIds, flatten_filter)             # <<<<<<<<<<<<<<
 * 
 *         del variantFile
 */
      __pyx_t_4 = __pyx_f_5vcfnp__mkvrow(__pyx_cur_scope->__pyx_v_var, __pyx_cur_scope->__pyx_v_fieldspec, __pyx_cur_scope->__pyx_v_filterIds, __pyx_cur_scope->__pyx_v_flatten_filter); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __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_L10_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 = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }

    /* "vcfnp.pyx":649
 *             yield _mkvrow(var, fieldspec, filterIds, flatten_filter)
 * 
 *         del variantFile             # <<<<<<<<<<<<<<
 *         del var
 * 
 */
    delete __pyx_cur_scope->__pyx_v_variantFile;

    /* "vcfnp.pyx":650
 * 
 *         del variantFile
 *         del var             # <<<<<<<<<<<<<<
 * 
 * 
 */
    delete __pyx_cur_scope->__pyx_v_var;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":626
 * 
 * 
 * def itervariants(filenames,             # <<<<<<<<<<<<<<
 *                  region,
 *                  list fieldspec,
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __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_32generator2(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "vcfnp.pyx":653
 * 
 * 
 * def itervariants_with_condition(filenames,             # <<<<<<<<<<<<<<
 *                                 region,
 *                                 list fieldspec,
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_31itervariants_with_condition(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5vcfnp_30itervariants_with_condition[] = "itervariants_with_condition(filenames, region, list fieldspec, tuple filterIds, bool flatten_filter, parseInfo, condition)";
static PyMethodDef __pyx_mdef_5vcfnp_31itervariants_with_condition = {__Pyx_NAMESTR("itervariants_with_condition"), (PyCFunction)__pyx_pw_5vcfnp_31itervariants_with_condition, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5vcfnp_30itervariants_with_condition)};
static PyObject *__pyx_pw_5vcfnp_31itervariants_with_condition(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_filenames = 0;
  PyObject *__pyx_v_region = 0;
  PyObject *__pyx_v_fieldspec = 0;
  PyObject *__pyx_v_filterIds = 0;
  int __pyx_v_flatten_filter;
  PyObject *__pyx_v_parseInfo = 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_fieldspec,&__pyx_n_s_filterIds,&__pyx_n_s_flatten_filter,&__pyx_n_s_parseInfo,&__pyx_n_s_condition,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("itervariants_with_condition", 1, 7, 7, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fieldspec)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("itervariants_with_condition", 1, 7, 7, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_filterIds)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("itervariants_with_condition", 1, 7, 7, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flatten_filter)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("itervariants_with_condition", 1, 7, 7, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_parseInfo)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("itervariants_with_condition", 1, 7, 7, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  6:
        if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_condition)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("itervariants_with_condition", 1, 7, 7, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __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 = 653; __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_fieldspec = ((PyObject*)values[2]);
    __pyx_v_filterIds = ((PyObject*)values[3]);
    __pyx_v_flatten_filter = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_flatten_filter == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_parseInfo = values[5];
    __pyx_v_condition = values[6];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("itervariants_with_condition", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __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_fieldspec), (&PyList_Type), 1, "fieldspec", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filterIds), (&PyTuple_Type), 1, "filterIds", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vcfnp_30itervariants_with_condition(__pyx_self, __pyx_v_filenames, __pyx_v_region, __pyx_v_fieldspec, __pyx_v_filterIds, __pyx_v_flatten_filter, __pyx_v_parseInfo, __pyx_v_condition);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vcfnp_30itervariants_with_condition(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filenames, PyObject *__pyx_v_region, PyObject *__pyx_v_fieldspec, PyObject *__pyx_v_filterIds, int __pyx_v_flatten_filter, PyObject *__pyx_v_parseInfo, PyObject *__pyx_v_condition) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_11_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_11_itervariants_with_condition *)__pyx_tp_new_5vcfnp___pyx_scope_struct_11_itervariants_with_condition(__pyx_ptype_5vcfnp___pyx_scope_struct_11_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_fieldspec = __pyx_v_fieldspec;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fieldspec);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fieldspec);
  __pyx_cur_scope->__pyx_v_filterIds = __pyx_v_filterIds;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_filterIds);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_filterIds);
  __pyx_cur_scope->__pyx_v_flatten_filter = __pyx_v_flatten_filter;
  __pyx_cur_scope->__pyx_v_parseInfo = __pyx_v_parseInfo;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_parseInfo);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_parseInfo);
  __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_32generator2, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __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_32generator2(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5vcfnp___pyx_scope_struct_11_itervariants_with_condition *__pyx_cur_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_11_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;
  bool __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  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 = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

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

  /* "vcfnp.pyx":664
 *     cdef Variant *var
 *     cdef long i = 0
 *     cdef long 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 = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_cur_scope->__pyx_v_n = __pyx_t_1;

  /* "vcfnp.pyx":666
 *     cdef long 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 = 666; __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 = 666; __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 = 666; __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 = 666; __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 = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_2);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_current_filename);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_current_filename, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;

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

    /* "vcfnp.pyx":668
 *     for current_filename in filenames:
 *         variantFile = new VariantCallFile()
 *         variantFile.open(current_filename)             # <<<<<<<<<<<<<<
 *         variantFile.parseInfo = parseInfo
 *         variantFile.parseSamples = False
 */
    __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 = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_cur_scope->__pyx_v_variantFile->open(__pyx_t_6);

    /* "vcfnp.pyx":669
 *         variantFile = new VariantCallFile()
 *         variantFile.open(current_filename)
 *         variantFile.parseInfo = parseInfo             # <<<<<<<<<<<<<<
 *         variantFile.parseSamples = False
 *         if region is not None:
 */
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_parseInfo); if (unlikely((__pyx_t_7 == (bool)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_cur_scope->__pyx_v_variantFile->parseInfo = __pyx_t_7;

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

    /* "vcfnp.pyx":671
 *         variantFile.parseInfo = parseInfo
 *         variantFile.parseSamples = False
 *         if region is not None:             # <<<<<<<<<<<<<<
 *             region_set = variantFile.setRegion(region)
 *             if not region_set:
 */
    __pyx_t_8 = (__pyx_cur_scope->__pyx_v_region != Py_None);
    __pyx_t_9 = (__pyx_t_8 != 0);
    if (__pyx_t_9) {

      /* "vcfnp.pyx":672
 *         variantFile.parseSamples = False
 *         if region is not None:
 *             region_set = variantFile.setRegion(region)             # <<<<<<<<<<<<<<
 *             if not region_set:
 *                 raise StopIteration
 */
      __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_region_set = __pyx_cur_scope->__pyx_v_variantFile->setRegion(__pyx_t_6);

      /* "vcfnp.pyx":673
 *         if region is not None:
 *             region_set = variantFile.setRegion(region)
 *             if not region_set:             # <<<<<<<<<<<<<<
 *                 raise StopIteration
 *         var = new Variant(deref(variantFile))
 */
      __pyx_t_9 = ((!(__pyx_cur_scope->__pyx_v_region_set != 0)) != 0);
      if (__pyx_t_9) {

        /* "vcfnp.pyx":674
 *             region_set = variantFile.setRegion(region)
 *             if not region_set:
 *                 raise StopIteration             # <<<<<<<<<<<<<<
 *         var = new Variant(deref(variantFile))
 * 
 */
        __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "vcfnp.pyx":675
 *             if not region_set:
 *                 raise StopIteration
 *         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":677
 *         var = new Variant(deref(variantFile))
 * 
 *         while i < n and _get_next_variant(variantFile, var):             # <<<<<<<<<<<<<<
 *             if condition[i]:
 *                 yield _mkvrow(var, fieldspec, filterIds, flatten_filter)
 */
    while (1) {
      __pyx_t_9 = (__pyx_cur_scope->__pyx_v_i < __pyx_cur_scope->__pyx_v_n);
      if (__pyx_t_9) {
        __pyx_t_8 = (__pyx_f_5vcfnp__get_next_variant(__pyx_cur_scope->__pyx_v_variantFile, __pyx_cur_scope->__pyx_v_var) != 0);
      } else {
        __pyx_t_8 = __pyx_t_9;
      }
      if (!__pyx_t_8) break;

      /* "vcfnp.pyx":678
 * 
 *         while i < n and _get_next_variant(variantFile, var):
 *             if condition[i]:             # <<<<<<<<<<<<<<
 *                 yield _mkvrow(var, fieldspec, filterIds, flatten_filter)
 *             i += 1
 */
      __pyx_t_4 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_condition, __pyx_cur_scope->__pyx_v_i, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __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 = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_8) {

        /* "vcfnp.pyx":679
 *         while i < n and _get_next_variant(variantFile, var):
 *             if condition[i]:
 *                 yield _mkvrow(var, fieldspec, filterIds, flatten_filter)             # <<<<<<<<<<<<<<
 *             i += 1
 * 
 */
        __pyx_t_4 = __pyx_f_5vcfnp__mkvrow(__pyx_cur_scope->__pyx_v_var, __pyx_cur_scope->__pyx_v_fieldspec, __pyx_cur_scope->__pyx_v_filterIds, __pyx_cur_scope->__pyx_v_flatten_filter); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __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 = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L10;
      }
      __pyx_L10:;

      /* "vcfnp.pyx":680
 *             if condition[i]:
 *                 yield _mkvrow(var, fieldspec, filterIds, flatten_filter)
 *             i += 1             # <<<<<<<<<<<<<<
 * 
 *         del variantFile
 */
      __pyx_cur_scope->__pyx_v_i = (__pyx_cur_scope->__pyx_v_i + 1);
    }

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

    /* "vcfnp.pyx":683
 * 
 *         del variantFile
 *         del var             # <<<<<<<<<<<<<<
 * 
 * 
 */
    delete __pyx_cur_scope->__pyx_v_var;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":653
 * 
 * 
 * def itervariants_with_condition(filenames,             # <<<<<<<<<<<<<<
 *                                 region,
 *                                 list fieldspec,
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __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":686
 * 
 * 
 * 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":688
 * 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;

  /* "vcfnp.pyx":686
 * 
 * 
 * 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))
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":691
 * 
 * 
 * cdef inline object _mkvrow(Variant *var,             # <<<<<<<<<<<<<<
 *                             list fieldspec,
 *                             tuple filterIds,
 */

static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkvrow(vcf::Variant *__pyx_v_var, PyObject *__pyx_v_fieldspec, PyObject *__pyx_v_filterIds, int __pyx_v_flatten_filter) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_v_f = NULL;
  PyObject *__pyx_v_arity = NULL;
  PyObject *__pyx_v_fill = NULL;
  PyObject *__pyx_v_vcf_type = NULL;
  PyObject *__pyx_v_transformer = NULL;
  PyObject *__pyx_v_val = 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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  std::string __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  int __pyx_t_16;
  int __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_mkvrow", 0);

  /* "vcfnp.pyx":695
 *                             tuple filterIds,
 *                             bint flatten_filter):
 *     out = list()             # <<<<<<<<<<<<<<
 *     for f, arity, fill, vcf_type, transformer in fieldspec:
 *         val = _mkvval(var, f, arity, fill, vcf_type, transformer, filterIds)
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "vcfnp.pyx":696
 *                             bint flatten_filter):
 *     out = list()
 *     for f, arity, fill, vcf_type, transformer in fieldspec:             # <<<<<<<<<<<<<<
 *         val = _mkvval(var, f, arity, fill, vcf_type, transformer, filterIds)
 *         if f == 'FILTER' and flatten_filter:
 */
  if (unlikely(__pyx_v_fieldspec == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = __pyx_v_fieldspec; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __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[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
      PyObject* sequence = __pyx_t_3;
      #if CYTHON_COMPILING_IN_CPYTHON
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 5)) {
        if (size > 5) __Pyx_RaiseTooManyValuesError(5);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2); 
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 3); 
        __pyx_t_8 = PyTuple_GET_ITEM(sequence, 4); 
      } else {
        __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 2); 
        __pyx_t_7 = PyList_GET_ITEM(sequence, 3); 
        __pyx_t_8 = PyList_GET_ITEM(sequence, 4); 
      }
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_8);
      #else
      {
        Py_ssize_t i;
        PyObject** temps[5] = {&__pyx_t_4,&__pyx_t_5,&__pyx_t_6,&__pyx_t_7,&__pyx_t_8};
        for (i=0; i < 5; i++) {
          PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(item);
          *(temps[i]) = item;
        }
      }
      #endif
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      Py_ssize_t index = -1;
      PyObject** temps[5] = {&__pyx_t_4,&__pyx_t_5,&__pyx_t_6,&__pyx_t_7,&__pyx_t_8};
      __pyx_t_9 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
      for (index=0; index < 5; index++) {
        PyObject* item = __pyx_t_10(__pyx_t_9); if (unlikely(!item)) goto __pyx_L5_unpacking_failed;
        __Pyx_GOTREF(item);
        *(temps[index]) = item;
      }
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_10 = NULL;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_10 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_arity, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_fill, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_XDECREF_SET(__pyx_v_vcf_type, __pyx_t_7);
    __pyx_t_7 = 0;
    __Pyx_XDECREF_SET(__pyx_v_transformer, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "vcfnp.pyx":697
 *     out = list()
 *     for f, arity, fill, vcf_type, transformer in fieldspec:
 *         val = _mkvval(var, f, arity, fill, vcf_type, transformer, filterIds)             # <<<<<<<<<<<<<<
 *         if f == 'FILTER' and flatten_filter:
 *             out.extend(val)
 */
    __pyx_t_11 = __pyx_convert_string_from_py_(__pyx_v_f); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_v_arity); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_v_vcf_type); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = __pyx_f_5vcfnp__mkvval(__pyx_v_var, __pyx_t_11, __pyx_t_12, __pyx_v_fill, __pyx_t_13, __pyx_v_transformer, __pyx_v_filterIds); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "vcfnp.pyx":698
 *     for f, arity, fill, vcf_type, transformer in fieldspec:
 *         val = _mkvval(var, f, arity, fill, vcf_type, transformer, filterIds)
 *         if f == 'FILTER' and flatten_filter:             # <<<<<<<<<<<<<<
 *             out.extend(val)
 *         else:
 */
    __pyx_t_14 = (__Pyx_PyString_Equals(__pyx_v_f, __pyx_n_s_FILTER, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_14) {
      __pyx_t_15 = __pyx_v_flatten_filter;
      __pyx_t_16 = __pyx_t_15;
    } else {
      __pyx_t_16 = __pyx_t_14;
    }
    if (__pyx_t_16) {

      /* "vcfnp.pyx":699
 *         val = _mkvval(var, f, arity, fill, vcf_type, transformer, filterIds)
 *         if f == 'FILTER' and flatten_filter:
 *             out.extend(val)             # <<<<<<<<<<<<<<
 *         else:
 *             out.append(val)
 */
      __pyx_t_17 = __Pyx_PyList_Extend(__pyx_v_out, __pyx_v_val); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L7;
    }
    /*else*/ {

      /* "vcfnp.pyx":701
 *             out.extend(val)
 *         else:
 *             out.append(val)             # <<<<<<<<<<<<<<
 *     return tuple(out)
 * 
 */
      __pyx_t_17 = __Pyx_PyList_Append(__pyx_v_out, __pyx_v_val); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L7:;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":702
 *         else:
 *             out.append(val)
 *     return tuple(out)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_AsTuple(__pyx_v_out); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "vcfnp.pyx":691
 * 
 * 
 * cdef inline object _mkvrow(Variant *var,             # <<<<<<<<<<<<<<
 *                             list fieldspec,
 *                             tuple filterIds,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("vcfnp._mkvrow", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XDECREF(__pyx_v_f);
  __Pyx_XDECREF(__pyx_v_arity);
  __Pyx_XDECREF(__pyx_v_fill);
  __Pyx_XDECREF(__pyx_v_vcf_type);
  __Pyx_XDECREF(__pyx_v_transformer);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":705
 * 
 * 
 * cdef inline object _mkvval(Variant *var, string field, int arity, object fill, int vcf_type, transformer, tuple 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, int __pyx_v_vcf_type, PyObject *__pyx_v_transformer, 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_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_mkvval", 0);

  /* "vcfnp.pyx":706
 * 
 * cdef inline object _mkvval(Variant *var, string field, int arity, object fill, int vcf_type, transformer, tuple 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":707
 * cdef inline object _mkvval(Variant *var, string field, int arity, object fill, int vcf_type, transformer, tuple 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 = 707; __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":708
 *     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":709
 *         out = var.sequenceName
 *     elif field == FIELD_NAME_POS:
 *         out = var.position             # <<<<<<<<<<<<<<
 *     elif field == FIELD_NAME_ID:
 *         out = var.id
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_var->position); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __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":710
 *     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":711
 *         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 = 711; __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":712
 *     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":713
 *         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 = 713; __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":714
 *     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":715
 *         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 = 715; __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":716
 *     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":717
 *         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 = 717; __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":718
 *     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":719
 *         out = var.quality
 *     elif field == FIELD_NAME_FILTER:
 *         out = _mkfilterval(var, filterIds)             # <<<<<<<<<<<<<<
 *     elif field == FIELD_NAME_NUM_ALLELES:
 *         out = <int>(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 = 719; __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":720
 *     elif field == FIELD_NAME_FILTER:
 *         out = _mkfilterval(var, filterIds)
 *     elif field == FIELD_NAME_NUM_ALLELES:             # <<<<<<<<<<<<<<
 *         out = <int>(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":721
 *         out = _mkfilterval(var, filterIds)
 *     elif field == FIELD_NAME_NUM_ALLELES:
 *         out = <int>(var.alt.size() + 1)             # <<<<<<<<<<<<<<
 *     elif field == FIELD_NAME_IS_SNP:
 *         out = _is_snp(var)
 */
    __pyx_t_2 = __Pyx_PyInt_From_int(((int)(__pyx_v_var->alt.size() + 1))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __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":722
 *     elif field == FIELD_NAME_NUM_ALLELES:
 *         out = <int>(var.alt.size() + 1)
 *     elif field == FIELD_NAME_IS_SNP:             # <<<<<<<<<<<<<<
 *         out = _is_snp(var)
 *     elif field == FIELD_NAME_SVLEN:
 */
  __pyx_t_1 = ((__pyx_v_field == __pyx_v_5vcfnp_FIELD_NAME_IS_SNP) != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":723
 *         out = <int>(var.alt.size() + 1)
 *     elif field == FIELD_NAME_IS_SNP:
 *         out = _is_snp(var)             # <<<<<<<<<<<<<<
 *     elif field == FIELD_NAME_SVLEN:
 *         out = _svlen(var, arity, fill)
 */
    __pyx_t_2 = __pyx_f_5vcfnp__is_snp(__pyx_v_var); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __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":724
 *     elif field == FIELD_NAME_IS_SNP:
 *         out = _is_snp(var)
 *     elif field == FIELD_NAME_SVLEN:             # <<<<<<<<<<<<<<
 *         out = _svlen(var, arity, fill)
 *     elif transformer is not None:
 */
  __pyx_t_1 = ((__pyx_v_field == __pyx_v_5vcfnp_FIELD_NAME_SVLEN) != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":725
 *         out = _is_snp(var)
 *     elif field == FIELD_NAME_SVLEN:
 *         out = _svlen(var, arity, fill)             # <<<<<<<<<<<<<<
 *     elif transformer is not None:
 *         out = transformer(var.info[field])
 */
    __pyx_t_2 = __pyx_f_5vcfnp__svlen(__pyx_v_var, __pyx_v_arity, __pyx_v_fill); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __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":726
 *     elif field == FIELD_NAME_SVLEN:
 *         out = _svlen(var, arity, fill)
 *     elif transformer is not None:             # <<<<<<<<<<<<<<
 *         out = transformer(var.info[field])
 *     elif vcf_type == FIELD_BOOL:
 */
  __pyx_t_1 = (__pyx_v_transformer != Py_None);
  __pyx_t_3 = (__pyx_t_1 != 0);
  if (__pyx_t_3) {

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

  /* "vcfnp.pyx":728
 *     elif 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_3 = ((__pyx_v_vcf_type == vcf::FIELD_BOOL) != 0);
  if (__pyx_t_3) {

    /* "vcfnp.pyx":730
 *     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_2 = __Pyx_PyBool_FromLong((__pyx_v_var->infoFlags.count(__pyx_v_field) > 0)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __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":732
 *         out = (var.infoFlags.count(field) > 0)
 *     else:
 *         out = _mkval(var.info[field], arity, fill, vcf_type)             # <<<<<<<<<<<<<<
 *     return out
 * 
 */
    __pyx_t_2 = __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_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __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":733
 *     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;

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __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":736
 * 
 * 
 * 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":737
 * 
 * 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":738
 * 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":739
 *     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":741
 *             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 = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_out = __pyx_t_2;
      __pyx_t_2 = 0;
    }
    __pyx_L4:;
    goto __pyx_L3;
  }

  /* "vcfnp.pyx":742
 *         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":743
 *             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 = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_out = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "vcfnp.pyx":744
 *     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 = 744; __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 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_out, __pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L3;
  }

  /* "vcfnp.pyx":745
 *         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":746
 *         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 = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_out = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "vcfnp.pyx":747
 *     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, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __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 = 747; __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 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_out, __pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "vcfnp.pyx":749
 *         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 = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_out = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "vcfnp.pyx":750
 *     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 = 750; __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, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_out, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "vcfnp.pyx":751
 *         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 = 751; __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 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_out, __pyx_t_3);
    __pyx_t_3 = 0;
  }
  __pyx_L3:;

  /* "vcfnp.pyx":752
 *         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;

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

  /* function exit code */
  __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":755
 * 
 * 
 * cdef inline object _mkfilterval(Variant *var, tuple 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":756
 * 
 * cdef inline object _mkfilterval(Variant *var, tuple 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 = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyList_CheckExact(__pyx_t_1))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = __pyx_t_1;
  __Pyx_INCREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_filters = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

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

  /* "vcfnp.pyx":758
 *     filters = <list>split(var.filter, SEMICOLON)
 *     out = [(id in filters) for id in filterIds]
 *     out = tuple(out)             # <<<<<<<<<<<<<<
 *     return out
 * 
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __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_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_out, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "vcfnp.pyx":759
 *     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;

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

  /* function exit code */
  __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":762
 * 
 * 
 * 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;
  size_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  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":765
 *     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":766
 *     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_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;
  }

  /* "vcfnp.pyx":767
 *     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_2 = __pyx_v_var->alt.size();
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "vcfnp.pyx":768
 *         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_4 = __pyx_convert_string_to_py_(__pyx_v_var->alt.at(__pyx_v_i)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_alt, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "vcfnp.pyx":769
 *     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(__pyx_v_alt);
    __pyx_t_5 = __pyx_v_alt;
    __pyx_t_1 = (__Pyx_PyBytes_Equals(__pyx_t_5, __pyx_n_s_A, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_6 = (__pyx_t_1 != 0);
    if (__pyx_t_6) {
      __pyx_t_1 = (__Pyx_PyBytes_Equals(__pyx_t_5, __pyx_n_s_C, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_7 = (__pyx_t_1 != 0);
      __pyx_t_1 = __pyx_t_7;
    } else {
      __pyx_t_1 = __pyx_t_6;
    }
    if (__pyx_t_1) {
      __pyx_t_6 = (__Pyx_PyBytes_Equals(__pyx_t_5, __pyx_n_s_G, Py_NE)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_7 = (__pyx_t_6 != 0);
      __pyx_t_6 = __pyx_t_7;
    } else {
      __pyx_t_6 = __pyx_t_1;
    }
    if (__pyx_t_6) {
      __pyx_t_1 = (__Pyx_PyBytes_Equals(__pyx_t_5, __pyx_n_s_T, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_7 = (__pyx_t_1 != 0);
      __pyx_t_1 = __pyx_t_7;
    } else {
      __pyx_t_1 = __pyx_t_6;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = (__pyx_t_1 != 0);
    if (__pyx_t_6) {

      /* "vcfnp.pyx":770
 *         alt = var.alt.at(i)
 *         if alt not in {'A', 'C', 'G', 'T'}:
 *             return False             # <<<<<<<<<<<<<<
 *     return True
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      goto __pyx_L0;
    }
  }

  /* "vcfnp.pyx":771
 *         if alt not in {'A', 'C', 'G', 'T'}:
 *             return False
 *     return True             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__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;
}

/* "vcfnp.pyx":774
 * 
 * 
 * cdef inline object _svlen(Variant *var, int arity, object fill):             # <<<<<<<<<<<<<<
 *     if arity == 1:
 *         return _svlen_single(var.ref, var.alt, fill)
 */

static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__svlen(vcf::Variant *__pyx_v_var, int __pyx_v_arity, PyObject *__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("_svlen", 0);

  /* "vcfnp.pyx":775
 * 
 * cdef inline object _svlen(Variant *var, int arity, object fill):
 *     if arity == 1:             # <<<<<<<<<<<<<<
 *         return _svlen_single(var.ref, var.alt, fill)
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_arity == 1) != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":776
 * cdef inline object _svlen(Variant *var, int arity, object fill):
 *     if arity == 1:
 *         return _svlen_single(var.ref, var.alt, fill)             # <<<<<<<<<<<<<<
 *     else:
 *         return _svlen_multi(var.ref, var.alt, arity, fill)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_5vcfnp__svlen_single(__pyx_v_var->ref, __pyx_v_var->alt, __pyx_v_fill); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }
  /*else*/ {

    /* "vcfnp.pyx":778
 *         return _svlen_single(var.ref, var.alt, fill)
 *     else:
 *         return _svlen_multi(var.ref, var.alt, arity, fill)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_5vcfnp__svlen_multi(__pyx_v_var->ref, __pyx_v_var->alt, __pyx_v_arity, __pyx_v_fill); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "vcfnp.pyx":774
 * 
 * 
 * cdef inline object _svlen(Variant *var, int arity, object fill):             # <<<<<<<<<<<<<<
 *     if arity == 1:
 *         return _svlen_single(var.ref, var.alt, fill)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vcfnp._svlen", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":781
 * 
 * 
 * cdef inline object _svlen_single(string ref, vector[string]& alt, object fill):             # <<<<<<<<<<<<<<
 *     if alt.size() > 0:
 *         return <int>(alt.at(0).size() - ref.size())
 */

static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__svlen_single(std::string __pyx_v_ref, std::vector<std::string> &__pyx_v_alt, PyObject *__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("_svlen_single", 0);

  /* "vcfnp.pyx":782
 * 
 * cdef inline object _svlen_single(string ref, vector[string]& alt, object fill):
 *     if alt.size() > 0:             # <<<<<<<<<<<<<<
 *         return <int>(alt.at(0).size() - ref.size())
 *     return fill
 */
  __pyx_t_1 = ((__pyx_v_alt.size() > 0) != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":783
 * cdef inline object _svlen_single(string ref, vector[string]& alt, object fill):
 *     if alt.size() > 0:
 *         return <int>(alt.at(0).size() - ref.size())             # <<<<<<<<<<<<<<
 *     return fill
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyInt_From_int(((int)(__pyx_v_alt.at(0).size() - __pyx_v_ref.size()))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "vcfnp.pyx":784
 *     if alt.size() > 0:
 *         return <int>(alt.at(0).size() - ref.size())
 *     return fill             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_fill);
  __pyx_r = __pyx_v_fill;
  goto __pyx_L0;

  /* "vcfnp.pyx":781
 * 
 * 
 * cdef inline object _svlen_single(string ref, vector[string]& alt, object fill):             # <<<<<<<<<<<<<<
 *     if alt.size() > 0:
 *         return <int>(alt.at(0).size() - ref.size())
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vcfnp._svlen_single", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":787
 * 
 * 
 * cdef inline object _svlen_multi(string ref, vector[string]& alt, int arity, object fill):             # <<<<<<<<<<<<<<
 *     cdef int i
 *     out = list()
 */

static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__svlen_multi(std::string __pyx_v_ref, std::vector<std::string> &__pyx_v_alt, int __pyx_v_arity, PyObject *__pyx_v_fill) {
  int __pyx_v_i;
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_svlen_multi", 0);

  /* "vcfnp.pyx":789
 * cdef inline object _svlen_multi(string ref, vector[string]& alt, int arity, object fill):
 *     cdef int i
 *     out = list()             # <<<<<<<<<<<<<<
 *     for i in range(arity):
 *         if i < alt.size():
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "vcfnp.pyx":790
 *     cdef int i
 *     out = list()
 *     for i in range(arity):             # <<<<<<<<<<<<<<
 *         if i < alt.size():
 *             out.append(<int>(alt.at(i).size() - ref.size()))
 */
  __pyx_t_2 = __pyx_v_arity;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "vcfnp.pyx":791
 *     out = list()
 *     for i in range(arity):
 *         if i < alt.size():             # <<<<<<<<<<<<<<
 *             out.append(<int>(alt.at(i).size() - ref.size()))
 *         else:
 */
    __pyx_t_4 = ((__pyx_v_i < __pyx_v_alt.size()) != 0);
    if (__pyx_t_4) {

      /* "vcfnp.pyx":792
 *     for i in range(arity):
 *         if i < alt.size():
 *             out.append(<int>(alt.at(i).size() - ref.size()))             # <<<<<<<<<<<<<<
 *         else:
 *             out.append(fill)
 */
      __pyx_t_1 = __Pyx_PyInt_From_int(((int)(__pyx_v_alt.at(__pyx_v_i).size() - __pyx_v_ref.size()))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_out, __pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "vcfnp.pyx":794
 *             out.append(<int>(alt.at(i).size() - ref.size()))
 *         else:
 *             out.append(fill)             # <<<<<<<<<<<<<<
 *     return out
 * 
 */
      __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_out, __pyx_v_fill); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L5:;
  }

  /* "vcfnp.pyx":795
 *         else:
 *             out.append(fill)
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "vcfnp.pyx":787
 * 
 * 
 * cdef inline object _svlen_multi(string ref, vector[string]& alt, int arity, object fill):             # <<<<<<<<<<<<<<
 *     cdef int i
 *     out = list()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vcfnp._svlen_multi", __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":798
 * 
 * 
 * def _warn_duplicates(fields):             # <<<<<<<<<<<<<<
 *     visited = set()
 *     for f in fields:
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_34_warn_duplicates(PyObject *__pyx_self, PyObject *__pyx_v_fields); /*proto*/
static char __pyx_doc_5vcfnp_33_warn_duplicates[] = "_warn_duplicates(fields)";
static PyMethodDef __pyx_mdef_5vcfnp_34_warn_duplicates = {__Pyx_NAMESTR("_warn_duplicates"), (PyCFunction)__pyx_pw_5vcfnp_34_warn_duplicates, METH_O, __Pyx_DOCSTR(__pyx_doc_5vcfnp_33_warn_duplicates)};
static PyObject *__pyx_pw_5vcfnp_34_warn_duplicates(PyObject *__pyx_self, PyObject *__pyx_v_fields) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_warn_duplicates (wrapper)", 0);
  __pyx_r = __pyx_pf_5vcfnp_33_warn_duplicates(__pyx_self, ((PyObject *)__pyx_v_fields));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vcfnp_33_warn_duplicates(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fields) {
  PyObject *__pyx_v_visited = NULL;
  PyObject *__pyx_v_f = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_warn_duplicates", 0);

  /* "vcfnp.pyx":799
 * 
 * def _warn_duplicates(fields):
 *     visited = set()             # <<<<<<<<<<<<<<
 *     for f in fields:
 *         if f in visited:
 */
  __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_visited = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "vcfnp.pyx":800
 * def _warn_duplicates(fields):
 *     visited = set()
 *     for f in fields:             # <<<<<<<<<<<<<<
 *         if f in visited:
 *             print >>sys.stderr, 'WARNING: duplicate definition in header: %s' % f
 */
  if (PyList_CheckExact(__pyx_v_fields) || PyTuple_CheckExact(__pyx_v_fields)) {
    __pyx_t_1 = __pyx_v_fields; __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_fields); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __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 = 800; __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 = 800; __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 = 800; __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 = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "vcfnp.pyx":801
 *     visited = set()
 *     for f in fields:
 *         if f in visited:             # <<<<<<<<<<<<<<
 *             print >>sys.stderr, 'WARNING: duplicate definition in header: %s' % f
 *         visited.add(f)
 */
    __pyx_t_5 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_v_visited, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_6 = (__pyx_t_5 != 0);
    if (__pyx_t_6) {

      /* "vcfnp.pyx":802
 *     for f in fields:
 *         if f in visited:
 *             print >>sys.stderr, 'WARNING: duplicate definition in header: %s' % f             # <<<<<<<<<<<<<<
 *         visited.add(f)
 * 
 */
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_stderr); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_WARNING_duplicate_definition_in, __pyx_v_f); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_PrintOne(__pyx_t_7, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "vcfnp.pyx":803
 *         if f in visited:
 *             print >>sys.stderr, 'WARNING: duplicate definition in header: %s' % f
 *         visited.add(f)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_8 = PySet_Add(__pyx_v_visited, __pyx_v_f); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":798
 * 
 * 
 * def _warn_duplicates(fields):             # <<<<<<<<<<<<<<
 *     visited = set()
 *     for f in fields:
 */

  /* function exit code */
  __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_7);
  __Pyx_AddTraceback("vcfnp._warn_duplicates", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_visited);
  __Pyx_XDECREF(__pyx_v_f);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":806
 * 
 * 
 * cdef inline object _mkval(vector[string]& string_vals, int arity, object fill, int vcf_type):             # <<<<<<<<<<<<<<
 *     if vcf_type == FIELD_FLOAT:
 *         out = _mkval_double(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
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_mkval", 0);

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

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

    /* "vcfnp.pyx":808
 * cdef inline object _mkval(vector[string]& string_vals, int arity, object fill, int vcf_type):
 *     if vcf_type == FIELD_FLOAT:
 *         out = _mkval_double(string_vals, arity, fill)             # <<<<<<<<<<<<<<
 *     elif vcf_type == FIELD_INTEGER:
 *         out = _mkval_long(string_vals, arity, fill)
 */
    __pyx_t_1 = __pyx_f_5vcfnp__mkval_double(__pyx_v_string_vals, __pyx_v_arity, __pyx_v_fill); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_out = __pyx_t_1;
    __pyx_t_1 = 0;
    break;

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

    /* "vcfnp.pyx":810
 *         out = _mkval_double(string_vals, arity, fill)
 *     elif vcf_type == FIELD_INTEGER:
 *         out = _mkval_long(string_vals, arity, fill)             # <<<<<<<<<<<<<<
 *     else:
 *         # make strings by default
 */
    __pyx_t_1 = __pyx_f_5vcfnp__mkval_long(__pyx_v_string_vals, __pyx_v_arity, __pyx_v_fill); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_out = __pyx_t_1;
    __pyx_t_1 = 0;
    break;
    default:

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

  /* "vcfnp.pyx":814
 *         # 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;

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __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":817
 * 
 * 
 * cdef inline object _mkval_string(vector[string]& string_vals, int arity, object 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, PyObject *__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":818
 * 
 * cdef inline object _mkval_string(vector[string]& string_vals, int arity, object 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":819
 * cdef inline object _mkval_string(vector[string]& string_vals, int arity, object 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":820
 *     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 = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;
    }
    /*else*/ {

      /* "vcfnp.pyx":822
 *             return string_vals.at(0)
 *         else:
 *             return fill             # <<<<<<<<<<<<<<
 *     else:
 *         return _mkval_string_multi(string_vals, arity, fill)
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_fill);
      __pyx_r = __pyx_v_fill;
      goto __pyx_L0;
    }
  }
  /*else*/ {

    /* "vcfnp.pyx":824
 *             return fill
 *     else:
 *         return _mkval_string_multi(string_vals, arity, fill)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __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 = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

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

  /* function exit code */
  __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":827
 * 
 * 
 * cdef inline object _mkval_string_multi(vector[string]& string_vals, int arity, object fill):             # <<<<<<<<<<<<<<
 *     cdef int i
 *     out = list()
 */

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

  /* "vcfnp.pyx":829
 * cdef inline object _mkval_string_multi(vector[string]& string_vals, int arity, object fill):
 *     cdef int i
 *     out = list()             # <<<<<<<<<<<<<<
 *     for i in range(arity):
 *         if i < string_vals.size():
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "vcfnp.pyx":830
 *     cdef int i
 *     out = list()
 *     for i in range(arity):             # <<<<<<<<<<<<<<
 *         if i < string_vals.size():
 *             out.append(string_vals.at(i))
 */
  __pyx_t_2 = __pyx_v_arity;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "vcfnp.pyx":831
 *     out = list()
 *     for i in range(arity):
 *         if i < string_vals.size():             # <<<<<<<<<<<<<<
 *             out.append(string_vals.at(i))
 *         else:
 */
    __pyx_t_4 = ((__pyx_v_i < __pyx_v_string_vals.size()) != 0);
    if (__pyx_t_4) {

      /* "vcfnp.pyx":832
 *     for i in range(arity):
 *         if i < string_vals.size():
 *             out.append(string_vals.at(i))             # <<<<<<<<<<<<<<
 *         else:
 *             out.append(fill)
 */
      __pyx_t_1 = __pyx_convert_string_to_py_(__pyx_v_string_vals.at(__pyx_v_i)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_out, __pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "vcfnp.pyx":834
 *             out.append(string_vals.at(i))
 *         else:
 *             out.append(fill)             # <<<<<<<<<<<<<<
 *     return out
 * 
 */
      __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_out, __pyx_v_fill); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L5:;
  }

  /* "vcfnp.pyx":835
 *         else:
 *             out.append(fill)
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "vcfnp.pyx":827
 * 
 * 
 * cdef inline object _mkval_string_multi(vector[string]& string_vals, int arity, object fill):             # <<<<<<<<<<<<<<
 *     cdef int i
 *     out = list()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vcfnp._mkval_string_multi", __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":838
 * 
 * 
 * cdef inline object _mkval_double(vector[string]& string_vals, int arity, object fill):             # <<<<<<<<<<<<<<
 *     if arity == 1:
 *         out = _mkval_double_single(string_vals, fill)
 */

static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkval_double(std::vector<std::string> &__pyx_v_string_vals, 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_mkval_double", 0);

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

    /* "vcfnp.pyx":840
 * cdef inline object _mkval_double(vector[string]& string_vals, int arity, object fill):
 *     if arity == 1:
 *         out = _mkval_double_single(string_vals, fill)             # <<<<<<<<<<<<<<
 *     else:
 *         out = _mkval_double_multi(string_vals, arity, fill)
 */
    __pyx_t_2 = __pyx_f_5vcfnp__mkval_double_single(__pyx_v_string_vals, __pyx_v_fill); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __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":842
 *         out = _mkval_double_single(string_vals, fill)
 *     else:
 *         out = _mkval_double_multi(string_vals, arity, fill)             # <<<<<<<<<<<<<<
 *     return out
 * 
 */
    __pyx_t_2 = __pyx_f_5vcfnp__mkval_double_multi(__pyx_v_string_vals, __pyx_v_arity, __pyx_v_fill); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __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":843
 *     else:
 *         out = _mkval_double_multi(string_vals, arity, fill)
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vcfnp._mkval_double", __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":846
 * 
 * 
 * cdef inline object _mkval_double_single(vector[string]& string_vals, object fill):             # <<<<<<<<<<<<<<
 *     cdef double v
 *     if string_vals.size() > 0:
 */

static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkval_double_single(std::vector<std::string> &__pyx_v_string_vals, PyObject *__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_double_single", 0);

  /* "vcfnp.pyx":848
 * cdef inline object _mkval_double_single(vector[string]& string_vals, object fill):
 *     cdef double 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":849
 *     cdef double v
 *     if string_vals.size() > 0:
 *         return atof(string_vals.at(0).c_str())             # <<<<<<<<<<<<<<
 *     return fill
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyFloat_FromDouble(atof(__pyx_v_string_vals.at(0).c_str())); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "vcfnp.pyx":850
 *     if string_vals.size() > 0:
 *         return atof(string_vals.at(0).c_str())
 *     return fill             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_fill);
  __pyx_r = __pyx_v_fill;
  goto __pyx_L0;

  /* "vcfnp.pyx":846
 * 
 * 
 * cdef inline object _mkval_double_single(vector[string]& string_vals, object fill):             # <<<<<<<<<<<<<<
 *     cdef double v
 *     if string_vals.size() > 0:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vcfnp._mkval_double_single", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":853
 * 
 * 
 * cdef inline object _mkval_double_multi(vector[string]& string_vals, int arity, object fill):             # <<<<<<<<<<<<<<
 *     cdef int i
 *     out = list()
 */

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

  /* "vcfnp.pyx":855
 * cdef inline object _mkval_double_multi(vector[string]& string_vals, int arity, object fill):
 *     cdef int i
 *     out = list()             # <<<<<<<<<<<<<<
 *     for i in range(arity):
 *         if i < string_vals.size():
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "vcfnp.pyx":856
 *     cdef int i
 *     out = list()
 *     for i in range(arity):             # <<<<<<<<<<<<<<
 *         if i < string_vals.size():
 *             out.append(atof(string_vals.at(i).c_str()))
 */
  __pyx_t_2 = __pyx_v_arity;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "vcfnp.pyx":857
 *     out = list()
 *     for i in range(arity):
 *         if i < string_vals.size():             # <<<<<<<<<<<<<<
 *             out.append(atof(string_vals.at(i).c_str()))
 *         else:
 */
    __pyx_t_4 = ((__pyx_v_i < __pyx_v_string_vals.size()) != 0);
    if (__pyx_t_4) {

      /* "vcfnp.pyx":858
 *     for i in range(arity):
 *         if i < string_vals.size():
 *             out.append(atof(string_vals.at(i).c_str()))             # <<<<<<<<<<<<<<
 *         else:
 *             out.append(fill)
 */
      __pyx_t_1 = PyFloat_FromDouble(atof(__pyx_v_string_vals.at(__pyx_v_i).c_str())); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_out, __pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "vcfnp.pyx":860
 *             out.append(atof(string_vals.at(i).c_str()))
 *         else:
 *             out.append(fill)             # <<<<<<<<<<<<<<
 *     return out
 * 
 */
      __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_out, __pyx_v_fill); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L5:;
  }

  /* "vcfnp.pyx":861
 *         else:
 *             out.append(fill)
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "vcfnp.pyx":853
 * 
 * 
 * cdef inline object _mkval_double_multi(vector[string]& string_vals, int arity, object fill):             # <<<<<<<<<<<<<<
 *     cdef int i
 *     out = list()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vcfnp._mkval_double_multi", __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":864
 * 
 * 
 * cdef inline object _mkval_long(vector[string]& string_vals, int arity, object fill):             # <<<<<<<<<<<<<<
 *     if arity == 1:
 *         out = _mkval_long_single(string_vals, fill)
 */

static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkval_long(std::vector<std::string> &__pyx_v_string_vals, 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_mkval_long", 0);

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

    /* "vcfnp.pyx":866
 * cdef inline object _mkval_long(vector[string]& string_vals, int arity, object fill):
 *     if arity == 1:
 *         out = _mkval_long_single(string_vals, fill)             # <<<<<<<<<<<<<<
 *     else:
 *         out = _mkval_long_multi(string_vals, arity, fill)
 */
    __pyx_t_2 = __pyx_f_5vcfnp__mkval_long_single(__pyx_v_string_vals, __pyx_v_fill); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __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":868
 *         out = _mkval_long_single(string_vals, fill)
 *     else:
 *         out = _mkval_long_multi(string_vals, arity, fill)             # <<<<<<<<<<<<<<
 *     return out
 * 
 */
    __pyx_t_2 = __pyx_f_5vcfnp__mkval_long_multi(__pyx_v_string_vals, __pyx_v_arity, __pyx_v_fill); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __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":869
 *     else:
 *         out = _mkval_long_multi(string_vals, arity, fill)
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vcfnp._mkval_long", __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":872
 * 
 * 
 * cdef inline object _mkval_long_single(vector[string]& string_vals, object fill):             # <<<<<<<<<<<<<<
 *     if string_vals.size() > 0:
 *         return atol(string_vals.at(0).c_str())
 */

static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkval_long_single(std::vector<std::string> &__pyx_v_string_vals, PyObject *__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_long_single", 0);

  /* "vcfnp.pyx":873
 * 
 * cdef inline object _mkval_long_single(vector[string]& string_vals, object fill):
 *     if string_vals.size() > 0:             # <<<<<<<<<<<<<<
 *         return atol(string_vals.at(0).c_str())
 *     return fill
 */
  __pyx_t_1 = ((__pyx_v_string_vals.size() > 0) != 0);
  if (__pyx_t_1) {

    /* "vcfnp.pyx":874
 * cdef inline object _mkval_long_single(vector[string]& string_vals, object fill):
 *     if string_vals.size() > 0:
 *         return atol(string_vals.at(0).c_str())             # <<<<<<<<<<<<<<
 *     return fill
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyInt_From_long(atol(__pyx_v_string_vals.at(0).c_str())); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "vcfnp.pyx":875
 *     if string_vals.size() > 0:
 *         return atol(string_vals.at(0).c_str())
 *     return fill             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_fill);
  __pyx_r = __pyx_v_fill;
  goto __pyx_L0;

  /* "vcfnp.pyx":872
 * 
 * 
 * cdef inline object _mkval_long_single(vector[string]& string_vals, object fill):             # <<<<<<<<<<<<<<
 *     if string_vals.size() > 0:
 *         return atol(string_vals.at(0).c_str())
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vcfnp._mkval_long_single", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":878
 * 
 * 
 * cdef inline object _mkval_long_multi(vector[string]& string_vals, int arity, object fill):             # <<<<<<<<<<<<<<
 *     cdef int i
 *     out = list()
 */

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

  /* "vcfnp.pyx":880
 * cdef inline object _mkval_long_multi(vector[string]& string_vals, int arity, object fill):
 *     cdef int i
 *     out = list()             # <<<<<<<<<<<<<<
 *     for i in range(arity):
 *         if i < string_vals.size():
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "vcfnp.pyx":881
 *     cdef int i
 *     out = list()
 *     for i in range(arity):             # <<<<<<<<<<<<<<
 *         if i < string_vals.size():
 *             out.append(atol(string_vals.at(i).c_str()))
 */
  __pyx_t_2 = __pyx_v_arity;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "vcfnp.pyx":882
 *     out = list()
 *     for i in range(arity):
 *         if i < string_vals.size():             # <<<<<<<<<<<<<<
 *             out.append(atol(string_vals.at(i).c_str()))
 *         else:
 */
    __pyx_t_4 = ((__pyx_v_i < __pyx_v_string_vals.size()) != 0);
    if (__pyx_t_4) {

      /* "vcfnp.pyx":883
 *     for i in range(arity):
 *         if i < string_vals.size():
 *             out.append(atol(string_vals.at(i).c_str()))             # <<<<<<<<<<<<<<
 *         else:
 *             out.append(fill)
 */
      __pyx_t_1 = __Pyx_PyInt_From_long(atol(__pyx_v_string_vals.at(__pyx_v_i).c_str())); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_out, __pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "vcfnp.pyx":885
 *             out.append(atol(string_vals.at(i).c_str()))
 *         else:
 *             out.append(fill)             # <<<<<<<<<<<<<<
 *     return out
 * 
 */
      __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_out, __pyx_v_fill); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L5:;
  }

  /* "vcfnp.pyx":886
 *         else:
 *             out.append(fill)
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "vcfnp.pyx":878
 * 
 * 
 * cdef inline object _mkval_long_multi(vector[string]& string_vals, int arity, object fill):             # <<<<<<<<<<<<<<
 *     cdef int i
 *     out = list()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vcfnp._mkval_long_multi", __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":889
 * 
 * 
 * def _calldata_fields(fields, exclude_fields, formatIds):             # <<<<<<<<<<<<<<
 *     if fields is None:
 *         fields = STANDARD_CALLDATA_FIELDS + formatIds
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_36_calldata_fields(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5vcfnp_35_calldata_fields[] = "_calldata_fields(fields, exclude_fields, formatIds)";
static PyMethodDef __pyx_mdef_5vcfnp_36_calldata_fields = {__Pyx_NAMESTR("_calldata_fields"), (PyCFunction)__pyx_pw_5vcfnp_36_calldata_fields, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5vcfnp_35_calldata_fields)};
static PyObject *__pyx_pw_5vcfnp_36_calldata_fields(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_fields = 0;
  PyObject *__pyx_v_exclude_fields = 0;
  PyObject *__pyx_v_formatIds = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_calldata_fields (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fields,&__pyx_n_s_exclude_fields,&__pyx_n_s_formatIds,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_fields)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exclude_fields)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_calldata_fields", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_formatIds)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_calldata_fields", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_calldata_fields") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __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_fields = values[0];
    __pyx_v_exclude_fields = values[1];
    __pyx_v_formatIds = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_calldata_fields", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vcfnp._calldata_fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5vcfnp_35_calldata_fields(__pyx_self, __pyx_v_fields, __pyx_v_exclude_fields, __pyx_v_formatIds);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vcfnp_35_calldata_fields(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fields, PyObject *__pyx_v_exclude_fields, PyObject *__pyx_v_formatIds) {
  PyObject *__pyx_v_f = 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;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_calldata_fields", 0);
  __Pyx_INCREF(__pyx_v_fields);

  /* "vcfnp.pyx":890
 * 
 * def _calldata_fields(fields, exclude_fields, formatIds):
 *     if fields is None:             # <<<<<<<<<<<<<<
 *         fields = STANDARD_CALLDATA_FIELDS + formatIds
 *     else:
 */
  __pyx_t_1 = (__pyx_v_fields == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "vcfnp.pyx":891
 * def _calldata_fields(fields, exclude_fields, formatIds):
 *     if fields is None:
 *         fields = STANDARD_CALLDATA_FIELDS + formatIds             # <<<<<<<<<<<<<<
 *     else:
 *         for f in fields:
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_STANDARD_CALLDATA_FIELDS); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_v_formatIds); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_fields, __pyx_t_4);
    __pyx_t_4 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "vcfnp.pyx":893
 *         fields = STANDARD_CALLDATA_FIELDS + formatIds
 *     else:
 *         for f in fields:             # <<<<<<<<<<<<<<
 *             if f not in STANDARD_CALLDATA_FIELDS and f not in formatIds:
 *                 # support extracting FORMAT even if not declared in header, but warn...
 */
    if (PyList_CheckExact(__pyx_v_fields) || PyTuple_CheckExact(__pyx_v_fields)) {
      __pyx_t_4 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_fields); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext;
    }
    for (;;) {
      if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_4)) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_4)) {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        __pyx_t_3 = __pyx_t_6(__pyx_t_4);
        if (unlikely(!__pyx_t_3)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "vcfnp.pyx":894
 *     else:
 *         for f in fields:
 *             if f not in STANDARD_CALLDATA_FIELDS and f not in formatIds:             # <<<<<<<<<<<<<<
 *                 # support extracting FORMAT even if not declared in header, but warn...
 *                 print >>sys.stderr, 'WARNING: no definition found for field %s' % f
 */
      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_STANDARD_CALLDATA_FIELDS); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_t_3, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if ((__pyx_t_2 != 0)) {
        __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_v_formatIds, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_7 = (__pyx_t_1 != 0);
      } else {
        __pyx_t_7 = (__pyx_t_2 != 0);
      }
      if (__pyx_t_7) {

        /* "vcfnp.pyx":896
 *             if f not in STANDARD_CALLDATA_FIELDS and f not in formatIds:
 *                 # support extracting FORMAT even if not declared in header, but warn...
 *                 print >>sys.stderr, 'WARNING: no definition found for field %s' % f             # <<<<<<<<<<<<<<
 *     if exclude_fields is not None:
 *         fields = [f for f in fields if f not in exclude_fields]
 */
        __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_stderr); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_WARNING_no_definition_found_for, __pyx_v_f); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        if (__Pyx_PrintOne(__pyx_t_8, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_L3:;

  /* "vcfnp.pyx":897
 *                 # support extracting FORMAT even if not declared in header, but warn...
 *                 print >>sys.stderr, 'WARNING: no definition found for field %s' % f
 *     if exclude_fields is not None:             # <<<<<<<<<<<<<<
 *         fields = [f for f in fields if f not in exclude_fields]
 *     return tuple(fields)
 */
  __pyx_t_7 = (__pyx_v_exclude_fields != Py_None);
  __pyx_t_2 = (__pyx_t_7 != 0);
  if (__pyx_t_2) {

    /* "vcfnp.pyx":898
 *                 print >>sys.stderr, 'WARNING: no definition found for field %s' % f
 *     if exclude_fields is not None:
 *         fields = [f for f in fields if f not in exclude_fields]             # <<<<<<<<<<<<<<
 *     return tuple(fields)
 * 
 */
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    if (PyList_CheckExact(__pyx_v_fields) || PyTuple_CheckExact(__pyx_v_fields)) {
      __pyx_t_8 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_8); __pyx_t_5 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_fields); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = Py_TYPE(__pyx_t_8)->tp_iternext;
    }
    for (;;) {
      if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_8)) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_8)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_8, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_8)) {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_8, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        __pyx_t_3 = __pyx_t_6(__pyx_t_8);
        if (unlikely(!__pyx_t_3)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_v_exclude_fields, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_7 = (__pyx_t_2 != 0);
      if (__pyx_t_7) {
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_v_f))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L10;
      }
      __pyx_L10:;
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF_SET(__pyx_v_fields, __pyx_t_4);
    __pyx_t_4 = 0;
    goto __pyx_L7;
  }
  __pyx_L7:;

  /* "vcfnp.pyx":899
 *     if exclude_fields is not None:
 *         fields = [f for f in fields if f not in exclude_fields]
 *     return tuple(fields)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_fields);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_fields);
  __Pyx_GIVEREF(__pyx_v_fields);
  __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "vcfnp.pyx":889
 * 
 * 
 * def _calldata_fields(fields, exclude_fields, formatIds):             # <<<<<<<<<<<<<<
 *     if fields is None:
 *         fields = STANDARD_CALLDATA_FIELDS + formatIds
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("vcfnp._calldata_fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_f);
  __Pyx_XDECREF(__pyx_v_fields);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":902
 * 
 * 
 * def _calldata_arities(fields, arities, formatCounts, ploidy):             # <<<<<<<<<<<<<<
 *     if arities is None:
 *         arities = dict()
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_38_calldata_arities(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5vcfnp_37_calldata_arities[] = "_calldata_arities(fields, arities, formatCounts, ploidy)";
static PyMethodDef __pyx_mdef_5vcfnp_38_calldata_arities = {__Pyx_NAMESTR("_calldata_arities"), (PyCFunction)__pyx_pw_5vcfnp_38_calldata_arities, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5vcfnp_37_calldata_arities)};
static PyObject *__pyx_pw_5vcfnp_38_calldata_arities(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_fields = 0;
  PyObject *__pyx_v_arities = 0;
  PyObject *__pyx_v_formatCounts = 0;
  PyObject *__pyx_v_ploidy = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_calldata_arities (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fields,&__pyx_n_s_arities,&__pyx_n_s_formatCounts,&__pyx_n_s_ploidy,0};
    PyObject* values[4] = {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  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_fields)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arities)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_calldata_arities", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_formatCounts)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_calldata_arities", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __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("_calldata_arities", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_calldata_arities") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      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);
    }
    __pyx_v_fields = values[0];
    __pyx_v_arities = values[1];
    __pyx_v_formatCounts = values[2];
    __pyx_v_ploidy = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_calldata_arities", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vcfnp._calldata_arities", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5vcfnp_37_calldata_arities(__pyx_self, __pyx_v_fields, __pyx_v_arities, __pyx_v_formatCounts, __pyx_v_ploidy);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_5vcfnp_17_calldata_arities_2generator11(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "vcfnp.pyx":923
 *             else:
 *                 arities[f] = vcf_count
 *     return tuple(arities[f] for f in fields)             # <<<<<<<<<<<<<<
 * 
 * 
 */

static PyObject *__pyx_pf_5vcfnp_17_calldata_arities_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_13_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_13_genexpr *)__pyx_tp_new_5vcfnp___pyx_scope_struct_13_genexpr(__pyx_ptype_5vcfnp___pyx_scope_struct_13_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_12__calldata_arities *) __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_17_calldata_arities_2generator11, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("vcfnp._calldata_arities.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_17_calldata_arities_2generator11(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5vcfnp___pyx_scope_struct_13_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_13_genexpr *)__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;
  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 = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields)) { __Pyx_RaiseClosureNameError("fields"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  if (PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields; __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_outer_scope->__pyx_v_fields); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __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 = 923; __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 = 923; __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 = 923; __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 = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_f);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_f, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_arities)) { __Pyx_RaiseClosureNameError("arities"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    __pyx_t_4 = PyObject_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_arities, __pyx_cur_scope->__pyx_v_f); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __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_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_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 = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __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":902
 * 
 * 
 * def _calldata_arities(fields, arities, formatCounts, ploidy):             # <<<<<<<<<<<<<<
 *     if arities is None:
 *         arities = dict()
 */

static PyObject *__pyx_pf_5vcfnp_37_calldata_arities(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fields, PyObject *__pyx_v_arities, PyObject *__pyx_v_formatCounts, PyObject *__pyx_v_ploidy) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_12__calldata_arities *__pyx_cur_scope;
  PyObject *__pyx_v_f = NULL;
  PyObject *__pyx_v_vcf_count = 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;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_calldata_arities", 0);
  __pyx_cur_scope = (struct __pyx_obj_5vcfnp___pyx_scope_struct_12__calldata_arities *)__pyx_tp_new_5vcfnp___pyx_scope_struct_12__calldata_arities(__pyx_ptype_5vcfnp___pyx_scope_struct_12__calldata_arities, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_fields = __pyx_v_fields;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fields);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fields);
  __pyx_cur_scope->__pyx_v_arities = __pyx_v_arities;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_arities);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_arities);

  /* "vcfnp.pyx":903
 * 
 * def _calldata_arities(fields, arities, formatCounts, ploidy):
 *     if arities is None:             # <<<<<<<<<<<<<<
 *         arities = dict()
 *     for f, vcf_count in zip(fields, formatCounts):
 */
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v_arities == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "vcfnp.pyx":904
 * def _calldata_arities(fields, arities, formatCounts, ploidy):
 *     if arities is None:
 *         arities = dict()             # <<<<<<<<<<<<<<
 *     for f, vcf_count in zip(fields, formatCounts):
 *         if f not in arities:
 */
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_arities);
    __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_arities, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "vcfnp.pyx":905
 *     if arities is None:
 *         arities = dict()
 *     for f, vcf_count in zip(fields, formatCounts):             # <<<<<<<<<<<<<<
 *         if f not in arities:
 *             if f == 'genotype':
 */
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fields);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_v_fields);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fields);
  __Pyx_INCREF(__pyx_v_formatCounts);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_formatCounts);
  __Pyx_GIVEREF(__pyx_v_formatCounts);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_3)) {
      if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_3)) {
      if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_6(__pyx_t_3);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
      PyObject* sequence = __pyx_t_4;
      #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 = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_7 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_8);
      #else
      __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      #endif
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
      index = 0; __pyx_t_7 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_8);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_10 = NULL;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_10 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L7_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_7);
    __pyx_t_7 = 0;
    __Pyx_XDECREF_SET(__pyx_v_vcf_count, __pyx_t_8);
    __pyx_t_8 = 0;

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

      /* "vcfnp.pyx":907
 *     for f, vcf_count in zip(fields, formatCounts):
 *         if f not in arities:
 *             if f == 'genotype':             # <<<<<<<<<<<<<<
 *                 arities[f] = ploidy
 *             elif f in DEFAULT_CALLDATA_ARITY:
 */
      __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_f, __pyx_n_s_genotype, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_1) {

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

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

        /* "vcfnp.pyx":910
 *                 arities[f] = ploidy
 *             elif f in DEFAULT_CALLDATA_ARITY:
 *                 arities[f] = DEFAULT_CALLDATA_ARITY[f]             # <<<<<<<<<<<<<<
 *             elif vcf_count == ALLELE_NUMBER:
 *                 # default to 2 (biallelic)
 */
        __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_CALLDATA_ARITY); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_8 = PyObject_GetItem(__pyx_t_4, __pyx_v_f); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(PyObject_SetItem(__pyx_cur_scope->__pyx_v_arities, __pyx_v_f, __pyx_t_8) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L9;
      }

      /* "vcfnp.pyx":911
 *             elif f in DEFAULT_CALLDATA_ARITY:
 *                 arities[f] = DEFAULT_CALLDATA_ARITY[f]
 *             elif vcf_count == ALLELE_NUMBER:             # <<<<<<<<<<<<<<
 *                 # default to 2 (biallelic)
 *                 arities[f] = 2
 */
      __pyx_t_8 = PyInt_FromLong(vcf::ALLELE_NUMBER); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_vcf_count, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_2) {

        /* "vcfnp.pyx":913
 *             elif 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 (unlikely(PyObject_SetItem(__pyx_cur_scope->__pyx_v_arities, __pyx_v_f, __pyx_int_2) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L9;
      }

      /* "vcfnp.pyx":914
 *                 # 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_4 = PyInt_FromLong(vcf::GENOTYPE_NUMBER); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_8 = PyObject_RichCompare(__pyx_v_vcf_count, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (__pyx_t_2) {

        /* "vcfnp.pyx":917
 *                 # 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_8 = PyNumber_Add(__pyx_v_ploidy, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        if (unlikely(PyObject_SetItem(__pyx_cur_scope->__pyx_v_arities, __pyx_v_f, __pyx_t_8) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L9;
      }

      /* "vcfnp.pyx":918
 *                 # 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_8 = PyObject_RichCompare(__pyx_v_vcf_count, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (__pyx_t_2) {

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

        /* "vcfnp.pyx":922
 *                 arities[f] = 1
 *             else:
 *                 arities[f] = vcf_count             # <<<<<<<<<<<<<<
 *     return tuple(arities[f] for f in fields)
 * 
 */
        if (unlikely(PyObject_SetItem(__pyx_cur_scope->__pyx_v_arities, __pyx_v_f, __pyx_v_vcf_count) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_L9:;
      goto __pyx_L8;
    }
    __pyx_L8:;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "vcfnp.pyx":923
 *             else:
 *                 arities[f] = vcf_count
 *     return tuple(arities[f] for f in fields)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __pyx_pf_5vcfnp_17_calldata_arities_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __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 = 923; __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 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "vcfnp.pyx":902
 * 
 * 
 * def _calldata_arities(fields, arities, formatCounts, ploidy):             # <<<<<<<<<<<<<<
 *     if arities is None:
 *         arities = dict()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("vcfnp._calldata_arities", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_f);
  __Pyx_XDECREF(__pyx_v_vcf_count);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":926
 * 
 * 
 * def _calldata_fills(fields, fills, formatTypes, ploidy):             # <<<<<<<<<<<<<<
 *     if fills is None:
 *         fills = dict()
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_40_calldata_fills(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5vcfnp_39_calldata_fills[] = "_calldata_fills(fields, fills, formatTypes, ploidy)";
static PyMethodDef __pyx_mdef_5vcfnp_40_calldata_fills = {__Pyx_NAMESTR("_calldata_fills"), (PyCFunction)__pyx_pw_5vcfnp_40_calldata_fills, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5vcfnp_39_calldata_fills)};
static PyObject *__pyx_pw_5vcfnp_40_calldata_fills(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_fields = 0;
  PyObject *__pyx_v_fills = 0;
  PyObject *__pyx_v_formatTypes = 0;
  PyObject *__pyx_v_ploidy = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_calldata_fills (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fields,&__pyx_n_s_fills,&__pyx_n_s_formatTypes,&__pyx_n_s_ploidy,0};
    PyObject* values[4] = {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  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_fields)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fills)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_calldata_fills", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_formatTypes)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_calldata_fills", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __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("_calldata_fills", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_calldata_fills") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      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);
    }
    __pyx_v_fields = values[0];
    __pyx_v_fills = values[1];
    __pyx_v_formatTypes = values[2];
    __pyx_v_ploidy = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_calldata_fills", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vcfnp._calldata_fills", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5vcfnp_39_calldata_fills(__pyx_self, __pyx_v_fields, __pyx_v_fills, __pyx_v_formatTypes, __pyx_v_ploidy);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_5vcfnp_15_calldata_fills_2generator12(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "vcfnp.pyx":937
 *             else:
 *                 fills[f] = DEFAULT_FILL_MAP[vcf_type]
 *     return tuple(fills[f] for f in fields)             # <<<<<<<<<<<<<<
 * 
 * 
 */

static PyObject *__pyx_pf_5vcfnp_15_calldata_fills_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_15_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_15_genexpr *)__pyx_tp_new_5vcfnp___pyx_scope_struct_15_genexpr(__pyx_ptype_5vcfnp___pyx_scope_struct_15_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_14__calldata_fills *) __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_15_calldata_fills_2generator12, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("vcfnp._calldata_fills.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_15_calldata_fills_2generator12(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5vcfnp___pyx_scope_struct_15_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_15_genexpr *)__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;
  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 = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields)) { __Pyx_RaiseClosureNameError("fields"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  if (PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields; __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_outer_scope->__pyx_v_fields); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __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 = 937; __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 = 937; __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 = 937; __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 = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_f);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_f, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fills)) { __Pyx_RaiseClosureNameError("fills"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    __pyx_t_4 = PyObject_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fills, __pyx_cur_scope->__pyx_v_f); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __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_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_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 = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __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":926
 * 
 * 
 * def _calldata_fills(fields, fills, formatTypes, ploidy):             # <<<<<<<<<<<<<<
 *     if fills is None:
 *         fills = dict()
 */

static PyObject *__pyx_pf_5vcfnp_39_calldata_fills(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fields, PyObject *__pyx_v_fills, PyObject *__pyx_v_formatTypes, PyObject *__pyx_v_ploidy) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_14__calldata_fills *__pyx_cur_scope;
  PyObject *__pyx_v_f = NULL;
  PyObject *__pyx_v_vcf_type = 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;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_calldata_fills", 0);
  __pyx_cur_scope = (struct __pyx_obj_5vcfnp___pyx_scope_struct_14__calldata_fills *)__pyx_tp_new_5vcfnp___pyx_scope_struct_14__calldata_fills(__pyx_ptype_5vcfnp___pyx_scope_struct_14__calldata_fills, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_fields = __pyx_v_fields;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fields);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fields);
  __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":927
 * 
 * def _calldata_fills(fields, fills, formatTypes, ploidy):
 *     if fills is None:             # <<<<<<<<<<<<<<
 *         fills = dict()
 *     for f, vcf_type in zip(fields, formatTypes):
 */
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v_fills == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "vcfnp.pyx":928
 * def _calldata_fills(fields, fills, formatTypes, ploidy):
 *     if fills is None:
 *         fills = dict()             # <<<<<<<<<<<<<<
 *     for f, vcf_type in zip(fields, formatTypes):
 *         if f not in fills:
 */
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_fills);
    __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_fills, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "vcfnp.pyx":929
 *     if fills is None:
 *         fills = dict()
 *     for f, vcf_type in zip(fields, formatTypes):             # <<<<<<<<<<<<<<
 *         if f not in fills:
 *             if f == 'GT':
 */
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fields);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_v_fields);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fields);
  __Pyx_INCREF(__pyx_v_formatTypes);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_formatTypes);
  __Pyx_GIVEREF(__pyx_v_formatTypes);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_3)) {
      if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_3)) {
      if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_6(__pyx_t_3);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
      PyObject* sequence = __pyx_t_4;
      #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 = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_7 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_8);
      #else
      __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      #endif
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
      index = 0; __pyx_t_7 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_8);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_10 = NULL;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_10 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L7_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_7);
    __pyx_t_7 = 0;
    __Pyx_XDECREF_SET(__pyx_v_vcf_type, __pyx_t_8);
    __pyx_t_8 = 0;

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

      /* "vcfnp.pyx":931
 *     for f, vcf_type in zip(fields, formatTypes):
 *         if f not in fills:
 *             if f == 'GT':             # <<<<<<<<<<<<<<
 *                 fills[f] = '/'.join(['.'] * ploidy)
 *             elif f in DEFAULT_CALLDATA_FILL:
 */
      __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_f, __pyx_n_s_GT, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_1) {

        /* "vcfnp.pyx":932
 *         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_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_kp_s__14);
        PyList_SET_ITEM(__pyx_t_4, 0, __pyx_kp_s__14);
        __Pyx_GIVEREF(__pyx_kp_s__14);
        { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_4, __pyx_v_ploidy); if (unlikely(!__pyx_temp)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_temp);
          __Pyx_DECREF(__pyx_t_4);
          __pyx_t_4 = __pyx_temp;
        }
        __pyx_t_8 = __Pyx_PyString_Join(__pyx_kp_s__13, __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(PyObject_SetItem(__pyx_cur_scope->__pyx_v_fills, __pyx_v_f, __pyx_t_8) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L9;
      }

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

        /* "vcfnp.pyx":934
 *                 fills[f] = '/'.join(['.'] * ploidy)
 *             elif f in DEFAULT_CALLDATA_FILL:
 *                 fills[f] = DEFAULT_CALLDATA_FILL[f]             # <<<<<<<<<<<<<<
 *             else:
 *                 fills[f] = DEFAULT_FILL_MAP[vcf_type]
 */
        __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_CALLDATA_FILL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_4 = PyObject_GetItem(__pyx_t_8, __pyx_v_f); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(PyObject_SetItem(__pyx_cur_scope->__pyx_v_fills, __pyx_v_f, __pyx_t_4) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        goto __pyx_L9;
      }
      /*else*/ {

        /* "vcfnp.pyx":936
 *                 fills[f] = DEFAULT_CALLDATA_FILL[f]
 *             else:
 *                 fills[f] = DEFAULT_FILL_MAP[vcf_type]             # <<<<<<<<<<<<<<
 *     return tuple(fills[f] for f in fields)
 * 
 */
        __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_FILL_MAP); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_8 = PyObject_GetItem(__pyx_t_4, __pyx_v_vcf_type); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(PyObject_SetItem(__pyx_cur_scope->__pyx_v_fills, __pyx_v_f, __pyx_t_8) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __pyx_L9:;
      goto __pyx_L8;
    }
    __pyx_L8:;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "vcfnp.pyx":937
 *             else:
 *                 fills[f] = DEFAULT_FILL_MAP[vcf_type]
 *     return tuple(fills[f] for f in fields)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __pyx_pf_5vcfnp_15_calldata_fills_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __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 = 937; __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 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "vcfnp.pyx":926
 * 
 * 
 * def _calldata_fills(fields, fills, formatTypes, ploidy):             # <<<<<<<<<<<<<<
 *     if fills is None:
 *         fills = dict()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("vcfnp._calldata_fills", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_f);
  __Pyx_XDECREF(__pyx_v_vcf_type);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":940
 * 
 * 
 * def _calldata_dtype(fields, dtypes, formatTypes, arities, samples, ploidy):             # <<<<<<<<<<<<<<
 * 
 *     # construct a numpy dtype for structured array cells
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_42_calldata_dtype(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5vcfnp_41_calldata_dtype[] = "_calldata_dtype(fields, dtypes, formatTypes, arities, samples, ploidy)";
static PyMethodDef __pyx_mdef_5vcfnp_42_calldata_dtype = {__Pyx_NAMESTR("_calldata_dtype"), (PyCFunction)__pyx_pw_5vcfnp_42_calldata_dtype, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5vcfnp_41_calldata_dtype)};
static PyObject *__pyx_pw_5vcfnp_42_calldata_dtype(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_fields = 0;
  PyObject *__pyx_v_dtypes = 0;
  PyObject *__pyx_v_formatTypes = 0;
  PyObject *__pyx_v_arities = 0;
  PyObject *__pyx_v_samples = 0;
  PyObject *__pyx_v_ploidy = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_calldata_dtype (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fields,&__pyx_n_s_dtypes,&__pyx_n_s_formatTypes,&__pyx_n_s_arities,&__pyx_n_s_samples,&__pyx_n_s_ploidy,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_fields)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dtypes)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_calldata_dtype", 1, 6, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_formatTypes)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_calldata_dtype", 1, 6, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __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("_calldata_dtype", 1, 6, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_samples)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_calldata_dtype", 1, 6, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ploidy)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_calldata_dtype", 1, 6, 6, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_calldata_dtype") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __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_fields = values[0];
    __pyx_v_dtypes = values[1];
    __pyx_v_formatTypes = values[2];
    __pyx_v_arities = values[3];
    __pyx_v_samples = values[4];
    __pyx_v_ploidy = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_calldata_dtype", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vcfnp._calldata_dtype", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5vcfnp_41_calldata_dtype(__pyx_self, __pyx_v_fields, __pyx_v_dtypes, __pyx_v_formatTypes, __pyx_v_arities, __pyx_v_samples, __pyx_v_ploidy);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vcfnp_41_calldata_dtype(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fields, PyObject *__pyx_v_dtypes, PyObject *__pyx_v_formatTypes, PyObject *__pyx_v_arities, PyObject *__pyx_v_samples, PyObject *__pyx_v_ploidy) {
  PyObject *__pyx_v_cell_dtype = NULL;
  PyObject *__pyx_v_f = NULL;
  PyObject *__pyx_v_vcf_type = NULL;
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_v_dtype = NULL;
  PyObject *__pyx_v_s = 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)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_calldata_dtype", 0);

  /* "vcfnp.pyx":943
 * 
 *     # construct a numpy dtype for structured array cells
 *     cell_dtype = list()             # <<<<<<<<<<<<<<
 *     for f, vcf_type, n in zip(fields, formatTypes, arities):
 *         if dtypes is not None and f in dtypes:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_cell_dtype = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "vcfnp.pyx":944
 *     # construct a numpy dtype for structured array cells
 *     cell_dtype = list()
 *     for f, vcf_type, n in zip(fields, formatTypes, arities):             # <<<<<<<<<<<<<<
 *         if dtypes is not None and f in dtypes:
 *             t = dtypes[f]
 */
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_fields);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_fields);
  __Pyx_GIVEREF(__pyx_v_fields);
  __Pyx_INCREF(__pyx_v_formatTypes);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_formatTypes);
  __Pyx_GIVEREF(__pyx_v_formatTypes);
  __Pyx_INCREF(__pyx_v_arities);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_arities);
  __Pyx_GIVEREF(__pyx_v_arities);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_1)) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_1)) {
      if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_2 = __pyx_t_4(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __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 != 3)) {
        if (size > 3) __Pyx_RaiseTooManyValuesError(3);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 2); 
      } else {
        __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
        __pyx_t_7 = PyList_GET_ITEM(sequence, 2); 
      }
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      #else
      __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __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 = 944; __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_5 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      index = 1; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      index = 2; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_9 = NULL;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_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 = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_vcf_type, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "vcfnp.pyx":945
 *     cell_dtype = list()
 *     for f, vcf_type, n in zip(fields, formatTypes, arities):
 *         if dtypes is not None and f in dtypes:             # <<<<<<<<<<<<<<
 *             t = dtypes[f]
 *         elif f == 'GT':
 */
    __pyx_t_10 = (__pyx_v_dtypes != Py_None);
    if ((__pyx_t_10 != 0)) {
      __pyx_t_11 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_v_dtypes, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_12 = (__pyx_t_11 != 0);
    } else {
      __pyx_t_12 = (__pyx_t_10 != 0);
    }
    if (__pyx_t_12) {

      /* "vcfnp.pyx":946
 *     for f, vcf_type, n in zip(fields, formatTypes, arities):
 *         if dtypes is not None and f in dtypes:
 *             t = dtypes[f]             # <<<<<<<<<<<<<<
 *         elif f == 'GT':
 *             t = 'a%d' % ((ploidy*2)-1)
 */
      __pyx_t_2 = PyObject_GetItem(__pyx_v_dtypes, __pyx_v_f); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_2);
      __pyx_t_2 = 0;
      goto __pyx_L7;
    }

    /* "vcfnp.pyx":947
 *         if dtypes is not None and f in dtypes:
 *             t = dtypes[f]
 *         elif f == 'GT':             # <<<<<<<<<<<<<<
 *             t = 'a%d' % ((ploidy*2)-1)
 *         elif f in DEFAULT_CALLDATA_DTYPE:
 */
    __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_v_f, __pyx_n_s_GT, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_12) {

      /* "vcfnp.pyx":948
 *             t = dtypes[f]
 *         elif f == 'GT':
 *             t = 'a%d' % ((ploidy*2)-1)             # <<<<<<<<<<<<<<
 *         elif f in DEFAULT_CALLDATA_DTYPE:
 *             # known field
 */
      __pyx_t_2 = PyNumber_Multiply(__pyx_v_ploidy, __pyx_int_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = PyNumber_Subtract(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_a_d, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_2);
      __pyx_t_2 = 0;
      goto __pyx_L7;
    }

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

      /* "vcfnp.pyx":951
 *         elif f in DEFAULT_CALLDATA_DTYPE:
 *             # known field
 *             t = DEFAULT_CALLDATA_DTYPE[f]             # <<<<<<<<<<<<<<
 *         else:
 *             t = DEFAULT_TYPE_MAP[vcf_type]
 */
      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_CALLDATA_DTYPE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = PyObject_GetItem(__pyx_t_2, __pyx_v_f); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_7);
      __pyx_t_7 = 0;
      goto __pyx_L7;
    }
    /*else*/ {

      /* "vcfnp.pyx":953
 *             t = DEFAULT_CALLDATA_DTYPE[f]
 *         else:
 *             t = DEFAULT_TYPE_MAP[vcf_type]             # <<<<<<<<<<<<<<
 *         if n == 1:
 *             cell_dtype.append((f, t))
 */
      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_TYPE_MAP); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_2 = PyObject_GetItem(__pyx_t_7, __pyx_v_vcf_type); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_2);
      __pyx_t_2 = 0;
    }
    __pyx_L7:;

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

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

      /* "vcfnp.pyx":957
 *             cell_dtype.append((f, t))
 *         else:
 *             cell_dtype.append((f, t, (n,)))             # <<<<<<<<<<<<<<
 * 
 *     # construct a numpy dtype for structured array
 */
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_n);
      PyTuple_SET_ITEM(__pyx_t_2, 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 = 957; __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, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_cell_dtype, __pyx_t_7); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __pyx_L8:;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":960
 * 
 *     # construct a numpy dtype for structured array
 *     dtype = [(s, cell_dtype) for s in samples]             # <<<<<<<<<<<<<<
 *     return dtype
 * 
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyList_CheckExact(__pyx_v_samples) || PyTuple_CheckExact(__pyx_v_samples)) {
    __pyx_t_7 = __pyx_v_samples; __Pyx_INCREF(__pyx_t_7); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_samples); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_4 = Py_TYPE(__pyx_t_7)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_7)) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_7)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_7)) {
      if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_2 = __pyx_t_4(__pyx_t_7);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_s);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_s);
    __Pyx_GIVEREF(__pyx_v_s);
    __Pyx_INCREF(__pyx_v_cell_dtype);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_cell_dtype);
    __Pyx_GIVEREF(__pyx_v_cell_dtype);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_dtype = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "vcfnp.pyx":961
 *     # construct a numpy dtype for structured array
 *     dtype = [(s, cell_dtype) for s in samples]
 *     return dtype             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_dtype);
  __pyx_r = __pyx_v_dtype;
  goto __pyx_L0;

  /* "vcfnp.pyx":940
 * 
 * 
 * def _calldata_dtype(fields, dtypes, formatTypes, arities, samples, ploidy):             # <<<<<<<<<<<<<<
 * 
 *     # construct a numpy dtype for structured array cells
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("vcfnp._calldata_dtype", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_cell_dtype);
  __Pyx_XDECREF(__pyx_v_f);
  __Pyx_XDECREF(__pyx_v_vcf_type);
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XDECREF(__pyx_v_dtype);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_44calldata(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5vcfnp_43calldata[] = "calldata(filename, region=None, samples=None, ploidy=2, fields=None, exclude_fields=None, dtypes=None, arities=None, fills=None, vcf_types=None, count=None, progress=0, logstream=sys.stderr, condition=None, slice=None, verbose=False, cache=False, cachedir=None, skip_cached=False)\n\n    Load a numpy 1-dimensional 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    vcf_types: dict or dict-like\n        Dictionary containing field:string mappings used to override any\n        bogus type declarations in the VCF header\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    verbose: bool\n        Log more messages.\n    cache: bool\n        If True, save the resulting numpy array to disk, and load from the cache if present rather than rebuilding\n        from the VCF.\n    cachedir: string\n        Manually specify the directory to use to store cache files.\n    skip_cached: bool""\n        If True and cache file is fresh, do not load and return None.\n\n    Examples\n    --------\n\n        >>> from vcfnp import calldata, view2d\n        >>> C = calldata('fixture/sample.vcf')\n        >>> C\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, 0, '0/1', [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, 0, '0/1', [3, 3])),\n               ((True, True, [0, 0], 1, 48, '0|0', [51, 51]), (True, True, [1, 0], 8, 48, '1|0', [51, 51]), (True, False, [1, 1], 5, 43, '1/1', [0, 0])),\n               ((True, True, [0, 0], 3, 49, '0|0', [58, 50]), (True, True, [0, 1], 5, 3, '0|1', [65, 3]), (True, False, [0, 0], 3, 41, '0/0', [0, 0])),\n               ((True, True, [1, 2], 6, 21, '1|2', [23, 27]), (True, True, [2, 1], 0, 2, '2|1', [18, 2]), (True, False, [2, 2], 4, 35, '2/2', [0, 0])),\n               ((True, True, [0, 0], 0, 54, '0|0', [56, 60]), (True, True, [0, 0], 4, 48, '0|0', [51, 51]), (True, False, [0, 0], 2, 61, '0/0', [0, 0])),\n               ((True, False, [0, 1], 4, 0, '0/1', [0, 0]), (True, False, [0, 2], 2, 17, '0/2', [0, 0]), (False, False, [-1, -1], 3, 40, './.', [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, 0, '0/1', [0, 0]), (True, True, [0, 2], 0, 0, '0|2', [0, 0]))],\n              dtype=[('NA00001', [('is_called', '?'), ('is_phased', '?'), ('genotype', 'i1', (2,)), ('DP', '<u2'), ('GQ', 'u1'), ('GT', 'S3'), ('HQ', '<i4', (2,))]), ('NA00002', [('is_called', '?'), ('is_phased', '?'), ('genotype', 'i1', (2,)), ('DP', '<u2'), ('GQ', 'u1'), ('GT', 'S3'), ('HQ', '<i4', (2,))]), ('NA00003', [('is_called', '?'), ('is_phased', '?'), ('genotype', 'i1', (2,)), ('DP', '<u2'), ('""GQ', 'u1'), ('GT', 'S3'), ('HQ', '<i4', (2,))])])\n        >>> C['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], 1, 48, '0|0', [51, 51]),\n               (True, True, [0, 0], 3, 49, '0|0', [58, 50]),\n               (True, True, [1, 2], 6, 21, '1|2', [23, 27]),\n               (True, True, [0, 0], 0, 54, '0|0', [56, 60]),\n               (True, False, [0, 1], 4, 0, '0/1', [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', '?'), ('is_phased', '?'), ('genotype', 'i1', (2,)), ('DP', '<u2'), ('GQ', 'u1'), ('GT', 'S3'), ('HQ', '<i4', (2,))])\n        >>> C2d = view2d(C)\n        >>> C2d\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, 0, '0/1', [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, 0, '0/1', [3, 3])],\n               [(True, True, [0, 0], 1, 48, '0|0', [51, 51]),\n                (True, True, [1, 0], 8, 48, '1|0', [51, 51]),\n                (True, False, [1, 1], 5, 43, '1/1', [0, 0])],\n               [(True, True, [0, 0], 3, 49, '0|0', [58, 50]),\n                (True, True, [0, 1], 5, 3, '0|1', [65, 3]),\n                (True, False, [0, 0], 3, 41, '0/0', [0, 0])],\n               [(True, True, [1, 2], 6, 21, '1|2', [23, 27]),\n                (True, True, [2, 1], 0, 2, '2|1', [18, 2]),\n                (True, False, [2, 2], 4, 35, '2/2', [0, 0])],\n               [(True, True, [0, 0], 0, 54, '0|0', [56, 60]),\n                (True, True, [0, 0], 4, 48, '0|0', [51, 51]),\n                (True, False, [0, 0], 2, 61, '0/0', [0, 0])],\n               [(True, False, [0, 1], 4, 0, '0/1',"" [0, 0]),\n                (True, False, [0, 2], 2, 17, '0/2', [0, 0]),\n                (False, False, [-1, -1], 3, 40, './.', [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, 0, '0/1', [0, 0]),\n                (True, True, [0, 2], 0, 0, '0|2', [0, 0])]],\n              dtype=[('is_called', '?'), ('is_phased', '?'), ('genotype', 'i1', (2,)), ('DP', '<u2'), ('GQ', 'u1'), ('GT', 'S3'), ('HQ', '<i4', (2,))])\n        >>> C2d['genotype']\n        array([[[ 0,  0],\n                [ 0,  0],\n                [ 0,  1]],\n\n               [[ 0,  0],\n                [ 0,  0],\n                [ 0,  1]],\n\n               [[ 0,  0],\n                [ 1,  0],\n                [ 1,  1]],\n\n               [[ 0,  0],\n                [ 0,  1],\n                [ 0,  0]],\n\n               [[ 1,  2],\n                [ 2,  1],\n                [ 2,  2]],\n\n               [[ 0,  0],\n                [ 0,  0],\n                [ 0,  0]],\n\n               [[ 0,  1],\n                [ 0,  2],\n                [-1, -1]],\n\n               [[ 0,  0],\n                [ 0,  0],\n                [-1, -1]],\n\n               [[ 0, -1],\n                [ 0,  1],\n                [ 0,  2]]], dtype=int8)\n        >>> C2d['genotype'][3, :]\n        array([[0, 0],\n               [0, 1],\n               [0, 0]], dtype=int8)\n\n    ";
static PyMethodDef __pyx_mdef_5vcfnp_44calldata = {__Pyx_NAMESTR("calldata"), (PyCFunction)__pyx_pw_5vcfnp_44calldata, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5vcfnp_43calldata)};
static PyObject *__pyx_pw_5vcfnp_44calldata(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_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;
  PyObject *__pyx_v_verbose = 0;
  PyObject *__pyx_v_cache = 0;
  PyObject *__pyx_v_cachedir = 0;
  PyObject *__pyx_v_skip_cached = 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_vcf_types,&__pyx_n_s_count,&__pyx_n_s_progress,&__pyx_n_s_logstream,&__pyx_n_s_condition,&__pyx_n_s_slice,&__pyx_n_s_verbose,&__pyx_n_s_cache,&__pyx_n_s_cachedir,&__pyx_n_s_skip_cached,0};
    PyObject* values[19] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};

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

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

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

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

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

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

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

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

    /* "vcfnp.pyx":974
 *              fills=None,
 *              vcf_types=None,
 *              count=None,             # <<<<<<<<<<<<<<
 *              progress=0,
 *              logstream=sys.stderr,
 */
    values[10] = ((PyObject *)Py_None);
    values[11] = ((PyObject *)__pyx_int_0);
    values[12] = __pyx_k__15;

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

    /* "vcfnp.pyx":978
 *              logstream=sys.stderr,
 *              condition=None,
 *              slice=None,             # <<<<<<<<<<<<<<
 *              verbose=False,
 *              cache=False,
 */
    values[14] = ((PyObject *)Py_None);

    /* "vcfnp.pyx":979
 *              condition=None,
 *              slice=None,
 *              verbose=False,             # <<<<<<<<<<<<<<
 *              cache=False,
 *              cachedir=None,
 */
    values[15] = ((PyObject *)Py_False);

    /* "vcfnp.pyx":980
 *              slice=None,
 *              verbose=False,
 *              cache=False,             # <<<<<<<<<<<<<<
 *              cachedir=None,
 *              skip_cached=False,
 */
    values[16] = ((PyObject *)Py_False);

    /* "vcfnp.pyx":981
 *              verbose=False,
 *              cache=False,
 *              cachedir=None,             # <<<<<<<<<<<<<<
 *              skip_cached=False,
 *              ):
 */
    values[17] = ((PyObject *)Py_None);

    /* "vcfnp.pyx":982
 *              cache=False,
 *              cachedir=None,
 *              skip_cached=False,             # <<<<<<<<<<<<<<
 *              ):
 *     """
 */
    values[18] = ((PyObject *)Py_False);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
        case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
        case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
        case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
        case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
        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_vcf_types);
          if (value) { values[9] = value; kw_args--; }
        }
        case 10:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_count);
          if (value) { values[10] = value; kw_args--; }
        }
        case 11:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_progress);
          if (value) { values[11] = value; kw_args--; }
        }
        case 12:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_logstream);
          if (value) { values[12] = value; kw_args--; }
        }
        case 13:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_condition);
          if (value) { values[13] = value; kw_args--; }
        }
        case 14:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_slice);
          if (value) { values[14] = value; kw_args--; }
        }
        case 15:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose);
          if (value) { values[15] = value; kw_args--; }
        }
        case 16:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cache);
          if (value) { values[16] = value; kw_args--; }
        }
        case 17:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cachedir);
          if (value) { values[17] = value; kw_args--; }
        }
        case 18:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_skip_cached);
          if (value) { values[18] = 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 = 964; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
        case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
        case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
        case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
        case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
        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_vcf_types = values[9];
    __pyx_v_count = values[10];
    __pyx_v_progress = values[11];
    __pyx_v_logstream = values[12];
    __pyx_v_condition = values[13];
    __pyx_v_slice = values[14];
    __pyx_v_verbose = values[15];
    __pyx_v_cache = values[16];
    __pyx_v_cachedir = values[17];
    __pyx_v_skip_cached = values[18];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("calldata", 0, 1, 19, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __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_43calldata(__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_vcf_types, __pyx_v_count, __pyx_v_progress, __pyx_v_logstream, __pyx_v_condition, __pyx_v_slice, __pyx_v_verbose, __pyx_v_cache, __pyx_v_cachedir, __pyx_v_skip_cached);

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

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vcfnp_43calldata(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_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_verbose, PyObject *__pyx_v_cache, PyObject *__pyx_v_cachedir, PyObject *__pyx_v_skip_cached) {
  PyObject *__pyx_v_cache_fn = NULL;
  PyObject *__pyx_v_A = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("calldata", 0);

  /* "vcfnp.pyx":1129
 *     """
 * 
 *     if cache:             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(filename, (list, tuple)):
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_cache); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "vcfnp.pyx":1131
 *     if cache:
 * 
 *         if isinstance(filename, (list, tuple)):             # <<<<<<<<<<<<<<
 *             raise Exception('caching only supported when loading from a single VCF file')
 * 
 */
    __pyx_t_1 = PyList_Check(__pyx_v_filename); 
    if (!__pyx_t_1) {
      __pyx_t_2 = PyTuple_Check(__pyx_v_filename); 
      __pyx_t_3 = __pyx_t_2;
    } else {
      __pyx_t_3 = __pyx_t_1;
    }
    __pyx_t_1 = (__pyx_t_3 != 0);
    if (__pyx_t_1) {

      /* "vcfnp.pyx":1132
 * 
 *         if isinstance(filename, (list, tuple)):
 *             raise Exception('caching only supported when loading from a single VCF file')             # <<<<<<<<<<<<<<
 * 
 *         cache_fn = _mk_cache_fn(filename, type='calldata', region=region, cachedir=cachedir)
 */
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __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[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }

    /* "vcfnp.pyx":1134
 *             raise Exception('caching only supported when loading from a single VCF file')
 * 
 *         cache_fn = _mk_cache_fn(filename, type='calldata', region=region, cachedir=cachedir)             # <<<<<<<<<<<<<<
 *         if not os.path.exists(cache_fn) or os.path.getmtime(filename) > os.path.getmtime(cache_fn):
 *             if verbose:
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_mk_cache_fn); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; __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 = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_filename);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_filename);
    __Pyx_GIVEREF(__pyx_v_filename);
    __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_type, __pyx_n_s_calldata) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_region, __pyx_v_region) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_cachedir, __pyx_v_cachedir) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_cache_fn = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "vcfnp.pyx":1135
 * 
 *         cache_fn = _mk_cache_fn(filename, type='calldata', region=region, cachedir=cachedir)
 *         if not os.path.exists(cache_fn) or os.path.getmtime(filename) > os.path.getmtime(cache_fn):             # <<<<<<<<<<<<<<
 *             if verbose:
 *                 log(logstream, 'no cache file found or cache out of date')
 */
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_path); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_exists); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __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 = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_cache_fn);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_cache_fn);
    __Pyx_GIVEREF(__pyx_v_cache_fn);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_3 = (!__pyx_t_1);
    if (!__pyx_t_3) {
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_path); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_getmtime); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __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 = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_v_filename);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_filename);
      __Pyx_GIVEREF(__pyx_v_filename);
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_path); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_getmtime); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_cache_fn);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_cache_fn);
      __Pyx_GIVEREF(__pyx_v_cache_fn);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyObject_RichCompare(__pyx_t_7, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_2 = __pyx_t_1;
    } else {
      __pyx_t_2 = __pyx_t_3;
    }
    if (__pyx_t_2) {

      /* "vcfnp.pyx":1136
 *         cache_fn = _mk_cache_fn(filename, type='calldata', region=region, cachedir=cachedir)
 *         if not os.path.exists(cache_fn) or os.path.getmtime(filename) > os.path.getmtime(cache_fn):
 *             if verbose:             # <<<<<<<<<<<<<<
 *                 log(logstream, 'no cache file found or cache out of date')
 *             A = _build_calldata(filename,
 */
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_verbose); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_2) {

        /* "vcfnp.pyx":1137
 *         if not os.path.exists(cache_fn) or os.path.getmtime(filename) > os.path.getmtime(cache_fn):
 *             if verbose:
 *                 log(logstream, 'no cache file found or cache out of date')             # <<<<<<<<<<<<<<
 *             A = _build_calldata(filename,
 *                                 region=region,
 */
        __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_v_logstream);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_logstream);
        __Pyx_GIVEREF(__pyx_v_logstream);
        __Pyx_INCREF(__pyx_kp_s_no_cache_file_found_or_cache_out);
        PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_kp_s_no_cache_file_found_or_cache_out);
        __Pyx_GIVEREF(__pyx_kp_s_no_cache_file_found_or_cache_out);
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L6;
      }
      __pyx_L6:;

      /* "vcfnp.pyx":1138
 *             if verbose:
 *                 log(logstream, 'no cache file found or cache out of date')
 *             A = _build_calldata(filename,             # <<<<<<<<<<<<<<
 *                                 region=region,
 *                                 samples=samples,
 */
      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_build_calldata); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_filename);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_filename);
      __Pyx_GIVEREF(__pyx_v_filename);
      __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);

      /* "vcfnp.pyx":1139
 *                 log(logstream, 'no cache file found or cache out of date')
 *             A = _build_calldata(filename,
 *                                 region=region,             # <<<<<<<<<<<<<<
 *                                 samples=samples,
 *                                 ploidy=ploidy,
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_region, __pyx_v_region) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":1140
 *             A = _build_calldata(filename,
 *                                 region=region,
 *                                 samples=samples,             # <<<<<<<<<<<<<<
 *                                 ploidy=ploidy,
 *                                 fields=fields,
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_samples, __pyx_v_samples) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":1141
 *                                 region=region,
 *                                 samples=samples,
 *                                 ploidy=ploidy,             # <<<<<<<<<<<<<<
 *                                 fields=fields,
 *                                 exclude_fields=exclude_fields,
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ploidy, __pyx_v_ploidy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":1142
 *                                 samples=samples,
 *                                 ploidy=ploidy,
 *                                 fields=fields,             # <<<<<<<<<<<<<<
 *                                 exclude_fields=exclude_fields,
 *                                 dtypes=dtypes,
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_fields, __pyx_v_fields) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":1143
 *                                 ploidy=ploidy,
 *                                 fields=fields,
 *                                 exclude_fields=exclude_fields,             # <<<<<<<<<<<<<<
 *                                 dtypes=dtypes,
 *                                 arities=arities,
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_exclude_fields, __pyx_v_exclude_fields) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":1144
 *                                 fields=fields,
 *                                 exclude_fields=exclude_fields,
 *                                 dtypes=dtypes,             # <<<<<<<<<<<<<<
 *                                 arities=arities,
 *                                 fills=fills,
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtypes, __pyx_v_dtypes) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":1145
 *                                 exclude_fields=exclude_fields,
 *                                 dtypes=dtypes,
 *                                 arities=arities,             # <<<<<<<<<<<<<<
 *                                 fills=fills,
 *                                 vcf_types=vcf_types,
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_arities, __pyx_v_arities) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":1146
 *                                 dtypes=dtypes,
 *                                 arities=arities,
 *                                 fills=fills,             # <<<<<<<<<<<<<<
 *                                 vcf_types=vcf_types,
 *                                 count=count,
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_fills, __pyx_v_fills) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":1147
 *                                 arities=arities,
 *                                 fills=fills,
 *                                 vcf_types=vcf_types,             # <<<<<<<<<<<<<<
 *                                 count=count,
 *                                 progress=progress,
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_vcf_types, __pyx_v_vcf_types) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":1148
 *                                 fills=fills,
 *                                 vcf_types=vcf_types,
 *                                 count=count,             # <<<<<<<<<<<<<<
 *                                 progress=progress,
 *                                 logstream=logstream,
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_count, __pyx_v_count) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":1149
 *                                 vcf_types=vcf_types,
 *                                 count=count,
 *                                 progress=progress,             # <<<<<<<<<<<<<<
 *                                 logstream=logstream,
 *                                 condition=condition,
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_progress, __pyx_v_progress) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":1150
 *                                 count=count,
 *                                 progress=progress,
 *                                 logstream=logstream,             # <<<<<<<<<<<<<<
 *                                 condition=condition,
 *                                 slice=slice,
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_logstream, __pyx_v_logstream) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":1151
 *                                 progress=progress,
 *                                 logstream=logstream,
 *                                 condition=condition,             # <<<<<<<<<<<<<<
 *                                 slice=slice,
 *                                 verbose=verbose)
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_condition, __pyx_v_condition) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":1152
 *                                 logstream=logstream,
 *                                 condition=condition,
 *                                 slice=slice,             # <<<<<<<<<<<<<<
 *                                 verbose=verbose)
 *             if verbose:
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_slice, __pyx_v_slice) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":1153
 *                                 condition=condition,
 *                                 slice=slice,
 *                                 verbose=verbose)             # <<<<<<<<<<<<<<
 *             if verbose:
 *                 log(logstream, 'saving to cache', cache_fn)
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_verbose, __pyx_v_verbose) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":1138
 *             if verbose:
 *                 log(logstream, 'no cache file found or cache out of date')
 *             A = _build_calldata(filename,             # <<<<<<<<<<<<<<
 *                                 region=region,
 *                                 samples=samples,
 */
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_A = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "vcfnp.pyx":1154
 *                                 slice=slice,
 *                                 verbose=verbose)
 *             if verbose:             # <<<<<<<<<<<<<<
 *                 log(logstream, 'saving to cache', cache_fn)
 *             np.save(cache_fn, A)
 */
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_verbose); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_2) {

        /* "vcfnp.pyx":1155
 *                                 verbose=verbose)
 *             if verbose:
 *                 log(logstream, 'saving to cache', cache_fn)             # <<<<<<<<<<<<<<
 *             np.save(cache_fn, A)
 *             return A
 */
        __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_v_logstream);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_logstream);
        __Pyx_GIVEREF(__pyx_v_logstream);
        __Pyx_INCREF(__pyx_kp_s_saving_to_cache);
        PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_kp_s_saving_to_cache);
        __Pyx_GIVEREF(__pyx_kp_s_saving_to_cache);
        __Pyx_INCREF(__pyx_v_cache_fn);
        PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_cache_fn);
        __Pyx_GIVEREF(__pyx_v_cache_fn);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        goto __pyx_L7;
      }
      __pyx_L7:;

      /* "vcfnp.pyx":1156
 *             if verbose:
 *                 log(logstream, 'saving to cache', cache_fn)
 *             np.save(cache_fn, A)             # <<<<<<<<<<<<<<
 *             return A
 *         else:
 */
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_save); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __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 = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_cache_fn);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_cache_fn);
      __Pyx_GIVEREF(__pyx_v_cache_fn);
      __Pyx_INCREF(__pyx_v_A);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_A);
      __Pyx_GIVEREF(__pyx_v_A);
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1156; __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;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "vcfnp.pyx":1157
 *                 log(logstream, 'saving to cache', cache_fn)
 *             np.save(cache_fn, A)
 *             return A             # <<<<<<<<<<<<<<
 *         else:
 *             if skip_cached:
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_A);
      __pyx_r = __pyx_v_A;
      goto __pyx_L0;
    }
    /*else*/ {

      /* "vcfnp.pyx":1159
 *             return A
 *         else:
 *             if skip_cached:             # <<<<<<<<<<<<<<
 *                 if verbose:
 *                     log(logstream, 'skipping from cache', cache_fn)
 */
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_skip_cached); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_2) {

        /* "vcfnp.pyx":1160
 *         else:
 *             if skip_cached:
 *                 if verbose:             # <<<<<<<<<<<<<<
 *                     log(logstream, 'skipping from cache', cache_fn)
 *                 return None
 */
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_verbose); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (__pyx_t_2) {

          /* "vcfnp.pyx":1161
 *             if skip_cached:
 *                 if verbose:
 *                     log(logstream, 'skipping from cache', cache_fn)             # <<<<<<<<<<<<<<
 *                 return None
 *             else:
 */
          __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_INCREF(__pyx_v_logstream);
          PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_logstream);
          __Pyx_GIVEREF(__pyx_v_logstream);
          __Pyx_INCREF(__pyx_kp_s_skipping_from_cache);
          PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_kp_s_skipping_from_cache);
          __Pyx_GIVEREF(__pyx_kp_s_skipping_from_cache);
          __Pyx_INCREF(__pyx_v_cache_fn);
          PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_cache_fn);
          __Pyx_GIVEREF(__pyx_v_cache_fn);
          __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          goto __pyx_L9;
        }
        __pyx_L9:;

        /* "vcfnp.pyx":1162
 *                 if verbose:
 *                     log(logstream, 'skipping from cache', cache_fn)
 *                 return None             # <<<<<<<<<<<<<<
 *             else:
 *                 if verbose:
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_None);
        __pyx_r = Py_None;
        goto __pyx_L0;
      }
      /*else*/ {

        /* "vcfnp.pyx":1164
 *                 return None
 *             else:
 *                 if verbose:             # <<<<<<<<<<<<<<
 *                     log(logstream, 'loading from cache', cache_fn)
 *                 A = np.load(cache_fn)
 */
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_verbose); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (__pyx_t_2) {

          /* "vcfnp.pyx":1165
 *             else:
 *                 if verbose:
 *                     log(logstream, 'loading from cache', cache_fn)             # <<<<<<<<<<<<<<
 *                 A = np.load(cache_fn)
 *                 return A
 */
          __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_INCREF(__pyx_v_logstream);
          PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_logstream);
          __Pyx_GIVEREF(__pyx_v_logstream);
          __Pyx_INCREF(__pyx_kp_s_loading_from_cache);
          PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_kp_s_loading_from_cache);
          __Pyx_GIVEREF(__pyx_kp_s_loading_from_cache);
          __Pyx_INCREF(__pyx_v_cache_fn);
          PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_cache_fn);
          __Pyx_GIVEREF(__pyx_v_cache_fn);
          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1165; __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;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          goto __pyx_L10;
        }
        __pyx_L10:;

        /* "vcfnp.pyx":1166
 *                 if verbose:
 *                     log(logstream, 'loading from cache', cache_fn)
 *                 A = np.load(cache_fn)             # <<<<<<<<<<<<<<
 *                 return A
 * 
 */
        __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_load); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __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 = 1166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_v_cache_fn);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_cache_fn);
        __Pyx_GIVEREF(__pyx_v_cache_fn);
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_v_A = __pyx_t_5;
        __pyx_t_5 = 0;

        /* "vcfnp.pyx":1167
 *                     log(logstream, 'loading from cache', cache_fn)
 *                 A = np.load(cache_fn)
 *                 return A             # <<<<<<<<<<<<<<
 * 
 *     else:
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_v_A);
        __pyx_r = __pyx_v_A;
        goto __pyx_L0;
      }
    }
  }
  /*else*/ {

    /* "vcfnp.pyx":1171
 *     else:
 * 
 *         A = _build_calldata(filename,             # <<<<<<<<<<<<<<
 *                             region=region,
 *                             samples=samples,
 */
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_build_calldata); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_filename);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_filename);
    __Pyx_GIVEREF(__pyx_v_filename);
    __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);

    /* "vcfnp.pyx":1172
 * 
 *         A = _build_calldata(filename,
 *                             region=region,             # <<<<<<<<<<<<<<
 *                             samples=samples,
 *                             ploidy=ploidy,
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_region, __pyx_v_region) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":1173
 *         A = _build_calldata(filename,
 *                             region=region,
 *                             samples=samples,             # <<<<<<<<<<<<<<
 *                             ploidy=ploidy,
 *                             fields=fields,
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_samples, __pyx_v_samples) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":1174
 *                             region=region,
 *                             samples=samples,
 *                             ploidy=ploidy,             # <<<<<<<<<<<<<<
 *                             fields=fields,
 *                             exclude_fields=exclude_fields,
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_ploidy, __pyx_v_ploidy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":1175
 *                             samples=samples,
 *                             ploidy=ploidy,
 *                             fields=fields,             # <<<<<<<<<<<<<<
 *                             exclude_fields=exclude_fields,
 *                             dtypes=dtypes,
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_fields, __pyx_v_fields) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":1176
 *                             ploidy=ploidy,
 *                             fields=fields,
 *                             exclude_fields=exclude_fields,             # <<<<<<<<<<<<<<
 *                             dtypes=dtypes,
 *                             arities=arities,
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_exclude_fields, __pyx_v_exclude_fields) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":1177
 *                             fields=fields,
 *                             exclude_fields=exclude_fields,
 *                             dtypes=dtypes,             # <<<<<<<<<<<<<<
 *                             arities=arities,
 *                             fills=fills,
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtypes, __pyx_v_dtypes) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":1178
 *                             exclude_fields=exclude_fields,
 *                             dtypes=dtypes,
 *                             arities=arities,             # <<<<<<<<<<<<<<
 *                             fills=fills,
 *                             vcf_types=vcf_types,
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_arities, __pyx_v_arities) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":1179
 *                             dtypes=dtypes,
 *                             arities=arities,
 *                             fills=fills,             # <<<<<<<<<<<<<<
 *                             vcf_types=vcf_types,
 *                             count=count,
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_fills, __pyx_v_fills) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":1180
 *                             arities=arities,
 *                             fills=fills,
 *                             vcf_types=vcf_types,             # <<<<<<<<<<<<<<
 *                             count=count,
 *                             progress=progress,
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_vcf_types, __pyx_v_vcf_types) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":1181
 *                             fills=fills,
 *                             vcf_types=vcf_types,
 *                             count=count,             # <<<<<<<<<<<<<<
 *                             progress=progress,
 *                             logstream=logstream,
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_count, __pyx_v_count) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":1182
 *                             vcf_types=vcf_types,
 *                             count=count,
 *                             progress=progress,             # <<<<<<<<<<<<<<
 *                             logstream=logstream,
 *                             condition=condition,
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_progress, __pyx_v_progress) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":1183
 *                             count=count,
 *                             progress=progress,
 *                             logstream=logstream,             # <<<<<<<<<<<<<<
 *                             condition=condition,
 *                             slice=slice,
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_logstream, __pyx_v_logstream) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":1184
 *                             progress=progress,
 *                             logstream=logstream,
 *                             condition=condition,             # <<<<<<<<<<<<<<
 *                             slice=slice,
 *                             verbose=verbose)
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_condition, __pyx_v_condition) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":1185
 *                             logstream=logstream,
 *                             condition=condition,
 *                             slice=slice,             # <<<<<<<<<<<<<<
 *                             verbose=verbose)
 *         return A
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_slice, __pyx_v_slice) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":1186
 *                             condition=condition,
 *                             slice=slice,
 *                             verbose=verbose)             # <<<<<<<<<<<<<<
 *         return A
 * 
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_verbose, __pyx_v_verbose) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":1171
 *     else:
 * 
 *         A = _build_calldata(filename,             # <<<<<<<<<<<<<<
 *                             region=region,
 *                             samples=samples,
 */
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_A = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "vcfnp.pyx":1187
 *                             slice=slice,
 *                             verbose=verbose)
 *         return A             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_A);
    __pyx_r = __pyx_v_A;
    goto __pyx_L0;
  }

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("vcfnp.calldata", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_cache_fn);
  __Pyx_XDECREF(__pyx_v_A);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_46_build_calldata(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5vcfnp_45_build_calldata[] = "_build_calldata(filename, region=None, samples=None, ploidy=2, fields=None, exclude_fields=None, dtypes=None, arities=None, fills=None, vcf_types=None, count=None, progress=0, logstream=sys.stderr, condition=None, slice=None, verbose=False)";
static PyMethodDef __pyx_mdef_5vcfnp_46_build_calldata = {__Pyx_NAMESTR("_build_calldata"), (PyCFunction)__pyx_pw_5vcfnp_46_build_calldata, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5vcfnp_45_build_calldata)};
static PyObject *__pyx_pw_5vcfnp_46_build_calldata(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_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;
  PyObject *__pyx_v_verbose = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_build_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_vcf_types,&__pyx_n_s_count,&__pyx_n_s_progress,&__pyx_n_s_logstream,&__pyx_n_s_condition,&__pyx_n_s_slice,&__pyx_n_s_verbose,0};
    PyObject* values[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};

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

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

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

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

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

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

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

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

    /* "vcfnp.pyx":1200
 *                     fills=None,
 *                     vcf_types=None,
 *                     count=None,             # <<<<<<<<<<<<<<
 *                     progress=0,
 *                     logstream=sys.stderr,
 */
    values[10] = ((PyObject *)Py_None);
    values[11] = ((PyObject *)__pyx_int_0);
    values[12] = __pyx_k__17;

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

    /* "vcfnp.pyx":1204
 *                     logstream=sys.stderr,
 *                     condition=None,
 *                     slice=None,             # <<<<<<<<<<<<<<
 *                     verbose=False,
 *                     ):
 */
    values[14] = ((PyObject *)Py_None);

    /* "vcfnp.pyx":1205
 *                     condition=None,
 *                     slice=None,
 *                     verbose=False,             # <<<<<<<<<<<<<<
 *                     ):
 * 
 */
    values[15] = ((PyObject *)Py_False);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
        case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
        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_vcf_types);
          if (value) { values[9] = value; kw_args--; }
        }
        case 10:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_count);
          if (value) { values[10] = value; kw_args--; }
        }
        case 11:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_progress);
          if (value) { values[11] = value; kw_args--; }
        }
        case 12:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_logstream);
          if (value) { values[12] = value; kw_args--; }
        }
        case 13:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_condition);
          if (value) { values[13] = value; kw_args--; }
        }
        case 14:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_slice);
          if (value) { values[14] = value; kw_args--; }
        }
        case 15:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose);
          if (value) { values[15] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_build_calldata") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
        case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
        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_vcf_types = values[9];
    __pyx_v_count = values[10];
    __pyx_v_progress = values[11];
    __pyx_v_logstream = values[12];
    __pyx_v_condition = values[13];
    __pyx_v_slice = values[14];
    __pyx_v_verbose = values[15];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_build_calldata", 0, 1, 16, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vcfnp._build_calldata", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5vcfnp_45_build_calldata(__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_vcf_types, __pyx_v_count, __pyx_v_progress, __pyx_v_logstream, __pyx_v_condition, __pyx_v_slice, __pyx_v_verbose);

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

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_5vcfnp_15_build_calldata_2generator13(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "vcfnp.pyx":1242
 *             formatTypes[f] = TYPESTRING2KEY[vcf_types[f]]
 * 
 *     formatTypes = tuple(formatTypes[f] if f in formatTypes else -1 for f in fields)             # <<<<<<<<<<<<<<
 *     formatCounts = tuple(formatCounts[f] if f in formatCounts else -1 for f in fields)
 * 
 */

static PyObject *__pyx_pf_5vcfnp_15_build_calldata_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_17_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_17_genexpr *)__pyx_tp_new_5vcfnp___pyx_scope_struct_17_genexpr(__pyx_ptype_5vcfnp___pyx_scope_struct_17_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_16__build_calldata *) __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_15_build_calldata_2generator13, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("vcfnp._build_calldata.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_15_build_calldata_2generator13(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5vcfnp___pyx_scope_struct_17_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_17_genexpr *)__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;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = 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 = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields)) { __Pyx_RaiseClosureNameError("fields"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  if (PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields; __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_outer_scope->__pyx_v_fields); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; __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 = 1242; __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 = 1242; __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 = 1242; __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 = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_f);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_f, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_formatTypes)) { __Pyx_RaiseClosureNameError("formatTypes"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    __pyx_t_5 = (__Pyx_PySequence_Contains(__pyx_cur_scope->__pyx_v_f, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_formatTypes, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if ((__pyx_t_5 != 0)) {
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_formatTypes)) { __Pyx_RaiseClosureNameError("formatTypes"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
      __pyx_t_6 = PyObject_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_formatTypes, __pyx_cur_scope->__pyx_v_f); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 = __pyx_t_6;
      __pyx_t_6 = 0;
    } else {
      __Pyx_INCREF(__pyx_int_neg_1);
      __pyx_t_4 = __pyx_int_neg_1;
    }
    __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_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_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 = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __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;
}
static PyObject *__pyx_gb_5vcfnp_15_build_calldata_5generator14(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "vcfnp.pyx":1243
 * 
 *     formatTypes = tuple(formatTypes[f] if f in formatTypes else -1 for f in fields)
 *     formatCounts = tuple(formatCounts[f] if f in formatCounts else -1 for f in fields)             # <<<<<<<<<<<<<<
 * 
 *     # determine expected number of values for each field
 */

static PyObject *__pyx_pf_5vcfnp_15_build_calldata_3genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_18_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_18_genexpr *)__pyx_tp_new_5vcfnp___pyx_scope_struct_18_genexpr(__pyx_ptype_5vcfnp___pyx_scope_struct_18_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_16__build_calldata *) __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_15_build_calldata_5generator14, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("vcfnp._build_calldata.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_15_build_calldata_5generator14(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5vcfnp___pyx_scope_struct_18_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_18_genexpr *)__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;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = 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 = 1243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields)) { __Pyx_RaiseClosureNameError("fields"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  if (PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields; __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_outer_scope->__pyx_v_fields); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __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 = 1243; __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 = 1243; __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 = 1243; __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 = 1243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_f);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_f, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_formatCounts)) { __Pyx_RaiseClosureNameError("formatCounts"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    __pyx_t_5 = (__Pyx_PySequence_Contains(__pyx_cur_scope->__pyx_v_f, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_formatCounts, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if ((__pyx_t_5 != 0)) {
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_formatCounts)) { __Pyx_RaiseClosureNameError("formatCounts"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
      __pyx_t_6 = PyObject_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_formatCounts, __pyx_cur_scope->__pyx_v_f); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 = __pyx_t_6;
      __pyx_t_6 = 0;
    } else {
      __Pyx_INCREF(__pyx_int_neg_1);
      __pyx_t_4 = __pyx_int_neg_1;
    }
    __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_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_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 = 1243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __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":1190
 * 
 * 
 * def _build_calldata(filename,             # <<<<<<<<<<<<<<
 *                     region=None,
 *                     samples=None,
 */

static PyObject *__pyx_pf_5vcfnp_45_build_calldata(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_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_verbose) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_16__build_calldata *__pyx_cur_scope;
  PyObject *__pyx_v_filenames = NULL;
  struct __pyx_obj_6vcflib_PyVariantCallFile *__pyx_v_vcf = NULL;
  PyObject *__pyx_v_formatIds = NULL;
  PyObject *__pyx_v_all_samples = NULL;
  PyObject *__pyx_v_s = NULL;
  PyObject *__pyx_v_f = NULL;
  PyObject *__pyx_v_dtype = NULL;
  PyObject *__pyx_v_fieldspec = NULL;
  PyObject *__pyx_v_it = 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;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_build_calldata", 0);
  __pyx_cur_scope = (struct __pyx_obj_5vcfnp___pyx_scope_struct_16__build_calldata *)__pyx_tp_new_5vcfnp___pyx_scope_struct_16__build_calldata(__pyx_ptype_5vcfnp___pyx_scope_struct_16__build_calldata, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_fields = __pyx_v_fields;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fields);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fields);
  __Pyx_INCREF(__pyx_v_samples);
  __Pyx_INCREF(__pyx_v_arities);
  __Pyx_INCREF(__pyx_v_fills);

  /* "vcfnp.pyx":1208
 *                     ):
 * 
 *     if verbose:             # <<<<<<<<<<<<<<
 *         log(logstream, 'loading calldata from', filename)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_verbose); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "vcfnp.pyx":1209
 * 
 *     if verbose:
 *         log(logstream, 'loading calldata from', filename)             # <<<<<<<<<<<<<<
 * 
 *     filenames = _filenames_from_arg(filename)
 */
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_logstream);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_logstream);
    __Pyx_GIVEREF(__pyx_v_logstream);
    __Pyx_INCREF(__pyx_kp_s_loading_calldata_from);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_kp_s_loading_calldata_from);
    __Pyx_GIVEREF(__pyx_kp_s_loading_calldata_from);
    __Pyx_INCREF(__pyx_v_filename);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_filename);
    __Pyx_GIVEREF(__pyx_v_filename);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "vcfnp.pyx":1211
 *         log(logstream, 'loading calldata from', filename)
 * 
 *     filenames = _filenames_from_arg(filename)             # <<<<<<<<<<<<<<
 * 
 *     # extract definitions from VCF header
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_filenames_from_arg); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_filename);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_filename);
  __Pyx_GIVEREF(__pyx_v_filename);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_filenames = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "vcfnp.pyx":1214
 * 
 *     # extract definitions from VCF header
 *     vcf = PyVariantCallFile(filenames[0])             # <<<<<<<<<<<<<<
 *     _warn_duplicates(vcf.formatIds)
 *     formatIds = tuple(sorted(set(vcf.formatIds)))
 */
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_filenames, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6vcflib_PyVariantCallFile)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_vcf = ((struct __pyx_obj_6vcflib_PyVariantCallFile *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "vcfnp.pyx":1215
 *     # extract definitions from VCF header
 *     vcf = PyVariantCallFile(filenames[0])
 *     _warn_duplicates(vcf.formatIds)             # <<<<<<<<<<<<<<
 *     formatIds = tuple(sorted(set(vcf.formatIds)))
 *     formatTypes = vcf.formatTypes
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_warn_duplicates); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __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 = 1215; __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 = 1215; __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 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "vcfnp.pyx":1216
 *     vcf = PyVariantCallFile(filenames[0])
 *     _warn_duplicates(vcf.formatIds)
 *     formatIds = tuple(sorted(set(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 = 1216; __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 = 1216; __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 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1216; __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 = __Pyx_PyObject_Call(__pyx_builtin_sorted, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1216; __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 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_formatIds = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "vcfnp.pyx":1217
 *     _warn_duplicates(vcf.formatIds)
 *     formatIds = tuple(sorted(set(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 = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_cur_scope->__pyx_v_formatTypes = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "vcfnp.pyx":1218
 *     formatIds = tuple(sorted(set(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 = 1218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_cur_scope->__pyx_v_formatCounts = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "vcfnp.pyx":1219
 *     formatTypes = vcf.formatTypes
 *     formatCounts = vcf.formatCounts
 *     all_samples = vcf.sampleNames             # <<<<<<<<<<<<<<
 * 
 *     # determine which samples to extract
 */
  __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 = 1219; __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":1222
 * 
 *     # determine which samples to extract
 *     if samples is None:             # <<<<<<<<<<<<<<
 *         samples = all_samples
 *     else:
 */
  __pyx_t_1 = (__pyx_v_samples == Py_None);
  __pyx_t_5 = (__pyx_t_1 != 0);
  if (__pyx_t_5) {

    /* "vcfnp.pyx":1223
 *     # determine which samples to extract
 *     if samples is None:
 *         samples = all_samples             # <<<<<<<<<<<<<<
 *     else:
 *         for s in samples:
 */
    __Pyx_INCREF(__pyx_v_all_samples);
    __Pyx_DECREF_SET(__pyx_v_samples, __pyx_v_all_samples);
    goto __pyx_L4;
  }
  /*else*/ {

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

      /* "vcfnp.pyx":1226
 *     else:
 *         for s in samples:
 *             assert s in all_samples, 'unknown sample: %s' % s             # <<<<<<<<<<<<<<
 *     samples = tuple(samples)
 * 
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(!Py_OptimizeFlag)) {
        __pyx_t_5 = (__Pyx_PySequence_Contains(__pyx_v_s, __pyx_v_all_samples, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (unlikely(!(__pyx_t_5 != 0))) {
          __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_unknown_sample_s, __pyx_v_s); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          PyErr_SetObject(PyExc_AssertionError, __pyx_t_4);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
      }
      #endif
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_L4:;

  /* "vcfnp.pyx":1227
 *         for s in samples:
 *             assert s in all_samples, 'unknown sample: %s' % s
 *     samples = tuple(samples)             # <<<<<<<<<<<<<<
 * 
 *     # determine fields to extract
 */
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_samples);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_samples);
  __Pyx_GIVEREF(__pyx_v_samples);
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_samples, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "vcfnp.pyx":1230
 * 
 *     # determine fields to extract
 *     fields = _calldata_fields(fields, exclude_fields, formatIds)             # <<<<<<<<<<<<<<
 * 
 *     # support for working around VCFs with bad FORMAT headers
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_calldata_fields); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fields);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_v_fields);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fields);
  __Pyx_INCREF(__pyx_v_exclude_fields);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_exclude_fields);
  __Pyx_GIVEREF(__pyx_v_exclude_fields);
  __Pyx_INCREF(__pyx_v_formatIds);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_formatIds);
  __Pyx_GIVEREF(__pyx_v_formatIds);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_fields);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_fields, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "vcfnp.pyx":1233
 * 
 *     # support for working around VCFs with bad FORMAT headers
 *     for f in fields:             # <<<<<<<<<<<<<<
 *         if f not in STANDARD_CALLDATA_FIELDS and f not in formatIds:
 *             # fall back to unary string; can be overridden with vcf_types, dtypes and arities args
 */
  if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_fields) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_fields)) {
    __pyx_t_2 = __pyx_cur_scope->__pyx_v_fields; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_fields); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_7 && PyList_CheckExact(__pyx_t_2)) {
      if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_7 && PyTuple_CheckExact(__pyx_t_2)) {
      if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_3 = __pyx_t_7(__pyx_t_2);
      if (unlikely(!__pyx_t_3)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "vcfnp.pyx":1234
 *     # support for working around VCFs with bad FORMAT headers
 *     for f in fields:
 *         if f not in STANDARD_CALLDATA_FIELDS and f not in formatIds:             # <<<<<<<<<<<<<<
 *             # fall back to unary string; can be overridden with vcf_types, dtypes and arities args
 *             formatTypes[f] = FIELD_STRING
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_STANDARD_CALLDATA_FIELDS); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_t_3, Py_NE)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if ((__pyx_t_5 != 0)) {
      __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_v_formatIds, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_8 = (__pyx_t_1 != 0);
    } else {
      __pyx_t_8 = (__pyx_t_5 != 0);
    }
    if (__pyx_t_8) {

      /* "vcfnp.pyx":1236
 *         if f not in STANDARD_CALLDATA_FIELDS and f not in formatIds:
 *             # fall back to unary string; can be overridden with vcf_types, dtypes and arities args
 *             formatTypes[f] = FIELD_STRING             # <<<<<<<<<<<<<<
 *             formatCounts[f] = 1
 *         if vcf_types is not None and f in vcf_types:
 */
      __pyx_t_3 = PyInt_FromLong(vcf::FIELD_STRING); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      if (unlikely(PyObject_SetItem(__pyx_cur_scope->__pyx_v_formatTypes, __pyx_v_f, __pyx_t_3) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "vcfnp.pyx":1237
 *             # fall back to unary string; can be overridden with vcf_types, dtypes and arities args
 *             formatTypes[f] = FIELD_STRING
 *             formatCounts[f] = 1             # <<<<<<<<<<<<<<
 *         if vcf_types is not None and f in vcf_types:
 *             # override type declared in VCF header
 */
      if (unlikely(PyObject_SetItem(__pyx_cur_scope->__pyx_v_formatCounts, __pyx_v_f, __pyx_int_1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L9;
    }
    __pyx_L9:;

    /* "vcfnp.pyx":1238
 *             formatTypes[f] = FIELD_STRING
 *             formatCounts[f] = 1
 *         if vcf_types is not None and f in vcf_types:             # <<<<<<<<<<<<<<
 *             # override type declared in VCF header
 *             formatTypes[f] = TYPESTRING2KEY[vcf_types[f]]
 */
    __pyx_t_8 = (__pyx_v_vcf_types != Py_None);
    if ((__pyx_t_8 != 0)) {
      __pyx_t_5 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_v_vcf_types, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_1 = (__pyx_t_5 != 0);
    } else {
      __pyx_t_1 = (__pyx_t_8 != 0);
    }
    if (__pyx_t_1) {

      /* "vcfnp.pyx":1240
 *         if vcf_types is not None and f in vcf_types:
 *             # override type declared in VCF header
 *             formatTypes[f] = TYPESTRING2KEY[vcf_types[f]]             # <<<<<<<<<<<<<<
 * 
 *     formatTypes = tuple(formatTypes[f] if f in formatTypes else -1 for f in fields)
 */
      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_TYPESTRING2KEY); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_GetItem(__pyx_v_vcf_types, __pyx_v_f); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_9 = PyObject_GetItem(__pyx_t_3, __pyx_t_4); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(PyObject_SetItem(__pyx_cur_scope->__pyx_v_formatTypes, __pyx_v_f, __pyx_t_9) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L10;
    }
    __pyx_L10:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":1242
 *             formatTypes[f] = TYPESTRING2KEY[vcf_types[f]]
 * 
 *     formatTypes = tuple(formatTypes[f] if f in formatTypes else -1 for f in fields)             # <<<<<<<<<<<<<<
 *     formatCounts = tuple(formatCounts[f] if f in formatCounts else -1 for f in fields)
 * 
 */
  __pyx_t_2 = __pyx_pf_5vcfnp_15_build_calldata_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_formatTypes);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_formatTypes, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "vcfnp.pyx":1243
 * 
 *     formatTypes = tuple(formatTypes[f] if f in formatTypes else -1 for f in fields)
 *     formatCounts = tuple(formatCounts[f] if f in formatCounts else -1 for f in fields)             # <<<<<<<<<<<<<<
 * 
 *     # determine expected number of values for each field
 */
  __pyx_t_2 = __pyx_pf_5vcfnp_15_build_calldata_3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_formatCounts);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_formatCounts, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "vcfnp.pyx":1246
 * 
 *     # determine expected number of values for each field
 *     arities = _calldata_arities(fields, arities, formatCounts, ploidy)             # <<<<<<<<<<<<<<
 * 
 *     # determine fill values to use where number of values is less than expectation
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_calldata_arities); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = PyTuple_New(4); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fields);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_cur_scope->__pyx_v_fields);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fields);
  __Pyx_INCREF(__pyx_v_arities);
  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_arities);
  __Pyx_GIVEREF(__pyx_v_arities);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_formatCounts);
  PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_cur_scope->__pyx_v_formatCounts);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_formatCounts);
  __Pyx_INCREF(__pyx_v_ploidy);
  PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_v_ploidy);
  __Pyx_GIVEREF(__pyx_v_ploidy);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF_SET(__pyx_v_arities, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "vcfnp.pyx":1249
 * 
 *     # determine fill values to use where number of values is less than expectation
 *     fills = _calldata_fills(fields, fills, formatTypes, ploidy)             # <<<<<<<<<<<<<<
 * 
 *     # construct a numpy dtype for structured array
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_calldata_fills); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = PyTuple_New(4); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fields);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_cur_scope->__pyx_v_fields);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fields);
  __Pyx_INCREF(__pyx_v_fills);
  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_fills);
  __Pyx_GIVEREF(__pyx_v_fills);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_formatTypes);
  PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_cur_scope->__pyx_v_formatTypes);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_formatTypes);
  __Pyx_INCREF(__pyx_v_ploidy);
  PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_v_ploidy);
  __Pyx_GIVEREF(__pyx_v_ploidy);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF_SET(__pyx_v_fills, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "vcfnp.pyx":1252
 * 
 *     # construct a numpy dtype for structured array
 *     dtype = _calldata_dtype(fields, dtypes, formatTypes, arities, samples, ploidy)             # <<<<<<<<<<<<<<
 * 
 *     # zip up field parameters
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_calldata_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = PyTuple_New(6); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fields);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_cur_scope->__pyx_v_fields);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fields);
  __Pyx_INCREF(__pyx_v_dtypes);
  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_dtypes);
  __Pyx_GIVEREF(__pyx_v_dtypes);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_formatTypes);
  PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_cur_scope->__pyx_v_formatTypes);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_formatTypes);
  __Pyx_INCREF(__pyx_v_arities);
  PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_v_arities);
  __Pyx_GIVEREF(__pyx_v_arities);
  __Pyx_INCREF(__pyx_v_samples);
  PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_v_samples);
  __Pyx_GIVEREF(__pyx_v_samples);
  __Pyx_INCREF(__pyx_v_ploidy);
  PyTuple_SET_ITEM(__pyx_t_9, 5, __pyx_v_ploidy);
  __Pyx_GIVEREF(__pyx_v_ploidy);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_v_dtype = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "vcfnp.pyx":1255
 * 
 *     # zip up field parameters
 *     fieldspec = zip(fields, arities, fills, formatTypes)             # <<<<<<<<<<<<<<
 * 
 *     # set up iterator
 */
  __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fields);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_cur_scope->__pyx_v_fields);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fields);
  __Pyx_INCREF(__pyx_v_arities);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_arities);
  __Pyx_GIVEREF(__pyx_v_arities);
  __Pyx_INCREF(__pyx_v_fills);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_fills);
  __Pyx_GIVEREF(__pyx_v_fills);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_formatTypes);
  PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_cur_scope->__pyx_v_formatTypes);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_formatTypes);
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_4, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_fieldspec = __pyx_t_9;
  __pyx_t_9 = 0;

  /* "vcfnp.pyx":1258
 * 
 *     # set up iterator
 *     if condition is not None:             # <<<<<<<<<<<<<<
 *         it = itercalldata_with_condition(filenames, region, samples, ploidy, fieldspec, condition)
 *     else:
 */
  __pyx_t_1 = (__pyx_v_condition != Py_None);
  __pyx_t_8 = (__pyx_t_1 != 0);
  if (__pyx_t_8) {

    /* "vcfnp.pyx":1259
 *     # set up iterator
 *     if condition is not None:
 *         it = itercalldata_with_condition(filenames, region, samples, ploidy, fieldspec, condition)             # <<<<<<<<<<<<<<
 *     else:
 *         it = itercalldata(filenames, region, samples, ploidy, fieldspec)
 */
    __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_itercalldata_with_condition); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_4 = PyTuple_New(6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_filenames);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_filenames);
    __Pyx_GIVEREF(__pyx_v_filenames);
    __Pyx_INCREF(__pyx_v_region);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_region);
    __Pyx_GIVEREF(__pyx_v_region);
    __Pyx_INCREF(__pyx_v_samples);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_samples);
    __Pyx_GIVEREF(__pyx_v_samples);
    __Pyx_INCREF(__pyx_v_ploidy);
    PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_ploidy);
    __Pyx_GIVEREF(__pyx_v_ploidy);
    __Pyx_INCREF(__pyx_v_fieldspec);
    PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_v_fieldspec);
    __Pyx_GIVEREF(__pyx_v_fieldspec);
    __Pyx_INCREF(__pyx_v_condition);
    PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_v_condition);
    __Pyx_GIVEREF(__pyx_v_condition);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_it = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L11;
  }
  /*else*/ {

    /* "vcfnp.pyx":1261
 *         it = itercalldata_with_condition(filenames, region, samples, ploidy, fieldspec, condition)
 *     else:
 *         it = itercalldata(filenames, region, samples, ploidy, fieldspec)             # <<<<<<<<<<<<<<
 * 
 *     # slice?
 */
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_itercalldata); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_filenames);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_filenames);
    __Pyx_GIVEREF(__pyx_v_filenames);
    __Pyx_INCREF(__pyx_v_region);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_region);
    __Pyx_GIVEREF(__pyx_v_region);
    __Pyx_INCREF(__pyx_v_samples);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_samples);
    __Pyx_GIVEREF(__pyx_v_samples);
    __Pyx_INCREF(__pyx_v_ploidy);
    PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_ploidy);
    __Pyx_GIVEREF(__pyx_v_ploidy);
    __Pyx_INCREF(__pyx_v_fieldspec);
    PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_v_fieldspec);
    __Pyx_GIVEREF(__pyx_v_fieldspec);
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_it = __pyx_t_9;
    __pyx_t_9 = 0;
  }
  __pyx_L11:;

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

    /* "vcfnp.pyx":1265
 *     # slice?
 *     if slice:
 *         it = islice(it, *slice)             # <<<<<<<<<<<<<<
 * 
 *     # build an array from the iterator
 */
    __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_islice); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1265; __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);
    __pyx_t_2 = PySequence_Tuple(__pyx_v_slice); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1265; __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_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_it, __pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L12;
  }
  __pyx_L12:;

  /* "vcfnp.pyx":1268
 * 
 *     # build an array from the iterator
 *     return _fromiter(it, dtype, count, progress, logstream)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_fromiter); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __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_INCREF(__pyx_v_dtype);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_dtype);
  __Pyx_GIVEREF(__pyx_v_dtype);
  __Pyx_INCREF(__pyx_v_count);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_count);
  __Pyx_GIVEREF(__pyx_v_count);
  __Pyx_INCREF(__pyx_v_progress);
  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_progress);
  __Pyx_GIVEREF(__pyx_v_progress);
  __Pyx_INCREF(__pyx_v_logstream);
  PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_logstream);
  __Pyx_GIVEREF(__pyx_v_logstream);
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_9;
  __pyx_t_9 = 0;
  goto __pyx_L0;

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("vcfnp._build_calldata", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_filenames);
  __Pyx_XDECREF((PyObject *)__pyx_v_vcf);
  __Pyx_XDECREF(__pyx_v_formatIds);
  __Pyx_XDECREF(__pyx_v_all_samples);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XDECREF(__pyx_v_f);
  __Pyx_XDECREF(__pyx_v_dtype);
  __Pyx_XDECREF(__pyx_v_fieldspec);
  __Pyx_XDECREF(__pyx_v_it);
  __Pyx_XDECREF(__pyx_v_samples);
  __Pyx_XDECREF(__pyx_v_arities);
  __Pyx_XDECREF(__pyx_v_fills);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_48calldata_2d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5vcfnp_47calldata_2d[] = "calldata_2d(filename, region=None, samples=None, ploidy=2, fields=None, exclude_fields=None, dtypes=None, arities=None, fills=None, vcf_types=None, count=None, progress=0, logstream=sys.stderr, condition=None, slice=None, verbose=False, cache=False, cachedir=None, skip_cached=False)\n\n    Load a numpy 2-dimensional structured array with data from the sample columns of a VCF\n    file. Convenience function, equivalent to calldata() followed by view2d().\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    vcf_types: dict or dict-like\n        Dictionary containing field:string mappings used to override any\n        bogus type declarations in the VCF header\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    verbose: bool\n        Log more messages.\n    cache: bool\n        If True, save the resulting numpy array to disk, and load from the cache if present rather than rebuilding\n        from the VCF.\n    cachedir: string\n        Manually spec""ify the directory to use to store cache files.\n    skip_cached: bool\n        If True and cache file is fresh, do not load and return None.\n\n    ";
static PyMethodDef __pyx_mdef_5vcfnp_48calldata_2d = {__Pyx_NAMESTR("calldata_2d"), (PyCFunction)__pyx_pw_5vcfnp_48calldata_2d, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5vcfnp_47calldata_2d)};
static PyObject *__pyx_pw_5vcfnp_48calldata_2d(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_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;
  PyObject *__pyx_v_verbose = 0;
  PyObject *__pyx_v_cache = 0;
  PyObject *__pyx_v_cachedir = 0;
  PyObject *__pyx_v_skip_cached = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("calldata_2d (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_vcf_types,&__pyx_n_s_count,&__pyx_n_s_progress,&__pyx_n_s_logstream,&__pyx_n_s_condition,&__pyx_n_s_slice,&__pyx_n_s_verbose,&__pyx_n_s_cache,&__pyx_n_s_cachedir,&__pyx_n_s_skip_cached,0};
    PyObject* values[19] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};

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

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

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

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

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

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

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

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

    /* "vcfnp.pyx":1281
 *                 fills=None,
 *                 vcf_types=None,
 *                 count=None,             # <<<<<<<<<<<<<<
 *                 progress=0,
 *                 logstream=sys.stderr,
 */
    values[10] = ((PyObject *)Py_None);
    values[11] = ((PyObject *)__pyx_int_0);
    values[12] = __pyx_k__18;

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

    /* "vcfnp.pyx":1285
 *                 logstream=sys.stderr,
 *                 condition=None,
 *                 slice=None,             # <<<<<<<<<<<<<<
 *                 verbose=False,
 *                 cache=False,
 */
    values[14] = ((PyObject *)Py_None);

    /* "vcfnp.pyx":1286
 *                 condition=None,
 *                 slice=None,
 *                 verbose=False,             # <<<<<<<<<<<<<<
 *                 cache=False,
 *                 cachedir=None,
 */
    values[15] = ((PyObject *)Py_False);

    /* "vcfnp.pyx":1287
 *                 slice=None,
 *                 verbose=False,
 *                 cache=False,             # <<<<<<<<<<<<<<
 *                 cachedir=None,
 *                 skip_cached=False,
 */
    values[16] = ((PyObject *)Py_False);

    /* "vcfnp.pyx":1288
 *                 verbose=False,
 *                 cache=False,
 *                 cachedir=None,             # <<<<<<<<<<<<<<
 *                 skip_cached=False,
 *                ):
 */
    values[17] = ((PyObject *)Py_None);

    /* "vcfnp.pyx":1289
 *                 cache=False,
 *                 cachedir=None,
 *                 skip_cached=False,             # <<<<<<<<<<<<<<
 *                ):
 *     """
 */
    values[18] = ((PyObject *)Py_False);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
        case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
        case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
        case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
        case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
        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_vcf_types);
          if (value) { values[9] = value; kw_args--; }
        }
        case 10:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_count);
          if (value) { values[10] = value; kw_args--; }
        }
        case 11:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_progress);
          if (value) { values[11] = value; kw_args--; }
        }
        case 12:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_logstream);
          if (value) { values[12] = value; kw_args--; }
        }
        case 13:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_condition);
          if (value) { values[13] = value; kw_args--; }
        }
        case 14:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_slice);
          if (value) { values[14] = value; kw_args--; }
        }
        case 15:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose);
          if (value) { values[15] = value; kw_args--; }
        }
        case 16:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cache);
          if (value) { values[16] = value; kw_args--; }
        }
        case 17:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cachedir);
          if (value) { values[17] = value; kw_args--; }
        }
        case 18:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_skip_cached);
          if (value) { values[18] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calldata_2d") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
        case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
        case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
        case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
        case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
        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_vcf_types = values[9];
    __pyx_v_count = values[10];
    __pyx_v_progress = values[11];
    __pyx_v_logstream = values[12];
    __pyx_v_condition = values[13];
    __pyx_v_slice = values[14];
    __pyx_v_verbose = values[15];
    __pyx_v_cache = values[16];
    __pyx_v_cachedir = values[17];
    __pyx_v_skip_cached = values[18];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("calldata_2d", 0, 1, 19, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vcfnp.calldata_2d", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5vcfnp_47calldata_2d(__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_vcf_types, __pyx_v_count, __pyx_v_progress, __pyx_v_logstream, __pyx_v_condition, __pyx_v_slice, __pyx_v_verbose, __pyx_v_cache, __pyx_v_cachedir, __pyx_v_skip_cached);

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

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vcfnp_47calldata_2d(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_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_verbose, PyObject *__pyx_v_cache, PyObject *__pyx_v_cachedir, PyObject *__pyx_v_skip_cached) {
  PyObject *__pyx_v_cache_fn = NULL;
  PyObject *__pyx_v_A = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("calldata_2d", 0);

  /* "vcfnp.pyx":1338
 *     """
 * 
 *     if cache:             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(filename, (list, tuple)):
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_cache); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "vcfnp.pyx":1340
 *     if cache:
 * 
 *         if isinstance(filename, (list, tuple)):             # <<<<<<<<<<<<<<
 *             raise Exception('caching only supported when loading from a single VCF file')
 * 
 */
    __pyx_t_1 = PyList_Check(__pyx_v_filename); 
    if (!__pyx_t_1) {
      __pyx_t_2 = PyTuple_Check(__pyx_v_filename); 
      __pyx_t_3 = __pyx_t_2;
    } else {
      __pyx_t_3 = __pyx_t_1;
    }
    __pyx_t_1 = (__pyx_t_3 != 0);
    if (__pyx_t_1) {

      /* "vcfnp.pyx":1341
 * 
 *         if isinstance(filename, (list, tuple)):
 *             raise Exception('caching only supported when loading from a single VCF file')             # <<<<<<<<<<<<<<
 * 
 *         cache_fn = _mk_cache_fn(filename, type='calldata_2d', region=region, cachedir=cachedir)
 */
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1341; __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[0]; __pyx_lineno = 1341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }

    /* "vcfnp.pyx":1343
 *             raise Exception('caching only supported when loading from a single VCF file')
 * 
 *         cache_fn = _mk_cache_fn(filename, type='calldata_2d', region=region, cachedir=cachedir)             # <<<<<<<<<<<<<<
 *         if not os.path.exists(cache_fn) or os.path.getmtime(filename) > os.path.getmtime(cache_fn):
 *             if verbose:
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_mk_cache_fn); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1343; __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 = 1343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_filename);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_filename);
    __Pyx_GIVEREF(__pyx_v_filename);
    __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_type, __pyx_n_s_calldata_2d) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_region, __pyx_v_region) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_cachedir, __pyx_v_cachedir) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_cache_fn = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "vcfnp.pyx":1344
 * 
 *         cache_fn = _mk_cache_fn(filename, type='calldata_2d', region=region, cachedir=cachedir)
 *         if not os.path.exists(cache_fn) or os.path.getmtime(filename) > os.path.getmtime(cache_fn):             # <<<<<<<<<<<<<<
 *             if verbose:
 *                 log(logstream, 'no cache file found or cache out of date')
 */
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_path); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_exists); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __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 = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_cache_fn);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_cache_fn);
    __Pyx_GIVEREF(__pyx_v_cache_fn);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); 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);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_3 = (!__pyx_t_1);
    if (!__pyx_t_3) {
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); 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);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_path); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_getmtime); 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);
      __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 = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_v_filename);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_filename);
      __Pyx_GIVEREF(__pyx_v_filename);
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_path); 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);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_getmtime); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __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);
      __Pyx_INCREF(__pyx_v_cache_fn);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_cache_fn);
      __Pyx_GIVEREF(__pyx_v_cache_fn);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __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_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyObject_RichCompare(__pyx_t_7, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_2 = __pyx_t_1;
    } else {
      __pyx_t_2 = __pyx_t_3;
    }
    if (__pyx_t_2) {

      /* "vcfnp.pyx":1345
 *         cache_fn = _mk_cache_fn(filename, type='calldata_2d', region=region, cachedir=cachedir)
 *         if not os.path.exists(cache_fn) or os.path.getmtime(filename) > os.path.getmtime(cache_fn):
 *             if verbose:             # <<<<<<<<<<<<<<
 *                 log(logstream, 'no cache file found or cache out of date')
 *             A = _build_calldata_2d(filename,
 */
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_verbose); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_2) {

        /* "vcfnp.pyx":1346
 *         if not os.path.exists(cache_fn) or os.path.getmtime(filename) > os.path.getmtime(cache_fn):
 *             if verbose:
 *                 log(logstream, 'no cache file found or cache out of date')             # <<<<<<<<<<<<<<
 *             A = _build_calldata_2d(filename,
 *                                    region=region,
 */
        __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); 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_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_v_logstream);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_logstream);
        __Pyx_GIVEREF(__pyx_v_logstream);
        __Pyx_INCREF(__pyx_kp_s_no_cache_file_found_or_cache_out);
        PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_kp_s_no_cache_file_found_or_cache_out);
        __Pyx_GIVEREF(__pyx_kp_s_no_cache_file_found_or_cache_out);
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L6;
      }
      __pyx_L6:;

      /* "vcfnp.pyx":1347
 *             if verbose:
 *                 log(logstream, 'no cache file found or cache out of date')
 *             A = _build_calldata_2d(filename,             # <<<<<<<<<<<<<<
 *                                    region=region,
 *                                    samples=samples,
 */
      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_build_calldata_2d); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_filename);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_filename);
      __Pyx_GIVEREF(__pyx_v_filename);
      __pyx_t_5 = PyDict_New(); 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);

      /* "vcfnp.pyx":1348
 *                 log(logstream, 'no cache file found or cache out of date')
 *             A = _build_calldata_2d(filename,
 *                                    region=region,             # <<<<<<<<<<<<<<
 *                                    samples=samples,
 *                                    ploidy=ploidy,
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_region, __pyx_v_region) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":1349
 *             A = _build_calldata_2d(filename,
 *                                    region=region,
 *                                    samples=samples,             # <<<<<<<<<<<<<<
 *                                    ploidy=ploidy,
 *                                    fields=fields,
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_samples, __pyx_v_samples) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":1350
 *                                    region=region,
 *                                    samples=samples,
 *                                    ploidy=ploidy,             # <<<<<<<<<<<<<<
 *                                    fields=fields,
 *                                    exclude_fields=exclude_fields,
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ploidy, __pyx_v_ploidy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":1351
 *                                    samples=samples,
 *                                    ploidy=ploidy,
 *                                    fields=fields,             # <<<<<<<<<<<<<<
 *                                    exclude_fields=exclude_fields,
 *                                    dtypes=dtypes,
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_fields, __pyx_v_fields) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":1352
 *                                    ploidy=ploidy,
 *                                    fields=fields,
 *                                    exclude_fields=exclude_fields,             # <<<<<<<<<<<<<<
 *                                    dtypes=dtypes,
 *                                    arities=arities,
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_exclude_fields, __pyx_v_exclude_fields) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":1353
 *                                    fields=fields,
 *                                    exclude_fields=exclude_fields,
 *                                    dtypes=dtypes,             # <<<<<<<<<<<<<<
 *                                    arities=arities,
 *                                    fills=fills,
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtypes, __pyx_v_dtypes) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":1354
 *                                    exclude_fields=exclude_fields,
 *                                    dtypes=dtypes,
 *                                    arities=arities,             # <<<<<<<<<<<<<<
 *                                    fills=fills,
 *                                    vcf_types=vcf_types,
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_arities, __pyx_v_arities) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":1355
 *                                    dtypes=dtypes,
 *                                    arities=arities,
 *                                    fills=fills,             # <<<<<<<<<<<<<<
 *                                    vcf_types=vcf_types,
 *                                    count=count,
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_fills, __pyx_v_fills) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":1356
 *                                    arities=arities,
 *                                    fills=fills,
 *                                    vcf_types=vcf_types,             # <<<<<<<<<<<<<<
 *                                    count=count,
 *                                    progress=progress,
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_vcf_types, __pyx_v_vcf_types) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":1357
 *                                    fills=fills,
 *                                    vcf_types=vcf_types,
 *                                    count=count,             # <<<<<<<<<<<<<<
 *                                    progress=progress,
 *                                    logstream=logstream,
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_count, __pyx_v_count) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":1358
 *                                    vcf_types=vcf_types,
 *                                    count=count,
 *                                    progress=progress,             # <<<<<<<<<<<<<<
 *                                    logstream=logstream,
 *                                    condition=condition,
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_progress, __pyx_v_progress) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":1359
 *                                    count=count,
 *                                    progress=progress,
 *                                    logstream=logstream,             # <<<<<<<<<<<<<<
 *                                    condition=condition,
 *                                    slice=slice,
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_logstream, __pyx_v_logstream) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":1360
 *                                    progress=progress,
 *                                    logstream=logstream,
 *                                    condition=condition,             # <<<<<<<<<<<<<<
 *                                    slice=slice,
 *                                    verbose=verbose)
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_condition, __pyx_v_condition) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":1361
 *                                    logstream=logstream,
 *                                    condition=condition,
 *                                    slice=slice,             # <<<<<<<<<<<<<<
 *                                    verbose=verbose)
 *             if verbose:
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_slice, __pyx_v_slice) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":1362
 *                                    condition=condition,
 *                                    slice=slice,
 *                                    verbose=verbose)             # <<<<<<<<<<<<<<
 *             if verbose:
 *                 log(logstream, 'saving to cache', cache_fn)
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_verbose, __pyx_v_verbose) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vcfnp.pyx":1347
 *             if verbose:
 *                 log(logstream, 'no cache file found or cache out of date')
 *             A = _build_calldata_2d(filename,             # <<<<<<<<<<<<<<
 *                                    region=region,
 *                                    samples=samples,
 */
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_A = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "vcfnp.pyx":1363
 *                                    slice=slice,
 *                                    verbose=verbose)
 *             if verbose:             # <<<<<<<<<<<<<<
 *                 log(logstream, 'saving to cache', cache_fn)
 *             np.save(cache_fn, A)
 */
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_verbose); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_2) {

        /* "vcfnp.pyx":1364
 *                                    verbose=verbose)
 *             if verbose:
 *                 log(logstream, 'saving to cache', cache_fn)             # <<<<<<<<<<<<<<
 *             np.save(cache_fn, A)
 *             return A
 */
        __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_v_logstream);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_logstream);
        __Pyx_GIVEREF(__pyx_v_logstream);
        __Pyx_INCREF(__pyx_kp_s_saving_to_cache);
        PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_kp_s_saving_to_cache);
        __Pyx_GIVEREF(__pyx_kp_s_saving_to_cache);
        __Pyx_INCREF(__pyx_v_cache_fn);
        PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_cache_fn);
        __Pyx_GIVEREF(__pyx_v_cache_fn);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        goto __pyx_L7;
      }
      __pyx_L7:;

      /* "vcfnp.pyx":1365
 *             if verbose:
 *                 log(logstream, 'saving to cache', cache_fn)
 *             np.save(cache_fn, A)             # <<<<<<<<<<<<<<
 *             return A
 *         else:
 */
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_save); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __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 = 1365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_cache_fn);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_cache_fn);
      __Pyx_GIVEREF(__pyx_v_cache_fn);
      __Pyx_INCREF(__pyx_v_A);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_A);
      __Pyx_GIVEREF(__pyx_v_A);
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1365; __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;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "vcfnp.pyx":1366
 *                 log(logstream, 'saving to cache', cache_fn)
 *             np.save(cache_fn, A)
 *             return A             # <<<<<<<<<<<<<<
 *         else:
 *             if skip_cached:
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_A);
      __pyx_r = __pyx_v_A;
      goto __pyx_L0;
    }
    /*else*/ {

      /* "vcfnp.pyx":1368
 *             return A
 *         else:
 *             if skip_cached:             # <<<<<<<<<<<<<<
 *                 if verbose:
 *                     log(logstream, 'skipping from cache', cache_fn)
 */
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_skip_cached); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_2) {

        /* "vcfnp.pyx":1369
 *         else:
 *             if skip_cached:
 *                 if verbose:             # <<<<<<<<<<<<<<
 *                     log(logstream, 'skipping from cache', cache_fn)
 *                 return None
 */
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_verbose); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (__pyx_t_2) {

          /* "vcfnp.pyx":1370
 *             if skip_cached:
 *                 if verbose:
 *                     log(logstream, 'skipping from cache', cache_fn)             # <<<<<<<<<<<<<<
 *                 return None
 *             else:
 */
          __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_INCREF(__pyx_v_logstream);
          PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_logstream);
          __Pyx_GIVEREF(__pyx_v_logstream);
          __Pyx_INCREF(__pyx_kp_s_skipping_from_cache);
          PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_kp_s_skipping_from_cache);
          __Pyx_GIVEREF(__pyx_kp_s_skipping_from_cache);
          __Pyx_INCREF(__pyx_v_cache_fn);
          PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_cache_fn);
          __Pyx_GIVEREF(__pyx_v_cache_fn);
          __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          goto __pyx_L9;
        }
        __pyx_L9:;

        /* "vcfnp.pyx":1371
 *                 if verbose:
 *                     log(logstream, 'skipping from cache', cache_fn)
 *                 return None             # <<<<<<<<<<<<<<
 *             else:
 *                 if verbose:
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_None);
        __pyx_r = Py_None;
        goto __pyx_L0;
      }
      /*else*/ {

        /* "vcfnp.pyx":1373
 *                 return None
 *             else:
 *                 if verbose:             # <<<<<<<<<<<<<<
 *                     log(logstream, 'loading from cache', cache_fn)
 *                 A = np.load(cache_fn)
 */
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_verbose); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (__pyx_t_2) {

          /* "vcfnp.pyx":1374
 *             else:
 *                 if verbose:
 *                     log(logstream, 'loading from cache', cache_fn)             # <<<<<<<<<<<<<<
 *                 A = np.load(cache_fn)
 *                 return A
 */
          __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_INCREF(__pyx_v_logstream);
          PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_logstream);
          __Pyx_GIVEREF(__pyx_v_logstream);
          __Pyx_INCREF(__pyx_kp_s_loading_from_cache);
          PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_kp_s_loading_from_cache);
          __Pyx_GIVEREF(__pyx_kp_s_loading_from_cache);
          __Pyx_INCREF(__pyx_v_cache_fn);
          PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_cache_fn);
          __Pyx_GIVEREF(__pyx_v_cache_fn);
          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1374; __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;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          goto __pyx_L10;
        }
        __pyx_L10:;

        /* "vcfnp.pyx":1375
 *                 if verbose:
 *                     log(logstream, 'loading from cache', cache_fn)
 *                 A = np.load(cache_fn)             # <<<<<<<<<<<<<<
 *                 return A
 * 
 */
        __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_load); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __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 = 1375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_v_cache_fn);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_cache_fn);
        __Pyx_GIVEREF(__pyx_v_cache_fn);
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_v_A = __pyx_t_5;
        __pyx_t_5 = 0;

        /* "vcfnp.pyx":1376
 *                     log(logstream, 'loading from cache', cache_fn)
 *                 A = np.load(cache_fn)
 *                 return A             # <<<<<<<<<<<<<<
 * 
 *     else:
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_v_A);
        __pyx_r = __pyx_v_A;
        goto __pyx_L0;
      }
    }
  }
  /*else*/ {

    /* "vcfnp.pyx":1380
 *     else:
 * 
 *         A = _build_calldata_2d(filename,             # <<<<<<<<<<<<<<
 *                                region=region,
 *                                samples=samples,
 */
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_build_calldata_2d); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_filename);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_filename);
    __Pyx_GIVEREF(__pyx_v_filename);
    __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);

    /* "vcfnp.pyx":1381
 * 
 *         A = _build_calldata_2d(filename,
 *                                region=region,             # <<<<<<<<<<<<<<
 *                                samples=samples,
 *                                ploidy=ploidy,
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_region, __pyx_v_region) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":1382
 *         A = _build_calldata_2d(filename,
 *                                region=region,
 *                                samples=samples,             # <<<<<<<<<<<<<<
 *                                ploidy=ploidy,
 *                                fields=fields,
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_samples, __pyx_v_samples) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":1383
 *                                region=region,
 *                                samples=samples,
 *                                ploidy=ploidy,             # <<<<<<<<<<<<<<
 *                                fields=fields,
 *                                exclude_fields=exclude_fields,
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_ploidy, __pyx_v_ploidy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":1384
 *                                samples=samples,
 *                                ploidy=ploidy,
 *                                fields=fields,             # <<<<<<<<<<<<<<
 *                                exclude_fields=exclude_fields,
 *                                dtypes=dtypes,
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_fields, __pyx_v_fields) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":1385
 *                                ploidy=ploidy,
 *                                fields=fields,
 *                                exclude_fields=exclude_fields,             # <<<<<<<<<<<<<<
 *                                dtypes=dtypes,
 *                                arities=arities,
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_exclude_fields, __pyx_v_exclude_fields) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":1386
 *                                fields=fields,
 *                                exclude_fields=exclude_fields,
 *                                dtypes=dtypes,             # <<<<<<<<<<<<<<
 *                                arities=arities,
 *                                fills=fills,
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtypes, __pyx_v_dtypes) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":1387
 *                                exclude_fields=exclude_fields,
 *                                dtypes=dtypes,
 *                                arities=arities,             # <<<<<<<<<<<<<<
 *                                fills=fills,
 *                                vcf_types=vcf_types,
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_arities, __pyx_v_arities) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":1388
 *                                dtypes=dtypes,
 *                                arities=arities,
 *                                fills=fills,             # <<<<<<<<<<<<<<
 *                                vcf_types=vcf_types,
 *                                count=count,
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_fills, __pyx_v_fills) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":1389
 *                                arities=arities,
 *                                fills=fills,
 *                                vcf_types=vcf_types,             # <<<<<<<<<<<<<<
 *                                count=count,
 *                                progress=progress,
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_vcf_types, __pyx_v_vcf_types) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":1390
 *                                fills=fills,
 *                                vcf_types=vcf_types,
 *                                count=count,             # <<<<<<<<<<<<<<
 *                                progress=progress,
 *                                logstream=logstream,
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_count, __pyx_v_count) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":1391
 *                                vcf_types=vcf_types,
 *                                count=count,
 *                                progress=progress,             # <<<<<<<<<<<<<<
 *                                logstream=logstream,
 *                                condition=condition,
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_progress, __pyx_v_progress) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":1392
 *                                count=count,
 *                                progress=progress,
 *                                logstream=logstream,             # <<<<<<<<<<<<<<
 *                                condition=condition,
 *                                slice=slice,
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_logstream, __pyx_v_logstream) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":1393
 *                                progress=progress,
 *                                logstream=logstream,
 *                                condition=condition,             # <<<<<<<<<<<<<<
 *                                slice=slice,
 *                                verbose=verbose)
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_condition, __pyx_v_condition) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":1394
 *                                logstream=logstream,
 *                                condition=condition,
 *                                slice=slice,             # <<<<<<<<<<<<<<
 *                                verbose=verbose)
 *         return A
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_slice, __pyx_v_slice) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":1395
 *                                condition=condition,
 *                                slice=slice,
 *                                verbose=verbose)             # <<<<<<<<<<<<<<
 *         return A
 * 
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_verbose, __pyx_v_verbose) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "vcfnp.pyx":1380
 *     else:
 * 
 *         A = _build_calldata_2d(filename,             # <<<<<<<<<<<<<<
 *                                region=region,
 *                                samples=samples,
 */
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_A = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "vcfnp.pyx":1396
 *                                slice=slice,
 *                                verbose=verbose)
 *         return A             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_A);
    __pyx_r = __pyx_v_A;
    goto __pyx_L0;
  }

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("vcfnp.calldata_2d", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_cache_fn);
  __Pyx_XDECREF(__pyx_v_A);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":1399
 * 
 * 
 * def _build_calldata_2d(*args, **kwargs):             # <<<<<<<<<<<<<<
 *     C = calldata(*args, **kwargs)
 *     C2d = view2d(C)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_50_build_calldata_2d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5vcfnp_49_build_calldata_2d[] = "_build_calldata_2d(*args, **kwargs)";
static PyMethodDef __pyx_mdef_5vcfnp_50_build_calldata_2d = {__Pyx_NAMESTR("_build_calldata_2d"), (PyCFunction)__pyx_pw_5vcfnp_50_build_calldata_2d, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5vcfnp_49_build_calldata_2d)};
static PyObject *__pyx_pw_5vcfnp_50_build_calldata_2d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_build_calldata_2d (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_build_calldata_2d", 1))) return NULL;
  __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New();
  if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_5vcfnp_49_build_calldata_2d(__pyx_self, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vcfnp_49_build_calldata_2d(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_C = NULL;
  PyObject *__pyx_v_C2d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  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("_build_calldata_2d", 0);

  /* "vcfnp.pyx":1400
 * 
 * def _build_calldata_2d(*args, **kwargs):
 *     C = calldata(*args, **kwargs)             # <<<<<<<<<<<<<<
 *     C2d = view2d(C)
 *     return C2d
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_calldata); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_v_kwargs;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_C = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "vcfnp.pyx":1401
 * def _build_calldata_2d(*args, **kwargs):
 *     C = calldata(*args, **kwargs)
 *     C2d = view2d(C)             # <<<<<<<<<<<<<<
 *     return C2d
 * 
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_view2d); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_C);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_C);
  __Pyx_GIVEREF(__pyx_v_C);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_C2d = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "vcfnp.pyx":1402
 *     C = calldata(*args, **kwargs)
 *     C2d = view2d(C)
 *     return C2d             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_C2d);
  __pyx_r = __pyx_v_C2d;
  goto __pyx_L0;

  /* "vcfnp.pyx":1399
 * 
 * 
 * def _build_calldata_2d(*args, **kwargs):             # <<<<<<<<<<<<<<
 *     C = calldata(*args, **kwargs)
 *     C2d = view2d(C)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("vcfnp._build_calldata_2d", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_C);
  __Pyx_XDECREF(__pyx_v_C2d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_5vcfnp_53generator3(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "vcfnp.pyx":1405
 * 
 * 
 * def itercalldata(filenames,             # <<<<<<<<<<<<<<
 *                   region,
 *                   tuple samples,
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_52itercalldata(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5vcfnp_51itercalldata[] = "itercalldata(filenames, region, tuple samples, int ploidy, list fieldspec)";
static PyMethodDef __pyx_mdef_5vcfnp_52itercalldata = {__Pyx_NAMESTR("itercalldata"), (PyCFunction)__pyx_pw_5vcfnp_52itercalldata, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5vcfnp_51itercalldata)};
static PyObject *__pyx_pw_5vcfnp_52itercalldata(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_filenames = 0;
  PyObject *__pyx_v_region = 0;
  PyObject *__pyx_v_samples = 0;
  int __pyx_v_ploidy;
  PyObject *__pyx_v_fieldspec = 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_fieldspec,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("itercalldata", 1, 5, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1405; __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, 5, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1405; __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, 5, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1405; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fieldspec)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("itercalldata", 1, 5, 5, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1405; __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 = 1405; __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_samples = ((PyObject*)values[2]);
    __pyx_v_ploidy = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_ploidy == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_fieldspec = ((PyObject*)values[4]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("itercalldata", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1405; __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_samples), (&PyTuple_Type), 1, "samples", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fieldspec), (&PyList_Type), 1, "fieldspec", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vcfnp_51itercalldata(__pyx_self, __pyx_v_filenames, __pyx_v_region, __pyx_v_samples, __pyx_v_ploidy, __pyx_v_fieldspec);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vcfnp_51itercalldata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filenames, PyObject *__pyx_v_region, PyObject *__pyx_v_samples, int __pyx_v_ploidy, PyObject *__pyx_v_fieldspec) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_19_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_19_itercalldata *)__pyx_tp_new_5vcfnp___pyx_scope_struct_19_itercalldata(__pyx_ptype_5vcfnp___pyx_scope_struct_19_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_INCREF(__pyx_cur_scope->__pyx_v_samples);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_samples);
  __pyx_cur_scope->__pyx_v_ploidy = __pyx_v_ploidy;
  __pyx_cur_scope->__pyx_v_fieldspec = __pyx_v_fieldspec;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fieldspec);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fieldspec);
  {
    __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5vcfnp_53generator3, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __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_53generator3(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5vcfnp___pyx_scope_struct_19_itercalldata *__pyx_cur_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_19_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_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 = 1405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":1413
 *     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 = 1413; __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 = 1413; __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 = 1413; __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 = 1413; __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 = 1413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_current_filename);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_current_filename, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;

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

    /* "vcfnp.pyx":1415
 *     for current_filename in filenames:
 *         variantFile = new VariantCallFile()
 *         variantFile.open(current_filename)             # <<<<<<<<<<<<<<
 *         variantFile.parseInfo = False
 *         variantFile.parseSamples = True
 */
    __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 = 1415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_cur_scope->__pyx_v_variantFile->open(__pyx_t_6);

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

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

    /* "vcfnp.pyx":1418
 *         variantFile.parseInfo = False
 *         variantFile.parseSamples = True
 *         if region is not None:             # <<<<<<<<<<<<<<
 *             region_set = variantFile.setRegion(region)
 *             if not region_set:
 */
    __pyx_t_7 = (__pyx_cur_scope->__pyx_v_region != Py_None);
    __pyx_t_8 = (__pyx_t_7 != 0);
    if (__pyx_t_8) {

      /* "vcfnp.pyx":1419
 *         variantFile.parseSamples = True
 *         if region is not None:
 *             region_set = variantFile.setRegion(region)             # <<<<<<<<<<<<<<
 *             if not region_set:
 *                 raise StopIteration
 */
      __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 = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_cur_scope->__pyx_v_region_set = __pyx_cur_scope->__pyx_v_variantFile->setRegion(__pyx_t_6);

      /* "vcfnp.pyx":1420
 *         if region is not None:
 *             region_set = variantFile.setRegion(region)
 *             if not region_set:             # <<<<<<<<<<<<<<
 *                 raise StopIteration
 *         var = new Variant(deref(variantFile))
 */
      __pyx_t_8 = ((!(__pyx_cur_scope->__pyx_v_region_set != 0)) != 0);
      if (__pyx_t_8) {

        /* "vcfnp.pyx":1421
 *             region_set = variantFile.setRegion(region)
 *             if not region_set:
 *                 raise StopIteration             # <<<<<<<<<<<<<<
 *         var = new Variant(deref(variantFile))
 * 
 */
        __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "vcfnp.pyx":1422
 *             if not region_set:
 *                 raise StopIteration
 *         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":1424
 *         var = new Variant(deref(variantFile))
 * 
 *         while _get_next_variant(variantFile, var):             # <<<<<<<<<<<<<<
 *             yield _mkcrow(var, samples, ploidy, fieldspec)
 * 
 */
    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":1425
 * 
 *         while _get_next_variant(variantFile, var):
 *             yield _mkcrow(var, samples, ploidy, fieldspec)             # <<<<<<<<<<<<<<
 * 
 *         del variantFile
 */
      __pyx_t_4 = __pyx_f_5vcfnp__mkcrow(__pyx_cur_scope->__pyx_v_var, __pyx_cur_scope->__pyx_v_samples, __pyx_cur_scope->__pyx_v_ploidy, __pyx_cur_scope->__pyx_v_fieldspec); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1425; __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_L10_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 = 1425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }

    /* "vcfnp.pyx":1427
 *             yield _mkcrow(var, samples, ploidy, fieldspec)
 * 
 *         del variantFile             # <<<<<<<<<<<<<<
 *         del var
 * 
 */
    delete __pyx_cur_scope->__pyx_v_variantFile;

    /* "vcfnp.pyx":1428
 * 
 *         del variantFile
 *         del var             # <<<<<<<<<<<<<<
 * 
 * 
 */
    delete __pyx_cur_scope->__pyx_v_var;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":1405
 * 
 * 
 * def itercalldata(filenames,             # <<<<<<<<<<<<<<
 *                   region,
 *                   tuple samples,
 */

  /* function exit code */
  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_56generator4(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "vcfnp.pyx":1431
 * 
 * 
 * def itercalldata_with_condition(filenames,             # <<<<<<<<<<<<<<
 *                                  region,
 *                                  tuple samples,
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_55itercalldata_with_condition(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5vcfnp_54itercalldata_with_condition[] = "itercalldata_with_condition(filenames, region, tuple samples, int ploidy, list fieldspec, condition)";
static PyMethodDef __pyx_mdef_5vcfnp_55itercalldata_with_condition = {__Pyx_NAMESTR("itercalldata_with_condition"), (PyCFunction)__pyx_pw_5vcfnp_55itercalldata_with_condition, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5vcfnp_54itercalldata_with_condition)};
static PyObject *__pyx_pw_5vcfnp_55itercalldata_with_condition(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_filenames = 0;
  PyObject *__pyx_v_region = 0;
  PyObject *__pyx_v_samples = 0;
  int __pyx_v_ploidy;
  PyObject *__pyx_v_fieldspec = 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_fieldspec,&__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("itercalldata_with_condition", 1, 6, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1431; __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, 6, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1431; __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, 6, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1431; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fieldspec)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("itercalldata_with_condition", 1, 6, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1431; __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("itercalldata_with_condition", 1, 6, 6, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1431; __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 = 1431; __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_samples = ((PyObject*)values[2]);
    __pyx_v_ploidy = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_ploidy == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1434; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_fieldspec = ((PyObject*)values[4]);
    __pyx_v_condition = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("itercalldata_with_condition", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1431; __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_samples), (&PyTuple_Type), 1, "samples", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fieldspec), (&PyList_Type), 1, "fieldspec", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vcfnp_54itercalldata_with_condition(__pyx_self, __pyx_v_filenames, __pyx_v_region, __pyx_v_samples, __pyx_v_ploidy, __pyx_v_fieldspec, __pyx_v_condition);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vcfnp_54itercalldata_with_condition(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filenames, PyObject *__pyx_v_region, PyObject *__pyx_v_samples, int __pyx_v_ploidy, PyObject *__pyx_v_fieldspec, PyObject *__pyx_v_condition) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_20_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_20_itercalldata_with_condition *)__pyx_tp_new_5vcfnp___pyx_scope_struct_20_itercalldata_with_condition(__pyx_ptype_5vcfnp___pyx_scope_struct_20_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_INCREF(__pyx_cur_scope->__pyx_v_samples);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_samples);
  __pyx_cur_scope->__pyx_v_ploidy = __pyx_v_ploidy;
  __pyx_cur_scope->__pyx_v_fieldspec = __pyx_v_fieldspec;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fieldspec);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fieldspec);
  __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_56generator4, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __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_56generator4(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5vcfnp___pyx_scope_struct_20_itercalldata_with_condition *__pyx_cur_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_20_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_L12_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 = 1431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

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

  /* "vcfnp.pyx":1441
 *     cdef Variant *var
 *     cdef long i = 0
 *     cdef long 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 = 1441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_cur_scope->__pyx_v_n = __pyx_t_1;

  /* "vcfnp.pyx":1443
 *     cdef long 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 = 1443; __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 = 1443; __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 = 1443; __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 = 1443; __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 = 1443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_2);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_current_filename);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_current_filename, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;

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

    /* "vcfnp.pyx":1445
 *     for current_filename in filenames:
 *         variantFile = new VariantCallFile()
 *         variantFile.open(current_filename)             # <<<<<<<<<<<<<<
 *         variantFile.parseInfo = False
 *         variantFile.parseSamples = False
 */
    __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 = 1445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_cur_scope->__pyx_v_variantFile->open(__pyx_t_6);

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

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

    /* "vcfnp.pyx":1448
 *         variantFile.parseInfo = False
 *         variantFile.parseSamples = False
 *         if region is not None:             # <<<<<<<<<<<<<<
 *             region_set = variantFile.setRegion(region)
 *             if not region_set:
 */
    __pyx_t_7 = (__pyx_cur_scope->__pyx_v_region != Py_None);
    __pyx_t_8 = (__pyx_t_7 != 0);
    if (__pyx_t_8) {

      /* "vcfnp.pyx":1449
 *         variantFile.parseSamples = False
 *         if region is not None:
 *             region_set = variantFile.setRegion(region)             # <<<<<<<<<<<<<<
 *             if not region_set:
 *                 raise StopIteration
 */
      __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 = 1449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_cur_scope->__pyx_v_region_set = __pyx_cur_scope->__pyx_v_variantFile->setRegion(__pyx_t_6);

      /* "vcfnp.pyx":1450
 *         if region is not None:
 *             region_set = variantFile.setRegion(region)
 *             if not region_set:             # <<<<<<<<<<<<<<
 *                 raise StopIteration
 *         var = new Variant(deref(variantFile))
 */
      __pyx_t_8 = ((!(__pyx_cur_scope->__pyx_v_region_set != 0)) != 0);
      if (__pyx_t_8) {

        /* "vcfnp.pyx":1451
 *             region_set = variantFile.setRegion(region)
 *             if not region_set:
 *                 raise StopIteration             # <<<<<<<<<<<<<<
 *         var = new Variant(deref(variantFile))
 * 
 */
        __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "vcfnp.pyx":1452
 *             if not region_set:
 *                 raise StopIteration
 *         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":1454
 *         var = new Variant(deref(variantFile))
 * 
 *         while i < n:             # <<<<<<<<<<<<<<
 *             # only worth 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":1456
 *         while i < n:
 *             # only worth 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, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; __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 = 1456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_8) {

        /* "vcfnp.pyx":1457
 *             # only worth 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":1458
 *             if condition[i]:
 *                 variantFile.parseSamples = True
 *                 if not _get_next_variant(variantFile, var):             # <<<<<<<<<<<<<<
 *                     break
 *                 yield _mkcrow(var, samples, ploidy, fieldspec)
 */
        __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":1459
 *                 variantFile.parseSamples = True
 *                 if not _get_next_variant(variantFile, var):
 *                     break             # <<<<<<<<<<<<<<
 *                 yield _mkcrow(var, samples, ploidy, fieldspec)
 *             else:
 */
          goto __pyx_L9_break;
        }

        /* "vcfnp.pyx":1460
 *                 if not _get_next_variant(variantFile, var):
 *                     break
 *                 yield _mkcrow(var, samples, ploidy, fieldspec)             # <<<<<<<<<<<<<<
 *             else:
 *                 variantFile.parseSamples = False
 */
        __pyx_t_4 = __pyx_f_5vcfnp__mkcrow(__pyx_cur_scope->__pyx_v_var, __pyx_cur_scope->__pyx_v_samples, __pyx_cur_scope->__pyx_v_ploidy, __pyx_cur_scope->__pyx_v_fieldspec); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1460; __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_L12_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 = 1460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L10;
      }
      /*else*/ {

        /* "vcfnp.pyx":1462
 *                 yield _mkcrow(var, samples, ploidy, fieldspec)
 *             else:
 *                 variantFile.parseSamples = False             # <<<<<<<<<<<<<<
 *                 if not _get_next_variant(variantFile, var):
 *                     break
 */
        __pyx_cur_scope->__pyx_v_variantFile->parseSamples = 0;

        /* "vcfnp.pyx":1463
 *             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":1464
 *                 variantFile.parseSamples = False
 *                 if not _get_next_variant(variantFile, var):
 *                     break             # <<<<<<<<<<<<<<
 *             i += 1
 * 
 */
          goto __pyx_L9_break;
        }
      }
      __pyx_L10:;

      /* "vcfnp.pyx":1465
 *                 if not _get_next_variant(variantFile, var):
 *                     break
 *             i += 1             # <<<<<<<<<<<<<<
 * 
 *         del variantFile
 */
      __pyx_cur_scope->__pyx_v_i = (__pyx_cur_scope->__pyx_v_i + 1);
    }
    __pyx_L9_break:;

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

    /* "vcfnp.pyx":1468
 * 
 *         del variantFile
 *         del var             # <<<<<<<<<<<<<<
 * 
 * 
 */
    delete __pyx_cur_scope->__pyx_v_var;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":1431
 * 
 * 
 * def itercalldata_with_condition(filenames,             # <<<<<<<<<<<<<<
 *                                  region,
 *                                  tuple samples,
 */

  /* function exit code */
  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":1471
 * 
 * 
 * cdef inline object _mkcrow(Variant *var,             # <<<<<<<<<<<<<<
 *                              tuple samples,
 *                              int ploidy,
 */

static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkcrow(vcf::Variant *__pyx_v_var, PyObject *__pyx_v_samples, int __pyx_v_ploidy, PyObject *__pyx_v_fieldspec) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_v_s = 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;
  std::string __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_mkcrow", 0);

  /* "vcfnp.pyx":1475
 *                              int ploidy,
 *                              list fieldspec):
 *     out = [_mkcvals(var, s, ploidy, fieldspec) 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 = 1475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(__pyx_v_samples == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = __pyx_v_samples; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_4 = PyTuple_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 = 1475; __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 = 1475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __pyx_convert_string_from_py_(__pyx_v_s); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_4 = __pyx_f_5vcfnp__mkcvals(__pyx_v_var, __pyx_t_5, __pyx_v_ploidy, __pyx_v_fieldspec); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __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 = 1475; __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":1476
 *                              list fieldspec):
 *     out = [_mkcvals(var, s, ploidy, fieldspec) for s in samples]
 *     return tuple(out)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_AsTuple(__pyx_v_out); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "vcfnp.pyx":1471
 * 
 * 
 * cdef inline object _mkcrow(Variant *var,             # <<<<<<<<<<<<<<
 *                              tuple samples,
 *                              int ploidy,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("vcfnp._mkcrow", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkcvals(vcf::Variant *__pyx_v_var, std::string __pyx_v_sample, int __pyx_v_ploidy, PyObject *__pyx_v_fieldspec) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_v_f = NULL;
  PyObject *__pyx_v_arity = NULL;
  PyObject *__pyx_v_fill = NULL;
  PyObject *__pyx_v_formatType = 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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  std::string __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_mkcvals", 0);

  /* "vcfnp.pyx":1483
 *                             int ploidy,
 *                             list fieldspec):
 *     out = [_mkcval(var.samples[sample], ploidy, f, arity, fill, formatType)             # <<<<<<<<<<<<<<
 *            for (f, arity, fill, formatType) in fieldspec]
 *     return tuple(out)
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);

  /* "vcfnp.pyx":1484
 *                             list fieldspec):
 *     out = [_mkcval(var.samples[sample], ploidy, f, arity, fill, formatType)
 *            for (f, arity, fill, formatType) in fieldspec]             # <<<<<<<<<<<<<<
 *     return tuple(out)
 * 
 */
  if (unlikely(__pyx_v_fieldspec == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = __pyx_v_fieldspec; __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 = 1484; __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 = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
      PyObject* sequence = __pyx_t_4;
      #if CYTHON_COMPILING_IN_CPYTHON
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 4)) {
        if (size > 4) __Pyx_RaiseTooManyValuesError(4);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 2); 
        __pyx_t_8 = PyTuple_GET_ITEM(sequence, 3); 
      } else {
        __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
        __pyx_t_7 = PyList_GET_ITEM(sequence, 2); 
        __pyx_t_8 = PyList_GET_ITEM(sequence, 3); 
      }
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_8);
      #else
      {
        Py_ssize_t i;
        PyObject** temps[4] = {&__pyx_t_5,&__pyx_t_6,&__pyx_t_7,&__pyx_t_8};
        for (i=0; i < 4; i++) {
          PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(item);
          *(temps[i]) = item;
        }
      }
      #endif
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      Py_ssize_t index = -1;
      PyObject** temps[4] = {&__pyx_t_5,&__pyx_t_6,&__pyx_t_7,&__pyx_t_8};
      __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
      for (index=0; index < 4; index++) {
        PyObject* item = __pyx_t_10(__pyx_t_9); if (unlikely(!item)) goto __pyx_L5_unpacking_failed;
        __Pyx_GOTREF(item);
        *(temps[index]) = item;
      }
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_10 = NULL;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_10 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_arity, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_XDECREF_SET(__pyx_v_fill, __pyx_t_7);
    __pyx_t_7 = 0;
    __Pyx_XDECREF_SET(__pyx_v_formatType, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "vcfnp.pyx":1483
 *                             int ploidy,
 *                             list fieldspec):
 *     out = [_mkcval(var.samples[sample], ploidy, f, arity, fill, formatType)             # <<<<<<<<<<<<<<
 *            for (f, arity, fill, formatType) in fieldspec]
 *     return tuple(out)
 */
    __pyx_t_11 = __pyx_convert_string_from_py_(__pyx_v_f); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_v_arity); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_v_formatType); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_4 = __pyx_f_5vcfnp__mkcval((__pyx_v_var->samples[__pyx_v_sample]), __pyx_v_ploidy, __pyx_t_11, __pyx_t_12, __pyx_v_fill, __pyx_t_13); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1483; __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 = 1483; __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":1485
 *     out = [_mkcval(var.samples[sample], ploidy, f, arity, fill, formatType)
 *            for (f, arity, fill, formatType) in fieldspec]
 *     return tuple(out)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_AsTuple(__pyx_v_out); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("vcfnp._mkcvals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XDECREF(__pyx_v_f);
  __Pyx_XDECREF(__pyx_v_arity);
  __Pyx_XDECREF(__pyx_v_fill);
  __Pyx_XDECREF(__pyx_v_formatType);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkcval(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, int __pyx_v_formatType) {
  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("_mkcval", 0);

  /* "vcfnp.pyx":1494
 *                            object fill,
 *                            int formatType):
 *     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":1495
 *                            int formatType):
 *     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 = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "vcfnp.pyx":1496
 *     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":1497
 *         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 = 1497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "vcfnp.pyx":1498
 *     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":1499
 *         return _is_phased(sample_data)
 *     elif field == FIELD_NAME_GENOTYPE:
 *         return _genotype(sample_data, ploidy)             # <<<<<<<<<<<<<<
 *     else:
 *         return _mkval(sample_data[field], arity, fill, formatType)
 */
    __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 = 1499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }
  /*else*/ {

    /* "vcfnp.pyx":1501
 *         return _genotype(sample_data, ploidy)
 *     else:
 *         return _mkval(sample_data[field], arity, fill, formatType)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __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_formatType); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vcfnp._mkcval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":1504
 * 
 * 
 * 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":1506
 * 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":1507
 *     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":1508
 *     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;
  }
  /*else*/ {

    /* "vcfnp.pyx":1510
 *         return False
 *     else:
 *         return gts.at(0).find('.') == npos             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_2 = __pyx_convert_string_from_py_(__pyx_kp_b__14); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1510; __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;
  }

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("vcfnp._is_called", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":1513
 * 
 * 
 * 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":1515
 * 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":1516
 *     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":1517
 *     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;
  }
  /*else*/ {

    /* "vcfnp.pyx":1519
 *         return False
 *     else:
 *         return gts.at(0).find('|') != npos             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_2 = __pyx_convert_string_from_py_(__pyx_kp_b__20); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1519; __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;
  }

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("vcfnp._is_phased", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":1522
 * 
 * 
 * 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":1528
 *     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":1529
 *     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":1530
 *     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":1531
 *     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;
    }
    /*else*/ {

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

    /* "vcfnp.pyx":1535
 *             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":1536
 *     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":1537
 *         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":1538
 *         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":1539
 *             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;
        }
        /*else*/ {

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

        /* "vcfnp.pyx":1543
 *                     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;
      }
    }
    /*else*/ {

      /* "vcfnp.pyx":1545
 *                 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":1546
 *         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":1547
 *             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":1548
 *                 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":1550
 *                         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":1552
 *                         alleles.push_back(atoi(allele_strings.at(i).c_str()))
 *                 else:
 *                     alleles.push_back(-1)             # <<<<<<<<<<<<<<
 *             return tuple(alleles)
 * 
 */
          __pyx_v_alleles.push_back(-1);
        }
        __pyx_L10:;
      }

      /* "vcfnp.pyx":1553
 *                 else:
 *                     alleles.push_back(-1)
 *             return tuple(alleles)             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __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 = 1553; __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 = 1553; __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 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;
    }
  }

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

  /* function exit code */
  __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;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_58view2d(PyObject *__pyx_self, PyObject *__pyx_v_a); /*proto*/
static char __pyx_doc_5vcfnp_57view2d[] = "view2d(a)\n\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                (Tru""e, 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_58view2d = {__Pyx_NAMESTR("view2d"), (PyCFunction)__pyx_pw_5vcfnp_58view2d, METH_O, __Pyx_DOCSTR(__pyx_doc_5vcfnp_57view2d)};
static PyObject *__pyx_pw_5vcfnp_58view2d(PyObject *__pyx_self, PyObject *__pyx_v_a) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("view2d (wrapper)", 0);
  __pyx_r = __pyx_pf_5vcfnp_57view2d(__pyx_self, ((PyObject *)__pyx_v_a));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vcfnp_57view2d(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a) {
  PyObject *__pyx_v_rows = NULL;
  Py_ssize_t __pyx_v_cols;
  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":1633
 *     """
 * 
 *     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 = 1633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_rows = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "vcfnp.pyx":1634
 * 
 *     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 = 1634; __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 = 1634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_cols = __pyx_t_2;

  /* "vcfnp.pyx":1635
 *     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 = 1635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1635; __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":1636
 *     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 = 1636; __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 = 1636; __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 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__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 = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_cols); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_rows);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_rows);
  __Pyx_GIVEREF(__pyx_v_rows);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_b = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "vcfnp.pyx":1637
 *     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;

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

  /* function exit code */
  __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_dtype);
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_60eff_default_transformer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5vcfnp_59eff_default_transformer[] = "eff_default_transformer(fills=EFF_DEFAULT_FILLS)\n\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_60eff_default_transformer = {__Pyx_NAMESTR("eff_default_transformer"), (PyCFunction)__pyx_pw_5vcfnp_60eff_default_transformer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5vcfnp_59eff_default_transformer)};
static PyObject *__pyx_pw_5vcfnp_60eff_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__22;
    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 = 1658; __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 = 1658; __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_59eff_default_transformer(__pyx_self, __pyx_v_fills);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_5vcfnp_23eff_default_transformer_12_transformer_2generator15(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "vcfnp.pyx":1672
 *             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_23_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_23_genexpr *)__pyx_tp_new_5vcfnp___pyx_scope_struct_23_genexpr(__pyx_ptype_5vcfnp___pyx_scope_struct_23_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_22__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_2generator15, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __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_2generator15(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5vcfnp___pyx_scope_struct_23_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_23_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;
  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 = 1672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_INCREF(__pyx_int_0);
  __pyx_t_1 = __pyx_int_0;

  /* "vcfnp.pyx":1676
 *                 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 = 1676; __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 = 1676; __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 = 1676; __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 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, 11, NULL, NULL, &__pyx_slice__23, 0, 1, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1676; __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 = 1676; __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 = 1676; __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 = 1676; __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 = 1676; __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 = 1676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_2 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1676; __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 = 1676; __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 = 1676; __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 = 1676; __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 = 1676; __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 = 1676; __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 = 1676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L7_unpacking_done:;
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_v);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_v, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_fill);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_fill, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    __pyx_t_7 = 0;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_i);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_i, __pyx_t_1);
    __Pyx_GIVEREF(__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 = 1676; __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":1672
 *             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_10 = (__Pyx_PyString_Equals(__pyx_cur_scope->__pyx_v_v, __pyx_kp_s__24, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_10) {
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fill);
      __pyx_t_2 = __pyx_cur_scope->__pyx_v_fill;
    } else {

      /* "vcfnp.pyx":1673
 *             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 = 1673; __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 = 1673; __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 = 1673; __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 = 1673; __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 = PyNumber_Int(__pyx_cur_scope->__pyx_v_v); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = __pyx_t_6;
        __pyx_t_6 = 0;
      } else {

        /* "vcfnp.pyx":1674
 *                 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_8 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_i, __pyx_int_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (__pyx_t_11) {
          __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_cur_scope->__pyx_v_v, __pyx_n_s_CODING, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          if (__pyx_t_12) {
            __Pyx_INCREF(__pyx_int_1);
            __pyx_t_8 = __pyx_int_1;
          } else {
            __Pyx_INCREF(__pyx_int_0);
            __pyx_t_8 = __pyx_int_0;
          }
          __pyx_t_6 = __pyx_t_8;
          __pyx_t_8 = 0;
        } else {

          /* "vcfnp.pyx":1676
 *                 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_6 = __pyx_cur_scope->__pyx_v_v;
        }
        __pyx_t_7 = __pyx_t_6;
        __pyx_t_6 = 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 = 1672; __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":1672
 *             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
 */

  /* function exit code */
  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":1665
 *     """
 *     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_22__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_22__transformer *)__pyx_tp_new_5vcfnp___pyx_scope_struct_22__transformer(__pyx_ptype_5vcfnp___pyx_scope_struct_22__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_21_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":1666
 *     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 = 1666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = ((__pyx_t_1 == 0) != 0);
  if (__pyx_t_2) {

    /* "vcfnp.pyx":1667
 *     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 = 1667; __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;
  }
  /*else*/ {

    /* "vcfnp.pyx":1669
 *             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 = 1669; __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 = 1669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_vals, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1669; __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 = 1669; __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 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_match_eff_main = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "vcfnp.pyx":1670
 *         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 = 1670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1670; __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 = 1670; __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 = 1670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1670; __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 = 1670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1670; __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(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__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":1672
 *             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 = 1672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);

    /* "vcfnp.pyx":1671
 *             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 == ''
 *                 else int(v) if i == 5 or i == 10
 */
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __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 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_result = ((PyObject*)__pyx_t_5);
    __pyx_t_5 = 0;

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

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

  /* function exit code */
  __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":1658
 * 
 * 
 * def eff_default_transformer(fills=EFF_DEFAULT_FILLS):             # <<<<<<<<<<<<<<
 *     """
 *     Return a simple transformer function for parsing EFF annotations. N.B.,
 */

static PyObject *__pyx_pf_5vcfnp_59eff_default_transformer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fills) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_21_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_21_eff_default_transformer *)__pyx_tp_new_5vcfnp___pyx_scope_struct_21_eff_default_transformer(__pyx_ptype_5vcfnp___pyx_scope_struct_21_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":1664
 * 
 *     """
 *     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 = 1664; __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 = 1664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1664; __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":1665
 *     """
 *     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_eff_default_transformer_locals, ((PyObject*)__pyx_cur_scope), __pyx_n_s_vcfnp_2, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__transformer = __pyx_t_1;
  __pyx_t_1 = 0;

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

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

  /* function exit code */
  __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;
}

/* "vcfnp.pyx":1684
 * class VariantsTable(object):
 * 
 *     def __init__(self,             # <<<<<<<<<<<<<<
 *                  filename,
 *                  region=None,
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_13VariantsTable_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5vcfnp_13VariantsTable___init__[] = "VariantsTable.__init__(self, filename, region=None, fields=None, exclude_fields=None, arities=None, flatten_filter=False, fill='.')";
static PyMethodDef __pyx_mdef_5vcfnp_13VariantsTable_1__init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_5vcfnp_13VariantsTable_1__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5vcfnp_13VariantsTable___init__)};
static PyObject *__pyx_pw_5vcfnp_13VariantsTable_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_filename = 0;
  PyObject *__pyx_v_region = 0;
  PyObject *__pyx_v_fields = 0;
  PyObject *__pyx_v_exclude_fields = 0;
  PyObject *__pyx_v_arities = 0;
  PyObject *__pyx_v_flatten_filter = 0;
  PyObject *__pyx_v_fill = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_filename,&__pyx_n_s_region,&__pyx_n_s_fields,&__pyx_n_s_exclude_fields,&__pyx_n_s_arities,&__pyx_n_s_flatten_filter,&__pyx_n_s_fill,0};
    PyObject* values[8] = {0,0,0,0,0,0,0,0};

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

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

    /* "vcfnp.pyx":1688
 *                  region=None,
 *                  fields=None,
 *                  exclude_fields=None,             # <<<<<<<<<<<<<<
 *                  arities=None,
 *                  flatten_filter=False,
 */
    values[4] = ((PyObject *)((PyObject *)Py_None));

    /* "vcfnp.pyx":1689
 *                  fields=None,
 *                  exclude_fields=None,
 *                  arities=None,             # <<<<<<<<<<<<<<
 *                  flatten_filter=False,
 *                  fill='.'
 */
    values[5] = ((PyObject *)((PyObject *)Py_None));

    /* "vcfnp.pyx":1690
 *                  exclude_fields=None,
 *                  arities=None,
 *                  flatten_filter=False,             # <<<<<<<<<<<<<<
 *                  fill='.'
 *                  ):
 */
    values[6] = ((PyObject *)((PyObject *)Py_False));
    values[7] = ((PyObject *)((PyObject*)__pyx_kp_s__14));
    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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_filename)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 8, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_region);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fields);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exclude_fields);
          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_flatten_filter);
          if (value) { values[6] = value; kw_args--; }
        }
        case  7:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill);
          if (value) { values[7] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_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);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_filename = values[1];
    __pyx_v_region = values[2];
    __pyx_v_fields = values[3];
    __pyx_v_exclude_fields = values[4];
    __pyx_v_arities = values[5];
    __pyx_v_flatten_filter = values[6];
    __pyx_v_fill = values[7];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 8, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vcfnp.VariantsTable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5vcfnp_13VariantsTable___init__(__pyx_self, __pyx_v_self, __pyx_v_filename, __pyx_v_region, __pyx_v_fields, __pyx_v_exclude_fields, __pyx_v_arities, __pyx_v_flatten_filter, __pyx_v_fill);

  /* "vcfnp.pyx":1684
 * class VariantsTable(object):
 * 
 *     def __init__(self,             # <<<<<<<<<<<<<<
 *                  filename,
 *                  region=None,
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vcfnp_13VariantsTable___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_region, PyObject *__pyx_v_fields, PyObject *__pyx_v_exclude_fields, PyObject *__pyx_v_arities, PyObject *__pyx_v_flatten_filter, PyObject *__pyx_v_fill) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "vcfnp.pyx":1693
 *                  fill='.'
 *                  ):
 *         self.filename = filename             # <<<<<<<<<<<<<<
 *         self.region = region
 *         self.fields = fields
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_filename, __pyx_v_filename) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":1694
 *                  ):
 *         self.filename = filename
 *         self.region = region             # <<<<<<<<<<<<<<
 *         self.fields = fields
 *         self.exclude_fields = exclude_fields
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_region, __pyx_v_region) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":1695
 *         self.filename = filename
 *         self.region = region
 *         self.fields = fields             # <<<<<<<<<<<<<<
 *         self.exclude_fields = exclude_fields
 *         self.arities = arities
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fields, __pyx_v_fields) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":1696
 *         self.region = region
 *         self.fields = fields
 *         self.exclude_fields = exclude_fields             # <<<<<<<<<<<<<<
 *         self.arities = arities
 *         self.flatten_filter = flatten_filter
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_exclude_fields, __pyx_v_exclude_fields) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":1697
 *         self.fields = fields
 *         self.exclude_fields = exclude_fields
 *         self.arities = arities             # <<<<<<<<<<<<<<
 *         self.flatten_filter = flatten_filter
 *         self.fill = fill
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_arities, __pyx_v_arities) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":1698
 *         self.exclude_fields = exclude_fields
 *         self.arities = arities
 *         self.flatten_filter = flatten_filter             # <<<<<<<<<<<<<<
 *         self.fill = fill
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_flatten_filter, __pyx_v_flatten_filter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":1699
 *         self.arities = arities
 *         self.flatten_filter = flatten_filter
 *         self.fill = fill             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fill, __pyx_v_fill) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":1684
 * class VariantsTable(object):
 * 
 *     def __init__(self,             # <<<<<<<<<<<<<<
 *                  filename,
 *                  region=None,
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("vcfnp.VariantsTable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":1701
 *         self.fill = fill
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 * 
 *         filenames = _filenames_from_arg(self.filename)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_13VariantsTable_3__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_5vcfnp_13VariantsTable_2__iter__[] = "VariantsTable.__iter__(self)";
static PyMethodDef __pyx_mdef_5vcfnp_13VariantsTable_3__iter__ = {__Pyx_NAMESTR("__iter__"), (PyCFunction)__pyx_pw_5vcfnp_13VariantsTable_3__iter__, METH_O, __Pyx_DOCSTR(__pyx_doc_5vcfnp_13VariantsTable_2__iter__)};
static PyObject *__pyx_pw_5vcfnp_13VariantsTable_3__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5vcfnp_13VariantsTable_2__iter__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_5vcfnp_13VariantsTable_8__iter___2generator16(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "vcfnp.pyx":1728
 *             arities = (None,) * len(fields)
 *         else:
 *             arities = tuple(self.arities.get(f) for f in fields)             # <<<<<<<<<<<<<<
 * 
 *         # determine if we need to parse the INFO field
 */

static PyObject *__pyx_pf_5vcfnp_13VariantsTable_8__iter___genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_25_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_25_genexpr *)__pyx_tp_new_5vcfnp___pyx_scope_struct_25_genexpr(__pyx_ptype_5vcfnp___pyx_scope_struct_25_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_24___iter__ *) __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_13VariantsTable_8__iter___2generator16, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("vcfnp.VariantsTable.__iter__.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_13VariantsTable_8__iter___2generator16(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5vcfnp___pyx_scope_struct_25_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_25_genexpr *)__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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = 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 = 1728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields)) { __Pyx_RaiseClosureNameError("fields"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  if (PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields; __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_outer_scope->__pyx_v_fields); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; __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 = 1728; __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 = 1728; __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 = 1728; __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 = 1728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_f);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_f, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self, __pyx_n_s_arities); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_f);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_cur_scope->__pyx_v_f);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_f);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; __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;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 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_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_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 = 1728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  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("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;
}
static PyObject *__pyx_gb_5vcfnp_13VariantsTable_8__iter___5generator17(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "vcfnp.pyx":1734
 * 
 *         # convert to tuple
 *         info_types = tuple(info_types[f] if f in info_types else -1 for f in fields)             # <<<<<<<<<<<<<<
 * 
 *         # make header row
 */

static PyObject *__pyx_pf_5vcfnp_13VariantsTable_8__iter___3genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_26_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_26_genexpr *)__pyx_tp_new_5vcfnp___pyx_scope_struct_26_genexpr(__pyx_ptype_5vcfnp___pyx_scope_struct_26_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_24___iter__ *) __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_13VariantsTable_8__iter___5generator17, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("vcfnp.VariantsTable.__iter__.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_13VariantsTable_8__iter___5generator17(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5vcfnp___pyx_scope_struct_26_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_26_genexpr *)__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;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = 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 = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields)) { __Pyx_RaiseClosureNameError("fields"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  if (PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_fields; __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_outer_scope->__pyx_v_fields); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1734; __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 = 1734; __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 = 1734; __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 = 1734; __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 = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_f);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_f, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_info_types)) { __Pyx_RaiseClosureNameError("info_types"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    __pyx_t_5 = (__Pyx_PySequence_Contains(__pyx_cur_scope->__pyx_v_f, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_info_types, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if ((__pyx_t_5 != 0)) {
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_info_types)) { __Pyx_RaiseClosureNameError("info_types"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
      __pyx_t_6 = PyObject_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_info_types, __pyx_cur_scope->__pyx_v_f); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 = __pyx_t_6;
      __pyx_t_6 = 0;
    } else {
      __Pyx_INCREF(__pyx_int_neg_1);
      __pyx_t_4 = __pyx_int_neg_1;
    }
    __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_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_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 = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __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":1701
 *         self.fill = fill
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 * 
 *         filenames = _filenames_from_arg(self.filename)
 */

static PyObject *__pyx_pf_5vcfnp_13VariantsTable_2__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_24___iter__ *__pyx_cur_scope;
  PyObject *__pyx_v_filenames = NULL;
  struct __pyx_obj_6vcflib_PyVariantCallFile *__pyx_v_vcf = NULL;
  PyObject *__pyx_v_filter_ids = NULL;
  PyObject *__pyx_v_info_ids = NULL;
  PyObject *__pyx_v_arities = NULL;
  PyObject *__pyx_v_parse_info = NULL;
  PyObject *__pyx_v_header = NULL;
  PyObject *__pyx_v_f = NULL;
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_data = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  int __pyx_t_12;
  PyObject *(*__pyx_t_13)(PyObject *);
  PyObject *__pyx_t_14 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__iter__", 0);
  __pyx_cur_scope = (struct __pyx_obj_5vcfnp___pyx_scope_struct_24___iter__ *)__pyx_tp_new_5vcfnp___pyx_scope_struct_24___iter__(__pyx_ptype_5vcfnp___pyx_scope_struct_24___iter__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self);

  /* "vcfnp.pyx":1703
 *     def __iter__(self):
 * 
 *         filenames = _filenames_from_arg(self.filename)             # <<<<<<<<<<<<<<
 * 
 *         # extract definitions from VCF header
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_filenames_from_arg); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_filename); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_filenames = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "vcfnp.pyx":1706
 * 
 *         # extract definitions from VCF header
 *         vcf = PyVariantCallFile(filenames[0])             # <<<<<<<<<<<<<<
 * 
 *         # FILTER definitions
 */
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_filenames, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1706; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6vcflib_PyVariantCallFile)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_vcf = ((struct __pyx_obj_6vcflib_PyVariantCallFile *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "vcfnp.pyx":1709
 * 
 *         # FILTER definitions
 *         filter_ids = vcf.filterIds             # <<<<<<<<<<<<<<
 *         _warn_duplicates(filter_ids)
 *         filter_ids = sorted(set(filter_ids))
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_vcf), __pyx_n_s_filterIds); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_filter_ids = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "vcfnp.pyx":1710
 *         # FILTER definitions
 *         filter_ids = vcf.filterIds
 *         _warn_duplicates(filter_ids)             # <<<<<<<<<<<<<<
 *         filter_ids = sorted(set(filter_ids))
 *         if 'PASS' not in filter_ids:
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_warn_duplicates); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_filter_ids);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_filter_ids);
  __Pyx_GIVEREF(__pyx_v_filter_ids);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":1711
 *         filter_ids = vcf.filterIds
 *         _warn_duplicates(filter_ids)
 *         filter_ids = sorted(set(filter_ids))             # <<<<<<<<<<<<<<
 *         if 'PASS' not in filter_ids:
 *             filter_ids.append('PASS')
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_filter_ids);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_filter_ids);
  __Pyx_GIVEREF(__pyx_v_filter_ids);
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_sorted, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF_SET(__pyx_v_filter_ids, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "vcfnp.pyx":1712
 *         _warn_duplicates(filter_ids)
 *         filter_ids = sorted(set(filter_ids))
 *         if 'PASS' not in filter_ids:             # <<<<<<<<<<<<<<
 *             filter_ids.append('PASS')
 *         filter_ids = tuple(filter_ids)
 */
  __pyx_t_4 = (__Pyx_PySequence_Contains(__pyx_n_s_PASS, __pyx_v_filter_ids, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

    /* "vcfnp.pyx":1713
 *         filter_ids = sorted(set(filter_ids))
 *         if 'PASS' not in filter_ids:
 *             filter_ids.append('PASS')             # <<<<<<<<<<<<<<
 *         filter_ids = tuple(filter_ids)
 * 
 */
    __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_filter_ids, __pyx_n_s_PASS); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "vcfnp.pyx":1714
 *         if 'PASS' not in filter_ids:
 *             filter_ids.append('PASS')
 *         filter_ids = tuple(filter_ids)             # <<<<<<<<<<<<<<
 * 
 *         # INFO definitions
 */
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_filter_ids);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_filter_ids);
  __Pyx_GIVEREF(__pyx_v_filter_ids);
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_filter_ids, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "vcfnp.pyx":1717
 * 
 *         # INFO definitions
 *         _warn_duplicates(vcf.infoIds)             # <<<<<<<<<<<<<<
 *         info_ids = tuple(sorted(set(vcf.infoIds)))
 *         info_types = vcf.infoTypes
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_warn_duplicates); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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 = 1717; __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 = 1717; __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 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "vcfnp.pyx":1718
 *         # INFO definitions
 *         _warn_duplicates(vcf.infoIds)
 *         info_ids = tuple(sorted(set(vcf.infoIds)))             # <<<<<<<<<<<<<<
 *         info_types = vcf.infoTypes
 * 
 */
  __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 = 1718; __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 = 1718; __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 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1718; __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 = __Pyx_PyObject_Call(__pyx_builtin_sorted, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1718; __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 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_info_ids = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "vcfnp.pyx":1719
 *         _warn_duplicates(vcf.infoIds)
 *         info_ids = tuple(sorted(set(vcf.infoIds)))
 *         info_types = vcf.infoTypes             # <<<<<<<<<<<<<<
 * 
 *         # determine fields to extract
 */
  __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 = 1719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_cur_scope->__pyx_v_info_types = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "vcfnp.pyx":1722
 * 
 *         # determine fields to extract
 *         fields = _variants_fields(self.fields, self.exclude_fields, info_ids)             # <<<<<<<<<<<<<<
 * 
 *         # turn arities into tuple for convenience
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_variants_fields); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1722; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_fields); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1722; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_exclude_fields); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1722; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1722; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_info_ids);
  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_info_ids);
  __Pyx_GIVEREF(__pyx_v_info_ids);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1722; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_fields = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "vcfnp.pyx":1725
 * 
 *         # turn arities into tuple for convenience
 *         if self.arities is None:             # <<<<<<<<<<<<<<
 *             arities = (None,) * len(fields)
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_arities); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = (__pyx_t_5 != 0);
  if (__pyx_t_4) {

    /* "vcfnp.pyx":1726
 *         # turn arities into tuple for convenience
 *         if self.arities is None:
 *             arities = (None,) * len(fields)             # <<<<<<<<<<<<<<
 *         else:
 *             arities = tuple(self.arities.get(f) for f in fields)
 */
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_fields;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_8 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = PyNumber_Multiply(__pyx_tuple__32, __pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_arities = ((PyObject*)__pyx_t_7);
    __pyx_t_7 = 0;
    goto __pyx_L4;
  }
  /*else*/ {

    /* "vcfnp.pyx":1728
 *             arities = (None,) * len(fields)
 *         else:
 *             arities = tuple(self.arities.get(f) for f in fields)             # <<<<<<<<<<<<<<
 * 
 *         # determine if we need to parse the INFO field
 */
    __pyx_t_7 = __pyx_pf_5vcfnp_13VariantsTable_8__iter___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_arities = ((PyObject*)__pyx_t_7);
    __pyx_t_7 = 0;
  }
  __pyx_L4:;

  /* "vcfnp.pyx":1731
 * 
 *         # determine if we need to parse the INFO field
 *         parse_info = any([f not in STANDARD_VARIANT_FIELDS for f in fields])             # <<<<<<<<<<<<<<
 * 
 *         # convert to tuple
 */
  __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_fields) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_fields)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_fields; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0;
    __pyx_t_9 = NULL;
  } else {
    __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_fields); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_9 && PyList_CheckExact(__pyx_t_1)) {
      if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_9 && PyTuple_CheckExact(__pyx_t_1)) {
      if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_3 = __pyx_t_9(__pyx_t_1);
      if (unlikely(!__pyx_t_3)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_STANDARD_VARIANT_FIELDS); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_t_3, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1731; __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;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_any, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_parse_info = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "vcfnp.pyx":1734
 * 
 *         # convert to tuple
 *         info_types = tuple(info_types[f] if f in info_types else -1 for f in fields)             # <<<<<<<<<<<<<<
 * 
 *         # make header row
 */
  __pyx_t_7 = __pyx_pf_5vcfnp_13VariantsTable_8__iter___3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_info_types);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_info_types, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;

  /* "vcfnp.pyx":1737
 * 
 *         # make header row
 *         header = list()             # <<<<<<<<<<<<<<
 *         for f in fields:
 *             if self.flatten_filter and f == 'FILTER':
 */
  __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_v_header = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "vcfnp.pyx":1738
 *         # make header row
 *         header = list()
 *         for f in fields:             # <<<<<<<<<<<<<<
 *             if self.flatten_filter and f == 'FILTER':
 *                 for t in filter_ids:
 */
  if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_fields) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_fields)) {
    __pyx_t_7 = __pyx_cur_scope->__pyx_v_fields; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
    __pyx_t_9 = NULL;
  } else {
    __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_fields); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_9 && PyList_CheckExact(__pyx_t_7)) {
      if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_1 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_9 && PyTuple_CheckExact(__pyx_t_7)) {
      if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_1 = __pyx_t_9(__pyx_t_7);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "vcfnp.pyx":1739
 *         header = list()
 *         for f in fields:
 *             if self.flatten_filter and f == 'FILTER':             # <<<<<<<<<<<<<<
 *                 for t in filter_ids:
 *                     header.append('FILTER_' + t)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_flatten_filter); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_4) {
      __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_f, __pyx_n_s_FILTER, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_10 = __pyx_t_5;
    } else {
      __pyx_t_10 = __pyx_t_4;
    }
    if (__pyx_t_10) {

      /* "vcfnp.pyx":1740
 *         for f in fields:
 *             if self.flatten_filter and f == 'FILTER':
 *                 for t in filter_ids:             # <<<<<<<<<<<<<<
 *                     header.append('FILTER_' + t)
 *             elif self.arities is not None and f in self.arities and self.arities[f] > 1:
 */
      __pyx_t_1 = __pyx_v_filter_ids; __Pyx_INCREF(__pyx_t_1); __pyx_t_11 = 0;
      for (;;) {
        if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_11); __Pyx_INCREF(__pyx_t_3); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
        __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "vcfnp.pyx":1741
 *             if self.flatten_filter and f == 'FILTER':
 *                 for t in filter_ids:
 *                     header.append('FILTER_' + t)             # <<<<<<<<<<<<<<
 *             elif self.arities is not None and f in self.arities and self.arities[f] > 1:
 *                 for i in range(1, self.arities[f] + 1):
 */
        __pyx_t_3 = PyNumber_Add(__pyx_n_s_FILTER_2, __pyx_v_t); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_header, __pyx_t_3); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1741; __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;
      goto __pyx_L9;
    }

    /* "vcfnp.pyx":1742
 *                 for t in filter_ids:
 *                     header.append('FILTER_' + t)
 *             elif self.arities is not None and f in self.arities and self.arities[f] > 1:             # <<<<<<<<<<<<<<
 *                 for i in range(1, self.arities[f] + 1):
 *                     header.append(f + '_' + str(i))
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_arities); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_10 = (__pyx_t_1 != Py_None);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_10) {
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_arities); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_4) {
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_arities); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = PyObject_GetItem(__pyx_t_1, __pyx_v_f); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1742; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_12 = __pyx_t_5;
      } else {
        __pyx_t_12 = __pyx_t_4;
      }
      __pyx_t_4 = __pyx_t_12;
    } else {
      __pyx_t_4 = __pyx_t_10;
    }
    if (__pyx_t_4) {

      /* "vcfnp.pyx":1743
 *                     header.append('FILTER_' + t)
 *             elif self.arities is not None and f in self.arities and self.arities[f] > 1:
 *                 for i in range(1, self.arities[f] + 1):             # <<<<<<<<<<<<<<
 *                     header.append(f + '_' + str(i))
 *             else:
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_arities); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = PyObject_GetItem(__pyx_t_1, __pyx_v_f); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1743; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__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 = 1743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_int_1);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) {
        __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_11 = 0;
        __pyx_t_13 = NULL;
      } else {
        __pyx_t_11 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_13 = Py_TYPE(__pyx_t_3)->tp_iternext;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      for (;;) {
        if (!__pyx_t_13 && PyList_CheckExact(__pyx_t_3)) {
          if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_11); __Pyx_INCREF(__pyx_t_1); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else if (!__pyx_t_13 && PyTuple_CheckExact(__pyx_t_3)) {
          if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_11); __Pyx_INCREF(__pyx_t_1); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else {
          __pyx_t_1 = __pyx_t_13(__pyx_t_3);
          if (unlikely(!__pyx_t_1)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "vcfnp.pyx":1744
 *             elif self.arities is not None and f in self.arities and self.arities[f] > 1:
 *                 for i in range(1, self.arities[f] + 1):
 *                     header.append(f + '_' + str(i))             # <<<<<<<<<<<<<<
 *             else:
 *                 header.append(f)
 */
        __pyx_t_1 = PyNumber_Add(__pyx_v_f, __pyx_n_s__7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_v_i);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_i);
        __Pyx_GIVEREF(__pyx_v_i);
        __pyx_t_14 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_14); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_header, __pyx_t_2); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L9;
    }
    /*else*/ {

      /* "vcfnp.pyx":1746
 *                     header.append(f + '_' + str(i))
 *             else:
 *                 header.append(f)             # <<<<<<<<<<<<<<
 *         header = tuple(header)
 *         # make data rows
 */
      __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_header, __pyx_v_f); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L9:;
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "vcfnp.pyx":1747
 *             else:
 *                 header.append(f)
 *         header = tuple(header)             # <<<<<<<<<<<<<<
 *         # make data rows
 *         data = itervariantstable(filenames=filenames,
 */
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_v_header);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_header);
  __Pyx_GIVEREF(__pyx_v_header);
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF_SET(__pyx_v_header, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "vcfnp.pyx":1749
 *         header = tuple(header)
 *         # make data rows
 *         data = itervariantstable(filenames=filenames,             # <<<<<<<<<<<<<<
 *                                  region=self.region,
 *                                  fields=fields,
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_itervariantstable); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_filenames, __pyx_v_filenames) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":1750
 *         # make data rows
 *         data = itervariantstable(filenames=filenames,
 *                                  region=self.region,             # <<<<<<<<<<<<<<
 *                                  fields=fields,
 *                                  arities=arities,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_region); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1750; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_region, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":1751
 *         data = itervariantstable(filenames=filenames,
 *                                  region=self.region,
 *                                  fields=fields,             # <<<<<<<<<<<<<<
 *                                  arities=arities,
 *                                  info_types=info_types,
 */
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_fields, __pyx_cur_scope->__pyx_v_fields) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":1752
 *                                  region=self.region,
 *                                  fields=fields,
 *                                  arities=arities,             # <<<<<<<<<<<<<<
 *                                  info_types=info_types,
 *                                  parse_info=parse_info,
 */
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_arities, __pyx_v_arities) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":1753
 *                                  fields=fields,
 *                                  arities=arities,
 *                                  info_types=info_types,             # <<<<<<<<<<<<<<
 *                                  parse_info=parse_info,
 *                                  filter_ids=filter_ids,
 */
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_info_types, __pyx_cur_scope->__pyx_v_info_types) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":1754
 *                                  arities=arities,
 *                                  info_types=info_types,
 *                                  parse_info=parse_info,             # <<<<<<<<<<<<<<
 *                                  filter_ids=filter_ids,
 *                                  flatten_filter=self.flatten_filter,
 */
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_parse_info, __pyx_v_parse_info) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":1755
 *                                  info_types=info_types,
 *                                  parse_info=parse_info,
 *                                  filter_ids=filter_ids,             # <<<<<<<<<<<<<<
 *                                  flatten_filter=self.flatten_filter,
 *                                  fill=self.fill)
 */
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_filter_ids, __pyx_v_filter_ids) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":1756
 *                                  parse_info=parse_info,
 *                                  filter_ids=filter_ids,
 *                                  flatten_filter=self.flatten_filter,             # <<<<<<<<<<<<<<
 *                                  fill=self.fill)
 *         return chain((header,), data)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_flatten_filter); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_flatten_filter, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":1757
 *                                  filter_ids=filter_ids,
 *                                  flatten_filter=self.flatten_filter,
 *                                  fill=self.fill)             # <<<<<<<<<<<<<<
 *         return chain((header,), data)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_fill); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_fill, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":1749
 *         header = tuple(header)
 *         # make data rows
 *         data = itervariantstable(filenames=filenames,             # <<<<<<<<<<<<<<
 *                                  region=self.region,
 *                                  fields=fields,
 */
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_data = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "vcfnp.pyx":1758
 *                                  flatten_filter=self.flatten_filter,
 *                                  fill=self.fill)
 *         return chain((header,), data)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_chain); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_v_header);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_header);
  __Pyx_GIVEREF(__pyx_v_header);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_v_data);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_data);
  __Pyx_GIVEREF(__pyx_v_data);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "vcfnp.pyx":1701
 *         self.fill = fill
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 * 
 *         filenames = _filenames_from_arg(self.filename)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("vcfnp.VariantsTable.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_filenames);
  __Pyx_XDECREF((PyObject *)__pyx_v_vcf);
  __Pyx_XDECREF(__pyx_v_filter_ids);
  __Pyx_XDECREF(__pyx_v_info_ids);
  __Pyx_XDECREF(__pyx_v_arities);
  __Pyx_XDECREF(__pyx_v_parse_info);
  __Pyx_XDECREF(__pyx_v_header);
  __Pyx_XDECREF(__pyx_v_f);
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_data);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_5vcfnp_63generator5(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "vcfnp.pyx":1761
 * 
 * 
 * def itervariantstable(filenames, region, fields, arities, info_types, parse_info, filter_ids, flatten_filter, fill):             # <<<<<<<<<<<<<<
 *     cdef VariantCallFile *variantFile
 *     cdef Variant *var
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vcfnp_62itervariantstable(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5vcfnp_61itervariantstable[] = "itervariantstable(filenames, region, fields, arities, info_types, parse_info, filter_ids, flatten_filter, fill)";
static PyMethodDef __pyx_mdef_5vcfnp_62itervariantstable = {__Pyx_NAMESTR("itervariantstable"), (PyCFunction)__pyx_pw_5vcfnp_62itervariantstable, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5vcfnp_61itervariantstable)};
static PyObject *__pyx_pw_5vcfnp_62itervariantstable(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_filenames = 0;
  PyObject *__pyx_v_region = 0;
  PyObject *__pyx_v_fields = 0;
  PyObject *__pyx_v_arities = 0;
  PyObject *__pyx_v_info_types = 0;
  PyObject *__pyx_v_parse_info = 0;
  PyObject *__pyx_v_filter_ids = 0;
  PyObject *__pyx_v_flatten_filter = 0;
  PyObject *__pyx_v_fill = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("itervariantstable (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_info_types,&__pyx_n_s_parse_info,&__pyx_n_s_filter_ids,&__pyx_n_s_flatten_filter,&__pyx_n_s_fill,0};
    PyObject* values[9] = {0,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  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_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("itervariantstable", 1, 9, 9, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1761; __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("itervariantstable", 1, 9, 9, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1761; __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("itervariantstable", 1, 9, 9, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1761; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_info_types)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("itervariantstable", 1, 9, 9, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1761; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_parse_info)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("itervariantstable", 1, 9, 9, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1761; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  6:
        if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_filter_ids)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("itervariantstable", 1, 9, 9, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1761; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  7:
        if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flatten_filter)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("itervariantstable", 1, 9, 9, 7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1761; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  8:
        if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("itervariantstable", 1, 9, 9, 8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1761; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "itervariantstable") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1761; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 9) {
      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);
      values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
    }
    __pyx_v_filenames = values[0];
    __pyx_v_region = values[1];
    __pyx_v_fields = values[2];
    __pyx_v_arities = values[3];
    __pyx_v_info_types = values[4];
    __pyx_v_parse_info = values[5];
    __pyx_v_filter_ids = values[6];
    __pyx_v_flatten_filter = values[7];
    __pyx_v_fill = values[8];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("itervariantstable", 1, 9, 9, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1761; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vcfnp.itervariantstable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5vcfnp_61itervariantstable(__pyx_self, __pyx_v_filenames, __pyx_v_region, __pyx_v_fields, __pyx_v_arities, __pyx_v_info_types, __pyx_v_parse_info, __pyx_v_filter_ids, __pyx_v_flatten_filter, __pyx_v_fill);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vcfnp_61itervariantstable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filenames, PyObject *__pyx_v_region, PyObject *__pyx_v_fields, PyObject *__pyx_v_arities, PyObject *__pyx_v_info_types, PyObject *__pyx_v_parse_info, PyObject *__pyx_v_filter_ids, PyObject *__pyx_v_flatten_filter, PyObject *__pyx_v_fill) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_27_itervariantstable *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("itervariantstable", 0);
  __pyx_cur_scope = (struct __pyx_obj_5vcfnp___pyx_scope_struct_27_itervariantstable *)__pyx_tp_new_5vcfnp___pyx_scope_struct_27_itervariantstable(__pyx_ptype_5vcfnp___pyx_scope_struct_27_itervariantstable, __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_INCREF(__pyx_cur_scope->__pyx_v_fields);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fields);
  __pyx_cur_scope->__pyx_v_arities = __pyx_v_arities;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_arities);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_arities);
  __pyx_cur_scope->__pyx_v_info_types = __pyx_v_info_types;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_info_types);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_info_types);
  __pyx_cur_scope->__pyx_v_parse_info = __pyx_v_parse_info;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_parse_info);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_parse_info);
  __pyx_cur_scope->__pyx_v_filter_ids = __pyx_v_filter_ids;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_filter_ids);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_filter_ids);
  __pyx_cur_scope->__pyx_v_flatten_filter = __pyx_v_flatten_filter;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_flatten_filter);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_flatten_filter);
  __pyx_cur_scope->__pyx_v_fill = __pyx_v_fill;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fill);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fill);
  {
    __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5vcfnp_63generator5, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("vcfnp.itervariantstable", __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_63generator5(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5vcfnp___pyx_scope_struct_27_itervariantstable *__pyx_cur_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_27_itervariantstable *)__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;
  bool __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  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 = 1761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":1765
 *     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 = 1765; __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 = 1765; __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 = 1765; __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 = 1765; __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 = 1765; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1765; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_current_filename);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_current_filename, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;

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

    /* "vcfnp.pyx":1767
 *     for current_filename in filenames:
 *         variantFile = new VariantCallFile()
 *         variantFile.open(current_filename)             # <<<<<<<<<<<<<<
 *         variantFile.parseInfo = parse_info
 *         variantFile.parseSamples = False
 */
    __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 = 1767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_cur_scope->__pyx_v_variantFile->open(__pyx_t_6);

    /* "vcfnp.pyx":1768
 *         variantFile = new VariantCallFile()
 *         variantFile.open(current_filename)
 *         variantFile.parseInfo = parse_info             # <<<<<<<<<<<<<<
 *         variantFile.parseSamples = False
 *         if region is not None:
 */
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_parse_info); if (unlikely((__pyx_t_7 == (bool)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_cur_scope->__pyx_v_variantFile->parseInfo = __pyx_t_7;

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

    /* "vcfnp.pyx":1770
 *         variantFile.parseInfo = parse_info
 *         variantFile.parseSamples = False
 *         if region is not None:             # <<<<<<<<<<<<<<
 *             region_set = variantFile.setRegion(region)
 *             if not region_set:
 */
    __pyx_t_8 = (__pyx_cur_scope->__pyx_v_region != Py_None);
    __pyx_t_9 = (__pyx_t_8 != 0);
    if (__pyx_t_9) {

      /* "vcfnp.pyx":1771
 *         variantFile.parseSamples = False
 *         if region is not None:
 *             region_set = variantFile.setRegion(region)             # <<<<<<<<<<<<<<
 *             if not region_set:
 *                 raise StopIteration
 */
      __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 = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_cur_scope->__pyx_v_region_set = __pyx_cur_scope->__pyx_v_variantFile->setRegion(__pyx_t_6);

      /* "vcfnp.pyx":1772
 *         if region is not None:
 *             region_set = variantFile.setRegion(region)
 *             if not region_set:             # <<<<<<<<<<<<<<
 *                 raise StopIteration
 *         var = new Variant(deref(variantFile))
 */
      __pyx_t_9 = ((!(__pyx_cur_scope->__pyx_v_region_set != 0)) != 0);
      if (__pyx_t_9) {

        /* "vcfnp.pyx":1773
 *             region_set = variantFile.setRegion(region)
 *             if not region_set:
 *                 raise StopIteration             # <<<<<<<<<<<<<<
 *         var = new Variant(deref(variantFile))
 * 
 */
        __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "vcfnp.pyx":1774
 *             if not region_set:
 *                 raise StopIteration
 *         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":1776
 *         var = new Variant(deref(variantFile))
 * 
 *         while _get_next_variant(variantFile, var):             # <<<<<<<<<<<<<<
 *             yield _mkvtblrow(var, fields, arities, info_types, filter_ids, flatten_filter, fill)
 * 
 */
    while (1) {
      __pyx_t_9 = (__pyx_f_5vcfnp__get_next_variant(__pyx_cur_scope->__pyx_v_variantFile, __pyx_cur_scope->__pyx_v_var) != 0);
      if (!__pyx_t_9) break;

      /* "vcfnp.pyx":1777
 * 
 *         while _get_next_variant(variantFile, var):
 *             yield _mkvtblrow(var, fields, arities, info_types, filter_ids, flatten_filter, fill)             # <<<<<<<<<<<<<<
 * 
 *         del variantFile
 */
      __pyx_t_4 = __pyx_f_5vcfnp__mkvtblrow(__pyx_cur_scope->__pyx_v_var, __pyx_cur_scope->__pyx_v_fields, __pyx_cur_scope->__pyx_v_arities, __pyx_cur_scope->__pyx_v_info_types, __pyx_cur_scope->__pyx_v_filter_ids, __pyx_cur_scope->__pyx_v_flatten_filter, __pyx_cur_scope->__pyx_v_fill); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1777; __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_L10_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 = 1777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }

    /* "vcfnp.pyx":1779
 *             yield _mkvtblrow(var, fields, arities, info_types, filter_ids, flatten_filter, fill)
 * 
 *         del variantFile             # <<<<<<<<<<<<<<
 *         del var
 * 
 */
    delete __pyx_cur_scope->__pyx_v_variantFile;

    /* "vcfnp.pyx":1780
 * 
 *         del variantFile
 *         del var             # <<<<<<<<<<<<<<
 * 
 * 
 */
    delete __pyx_cur_scope->__pyx_v_var;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":1761
 * 
 * 
 * def itervariantstable(filenames, region, fields, arities, info_types, parse_info, filter_ids, flatten_filter, fill):             # <<<<<<<<<<<<<<
 *     cdef VariantCallFile *variantFile
 *     cdef Variant *var
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("itervariantstable", __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":1783
 * 
 * 
 * cdef inline object _mkvtblrow(Variant *var,             # <<<<<<<<<<<<<<
 *                               fields,
 *                               arities,
 */

static CYTHON_INLINE PyObject *__pyx_f_5vcfnp__mkvtblrow(vcf::Variant *__pyx_v_var, PyObject *__pyx_v_fields, PyObject *__pyx_v_arities, PyObject *__pyx_v_info_types, PyObject *__pyx_v_filter_ids, PyObject *__pyx_v_flatten_filter, PyObject *__pyx_v_fill) {
  PyObject *__pyx_v_out = NULL;
  std::string __pyx_v_field;
  PyObject *__pyx_v_arity = NULL;
  PyObject *__pyx_v_vcf_type = NULL;
  PyObject *__pyx_v_vals = NULL;
  PyObject *__pyx_v_val = 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)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  std::string __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_mkvtblrow", 0);

  /* "vcfnp.pyx":1790
 *                               flatten_filter,
 *                               fill):
 *     out = list()             # <<<<<<<<<<<<<<
 *     cdef string field
 *     for field, arity, vcf_type in zip(fields, arities, info_types):
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "vcfnp.pyx":1792
 *     out = list()
 *     cdef string field
 *     for field, arity, vcf_type in zip(fields, arities, info_types):             # <<<<<<<<<<<<<<
 *         if field == FIELD_NAME_CHROM:
 *             out.append(var.sequenceName)
 */
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_fields);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_fields);
  __Pyx_GIVEREF(__pyx_v_fields);
  __Pyx_INCREF(__pyx_v_arities);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_arities);
  __Pyx_GIVEREF(__pyx_v_arities);
  __Pyx_INCREF(__pyx_v_info_types);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_info_types);
  __Pyx_GIVEREF(__pyx_v_info_types);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_1)) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_1)) {
      if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_2 = __pyx_t_4(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1792; __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 != 3)) {
        if (size > 3) __Pyx_RaiseTooManyValuesError(3);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 2); 
      } else {
        __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
        __pyx_t_7 = PyList_GET_ITEM(sequence, 2); 
      }
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      #else
      __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1792; __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 = 1792; __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_5 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      index = 1; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      index = 2; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_9 = NULL;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_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 = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L6_unpacking_done:;
    }
    __pyx_t_10 = __pyx_convert_string_from_py_(__pyx_t_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_field = __pyx_t_10;
    __Pyx_XDECREF_SET(__pyx_v_arity, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_XDECREF_SET(__pyx_v_vcf_type, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "vcfnp.pyx":1793
 *     cdef string field
 *     for field, arity, vcf_type in zip(fields, arities, info_types):
 *         if field == FIELD_NAME_CHROM:             # <<<<<<<<<<<<<<
 *             out.append(var.sequenceName)
 *         elif field == FIELD_NAME_POS:
 */
    __pyx_t_11 = ((__pyx_v_field == __pyx_v_5vcfnp_FIELD_NAME_CHROM) != 0);
    if (__pyx_t_11) {

      /* "vcfnp.pyx":1794
 *     for field, arity, vcf_type in zip(fields, arities, info_types):
 *         if field == FIELD_NAME_CHROM:
 *             out.append(var.sequenceName)             # <<<<<<<<<<<<<<
 *         elif field == FIELD_NAME_POS:
 *             out.append(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 = 1794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_out, __pyx_t_2); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L7;
    }

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

      /* "vcfnp.pyx":1796
 *             out.append(var.sequenceName)
 *         elif field == FIELD_NAME_POS:
 *             out.append(var.position)             # <<<<<<<<<<<<<<
 *         elif field == FIELD_NAME_ID:
 *             out.append(var.id)
 */
      __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_var->position); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_out, __pyx_t_2); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L7;
    }

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

      /* "vcfnp.pyx":1798
 *             out.append(var.position)
 *         elif field == FIELD_NAME_ID:
 *             out.append(var.id)             # <<<<<<<<<<<<<<
 *         elif field == FIELD_NAME_REF:
 *             out.append(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 = 1798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_out, __pyx_t_2); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L7;
    }

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

      /* "vcfnp.pyx":1800
 *             out.append(var.id)
 *         elif field == FIELD_NAME_REF:
 *             out.append(var.ref)             # <<<<<<<<<<<<<<
 *         elif field == FIELD_NAME_ALT:
 *             if arity is not None:
 */
      __pyx_t_2 = __pyx_convert_string_to_py_(__pyx_v_var->ref); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_out, __pyx_t_2); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L7;
    }

    /* "vcfnp.pyx":1801
 *         elif field == FIELD_NAME_REF:
 *             out.append(var.ref)
 *         elif field == FIELD_NAME_ALT:             # <<<<<<<<<<<<<<
 *             if arity is not None:
 *                 vals = _mktblval_multi(var.alt, arity, fill)
 */
    __pyx_t_11 = ((__pyx_v_field == __pyx_v_5vcfnp_FIELD_NAME_ALT) != 0);
    if (__pyx_t_11) {

      /* "vcfnp.pyx":1802
 *             out.append(var.ref)
 *         elif field == FIELD_NAME_ALT:
 *             if arity is not None:             # <<<<<<<<<<<<<<
 *                 vals = _mktblval_multi(var.alt, arity, fill)
 *                 out.extend(vals)
 */
      __pyx_t_11 = (__pyx_v_arity != Py_None);
      __pyx_t_13 = (__pyx_t_11 != 0);
      if (__pyx_t_13) {

        /* "vcfnp.pyx":1803
 *         elif field == FIELD_NAME_ALT:
 *             if arity is not None:
 *                 vals = _mktblval_multi(var.alt, arity, fill)             # <<<<<<<<<<<<<<
 *                 out.extend(vals)
 *             elif var.alt.size() == 0:
 */
        __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_v_arity); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_2 = __pyx_f_5vcfnp__mktblval_multi(__pyx_v_var->alt, __pyx_t_14, __pyx_v_fill); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_XDECREF_SET(__pyx_v_vals, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "vcfnp.pyx":1804
 *             if arity is not None:
 *                 vals = _mktblval_multi(var.alt, arity, fill)
 *                 out.extend(vals)             # <<<<<<<<<<<<<<
 *             elif var.alt.size() == 0:
 *                 out.append(fill)
 */
        __pyx_t_12 = __Pyx_PyList_Extend(__pyx_v_out, __pyx_v_vals); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L8;
      }

      /* "vcfnp.pyx":1805
 *                 vals = _mktblval_multi(var.alt, arity, fill)
 *                 out.extend(vals)
 *             elif var.alt.size() == 0:             # <<<<<<<<<<<<<<
 *                 out.append(fill)
 *             else:
 */
      __pyx_t_13 = ((__pyx_v_var->alt.size() == 0) != 0);
      if (__pyx_t_13) {

        /* "vcfnp.pyx":1806
 *                 out.extend(vals)
 *             elif var.alt.size() == 0:
 *                 out.append(fill)             # <<<<<<<<<<<<<<
 *             else:
 *                 val = ','.join(var.alt)
 */
        __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_out, __pyx_v_fill); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L8;
      }
      /*else*/ {

        /* "vcfnp.pyx":1808
 *                 out.append(fill)
 *             else:
 *                 val = ','.join(var.alt)             # <<<<<<<<<<<<<<
 *                 out.append(val)
 *         elif field == FIELD_NAME_QUAL:
 */
        __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 = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_7 = __Pyx_PyString_Join(__pyx_kp_s__33, __pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "vcfnp.pyx":1809
 *             else:
 *                 val = ','.join(var.alt)
 *                 out.append(val)             # <<<<<<<<<<<<<<
 *         elif field == FIELD_NAME_QUAL:
 *             out.append(var.quality)
 */
        __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_out, __pyx_v_val); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_L8:;
      goto __pyx_L7;
    }

    /* "vcfnp.pyx":1810
 *                 val = ','.join(var.alt)
 *                 out.append(val)
 *         elif field == FIELD_NAME_QUAL:             # <<<<<<<<<<<<<<
 *             out.append(var.quality)
 *         elif field == FIELD_NAME_FILTER:
 */
    __pyx_t_13 = ((__pyx_v_field == __pyx_v_5vcfnp_FIELD_NAME_QUAL) != 0);
    if (__pyx_t_13) {

      /* "vcfnp.pyx":1811
 *                 out.append(val)
 *         elif field == FIELD_NAME_QUAL:
 *             out.append(var.quality)             # <<<<<<<<<<<<<<
 *         elif field == FIELD_NAME_FILTER:
 *             if flatten_filter:
 */
      __pyx_t_7 = PyFloat_FromDouble(__pyx_v_var->quality); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_out, __pyx_t_7); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L7;
    }

    /* "vcfnp.pyx":1812
 *         elif field == FIELD_NAME_QUAL:
 *             out.append(var.quality)
 *         elif field == FIELD_NAME_FILTER:             # <<<<<<<<<<<<<<
 *             if flatten_filter:
 *                 out.extend(_mkfilterval(var, filter_ids))
 */
    __pyx_t_13 = ((__pyx_v_field == __pyx_v_5vcfnp_FIELD_NAME_FILTER) != 0);
    if (__pyx_t_13) {

      /* "vcfnp.pyx":1813
 *             out.append(var.quality)
 *         elif field == FIELD_NAME_FILTER:
 *             if flatten_filter:             # <<<<<<<<<<<<<<
 *                 out.extend(_mkfilterval(var, filter_ids))
 *             elif var.filter == DOT:
 */
      __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_flatten_filter); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_13) {

        /* "vcfnp.pyx":1814
 *         elif field == FIELD_NAME_FILTER:
 *             if flatten_filter:
 *                 out.extend(_mkfilterval(var, filter_ids))             # <<<<<<<<<<<<<<
 *             elif var.filter == DOT:
 *                 out.append(fill)
 */
        if (!(likely(PyTuple_CheckExact(__pyx_v_filter_ids))||((__pyx_v_filter_ids) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_filter_ids)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_7 = __pyx_f_5vcfnp__mkfilterval(__pyx_v_var, ((PyObject*)__pyx_v_filter_ids)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_12 = __Pyx_PyList_Extend(__pyx_v_out, __pyx_t_7); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L9;
      }

      /* "vcfnp.pyx":1815
 *             if flatten_filter:
 *                 out.extend(_mkfilterval(var, filter_ids))
 *             elif var.filter == DOT:             # <<<<<<<<<<<<<<
 *                 out.append(fill)
 *             else:
 */
      __pyx_t_13 = ((__pyx_v_var->filter == __pyx_v_5vcfnp_DOT) != 0);
      if (__pyx_t_13) {

        /* "vcfnp.pyx":1816
 *                 out.extend(_mkfilterval(var, filter_ids))
 *             elif var.filter == DOT:
 *                 out.append(fill)             # <<<<<<<<<<<<<<
 *             else:
 *                 out.append(var.filter)
 */
        __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_out, __pyx_v_fill); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L9;
      }
      /*else*/ {

        /* "vcfnp.pyx":1818
 *                 out.append(fill)
 *             else:
 *                 out.append(var.filter)             # <<<<<<<<<<<<<<
 *         elif field == FIELD_NAME_NUM_ALLELES:
 *             out.append(var.alt.size() + 1)
 */
        __pyx_t_7 = __pyx_convert_string_to_py_(__pyx_v_var->filter); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_out, __pyx_t_7); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __pyx_L9:;
      goto __pyx_L7;
    }

    /* "vcfnp.pyx":1819
 *             else:
 *                 out.append(var.filter)
 *         elif field == FIELD_NAME_NUM_ALLELES:             # <<<<<<<<<<<<<<
 *             out.append(var.alt.size() + 1)
 *         elif field == FIELD_NAME_IS_SNP:
 */
    __pyx_t_13 = ((__pyx_v_field == __pyx_v_5vcfnp_FIELD_NAME_NUM_ALLELES) != 0);
    if (__pyx_t_13) {

      /* "vcfnp.pyx":1820
 *                 out.append(var.filter)
 *         elif field == FIELD_NAME_NUM_ALLELES:
 *             out.append(var.alt.size() + 1)             # <<<<<<<<<<<<<<
 *         elif field == FIELD_NAME_IS_SNP:
 *             out.append(_is_snp(var))
 */
      __pyx_t_7 = __Pyx_PyInt_FromSize_t((__pyx_v_var->alt.size() + 1)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_out, __pyx_t_7); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L7;
    }

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

      /* "vcfnp.pyx":1822
 *             out.append(var.alt.size() + 1)
 *         elif field == FIELD_NAME_IS_SNP:
 *             out.append(_is_snp(var))             # <<<<<<<<<<<<<<
 *         else:
 *             if vcf_type == FIELD_BOOL:
 */
      __pyx_t_7 = __pyx_f_5vcfnp__is_snp(__pyx_v_var); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_out, __pyx_t_7); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L7;
    }
    /*else*/ {

      /* "vcfnp.pyx":1824
 *             out.append(_is_snp(var))
 *         else:
 *             if vcf_type == FIELD_BOOL:             # <<<<<<<<<<<<<<
 *                 # ignore arity, this is a flag
 *                 val = (var.infoFlags.count(field) > 0)
 */
      __pyx_t_7 = PyInt_FromLong(vcf::FIELD_BOOL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_2 = PyObject_RichCompare(__pyx_v_vcf_type, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_13) {

        /* "vcfnp.pyx":1826
 *             if vcf_type == FIELD_BOOL:
 *                 # ignore arity, this is a flag
 *                 val = (var.infoFlags.count(field) > 0)             # <<<<<<<<<<<<<<
 *                 out.append(val)
 *             else:
 */
        __pyx_t_2 = __Pyx_PyBool_FromLong((__pyx_v_var->infoFlags.count(__pyx_v_field) > 0)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "vcfnp.pyx":1827
 *                 # ignore arity, this is a flag
 *                 val = (var.infoFlags.count(field) > 0)
 *                 out.append(val)             # <<<<<<<<<<<<<<
 *             else:
 *                 if arity is not None:
 */
        __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_out, __pyx_v_val); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L10;
      }
      /*else*/ {

        /* "vcfnp.pyx":1829
 *                 out.append(val)
 *             else:
 *                 if arity is not None:             # <<<<<<<<<<<<<<
 *                     vals = _mktblval_multi(var.info[field], arity, fill)
 *                     out.extend(vals)
 */
        __pyx_t_13 = (__pyx_v_arity != Py_None);
        __pyx_t_11 = (__pyx_t_13 != 0);
        if (__pyx_t_11) {

          /* "vcfnp.pyx":1830
 *             else:
 *                 if arity is not None:
 *                     vals = _mktblval_multi(var.info[field], arity, fill)             # <<<<<<<<<<<<<<
 *                     out.extend(vals)
 *                 elif var.info[field].size() == 0:
 */
          __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_v_arity); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_2 = __pyx_f_5vcfnp__mktblval_multi((__pyx_v_var->info[__pyx_v_field]), __pyx_t_14, __pyx_v_fill); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_XDECREF_SET(__pyx_v_vals, __pyx_t_2);
          __pyx_t_2 = 0;

          /* "vcfnp.pyx":1831
 *                 if arity is not None:
 *                     vals = _mktblval_multi(var.info[field], arity, fill)
 *                     out.extend(vals)             # <<<<<<<<<<<<<<
 *                 elif var.info[field].size() == 0:
 *                     out.append(fill)
 */
          __pyx_t_12 = __Pyx_PyList_Extend(__pyx_v_out, __pyx_v_vals); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          goto __pyx_L11;
        }

        /* "vcfnp.pyx":1832
 *                     vals = _mktblval_multi(var.info[field], arity, fill)
 *                     out.extend(vals)
 *                 elif var.info[field].size() == 0:             # <<<<<<<<<<<<<<
 *                     out.append(fill)
 *                 else:
 */
        __pyx_t_11 = (((__pyx_v_var->info[__pyx_v_field]).size() == 0) != 0);
        if (__pyx_t_11) {

          /* "vcfnp.pyx":1833
 *                     out.extend(vals)
 *                 elif var.info[field].size() == 0:
 *                     out.append(fill)             # <<<<<<<<<<<<<<
 *                 else:
 *                     out.append(','.join(var.info[field]))
 */
          __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_out, __pyx_v_fill); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          goto __pyx_L11;
        }
        /*else*/ {

          /* "vcfnp.pyx":1835
 *                     out.append(fill)
 *                 else:
 *                     out.append(','.join(var.info[field]))             # <<<<<<<<<<<<<<
 *     return tuple(out)
 * 
 */
          __pyx_t_2 = __pyx_convert_vector_to_py_std_3a__3a_string((__pyx_v_var->info[__pyx_v_field])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_7 = __Pyx_PyString_Join(__pyx_kp_s__33, __pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_out, __pyx_t_7); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __pyx_L11:;
      }
      __pyx_L10:;
    }
    __pyx_L7:;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":1836
 *                 else:
 *                     out.append(','.join(var.info[field]))
 *     return tuple(out)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_AsTuple(__pyx_v_out); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "vcfnp.pyx":1783
 * 
 * 
 * cdef inline object _mkvtblrow(Variant *var,             # <<<<<<<<<<<<<<
 *                               fields,
 *                               arities,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("vcfnp._mkvtblrow", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XDECREF(__pyx_v_arity);
  __Pyx_XDECREF(__pyx_v_vcf_type);
  __Pyx_XDECREF(__pyx_v_vals);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vcfnp.pyx":1839
 * 
 * 
 * cdef inline object _mktblval_multi(vector[string]& string_vals, int arity, object fill):             # <<<<<<<<<<<<<<
 *     cdef int i
 *     out = list()
 */

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

  /* "vcfnp.pyx":1841
 * cdef inline object _mktblval_multi(vector[string]& string_vals, int arity, object fill):
 *     cdef int i
 *     out = list()             # <<<<<<<<<<<<<<
 *     for i in range(arity):
 *         if i < string_vals.size():
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "vcfnp.pyx":1842
 *     cdef int i
 *     out = list()
 *     for i in range(arity):             # <<<<<<<<<<<<<<
 *         if i < string_vals.size():
 *             out.append(string_vals.at(i))
 */
  __pyx_t_2 = __pyx_v_arity;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "vcfnp.pyx":1843
 *     out = list()
 *     for i in range(arity):
 *         if i < string_vals.size():             # <<<<<<<<<<<<<<
 *             out.append(string_vals.at(i))
 *         else:
 */
    __pyx_t_4 = ((__pyx_v_i < __pyx_v_string_vals.size()) != 0);
    if (__pyx_t_4) {

      /* "vcfnp.pyx":1844
 *     for i in range(arity):
 *         if i < string_vals.size():
 *             out.append(string_vals.at(i))             # <<<<<<<<<<<<<<
 *         else:
 *             out.append(fill)
 */
      __pyx_t_1 = __pyx_convert_string_to_py_(__pyx_v_string_vals.at(__pyx_v_i)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_out, __pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "vcfnp.pyx":1846
 *             out.append(string_vals.at(i))
 *         else:
 *             out.append(fill)             # <<<<<<<<<<<<<<
 *     return out
 * 
 */
      __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_out, __pyx_v_fill); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L5:;
  }

  /* "vcfnp.pyx":1847
 *         else:
 *             out.append(fill)
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "vcfnp.pyx":1839
 * 
 * 
 * cdef inline object _mktblval_multi(vector[string]& string_vals, int arity, object fill):             # <<<<<<<<<<<<<<
 *     cdef int i
 *     out = list()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vcfnp._mktblval_multi", __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;
}

/* "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.
 */

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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;
  }

  /* "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 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__34, 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;}
  }

  /* "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 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__35, 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;}
  }

  /* "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 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__36, 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;}
    }

    /* "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 = __Pyx_PyInt_From_int(__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 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __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(__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, __pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __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(__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;
  }
  /*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":283
 *                 info.format[0] = c'^' # Native data types, manual alignment
 *                 offset = 0
 *                 f = _util_dtypestring(descr, info.format + 1,             # <<<<<<<<<<<<<<
 *                                       info.format + _buffer_format_string_len,
 *                                       &offset)
 */
    __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';
  }

  /* "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.
 */

  /* function exit code */
  __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;
}

/* "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)
 */

/* 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));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

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:;

  /* "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)
 */

  /* function exit code */
  __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;

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

  /* function exit code */
  __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;

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

  /* function exit code */
  __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;

  /* "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)
 * 
 */

  /* function exit code */
  __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;

  /* "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)
 * 
 */

  /* function exit code */
  __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;

  /* "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)
 * 
 */

  /* function exit code */
  __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;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  long __pyx_t_10;
  char *__pyx_t_11;
  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(__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 = __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_SET(__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 (unlikely(__pyx_t_3 == NULL)) {__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 %.16s, got %.200s", "tuple", 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_SET(__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(__pyx_v_fields != Py_None)) {
      PyObject* sequence = __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 {
      __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    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_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3));
    __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__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 = __Pyx_PyInt_From_ptrdiff_t((__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 = __Pyx_PyInt_From_int((__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_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 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_6) {

      /* "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 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__37, 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;}
    }

    /* "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_6 = ((__pyx_v_child->byteorder == '>') != 0);
    if (__pyx_t_6) {
      __pyx_t_7 = (__pyx_v_little_endian != 0);
    } else {
      __pyx_t_7 = __pyx_t_6;
    }
    if (!__pyx_t_7) {

      /* "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_6 = ((__pyx_v_child->byteorder == '<') != 0);
      if (__pyx_t_6) {
        __pyx_t_8 = ((!(__pyx_v_little_endian != 0)) != 0);
        __pyx_t_9 = __pyx_t_8;
      } else {
        __pyx_t_9 = __pyx_t_6;
      }
      __pyx_t_6 = __pyx_t_9;
    } else {
      __pyx_t_6 = __pyx_t_7;
    }
    if (__pyx_t_6) {

      /* "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 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__38, 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;}
    }

    /* "numpy.pxd":813
 * 
 *         # Output padding bytes
 *         while offset[0] < new_offset:             # <<<<<<<<<<<<<<
 *             f[0] = 120 # "x"; pad byte
 *             f += 1
 */
    while (1) {
      __pyx_t_5 = __Pyx_PyInt_From_int((__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_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 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_6) 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_10 = 0;
      (__pyx_v_offset[__pyx_t_10]) = ((__pyx_v_offset[__pyx_t_10]) + 1);
    }

    /* "numpy.pxd":818
 *             offset[0] += 1
 * 
 *         offset[0] += child.itemsize             # <<<<<<<<<<<<<<
 * 
 *         if not PyDataType_HASFIELDS(child):
 */
    __pyx_t_10 = 0;
    (__pyx_v_offset[__pyx_t_10]) = ((__pyx_v_offset[__pyx_t_10]) + __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_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0);
    if (__pyx_t_6) {

      /* "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 = __Pyx_PyInt_From_int(__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_SET(__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_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0);
      if (__pyx_t_6) {

        /* "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 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__39, 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;}
      }

      /* "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_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 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_6) {
        (__pyx_v_f[0]) = 98;
        goto __pyx_L11;
      }

      /* "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_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 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_6) {
        (__pyx_v_f[0]) = 66;
        goto __pyx_L11;
      }

      /* "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_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 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_6) {
        (__pyx_v_f[0]) = 104;
        goto __pyx_L11;
      }

      /* "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_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 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_6) {
        (__pyx_v_f[0]) = 72;
        goto __pyx_L11;
      }

      /* "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_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 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_6) {
        (__pyx_v_f[0]) = 105;
        goto __pyx_L11;
      }

      /* "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_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 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_6) {
        (__pyx_v_f[0]) = 73;
        goto __pyx_L11;
      }

      /* "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_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 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_6) {
        (__pyx_v_f[0]) = 108;
        goto __pyx_L11;
      }

      /* "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_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 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_6) {
        (__pyx_v_f[0]) = 76;
        goto __pyx_L11;
      }

      /* "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_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 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_6) {
        (__pyx_v_f[0]) = 113;
        goto __pyx_L11;
      }

      /* "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_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 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_6) {
        (__pyx_v_f[0]) = 81;
        goto __pyx_L11;
      }

      /* "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_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 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_6) {
        (__pyx_v_f[0]) = 102;
        goto __pyx_L11;
      }

      /* "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_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 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_6) {
        (__pyx_v_f[0]) = 100;
        goto __pyx_L11;
      }

      /* "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_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 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_6) {
        (__pyx_v_f[0]) = 103;
        goto __pyx_L11;
      }

      /* "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_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 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_6) {
        (__pyx_v_f[0]) = 90;
        (__pyx_v_f[1]) = 102;
        __pyx_v_f = (__pyx_v_f + 1);
        goto __pyx_L11;
      }

      /* "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_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 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_6) {
        (__pyx_v_f[0]) = 90;
        (__pyx_v_f[1]) = 100;
        __pyx_v_f = (__pyx_v_f + 1);
        goto __pyx_L11;
      }

      /* "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_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 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_6) {
        (__pyx_v_f[0]) = 90;
        (__pyx_v_f[1]) = 103;
        __pyx_v_f = (__pyx_v_f + 1);
        goto __pyx_L11;
      }

      /* "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_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 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_6) {
        (__pyx_v_f[0]) = 79;
        goto __pyx_L11;
      }
      /*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 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __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(__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, __pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __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(__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_L11:;

      /* "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_L9;
    }
    /*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_11 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_v_f = __pyx_t_11;
    }
    __pyx_L9:;
  }
  __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;

  /* "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.
 */

  /* function exit code */
  __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;

  /* "numpy.pxd":965
 * 
 * 
 * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
 *      cdef PyObject* baseptr
 *      if base is None:
 */

  /* function exit code */
  __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;
  }
  /*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;
  }

  /* "numpy.pxd":975
 *      arr.base = baseptr
 * 
 * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
 *     if arr.base is NULL:
 *         return None
 */

  /* function exit code */
  __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
  char *__pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __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_t_1 = __Pyx_PyObject_AsStringAndSize(__pyx_v_o, (&__pyx_v_length)); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_data = __pyx_t_1;

  /* "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;

  /* "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)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("string.from_py.__pyx_convert_string_from_py_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __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[3]; __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;

  /* "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())
 * 
 */

  /* function exit code */
  __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[4]; __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[4]; __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[4]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "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())]
 * 
 */

  /* function exit code */
  __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;
}

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[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_PyInt_From_int((__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 = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "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())]
 * 
 */

  /* function exit code */
  __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___variants_arities *__pyx_freelist_5vcfnp___pyx_scope_struct___variants_arities[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct___variants_arities = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct___variants_arities(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct___variants_arities > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct___variants_arities)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct___variants_arities[--__pyx_freecount_5vcfnp___pyx_scope_struct___variants_arities];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct___variants_arities));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct___variants_arities(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct___variants_arities *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct___variants_arities *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_arities);
  Py_CLEAR(p->__pyx_v_fields);
  if ((__pyx_freecount_5vcfnp___pyx_scope_struct___variants_arities < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct___variants_arities))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct___variants_arities[__pyx_freecount_5vcfnp___pyx_scope_struct___variants_arities++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct___variants_arities *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct___variants_arities(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct___variants_arities *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct___variants_arities *)o;
  if (p->__pyx_v_arities) {
    e = (*v)(p->__pyx_v_arities, a); if (e) return e;
  }
  if (p->__pyx_v_fields) {
    e = (*v)(p->__pyx_v_fields, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5vcfnp___pyx_scope_struct___variants_arities(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vcfnp___pyx_scope_struct___variants_arities *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct___variants_arities *)o;
  tmp = ((PyObject*)p->__pyx_v_arities);
  p->__pyx_v_arities = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_fields);
  p->__pyx_v_fields = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct___variants_arities = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct___variants_arities"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct___variants_arities), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct___variants_arities, /*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___variants_arities, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct___variants_arities, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*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___variants_arities, /*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
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5vcfnp___pyx_scope_struct_1_genexpr *__pyx_freelist_5vcfnp___pyx_scope_struct_1_genexpr[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct_1_genexpr = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_1_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct_1_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_1_genexpr)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct_1_genexpr[--__pyx_freecount_5vcfnp___pyx_scope_struct_1_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_1_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_1_genexpr(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_1_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_f);
  Py_CLEAR(p->__pyx_t_0);
  if ((__pyx_freecount_5vcfnp___pyx_scope_struct_1_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_1_genexpr))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct_1_genexpr[__pyx_freecount_5vcfnp___pyx_scope_struct_1_genexpr++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_1_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct_1_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_1_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_f) {
    e = (*v)(p->__pyx_v_f, 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_genexpr(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_1_genexpr *)o;
  tmp = ((PyObject*)p->__pyx_outer_scope);
  p->__pyx_outer_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct___variants_arities *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_f);
  p->__pyx_v_f = 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 PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct_1_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct_1_genexpr"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_1_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_1_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_1_genexpr, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct_1_genexpr, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*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_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
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5vcfnp___pyx_scope_struct_2__variants_fills *__pyx_freelist_5vcfnp___pyx_scope_struct_2__variants_fills[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct_2__variants_fills = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_2__variants_fills(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct_2__variants_fills > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_2__variants_fills)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct_2__variants_fills[--__pyx_freecount_5vcfnp___pyx_scope_struct_2__variants_fills];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_2__variants_fills));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_2__variants_fills(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_2__variants_fills *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_2__variants_fills *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_fields);
  Py_CLEAR(p->__pyx_v_fills);
  if ((__pyx_freecount_5vcfnp___pyx_scope_struct_2__variants_fills < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_2__variants_fills))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct_2__variants_fills[__pyx_freecount_5vcfnp___pyx_scope_struct_2__variants_fills++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_2__variants_fills *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct_2__variants_fills(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_2__variants_fills *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_2__variants_fills *)o;
  if (p->__pyx_v_fields) {
    e = (*v)(p->__pyx_v_fields, a); if (e) return e;
  }
  if (p->__pyx_v_fills) {
    e = (*v)(p->__pyx_v_fills, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5vcfnp___pyx_scope_struct_2__variants_fills(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_2__variants_fills *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_2__variants_fills *)o;
  tmp = ((PyObject*)p->__pyx_v_fields);
  p->__pyx_v_fields = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_fills);
  p->__pyx_v_fills = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct_2__variants_fills = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct_2__variants_fills"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_2__variants_fills), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_2__variants_fills, /*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__variants_fills, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct_2__variants_fills, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*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__variants_fills, /*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
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5vcfnp___pyx_scope_struct_3_genexpr *__pyx_freelist_5vcfnp___pyx_scope_struct_3_genexpr[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct_3_genexpr = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_3_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct_3_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_3_genexpr)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct_3_genexpr[--__pyx_freecount_5vcfnp___pyx_scope_struct_3_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_3_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_3_genexpr(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_3_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_f);
  Py_CLEAR(p->__pyx_t_0);
  if ((__pyx_freecount_5vcfnp___pyx_scope_struct_3_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_3_genexpr))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct_3_genexpr[__pyx_freecount_5vcfnp___pyx_scope_struct_3_genexpr++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_3_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct_3_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_3_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_f) {
    e = (*v)(p->__pyx_v_f, 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_genexpr(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_3_genexpr *)o;
  tmp = ((PyObject*)p->__pyx_outer_scope);
  p->__pyx_outer_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_2__variants_fills *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_f);
  p->__pyx_v_f = 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 PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct_3_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct_3_genexpr"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_3_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_3_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_3_genexpr, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct_3_genexpr, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*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_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
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5vcfnp___pyx_scope_struct_4__info_transformers *__pyx_freelist_5vcfnp___pyx_scope_struct_4__info_transformers[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct_4__info_transformers = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_4__info_transformers(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct_4__info_transformers > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_4__info_transformers)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct_4__info_transformers[--__pyx_freecount_5vcfnp___pyx_scope_struct_4__info_transformers];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_4__info_transformers));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_4__info_transformers(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_4__info_transformers *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_4__info_transformers *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_fields);
  Py_CLEAR(p->__pyx_v_transformers);
  if ((__pyx_freecount_5vcfnp___pyx_scope_struct_4__info_transformers < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_4__info_transformers))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct_4__info_transformers[__pyx_freecount_5vcfnp___pyx_scope_struct_4__info_transformers++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_4__info_transformers *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct_4__info_transformers(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_4__info_transformers *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_4__info_transformers *)o;
  if (p->__pyx_v_fields) {
    e = (*v)(p->__pyx_v_fields, a); if (e) return e;
  }
  if (p->__pyx_v_transformers) {
    e = (*v)(p->__pyx_v_transformers, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5vcfnp___pyx_scope_struct_4__info_transformers(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_4__info_transformers *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_4__info_transformers *)o;
  tmp = ((PyObject*)p->__pyx_v_fields);
  p->__pyx_v_fields = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_transformers);
  p->__pyx_v_transformers = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct_4__info_transformers = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct_4__info_transformers"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_4__info_transformers), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_4__info_transformers, /*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__info_transformers, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct_4__info_transformers, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*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__info_transformers, /*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
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5vcfnp___pyx_scope_struct_5_genexpr *__pyx_freelist_5vcfnp___pyx_scope_struct_5_genexpr[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct_5_genexpr = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_5_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct_5_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_5_genexpr)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct_5_genexpr[--__pyx_freecount_5vcfnp___pyx_scope_struct_5_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_5_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_5_genexpr(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_5_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_5_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_f);
  Py_CLEAR(p->__pyx_t_0);
  if ((__pyx_freecount_5vcfnp___pyx_scope_struct_5_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_5_genexpr))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct_5_genexpr[__pyx_freecount_5vcfnp___pyx_scope_struct_5_genexpr++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_5_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct_5_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_5_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_5_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_f) {
    e = (*v)(p->__pyx_v_f, 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_genexpr(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_5_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_5_genexpr *)o;
  tmp = ((PyObject*)p->__pyx_outer_scope);
  p->__pyx_outer_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_4__info_transformers *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_f);
  p->__pyx_v_f = 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 PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct_5_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct_5_genexpr"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_5_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_5_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_5_genexpr, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct_5_genexpr, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*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_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
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5vcfnp___pyx_scope_struct_6__setup_variants *__pyx_freelist_5vcfnp___pyx_scope_struct_6__setup_variants[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct_6__setup_variants = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_6__setup_variants(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct_6__setup_variants > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_6__setup_variants)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct_6__setup_variants[--__pyx_freecount_5vcfnp___pyx_scope_struct_6__setup_variants];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_6__setup_variants));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_6__setup_variants(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_6__setup_variants *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_6__setup_variants *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_fields);
  Py_CLEAR(p->__pyx_v_infoCounts);
  Py_CLEAR(p->__pyx_v_infoTypes);
  if ((__pyx_freecount_5vcfnp___pyx_scope_struct_6__setup_variants < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_6__setup_variants))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct_6__setup_variants[__pyx_freecount_5vcfnp___pyx_scope_struct_6__setup_variants++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_6__setup_variants *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct_6__setup_variants(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_6__setup_variants *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_6__setup_variants *)o;
  if (p->__pyx_v_fields) {
    e = (*v)(p->__pyx_v_fields, a); if (e) return e;
  }
  if (p->__pyx_v_infoCounts) {
    e = (*v)(p->__pyx_v_infoCounts, a); if (e) return e;
  }
  if (p->__pyx_v_infoTypes) {
    e = (*v)(p->__pyx_v_infoTypes, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5vcfnp___pyx_scope_struct_6__setup_variants(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_6__setup_variants *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_6__setup_variants *)o;
  tmp = ((PyObject*)p->__pyx_v_fields);
  p->__pyx_v_fields = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_infoCounts);
  p->__pyx_v_infoCounts = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_infoTypes);
  p->__pyx_v_infoTypes = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct_6__setup_variants = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct_6__setup_variants"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_6__setup_variants), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_6__setup_variants, /*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__setup_variants, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct_6__setup_variants, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*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__setup_variants, /*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
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5vcfnp___pyx_scope_struct_7_genexpr *__pyx_freelist_5vcfnp___pyx_scope_struct_7_genexpr[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct_7_genexpr = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_7_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct_7_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_7_genexpr)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct_7_genexpr[--__pyx_freecount_5vcfnp___pyx_scope_struct_7_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_7_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_7_genexpr(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_7_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_7_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_f);
  Py_CLEAR(p->__pyx_t_0);
  if ((__pyx_freecount_5vcfnp___pyx_scope_struct_7_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_7_genexpr))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct_7_genexpr[__pyx_freecount_5vcfnp___pyx_scope_struct_7_genexpr++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_7_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct_7_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_7_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_7_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_f) {
    e = (*v)(p->__pyx_v_f, 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_7_genexpr(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_7_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_7_genexpr *)o;
  tmp = ((PyObject*)p->__pyx_outer_scope);
  p->__pyx_outer_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_6__setup_variants *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_f);
  p->__pyx_v_f = 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 PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct_7_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct_7_genexpr"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_7_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_7_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_7_genexpr, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct_7_genexpr, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*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_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
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5vcfnp___pyx_scope_struct_8_genexpr *__pyx_freelist_5vcfnp___pyx_scope_struct_8_genexpr[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct_8_genexpr = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_8_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct_8_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_8_genexpr)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct_8_genexpr[--__pyx_freecount_5vcfnp___pyx_scope_struct_8_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_8_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_8_genexpr(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_8_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_8_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_f);
  Py_CLEAR(p->__pyx_t_0);
  if ((__pyx_freecount_5vcfnp___pyx_scope_struct_8_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_8_genexpr))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct_8_genexpr[__pyx_freecount_5vcfnp___pyx_scope_struct_8_genexpr++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_8_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct_8_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_8_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_8_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_f) {
    e = (*v)(p->__pyx_v_f, 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_8_genexpr(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_8_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_8_genexpr *)o;
  tmp = ((PyObject*)p->__pyx_outer_scope);
  p->__pyx_outer_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_6__setup_variants *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_f);
  p->__pyx_v_f = 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 PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct_8_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct_8_genexpr"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_8_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_8_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_8_genexpr, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct_8_genexpr, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*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_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
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5vcfnp___pyx_scope_struct_9__iter_withprogress *__pyx_freelist_5vcfnp___pyx_scope_struct_9__iter_withprogress[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct_9__iter_withprogress = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_9__iter_withprogress(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct_9__iter_withprogress > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_9__iter_withprogress)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct_9__iter_withprogress[--__pyx_freecount_5vcfnp___pyx_scope_struct_9__iter_withprogress];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_9__iter_withprogress));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_9__iter_withprogress(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_9__iter_withprogress *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_9__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_9__iter_withprogress < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_9__iter_withprogress))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct_9__iter_withprogress[__pyx_freecount_5vcfnp___pyx_scope_struct_9__iter_withprogress++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_9__iter_withprogress *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct_9__iter_withprogress(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_9__iter_withprogress *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_9__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_9__iter_withprogress(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_9__iter_withprogress *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_9__iter_withprogress *)o;
  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 PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct_9__iter_withprogress = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct_9__iter_withprogress"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_9__iter_withprogress), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_9__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_9__iter_withprogress, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct_9__iter_withprogress, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*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__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
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5vcfnp___pyx_scope_struct_10_itervariants *__pyx_freelist_5vcfnp___pyx_scope_struct_10_itervariants[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct_10_itervariants = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_10_itervariants(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct_10_itervariants > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_10_itervariants)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct_10_itervariants[--__pyx_freecount_5vcfnp___pyx_scope_struct_10_itervariants];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_10_itervariants));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_10_itervariants(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_10_itervariants *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_10_itervariants *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_current_filename);
  Py_CLEAR(p->__pyx_v_fieldspec);
  Py_CLEAR(p->__pyx_v_filenames);
  Py_CLEAR(p->__pyx_v_filterIds);
  Py_CLEAR(p->__pyx_v_parseInfo);
  Py_CLEAR(p->__pyx_v_region);
  Py_CLEAR(p->__pyx_t_0);
  if ((__pyx_freecount_5vcfnp___pyx_scope_struct_10_itervariants < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_10_itervariants))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct_10_itervariants[__pyx_freecount_5vcfnp___pyx_scope_struct_10_itervariants++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_10_itervariants *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct_10_itervariants(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_10_itervariants *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_10_itervariants *)o;
  if (p->__pyx_v_current_filename) {
    e = (*v)(p->__pyx_v_current_filename, a); if (e) return e;
  }
  if (p->__pyx_v_fieldspec) {
    e = (*v)(p->__pyx_v_fieldspec, 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_filterIds) {
    e = (*v)(p->__pyx_v_filterIds, a); if (e) return e;
  }
  if (p->__pyx_v_parseInfo) {
    e = (*v)(p->__pyx_v_parseInfo, 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_10_itervariants(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_10_itervariants *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_10_itervariants *)o;
  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_fieldspec);
  p->__pyx_v_fieldspec = ((PyObject*)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_filterIds);
  p->__pyx_v_filterIds = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_parseInfo);
  p->__pyx_v_parseInfo = 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 PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct_10_itervariants = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct_10_itervariants"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_10_itervariants), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_10_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_10_itervariants, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct_10_itervariants, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*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_10_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
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5vcfnp___pyx_scope_struct_11_itervariants_with_condition *__pyx_freelist_5vcfnp___pyx_scope_struct_11_itervariants_with_condition[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct_11_itervariants_with_condition = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_11_itervariants_with_condition(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct_11_itervariants_with_condition > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_11_itervariants_with_condition)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct_11_itervariants_with_condition[--__pyx_freecount_5vcfnp___pyx_scope_struct_11_itervariants_with_condition];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_11_itervariants_with_condition));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_11_itervariants_with_condition(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_11_itervariants_with_condition *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_11_itervariants_with_condition *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_condition);
  Py_CLEAR(p->__pyx_v_current_filename);
  Py_CLEAR(p->__pyx_v_fieldspec);
  Py_CLEAR(p->__pyx_v_filenames);
  Py_CLEAR(p->__pyx_v_filterIds);
  Py_CLEAR(p->__pyx_v_parseInfo);
  Py_CLEAR(p->__pyx_v_region);
  Py_CLEAR(p->__pyx_t_1);
  if ((__pyx_freecount_5vcfnp___pyx_scope_struct_11_itervariants_with_condition < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_11_itervariants_with_condition))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct_11_itervariants_with_condition[__pyx_freecount_5vcfnp___pyx_scope_struct_11_itervariants_with_condition++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_11_itervariants_with_condition *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct_11_itervariants_with_condition(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_11_itervariants_with_condition *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_11_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_fieldspec) {
    e = (*v)(p->__pyx_v_fieldspec, 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_filterIds) {
    e = (*v)(p->__pyx_v_filterIds, a); if (e) return e;
  }
  if (p->__pyx_v_parseInfo) {
    e = (*v)(p->__pyx_v_parseInfo, 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_11_itervariants_with_condition(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_11_itervariants_with_condition *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_11_itervariants_with_condition *)o;
  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_fieldspec);
  p->__pyx_v_fieldspec = ((PyObject*)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_filterIds);
  p->__pyx_v_filterIds = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_parseInfo);
  p->__pyx_v_parseInfo = 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 PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct_11_itervariants_with_condition = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct_11_itervariants_with_condition"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_11_itervariants_with_condition), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_11_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_11_itervariants_with_condition, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct_11_itervariants_with_condition, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*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_11_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
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5vcfnp___pyx_scope_struct_12__calldata_arities *__pyx_freelist_5vcfnp___pyx_scope_struct_12__calldata_arities[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct_12__calldata_arities = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_12__calldata_arities(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct_12__calldata_arities > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_12__calldata_arities)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct_12__calldata_arities[--__pyx_freecount_5vcfnp___pyx_scope_struct_12__calldata_arities];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_12__calldata_arities));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_12__calldata_arities(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_12__calldata_arities *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_12__calldata_arities *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_arities);
  Py_CLEAR(p->__pyx_v_fields);
  if ((__pyx_freecount_5vcfnp___pyx_scope_struct_12__calldata_arities < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_12__calldata_arities))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct_12__calldata_arities[__pyx_freecount_5vcfnp___pyx_scope_struct_12__calldata_arities++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_12__calldata_arities *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct_12__calldata_arities(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_12__calldata_arities *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_12__calldata_arities *)o;
  if (p->__pyx_v_arities) {
    e = (*v)(p->__pyx_v_arities, a); if (e) return e;
  }
  if (p->__pyx_v_fields) {
    e = (*v)(p->__pyx_v_fields, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5vcfnp___pyx_scope_struct_12__calldata_arities(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_12__calldata_arities *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_12__calldata_arities *)o;
  tmp = ((PyObject*)p->__pyx_v_arities);
  p->__pyx_v_arities = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_fields);
  p->__pyx_v_fields = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct_12__calldata_arities = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct_12__calldata_arities"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_12__calldata_arities), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_12__calldata_arities, /*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_12__calldata_arities, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct_12__calldata_arities, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*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_12__calldata_arities, /*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
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5vcfnp___pyx_scope_struct_13_genexpr *__pyx_freelist_5vcfnp___pyx_scope_struct_13_genexpr[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct_13_genexpr = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_13_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct_13_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_13_genexpr)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct_13_genexpr[--__pyx_freecount_5vcfnp___pyx_scope_struct_13_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_13_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_13_genexpr(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_13_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_13_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_f);
  Py_CLEAR(p->__pyx_t_0);
  if ((__pyx_freecount_5vcfnp___pyx_scope_struct_13_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_13_genexpr))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct_13_genexpr[__pyx_freecount_5vcfnp___pyx_scope_struct_13_genexpr++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_13_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct_13_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_13_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_13_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_f) {
    e = (*v)(p->__pyx_v_f, 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_13_genexpr(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_13_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_13_genexpr *)o;
  tmp = ((PyObject*)p->__pyx_outer_scope);
  p->__pyx_outer_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_12__calldata_arities *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_f);
  p->__pyx_v_f = 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 PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct_13_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct_13_genexpr"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_13_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_13_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_13_genexpr, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct_13_genexpr, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*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_13_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
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5vcfnp___pyx_scope_struct_14__calldata_fills *__pyx_freelist_5vcfnp___pyx_scope_struct_14__calldata_fills[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct_14__calldata_fills = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_14__calldata_fills(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct_14__calldata_fills > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_14__calldata_fills)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct_14__calldata_fills[--__pyx_freecount_5vcfnp___pyx_scope_struct_14__calldata_fills];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_14__calldata_fills));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_14__calldata_fills(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_14__calldata_fills *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_14__calldata_fills *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_fields);
  Py_CLEAR(p->__pyx_v_fills);
  if ((__pyx_freecount_5vcfnp___pyx_scope_struct_14__calldata_fills < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_14__calldata_fills))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct_14__calldata_fills[__pyx_freecount_5vcfnp___pyx_scope_struct_14__calldata_fills++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_14__calldata_fills *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct_14__calldata_fills(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_14__calldata_fills *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_14__calldata_fills *)o;
  if (p->__pyx_v_fields) {
    e = (*v)(p->__pyx_v_fields, a); if (e) return e;
  }
  if (p->__pyx_v_fills) {
    e = (*v)(p->__pyx_v_fills, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5vcfnp___pyx_scope_struct_14__calldata_fills(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_14__calldata_fills *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_14__calldata_fills *)o;
  tmp = ((PyObject*)p->__pyx_v_fields);
  p->__pyx_v_fields = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_fills);
  p->__pyx_v_fills = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct_14__calldata_fills = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct_14__calldata_fills"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_14__calldata_fills), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_14__calldata_fills, /*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_14__calldata_fills, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct_14__calldata_fills, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*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_14__calldata_fills, /*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
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5vcfnp___pyx_scope_struct_15_genexpr *__pyx_freelist_5vcfnp___pyx_scope_struct_15_genexpr[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct_15_genexpr = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_15_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct_15_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_15_genexpr)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct_15_genexpr[--__pyx_freecount_5vcfnp___pyx_scope_struct_15_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_15_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_15_genexpr(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_15_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_15_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_f);
  Py_CLEAR(p->__pyx_t_0);
  if ((__pyx_freecount_5vcfnp___pyx_scope_struct_15_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_15_genexpr))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct_15_genexpr[__pyx_freecount_5vcfnp___pyx_scope_struct_15_genexpr++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_15_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct_15_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_15_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_15_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_f) {
    e = (*v)(p->__pyx_v_f, 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_15_genexpr(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_15_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_15_genexpr *)o;
  tmp = ((PyObject*)p->__pyx_outer_scope);
  p->__pyx_outer_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_14__calldata_fills *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_f);
  p->__pyx_v_f = 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 PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct_15_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct_15_genexpr"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_15_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_15_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_15_genexpr, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct_15_genexpr, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*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_15_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
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5vcfnp___pyx_scope_struct_16__build_calldata *__pyx_freelist_5vcfnp___pyx_scope_struct_16__build_calldata[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct_16__build_calldata = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_16__build_calldata(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct_16__build_calldata > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_16__build_calldata)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct_16__build_calldata[--__pyx_freecount_5vcfnp___pyx_scope_struct_16__build_calldata];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_16__build_calldata));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_16__build_calldata(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_16__build_calldata *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_16__build_calldata *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_fields);
  Py_CLEAR(p->__pyx_v_formatCounts);
  Py_CLEAR(p->__pyx_v_formatTypes);
  if ((__pyx_freecount_5vcfnp___pyx_scope_struct_16__build_calldata < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_16__build_calldata))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct_16__build_calldata[__pyx_freecount_5vcfnp___pyx_scope_struct_16__build_calldata++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_16__build_calldata *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct_16__build_calldata(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_16__build_calldata *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_16__build_calldata *)o;
  if (p->__pyx_v_fields) {
    e = (*v)(p->__pyx_v_fields, a); if (e) return e;
  }
  if (p->__pyx_v_formatCounts) {
    e = (*v)(p->__pyx_v_formatCounts, a); if (e) return e;
  }
  if (p->__pyx_v_formatTypes) {
    e = (*v)(p->__pyx_v_formatTypes, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5vcfnp___pyx_scope_struct_16__build_calldata(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_16__build_calldata *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_16__build_calldata *)o;
  tmp = ((PyObject*)p->__pyx_v_fields);
  p->__pyx_v_fields = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_formatCounts);
  p->__pyx_v_formatCounts = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_formatTypes);
  p->__pyx_v_formatTypes = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct_16__build_calldata = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct_16__build_calldata"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_16__build_calldata), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_16__build_calldata, /*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_16__build_calldata, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct_16__build_calldata, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*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_16__build_calldata, /*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
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5vcfnp___pyx_scope_struct_17_genexpr *__pyx_freelist_5vcfnp___pyx_scope_struct_17_genexpr[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct_17_genexpr = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_17_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct_17_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_17_genexpr)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct_17_genexpr[--__pyx_freecount_5vcfnp___pyx_scope_struct_17_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_17_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_17_genexpr(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_17_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_17_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_f);
  Py_CLEAR(p->__pyx_t_0);
  if ((__pyx_freecount_5vcfnp___pyx_scope_struct_17_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_17_genexpr))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct_17_genexpr[__pyx_freecount_5vcfnp___pyx_scope_struct_17_genexpr++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_17_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct_17_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_17_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_17_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_f) {
    e = (*v)(p->__pyx_v_f, 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_17_genexpr(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_17_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_17_genexpr *)o;
  tmp = ((PyObject*)p->__pyx_outer_scope);
  p->__pyx_outer_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_16__build_calldata *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_f);
  p->__pyx_v_f = 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 PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct_17_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct_17_genexpr"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_17_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_17_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_17_genexpr, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct_17_genexpr, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*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_17_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
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5vcfnp___pyx_scope_struct_18_genexpr *__pyx_freelist_5vcfnp___pyx_scope_struct_18_genexpr[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct_18_genexpr = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_18_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct_18_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_18_genexpr)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct_18_genexpr[--__pyx_freecount_5vcfnp___pyx_scope_struct_18_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_18_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_18_genexpr(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_18_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_18_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_f);
  Py_CLEAR(p->__pyx_t_0);
  if ((__pyx_freecount_5vcfnp___pyx_scope_struct_18_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_18_genexpr))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct_18_genexpr[__pyx_freecount_5vcfnp___pyx_scope_struct_18_genexpr++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_18_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct_18_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_18_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_18_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_f) {
    e = (*v)(p->__pyx_v_f, 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_18_genexpr(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_18_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_18_genexpr *)o;
  tmp = ((PyObject*)p->__pyx_outer_scope);
  p->__pyx_outer_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_16__build_calldata *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_f);
  p->__pyx_v_f = 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 PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct_18_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct_18_genexpr"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_18_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_18_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_18_genexpr, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct_18_genexpr, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*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_18_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
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5vcfnp___pyx_scope_struct_19_itercalldata *__pyx_freelist_5vcfnp___pyx_scope_struct_19_itercalldata[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct_19_itercalldata = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_19_itercalldata(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct_19_itercalldata > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_19_itercalldata)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct_19_itercalldata[--__pyx_freecount_5vcfnp___pyx_scope_struct_19_itercalldata];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_19_itercalldata));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_19_itercalldata(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_19_itercalldata *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_19_itercalldata *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_current_filename);
  Py_CLEAR(p->__pyx_v_fieldspec);
  Py_CLEAR(p->__pyx_v_filenames);
  Py_CLEAR(p->__pyx_v_region);
  Py_CLEAR(p->__pyx_v_samples);
  Py_CLEAR(p->__pyx_t_0);
  if ((__pyx_freecount_5vcfnp___pyx_scope_struct_19_itercalldata < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_19_itercalldata))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct_19_itercalldata[__pyx_freecount_5vcfnp___pyx_scope_struct_19_itercalldata++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_19_itercalldata *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct_19_itercalldata(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_19_itercalldata *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_19_itercalldata *)o;
  if (p->__pyx_v_current_filename) {
    e = (*v)(p->__pyx_v_current_filename, a); if (e) return e;
  }
  if (p->__pyx_v_fieldspec) {
    e = (*v)(p->__pyx_v_fieldspec, 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_region) {
    e = (*v)(p->__pyx_v_region, a); if (e) return e;
  }
  if (p->__pyx_v_samples) {
    e = (*v)(p->__pyx_v_samples, 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_19_itercalldata(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_19_itercalldata *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_19_itercalldata *)o;
  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_fieldspec);
  p->__pyx_v_fieldspec = ((PyObject*)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_region);
  p->__pyx_v_region = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_samples);
  p->__pyx_v_samples = ((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 PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct_19_itercalldata = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct_19_itercalldata"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_19_itercalldata), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_19_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_19_itercalldata, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct_19_itercalldata, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*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_19_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
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5vcfnp___pyx_scope_struct_20_itercalldata_with_condition *__pyx_freelist_5vcfnp___pyx_scope_struct_20_itercalldata_with_condition[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct_20_itercalldata_with_condition = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_20_itercalldata_with_condition(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct_20_itercalldata_with_condition > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_20_itercalldata_with_condition)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct_20_itercalldata_with_condition[--__pyx_freecount_5vcfnp___pyx_scope_struct_20_itercalldata_with_condition];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_20_itercalldata_with_condition));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_20_itercalldata_with_condition(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_20_itercalldata_with_condition *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_20_itercalldata_with_condition *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_condition);
  Py_CLEAR(p->__pyx_v_current_filename);
  Py_CLEAR(p->__pyx_v_fieldspec);
  Py_CLEAR(p->__pyx_v_filenames);
  Py_CLEAR(p->__pyx_v_region);
  Py_CLEAR(p->__pyx_v_samples);
  Py_CLEAR(p->__pyx_t_1);
  if ((__pyx_freecount_5vcfnp___pyx_scope_struct_20_itercalldata_with_condition < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_20_itercalldata_with_condition))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct_20_itercalldata_with_condition[__pyx_freecount_5vcfnp___pyx_scope_struct_20_itercalldata_with_condition++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_20_itercalldata_with_condition *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct_20_itercalldata_with_condition(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_20_itercalldata_with_condition *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_20_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_fieldspec) {
    e = (*v)(p->__pyx_v_fieldspec, 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_region) {
    e = (*v)(p->__pyx_v_region, a); if (e) return e;
  }
  if (p->__pyx_v_samples) {
    e = (*v)(p->__pyx_v_samples, 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_20_itercalldata_with_condition(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_20_itercalldata_with_condition *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_20_itercalldata_with_condition *)o;
  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_fieldspec);
  p->__pyx_v_fieldspec = ((PyObject*)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_region);
  p->__pyx_v_region = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_samples);
  p->__pyx_v_samples = ((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 PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct_20_itercalldata_with_condition = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct_20_itercalldata_with_condition"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_20_itercalldata_with_condition), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_20_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_20_itercalldata_with_condition, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct_20_itercalldata_with_condition, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*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_20_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
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5vcfnp___pyx_scope_struct_21_eff_default_transformer *__pyx_freelist_5vcfnp___pyx_scope_struct_21_eff_default_transformer[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct_21_eff_default_transformer = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_21_eff_default_transformer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct_21_eff_default_transformer > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_21_eff_default_transformer)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct_21_eff_default_transformer[--__pyx_freecount_5vcfnp___pyx_scope_struct_21_eff_default_transformer];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_21_eff_default_transformer));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_21_eff_default_transformer(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_21_eff_default_transformer *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_21_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_21_eff_default_transformer < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_21_eff_default_transformer))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct_21_eff_default_transformer[__pyx_freecount_5vcfnp___pyx_scope_struct_21_eff_default_transformer++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_21_eff_default_transformer *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct_21_eff_default_transformer(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_21_eff_default_transformer *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_21_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_21_eff_default_transformer(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_21_eff_default_transformer *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_21_eff_default_transformer *)o;
  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 PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct_21_eff_default_transformer = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct_21_eff_default_transformer"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_21_eff_default_transformer), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_21_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_21_eff_default_transformer, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct_21_eff_default_transformer, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*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_21_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
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5vcfnp___pyx_scope_struct_22__transformer *__pyx_freelist_5vcfnp___pyx_scope_struct_22__transformer[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct_22__transformer = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_22__transformer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct_22__transformer > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_22__transformer)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct_22__transformer[--__pyx_freecount_5vcfnp___pyx_scope_struct_22__transformer];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_22__transformer));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_22__transformer(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_22__transformer *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_22__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_22__transformer < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_22__transformer))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct_22__transformer[__pyx_freecount_5vcfnp___pyx_scope_struct_22__transformer++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_22__transformer *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct_22__transformer(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_22__transformer *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_22__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_22__transformer(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_22__transformer *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_22__transformer *)o;
  tmp = ((PyObject*)p->__pyx_outer_scope);
  p->__pyx_outer_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_21_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 PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct_22__transformer = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct_22__transformer"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_22__transformer), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_22__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_22__transformer, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct_22__transformer, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*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_22__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
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5vcfnp___pyx_scope_struct_23_genexpr *__pyx_freelist_5vcfnp___pyx_scope_struct_23_genexpr[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct_23_genexpr = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_23_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct_23_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_23_genexpr)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct_23_genexpr[--__pyx_freecount_5vcfnp___pyx_scope_struct_23_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_23_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_23_genexpr(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_23_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_23_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_23_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_23_genexpr))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct_23_genexpr[__pyx_freecount_5vcfnp___pyx_scope_struct_23_genexpr++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_23_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct_23_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_23_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_23_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_23_genexpr(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_23_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_23_genexpr *)o;
  tmp = ((PyObject*)p->__pyx_outer_scope);
  p->__pyx_outer_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_22__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 PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct_23_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct_23_genexpr"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_23_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_23_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_23_genexpr, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct_23_genexpr, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*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_23_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
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5vcfnp___pyx_scope_struct_24___iter__ *__pyx_freelist_5vcfnp___pyx_scope_struct_24___iter__[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct_24___iter__ = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_24___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct_24___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_24___iter__)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct_24___iter__[--__pyx_freecount_5vcfnp___pyx_scope_struct_24___iter__];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_24___iter__));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_24___iter__(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_24___iter__ *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_24___iter__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_fields);
  Py_CLEAR(p->__pyx_v_info_types);
  Py_CLEAR(p->__pyx_v_self);
  if ((__pyx_freecount_5vcfnp___pyx_scope_struct_24___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_24___iter__))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct_24___iter__[__pyx_freecount_5vcfnp___pyx_scope_struct_24___iter__++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_24___iter__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct_24___iter__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_24___iter__ *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_24___iter__ *)o;
  if (p->__pyx_v_fields) {
    e = (*v)(p->__pyx_v_fields, a); if (e) return e;
  }
  if (p->__pyx_v_info_types) {
    e = (*v)(p->__pyx_v_info_types, a); if (e) return e;
  }
  if (p->__pyx_v_self) {
    e = (*v)(p->__pyx_v_self, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5vcfnp___pyx_scope_struct_24___iter__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_24___iter__ *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_24___iter__ *)o;
  tmp = ((PyObject*)p->__pyx_v_fields);
  p->__pyx_v_fields = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_info_types);
  p->__pyx_v_info_types = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct_24___iter__ = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct_24___iter__"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_24___iter__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_24___iter__, /*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_24___iter__, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct_24___iter__, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*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_24___iter__, /*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
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5vcfnp___pyx_scope_struct_25_genexpr *__pyx_freelist_5vcfnp___pyx_scope_struct_25_genexpr[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct_25_genexpr = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_25_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct_25_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_25_genexpr)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct_25_genexpr[--__pyx_freecount_5vcfnp___pyx_scope_struct_25_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_25_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_25_genexpr(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_25_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_25_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_f);
  Py_CLEAR(p->__pyx_t_0);
  if ((__pyx_freecount_5vcfnp___pyx_scope_struct_25_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_25_genexpr))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct_25_genexpr[__pyx_freecount_5vcfnp___pyx_scope_struct_25_genexpr++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_25_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct_25_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_25_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_25_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_f) {
    e = (*v)(p->__pyx_v_f, 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_25_genexpr(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_25_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_25_genexpr *)o;
  tmp = ((PyObject*)p->__pyx_outer_scope);
  p->__pyx_outer_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_24___iter__ *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_f);
  p->__pyx_v_f = 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 PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct_25_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct_25_genexpr"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_25_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_25_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_25_genexpr, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct_25_genexpr, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*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_25_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
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5vcfnp___pyx_scope_struct_26_genexpr *__pyx_freelist_5vcfnp___pyx_scope_struct_26_genexpr[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct_26_genexpr = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_26_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct_26_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_26_genexpr)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct_26_genexpr[--__pyx_freecount_5vcfnp___pyx_scope_struct_26_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_26_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_26_genexpr(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_26_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_26_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_f);
  Py_CLEAR(p->__pyx_t_0);
  if ((__pyx_freecount_5vcfnp___pyx_scope_struct_26_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_26_genexpr))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct_26_genexpr[__pyx_freecount_5vcfnp___pyx_scope_struct_26_genexpr++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_26_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct_26_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_26_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_26_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_f) {
    e = (*v)(p->__pyx_v_f, 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_26_genexpr(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_26_genexpr *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_26_genexpr *)o;
  tmp = ((PyObject*)p->__pyx_outer_scope);
  p->__pyx_outer_scope = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_24___iter__ *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_f);
  p->__pyx_v_f = 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 PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct_26_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct_26_genexpr"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_26_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_26_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_26_genexpr, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct_26_genexpr, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*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_26_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
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5vcfnp___pyx_scope_struct_27_itervariantstable *__pyx_freelist_5vcfnp___pyx_scope_struct_27_itervariantstable[8];
static int __pyx_freecount_5vcfnp___pyx_scope_struct_27_itervariantstable = 0;

static PyObject *__pyx_tp_new_5vcfnp___pyx_scope_struct_27_itervariantstable(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((__pyx_freecount_5vcfnp___pyx_scope_struct_27_itervariantstable > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_27_itervariantstable)))) {
    o = (PyObject*)__pyx_freelist_5vcfnp___pyx_scope_struct_27_itervariantstable[--__pyx_freecount_5vcfnp___pyx_scope_struct_27_itervariantstable];
    memset(o, 0, sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_27_itervariantstable));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_27_itervariantstable(PyObject *o) {
  struct __pyx_obj_5vcfnp___pyx_scope_struct_27_itervariantstable *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_27_itervariantstable *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_arities);
  Py_CLEAR(p->__pyx_v_current_filename);
  Py_CLEAR(p->__pyx_v_fields);
  Py_CLEAR(p->__pyx_v_filenames);
  Py_CLEAR(p->__pyx_v_fill);
  Py_CLEAR(p->__pyx_v_filter_ids);
  Py_CLEAR(p->__pyx_v_flatten_filter);
  Py_CLEAR(p->__pyx_v_info_types);
  Py_CLEAR(p->__pyx_v_parse_info);
  Py_CLEAR(p->__pyx_v_region);
  Py_CLEAR(p->__pyx_t_0);
  if ((__pyx_freecount_5vcfnp___pyx_scope_struct_27_itervariantstable < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_27_itervariantstable))) {
    __pyx_freelist_5vcfnp___pyx_scope_struct_27_itervariantstable[__pyx_freecount_5vcfnp___pyx_scope_struct_27_itervariantstable++] = ((struct __pyx_obj_5vcfnp___pyx_scope_struct_27_itervariantstable *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vcfnp___pyx_scope_struct_27_itervariantstable(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_27_itervariantstable *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_27_itervariantstable *)o;
  if (p->__pyx_v_arities) {
    e = (*v)(p->__pyx_v_arities, 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_fields) {
    e = (*v)(p->__pyx_v_fields, 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_fill) {
    e = (*v)(p->__pyx_v_fill, a); if (e) return e;
  }
  if (p->__pyx_v_filter_ids) {
    e = (*v)(p->__pyx_v_filter_ids, a); if (e) return e;
  }
  if (p->__pyx_v_flatten_filter) {
    e = (*v)(p->__pyx_v_flatten_filter, a); if (e) return e;
  }
  if (p->__pyx_v_info_types) {
    e = (*v)(p->__pyx_v_info_types, a); if (e) return e;
  }
  if (p->__pyx_v_parse_info) {
    e = (*v)(p->__pyx_v_parse_info, 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_27_itervariantstable(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vcfnp___pyx_scope_struct_27_itervariantstable *p = (struct __pyx_obj_5vcfnp___pyx_scope_struct_27_itervariantstable *)o;
  tmp = ((PyObject*)p->__pyx_v_arities);
  p->__pyx_v_arities = 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_fields);
  p->__pyx_v_fields = 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_fill);
  p->__pyx_v_fill = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_filter_ids);
  p->__pyx_v_filter_ids = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_flatten_filter);
  p->__pyx_v_flatten_filter = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_info_types);
  p->__pyx_v_info_types = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_parse_info);
  p->__pyx_v_parse_info = 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 PyTypeObject __pyx_type_5vcfnp___pyx_scope_struct_27_itervariantstable = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("vcfnp.__pyx_scope_struct_27_itervariantstable"), /*tp_name*/
  sizeof(struct __pyx_obj_5vcfnp___pyx_scope_struct_27_itervariantstable), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vcfnp___pyx_scope_struct_27_itervariantstable, /*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_27_itervariantstable, /*tp_traverse*/
  __pyx_tp_clear_5vcfnp___pyx_scope_struct_27_itervariantstable, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*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_27_itervariantstable, /*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
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #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_Utility_functions_to_extract_da), /* 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_1_9, __pyx_k_1_9, sizeof(__pyx_k_1_9), 0, 0, 1, 0},
  {&__pyx_n_s_A, __pyx_k_A, sizeof(__pyx_k_A), 0, 0, 1, 1},
  {&__pyx_n_s_ABHet, __pyx_k_ABHet, sizeof(__pyx_k_ABHet), 0, 0, 1, 1},
  {&__pyx_n_s_ABHom, __pyx_k_ABHom, sizeof(__pyx_k_ABHom), 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_s_AF, __pyx_k_AF, sizeof(__pyx_k_AF), 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_BaseQRankSum, __pyx_k_BaseQRankSum, sizeof(__pyx_k_BaseQRankSum), 0, 0, 1, 1},
  {&__pyx_n_s_C, __pyx_k_C, sizeof(__pyx_k_C), 0, 0, 1, 1},
  {&__pyx_n_s_C2d, __pyx_k_C2d, sizeof(__pyx_k_C2d), 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_ClippingRankSum, __pyx_k_ClippingRankSum, sizeof(__pyx_k_ClippingRankSum), 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_CALLDATA_ARITY, __pyx_k_DEFAULT_CALLDATA_ARITY, sizeof(__pyx_k_DEFAULT_CALLDATA_ARITY), 0, 0, 1, 1},
  {&__pyx_n_s_DEFAULT_CALLDATA_DTYPE, __pyx_k_DEFAULT_CALLDATA_DTYPE, sizeof(__pyx_k_DEFAULT_CALLDATA_DTYPE), 0, 0, 1, 1},
  {&__pyx_n_s_DEFAULT_CALLDATA_FILL, __pyx_k_DEFAULT_CALLDATA_FILL, sizeof(__pyx_k_DEFAULT_CALLDATA_FILL), 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_DEFAULT_VARIANT_ARITY, __pyx_k_DEFAULT_VARIANT_ARITY, sizeof(__pyx_k_DEFAULT_VARIANT_ARITY), 0, 0, 1, 1},
  {&__pyx_n_s_DEFAULT_VARIANT_DTYPE, __pyx_k_DEFAULT_VARIANT_DTYPE, sizeof(__pyx_k_DEFAULT_VARIANT_DTYPE), 0, 0, 1, 1},
  {&__pyx_n_s_DEFAULT_VARIANT_FILL, __pyx_k_DEFAULT_VARIANT_FILL, sizeof(__pyx_k_DEFAULT_VARIANT_FILL), 0, 0, 1, 1},
  {&__pyx_n_s_DP, __pyx_k_DP, sizeof(__pyx_k_DP), 0, 0, 1, 1},
  {&__pyx_n_s_Dels, __pyx_k_Dels, sizeof(__pyx_k_Dels), 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_FILTER_2, __pyx_k_FILTER_2, sizeof(__pyx_k_FILTER_2), 0, 0, 1, 1},
  {&__pyx_n_s_FS, __pyx_k_FS, sizeof(__pyx_k_FS), 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_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0},
  {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0},
  {&__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_s_HaplotypeScore, __pyx_k_HaplotypeScore, sizeof(__pyx_k_HaplotypeScore), 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_InbreedingCoeff, __pyx_k_InbreedingCoeff, sizeof(__pyx_k_InbreedingCoeff), 0, 0, 1, 1},
  {&__pyx_n_s_Integer, __pyx_k_Integer, sizeof(__pyx_k_Integer), 0, 0, 1, 1},
  {&__pyx_kp_u_Load_a_numpy_1_dimensional_stru, __pyx_k_Load_a_numpy_1_dimensional_stru, sizeof(__pyx_k_Load_a_numpy_1_dimensional_stru), 0, 1, 0, 0},
  {&__pyx_kp_u_Load_an_numpy_structured_array, __pyx_k_Load_an_numpy_structured_array, sizeof(__pyx_k_Load_an_numpy_structured_array), 0, 1, 0, 0},
  {&__pyx_n_s_MLEAC, __pyx_k_MLEAC, sizeof(__pyx_k_MLEAC), 0, 0, 1, 1},
  {&__pyx_n_s_MLEAF, __pyx_k_MLEAF, sizeof(__pyx_k_MLEAF), 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_MQ0Fraction, __pyx_k_MQ0Fraction, sizeof(__pyx_k_MQ0Fraction), 0, 0, 1, 1},
  {&__pyx_n_s_MQRankSum, __pyx_k_MQRankSum, sizeof(__pyx_k_MQRankSum), 0, 0, 1, 1},
  {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0},
  {&__pyx_n_s_OND, __pyx_k_OND, sizeof(__pyx_k_OND), 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_RU, __pyx_k_RU, sizeof(__pyx_k_RU), 0, 0, 1, 1},
  {&__pyx_n_s_ReadPosRankSum, __pyx_k_ReadPosRankSum, sizeof(__pyx_k_ReadPosRankSum), 0, 0, 1, 1},
  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
  {&__pyx_n_s_STANDARD_CALLDATA_FIELDS, __pyx_k_STANDARD_CALLDATA_FIELDS, sizeof(__pyx_k_STANDARD_CALLDATA_FIELDS), 0, 0, 1, 1},
  {&__pyx_n_s_STANDARD_VARIANT_FIELDS, __pyx_k_STANDARD_VARIANT_FIELDS, sizeof(__pyx_k_STANDARD_VARIANT_FIELDS), 0, 0, 1, 1},
  {&__pyx_n_s_StopIteration, __pyx_k_StopIteration, sizeof(__pyx_k_StopIteration), 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_kp_u_Utility_function_to_view_a_stru, __pyx_k_Utility_function_to_view_a_stru, sizeof(__pyx_k_Utility_function_to_view_a_stru), 0, 1, 0, 0},
  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {&__pyx_n_s_VariantType, __pyx_k_VariantType, sizeof(__pyx_k_VariantType), 0, 0, 1, 1},
  {&__pyx_n_s_VariantsTable, __pyx_k_VariantsTable, sizeof(__pyx_k_VariantsTable), 0, 0, 1, 1},
  {&__pyx_n_s_VariantsTable___init, __pyx_k_VariantsTable___init, sizeof(__pyx_k_VariantsTable___init), 0, 0, 1, 1},
  {&__pyx_n_s_VariantsTable___iter, __pyx_k_VariantsTable___iter, sizeof(__pyx_k_VariantsTable___iter), 0, 0, 1, 1},
  {&__pyx_kp_s_WARNING_duplicate_definition_in, __pyx_k_WARNING_duplicate_definition_in, sizeof(__pyx_k_WARNING_duplicate_definition_in), 0, 0, 1, 0},
  {&__pyx_kp_s_WARNING_no_INFO_definition_found, __pyx_k_WARNING_no_INFO_definition_found, sizeof(__pyx_k_WARNING_no_INFO_definition_found), 0, 0, 1, 0},
  {&__pyx_kp_s_WARNING_no_definition_found_for, __pyx_k_WARNING_no_definition_found_for, sizeof(__pyx_k_WARNING_no_definition_found_for), 0, 0, 1, 0},
  {&__pyx_kp_s__13, __pyx_k__13, sizeof(__pyx_k__13), 0, 0, 1, 0},
  {&__pyx_kp_b__14, __pyx_k__14, sizeof(__pyx_k__14), 0, 0, 0, 0},
  {&__pyx_kp_s__14, __pyx_k__14, sizeof(__pyx_k__14), 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_kp_s__24, __pyx_k__24, sizeof(__pyx_k__24), 0, 0, 1, 0},
  {&__pyx_kp_s__28, __pyx_k__28, sizeof(__pyx_k__28), 0, 0, 1, 0},
  {&__pyx_kp_s__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 0},
  {&__pyx_kp_s__33, __pyx_k__33, sizeof(__pyx_k__33), 0, 0, 1, 0},
  {&__pyx_kp_b__42, __pyx_k__42, sizeof(__pyx_k__42), 0, 0, 0, 0},
  {&__pyx_kp_s__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 0, 1, 0},
  {&__pyx_n_s__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 0, 1, 1},
  {&__pyx_kp_s__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 0, 1, 0},
  {&__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_kp_s_a_d, __pyx_k_a_d, sizeof(__pyx_k_a_d), 0, 0, 1, 0},
  {&__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_any, __pyx_k_any, sizeof(__pyx_k_any), 0, 0, 1, 1},
  {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 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_build_calldata, __pyx_k_build_calldata, sizeof(__pyx_k_build_calldata), 0, 0, 1, 1},
  {&__pyx_n_s_build_calldata_2d, __pyx_k_build_calldata_2d, sizeof(__pyx_k_build_calldata_2d), 0, 0, 1, 1},
  {&__pyx_n_s_build_variants, __pyx_k_build_variants, sizeof(__pyx_k_build_variants), 0, 0, 1, 1},
  {&__pyx_n_s_cache, __pyx_k_cache, sizeof(__pyx_k_cache), 0, 0, 1, 1},
  {&__pyx_n_s_cache_fn, __pyx_k_cache_fn, sizeof(__pyx_k_cache_fn), 0, 0, 1, 1},
  {&__pyx_n_s_cachedir, __pyx_k_cachedir, sizeof(__pyx_k_cachedir), 0, 0, 1, 1},
  {&__pyx_n_s_cachedir_suffix, __pyx_k_cachedir_suffix, sizeof(__pyx_k_cachedir_suffix), 0, 0, 1, 1},
  {&__pyx_kp_s_caching_only_supported_when_load, __pyx_k_caching_only_supported_when_load, sizeof(__pyx_k_caching_only_supported_when_load), 0, 0, 1, 0},
  {&__pyx_n_s_calldata, __pyx_k_calldata, sizeof(__pyx_k_calldata), 0, 0, 1, 1},
  {&__pyx_n_s_calldata_2d, __pyx_k_calldata_2d, sizeof(__pyx_k_calldata_2d), 0, 0, 1, 1},
  {&__pyx_n_s_calldata_arities, __pyx_k_calldata_arities, sizeof(__pyx_k_calldata_arities), 0, 0, 1, 1},
  {&__pyx_n_s_calldata_dtype, __pyx_k_calldata_dtype, sizeof(__pyx_k_calldata_dtype), 0, 0, 1, 1},
  {&__pyx_n_s_calldata_fields, __pyx_k_calldata_fields, sizeof(__pyx_k_calldata_fields), 0, 0, 1, 1},
  {&__pyx_n_s_calldata_fills, __pyx_k_calldata_fills, sizeof(__pyx_k_calldata_fills), 0, 0, 1, 1},
  {&__pyx_kp_u_calldata_line_964, __pyx_k_calldata_line_964, sizeof(__pyx_k_calldata_line_964), 0, 1, 0, 0},
  {&__pyx_n_s_cell_dtype, __pyx_k_cell_dtype, sizeof(__pyx_k_cell_dtype), 0, 0, 1, 1},
  {&__pyx_n_s_chain, __pyx_k_chain, sizeof(__pyx_k_chain), 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_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
  {&__pyx_n_s_datetime, __pyx_k_datetime, sizeof(__pyx_k_datetime), 0, 0, 1, 1},
  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 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_eff_default_transformer, __pyx_k_eff_default_transformer, sizeof(__pyx_k_eff_default_transformer), 0, 0, 1, 1},
  {&__pyx_n_s_eff_default_transformer_locals, __pyx_k_eff_default_transformer_locals, sizeof(__pyx_k_eff_default_transformer_locals), 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_fieldspec, __pyx_k_fieldspec, sizeof(__pyx_k_fieldspec), 0, 0, 1, 1},
  {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1},
  {&__pyx_kp_s_file_not_found_s, __pyx_k_file_not_found_s, sizeof(__pyx_k_file_not_found_s), 0, 0, 1, 0},
  {&__pyx_n_s_filename, __pyx_k_filename, sizeof(__pyx_k_filename), 0, 0, 1, 1},
  {&__pyx_kp_s_filename_argument_must_be_basest, __pyx_k_filename_argument_must_be_basest, sizeof(__pyx_k_filename_argument_must_be_basest), 0, 0, 1, 0},
  {&__pyx_n_s_filenames, __pyx_k_filenames, sizeof(__pyx_k_filenames), 0, 0, 1, 1},
  {&__pyx_n_s_filenames_from_arg, __pyx_k_filenames_from_arg, sizeof(__pyx_k_filenames_from_arg), 0, 0, 1, 1},
  {&__pyx_n_s_fill, __pyx_k_fill, sizeof(__pyx_k_fill), 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_filter_ids, __pyx_k_filter_ids, sizeof(__pyx_k_filter_ids), 0, 0, 1, 1},
  {&__pyx_n_s_flatten_filter, __pyx_k_flatten_filter, sizeof(__pyx_k_flatten_filter), 0, 0, 1, 1},
  {&__pyx_n_s_flt, __pyx_k_flt, sizeof(__pyx_k_flt), 0, 0, 1, 1},
  {&__pyx_n_s_flush, __pyx_k_flush, sizeof(__pyx_k_flush), 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_fromiter_2, __pyx_k_fromiter_2, sizeof(__pyx_k_fromiter_2), 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_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
  {&__pyx_n_s_getmtime, __pyx_k_getmtime, sizeof(__pyx_k_getmtime), 0, 0, 1, 1},
  {&__pyx_n_s_group, __pyx_k_group, sizeof(__pyx_k_group), 0, 0, 1, 1},
  {&__pyx_n_s_header, __pyx_k_header, sizeof(__pyx_k_header), 0, 0, 1, 1},
  {&__pyx_kp_s_home_aliman_src_github_alimanfo, __pyx_k_home_aliman_src_github_alimanfo, sizeof(__pyx_k_home_aliman_src_github_alimanfo), 0, 0, 1, 0},
  {&__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_import, __pyx_k_import, sizeof(__pyx_k_import), 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_s_info_ids, __pyx_k_info_ids, sizeof(__pyx_k_info_ids), 0, 0, 1, 1},
  {&__pyx_n_s_info_transformers, __pyx_k_info_transformers, sizeof(__pyx_k_info_transformers), 0, 0, 1, 1},
  {&__pyx_n_s_info_types, __pyx_k_info_types, sizeof(__pyx_k_info_types), 0, 0, 1, 1},
  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 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_isdir, __pyx_k_isdir, sizeof(__pyx_k_isdir), 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_iter, __pyx_k_iter, sizeof(__pyx_k_iter), 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_iterable, __pyx_k_iterable, sizeof(__pyx_k_iterable), 0, 0, 1, 1},
  {&__pyx_n_s_itercalldata, __pyx_k_itercalldata, sizeof(__pyx_k_itercalldata), 0, 0, 1, 1},
  {&__pyx_n_s_itercalldata_with_condition, __pyx_k_itercalldata_with_condition, sizeof(__pyx_k_itercalldata_with_condition), 0, 0, 1, 1},
  {&__pyx_n_s_itertools, __pyx_k_itertools, sizeof(__pyx_k_itertools), 0, 0, 1, 1},
  {&__pyx_n_s_itervariants, __pyx_k_itervariants, sizeof(__pyx_k_itervariants), 0, 0, 1, 1},
  {&__pyx_n_s_itervariants_with_condition, __pyx_k_itervariants_with_condition, sizeof(__pyx_k_itervariants_with_condition), 0, 0, 1, 1},
  {&__pyx_n_s_itervariantstable, __pyx_k_itervariantstable, sizeof(__pyx_k_itervariantstable), 0, 0, 1, 1},
  {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
  {&__pyx_n_s_kwargs, __pyx_k_kwargs, sizeof(__pyx_k_kwargs), 0, 0, 1, 1},
  {&__pyx_n_s_load, __pyx_k_load, sizeof(__pyx_k_load), 0, 0, 1, 1},
  {&__pyx_kp_s_loading_calldata_from, __pyx_k_loading_calldata_from, sizeof(__pyx_k_loading_calldata_from), 0, 0, 1, 0},
  {&__pyx_kp_s_loading_from_cache, __pyx_k_loading_from_cache, sizeof(__pyx_k_loading_from_cache), 0, 0, 1, 0},
  {&__pyx_kp_s_loading_variants_from, __pyx_k_loading_variants_from, sizeof(__pyx_k_loading_variants_from), 0, 0, 1, 0},
  {&__pyx_n_s_log, __pyx_k_log, sizeof(__pyx_k_log), 0, 0, 1, 1},
  {&__pyx_n_s_logstream, __pyx_k_logstream, sizeof(__pyx_k_logstream), 0, 0, 1, 1},
  {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_makedirs, __pyx_k_makedirs, sizeof(__pyx_k_makedirs), 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_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
  {&__pyx_n_s_mk_cache_fn, __pyx_k_mk_cache_fn, sizeof(__pyx_k_mk_cache_fn), 0, 0, 1, 1},
  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
  {&__pyx_n_s_msg, __pyx_k_msg, sizeof(__pyx_k_msg), 0, 0, 1, 1},
  {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1},
  {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0},
  {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0},
  {&__pyx_n_s_nm, __pyx_k_nm, sizeof(__pyx_k_nm), 0, 0, 1, 1},
  {&__pyx_kp_s_no_cache_file_found_or_cache_out, __pyx_k_no_cache_file_found_or_cache_out, sizeof(__pyx_k_no_cache_file_found_or_cache_out), 0, 0, 1, 0},
  {&__pyx_n_s_now, __pyx_k_now, sizeof(__pyx_k_now), 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_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
  {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
  {&__pyx_n_s_parseInfo, __pyx_k_parseInfo, sizeof(__pyx_k_parseInfo), 0, 0, 1, 1},
  {&__pyx_n_s_parse_info, __pyx_k_parse_info, sizeof(__pyx_k_parse_info), 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_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 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_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 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_region_set, __pyx_k_region_set, sizeof(__pyx_k_region_set), 0, 0, 1, 1},
  {&__pyx_n_s_replace, __pyx_k_replace, sizeof(__pyx_k_replace), 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_kp_s_s_npy, __pyx_k_s_npy, sizeof(__pyx_k_s_npy), 0, 0, 1, 0},
  {&__pyx_kp_s_s_rows_in_2fs_batch_in_2fs_d_ro, __pyx_k_s_rows_in_2fs_batch_in_2fs_d_ro, sizeof(__pyx_k_s_rows_in_2fs_batch_in_2fs_d_ro), 0, 0, 1, 0},
  {&__pyx_kp_s_s_rows_in_2fs_d_rows_s, __pyx_k_s_rows_in_2fs_d_rows_s, sizeof(__pyx_k_s_rows_in_2fs_d_rows_s), 0, 0, 1, 0},
  {&__pyx_kp_s_s_s_npy, __pyx_k_s_s_npy, sizeof(__pyx_k_s_s_npy), 0, 0, 1, 0},
  {&__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_save, __pyx_k_save, sizeof(__pyx_k_save), 0, 0, 1, 1},
  {&__pyx_kp_s_saving_to_cache, __pyx_k_saving_to_cache, sizeof(__pyx_k_saving_to_cache), 0, 0, 1, 0},
  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
  {&__pyx_n_s_setup_variants, __pyx_k_setup_variants, sizeof(__pyx_k_setup_variants), 0, 0, 1, 1},
  {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
  {&__pyx_n_s_skip_cached, __pyx_k_skip_cached, sizeof(__pyx_k_skip_cached), 0, 0, 1, 1},
  {&__pyx_kp_s_skipping_from_cache, __pyx_k_skipping_from_cache, sizeof(__pyx_k_skipping_from_cache), 0, 0, 1, 0},
  {&__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_b_svlen, __pyx_k_svlen, sizeof(__pyx_k_svlen), 0, 0, 0, 1},
  {&__pyx_n_s_svlen, __pyx_k_svlen, sizeof(__pyx_k_svlen), 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_test, __pyx_k_test, sizeof(__pyx_k_test), 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_transformer, __pyx_k_transformer, sizeof(__pyx_k_transformer), 0, 0, 1, 1},
  {&__pyx_n_s_transformers, __pyx_k_transformers, sizeof(__pyx_k_transformers), 0, 0, 1, 1},
  {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 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_kp_s_unexpected_error_cache_directory, __pyx_k_unexpected_error_cache_directory, sizeof(__pyx_k_unexpected_error_cache_directory), 0, 0, 1, 0},
  {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0},
  {&__pyx_kp_s_unknown_sample_s, __pyx_k_unknown_sample_s, sizeof(__pyx_k_unknown_sample_s), 0, 0, 1, 0},
  {&__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_variants_arities, __pyx_k_variants_arities, sizeof(__pyx_k_variants_arities), 0, 0, 1, 1},
  {&__pyx_n_s_variants_dtype, __pyx_k_variants_dtype, sizeof(__pyx_k_variants_dtype), 0, 0, 1, 1},
  {&__pyx_n_s_variants_fields, __pyx_k_variants_fields, sizeof(__pyx_k_variants_fields), 0, 0, 1, 1},
  {&__pyx_n_s_variants_fills, __pyx_k_variants_fills, sizeof(__pyx_k_variants_fills), 0, 0, 1, 1},
  {&__pyx_kp_u_variants_line_372, __pyx_k_variants_line_372, sizeof(__pyx_k_variants_line_372), 0, 1, 0, 0},
  {&__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_fn, __pyx_k_vcf_fn, sizeof(__pyx_k_vcf_fn), 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_kp_s_vcfnp, __pyx_k_vcfnp, sizeof(__pyx_k_vcfnp), 0, 0, 1, 0},
  {&__pyx_n_s_vcfnp_2, __pyx_k_vcfnp_2, sizeof(__pyx_k_vcfnp_2), 0, 0, 1, 1},
  {&__pyx_kp_s_vcfnp_cache, __pyx_k_vcfnp_cache, sizeof(__pyx_k_vcfnp_cache), 0, 0, 1, 0},
  {&__pyx_n_s_verbose, __pyx_k_verbose, sizeof(__pyx_k_verbose), 0, 0, 1, 1},
  {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 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_kp_u_view2d_line_1556, __pyx_k_view2d_line_1556, sizeof(__pyx_k_view2d_line_1556), 0, 1, 0, 0},
  {&__pyx_n_s_visited, __pyx_k_visited, sizeof(__pyx_k_visited), 0, 0, 1, 1},
  {&__pyx_n_s_warn_duplicates, __pyx_k_warn_duplicates, sizeof(__pyx_k_warn_duplicates), 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_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; __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 = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_Exception = __Pyx_GetBuiltinName(__pyx_n_s_Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __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 = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_any = __Pyx_GetBuiltinName(__pyx_n_s_any); if (!__pyx_builtin_any) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __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 = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __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 = 767; __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":302
 *         filenames = filename
 *     else:
 *         raise Exception('filename argument must be basestring, list or tuple')             # <<<<<<<<<<<<<<
 *     for fn in filenames:
 *         if not os.path.exists(fn):
 */
  __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_filename_argument_must_be_basest); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple_);
  __Pyx_GIVEREF(__pyx_tuple_);

  /* "vcfnp.pyx":473
 * 
 *         if isinstance(filename, (list, tuple)):
 *             raise Exception('caching only supported when loading from a single VCF file')             # <<<<<<<<<<<<<<
 * 
 *         cache_fn = _mk_cache_fn(filename, type='variants', region=region, cachedir=cachedir)
 */
  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_caching_only_supported_when_load); if (unlikely(!__pyx_tuple__5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__5);
  __Pyx_GIVEREF(__pyx_tuple__5);

  /* "vcfnp.pyx":544
 *         cache_fn = os.path.join(cachedir, '%s.npy' % type)
 *     else:
 *         region = region.replace(':', '_').replace('-', '_')             # <<<<<<<<<<<<<<
 *         cache_fn = os.path.join(cachedir, '%s.%s.npy' % (type, region))
 *     return cache_fn
 */
  __pyx_tuple__8 = PyTuple_Pack(2, __pyx_kp_s__6, __pyx_n_s__7); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__8);
  __Pyx_GIVEREF(__pyx_tuple__8);
  __pyx_tuple__10 = PyTuple_Pack(2, __pyx_kp_s__9, __pyx_n_s__7); if (unlikely(!__pyx_tuple__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);

  /* "vcfnp.pyx":1132
 * 
 *         if isinstance(filename, (list, tuple)):
 *             raise Exception('caching only supported when loading from a single VCF file')             # <<<<<<<<<<<<<<
 * 
 *         cache_fn = _mk_cache_fn(filename, type='calldata', region=region, cachedir=cachedir)
 */
  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_caching_only_supported_when_load); if (unlikely(!__pyx_tuple__16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__16);
  __Pyx_GIVEREF(__pyx_tuple__16);

  /* "vcfnp.pyx":1341
 * 
 *         if isinstance(filename, (list, tuple)):
 *             raise Exception('caching only supported when loading from a single VCF file')             # <<<<<<<<<<<<<<
 * 
 *         cache_fn = _mk_cache_fn(filename, type='calldata_2d', region=region, cachedir=cachedir)
 */
  __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_caching_only_supported_when_load); if (unlikely(!__pyx_tuple__19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__19);
  __Pyx_GIVEREF(__pyx_tuple__19);

  /* "vcfnp.pyx":1533
 *             return -1
 *         else:
 *             return (-1,) * ploidy             # <<<<<<<<<<<<<<
 *     else:
 *         split(gts.at(0), GT_DELIMS, allele_strings)
 */
  __pyx_tuple__21 = PyTuple_New(1); if (unlikely(!__pyx_tuple__21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__21);
  __Pyx_INCREF(__pyx_int_neg_1);
  PyTuple_SET_ITEM(__pyx_tuple__21, 0, __pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_tuple__21);

  /* "vcfnp.pyx":1676
 *                 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_slice__23 = PySlice_New(Py_None, __pyx_int_11, Py_None); if (unlikely(!__pyx_slice__23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__23);
  __Pyx_GIVEREF(__pyx_slice__23);

  /* "vcfnp.pyx":1670
 *         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_tuple__25 = PyTuple_Pack(1, __pyx_int_1); if (unlikely(!__pyx_tuple__25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__25);
  __Pyx_GIVEREF(__pyx_tuple__25);
  __pyx_tuple__26 = PyTuple_Pack(1, __pyx_int_2); if (unlikely(!__pyx_tuple__26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__26);
  __Pyx_GIVEREF(__pyx_tuple__26);
  __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_s__20); if (unlikely(!__pyx_tuple__27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__27);
  __Pyx_GIVEREF(__pyx_tuple__27);

  /* "vcfnp.pyx":1664
 * 
 *     """
 *     prog_eff_main = re.compile(r'([^(]+)\(([^)]+)\)')             # <<<<<<<<<<<<<<
 *     def _transformer(vals):
 *         if len(vals) == 0:
 */
  __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_s__28); if (unlikely(!__pyx_tuple__29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__29);
  __Pyx_GIVEREF(__pyx_tuple__29);

  /* "vcfnp.pyx":1665
 *     """
 *     prog_eff_main = re.compile(r'([^(]+)\(([^)]+)\)')
 *     def _transformer(vals):             # <<<<<<<<<<<<<<
 *         if len(vals) == 0:
 *             return fills
 */
  __pyx_tuple__30 = PyTuple_Pack(6, __pyx_n_s_vals, __pyx_n_s_match_eff_main, __pyx_n_s_eff, __pyx_n_s_result, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__30);
  __Pyx_GIVEREF(__pyx_tuple__30);
  __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_aliman_src_github_alimanfo, __pyx_n_s_transformer, 1665, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":1726
 *         # turn arities into tuple for convenience
 *         if self.arities is None:
 *             arities = (None,) * len(fields)             # <<<<<<<<<<<<<<
 *         else:
 *             arities = tuple(self.arities.get(f) for f in fields)
 */
  __pyx_tuple__32 = PyTuple_New(1); if (unlikely(!__pyx_tuple__32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__32);
  __Pyx_INCREF(Py_None);
  PyTuple_SET_ITEM(__pyx_tuple__32, 0, Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GIVEREF(__pyx_tuple__32);

  /* "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_tuple__34 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__34)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__34);
  __Pyx_GIVEREF(__pyx_tuple__34);

  /* "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_tuple__35 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__35)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__35);
  __Pyx_GIVEREF(__pyx_tuple__35);

  /* "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_tuple__36 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__36)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);

  /* "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_tuple__37 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__37)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__37);
  __Pyx_GIVEREF(__pyx_tuple__37);

  /* "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_tuple__38 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__38)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__38);
  __Pyx_GIVEREF(__pyx_tuple__38);

  /* "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_tuple__39 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__39)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__39);
  __Pyx_GIVEREF(__pyx_tuple__39);

  /* "vcfnp.pyx":58
 * # these are the possible fields in the variants array
 * STANDARD_VARIANT_FIELDS = (
 *     'CHROM', 'POS', 'ID', 'REF', 'ALT', 'QUAL', 'FILTER',             # <<<<<<<<<<<<<<
 *     'num_alleles', 'is_snp', 'svlen'
 * )
 */
  __pyx_tuple__40 = PyTuple_Pack(10, __pyx_n_s_CHROM, __pyx_n_s_POS, __pyx_n_s_ID, __pyx_n_s_REF, __pyx_n_s_ALT, __pyx_n_s_QUAL, __pyx_n_s_FILTER, __pyx_n_s_num_alleles, __pyx_n_s_is_snp, __pyx_n_s_svlen); if (unlikely(!__pyx_tuple__40)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__40);
  __Pyx_GIVEREF(__pyx_tuple__40);

  /* "vcfnp.pyx":153
 * 
 * 
 * STANDARD_CALLDATA_FIELDS = ('is_called', 'is_phased', 'genotype')             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__41 = PyTuple_Pack(3, __pyx_n_s_is_called, __pyx_n_s_is_phased, __pyx_n_s_genotype); if (unlikely(!__pyx_tuple__41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__41);
  __Pyx_GIVEREF(__pyx_tuple__41);

  /* "vcfnp.pyx":206
 * 
 * 
 * def _variants_fields(fields, exclude_fields, infoIds):             # <<<<<<<<<<<<<<
 *     if fields is None:
 *         fields = STANDARD_VARIANT_FIELDS + infoIds
 */
  __pyx_tuple__43 = PyTuple_Pack(4, __pyx_n_s_fields, __pyx_n_s_exclude_fields, __pyx_n_s_infoIds, __pyx_n_s_f); if (unlikely(!__pyx_tuple__43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__43);
  __Pyx_GIVEREF(__pyx_tuple__43);
  __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_aliman_src_github_alimanfo, __pyx_n_s_variants_fields, 206, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":219
 * 
 * 
 * def _variants_arities(fields, arities, infoCounts):             # <<<<<<<<<<<<<<
 *     if arities is None:
 *         arities = dict()
 */
  __pyx_tuple__45 = PyTuple_Pack(7, __pyx_n_s_fields, __pyx_n_s_arities, __pyx_n_s_infoCounts, __pyx_n_s_f, __pyx_n_s_vcf_count, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__45)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__45);
  __Pyx_GIVEREF(__pyx_tuple__45);
  __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_aliman_src_github_alimanfo, __pyx_n_s_variants_arities, 219, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":240
 * 
 * 
 * def _variants_fills(fields, fills, infoTypes):             # <<<<<<<<<<<<<<
 *     if fills is None:
 *         fills = dict()
 */
  __pyx_tuple__47 = PyTuple_Pack(7, __pyx_n_s_fields, __pyx_n_s_fills, __pyx_n_s_infoTypes, __pyx_n_s_f, __pyx_n_s_vcf_type, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__47);
  __Pyx_GIVEREF(__pyx_tuple__47);
  __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_aliman_src_github_alimanfo, __pyx_n_s_variants_fills, 240, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":255
 * 
 * 
 * def _info_transformers(fields, transformers):             # <<<<<<<<<<<<<<
 *     if transformers is None:
 *         transformers = dict()
 */
  __pyx_tuple__49 = PyTuple_Pack(5, __pyx_n_s_fields, __pyx_n_s_transformers, __pyx_n_s_f, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__49)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__49);
  __Pyx_GIVEREF(__pyx_tuple__49);
  __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_aliman_src_github_alimanfo, __pyx_n_s_info_transformers, 255, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":264
 * 
 * 
 * def _variants_dtype(fields, dtypes, arities, filterIds, flatten_filter, infoTypes):             # <<<<<<<<<<<<<<
 * 
 *     dtype = list()
 */
  __pyx_tuple__51 = PyTuple_Pack(13, __pyx_n_s_fields, __pyx_n_s_dtypes, __pyx_n_s_arities, __pyx_n_s_filterIds, __pyx_n_s_flatten_filter, __pyx_n_s_infoTypes, __pyx_n_s_dtype, __pyx_n_s_f, __pyx_n_s_n, __pyx_n_s_vcf_type, __pyx_n_s_flt, __pyx_n_s_nm, __pyx_n_s_t); if (unlikely(!__pyx_tuple__51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__51);
  __Pyx_GIVEREF(__pyx_tuple__51);
  __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(6, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_aliman_src_github_alimanfo, __pyx_n_s_variants_dtype, 264, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":296
 * 
 * 
 * def _filenames_from_arg(filename):             # <<<<<<<<<<<<<<
 *     if isinstance(filename, basestring):
 *         filenames = [filename]
 */
  __pyx_tuple__53 = PyTuple_Pack(3, __pyx_n_s_filename, __pyx_n_s_filenames, __pyx_n_s_fn); if (unlikely(!__pyx_tuple__53)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__53);
  __Pyx_GIVEREF(__pyx_tuple__53);
  __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_aliman_src_github_alimanfo, __pyx_n_s_filenames_from_arg, 296, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":309
 * 
 * 
 * def _setup_variants(filename,             # <<<<<<<<<<<<<<
 *                     region,
 *                     fields,
 */
  __pyx_tuple__55 = PyTuple_Pack(20, __pyx_n_s_filename, __pyx_n_s_region, __pyx_n_s_fields, __pyx_n_s_exclude_fields, __pyx_n_s_arities, __pyx_n_s_fills, __pyx_n_s_transformers, __pyx_n_s_vcf_types, __pyx_n_s_flatten_filter, __pyx_n_s_filenames, __pyx_n_s_vcf, __pyx_n_s_filterIds, __pyx_n_s_infoIds, __pyx_n_s_infoTypes, __pyx_n_s_infoCounts, __pyx_n_s_parseInfo, __pyx_n_s_f, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__55);
  __Pyx_GIVEREF(__pyx_tuple__55);
  __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(9, 0, 20, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__55, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_aliman_src_github_alimanfo, __pyx_n_s_setup_variants, 309, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":367
 * 
 * 
 * def log(logstream, *msg):             # <<<<<<<<<<<<<<
 *     print >>logstream, '[vcfnp] ' + str(datetime.now()) + ' :: ' + ' '.join([str(m) for m in msg])
 *     sys.stderr.flush()
 */
  __pyx_tuple__57 = PyTuple_Pack(3, __pyx_n_s_logstream, __pyx_n_s_msg, __pyx_n_s_m); if (unlikely(!__pyx_tuple__57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__57);
  __Pyx_GIVEREF(__pyx_tuple__57);
  __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_aliman_src_github_alimanfo, __pyx_n_s_log, 367, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":372
 * 
 * 
 * def variants(filename,             # <<<<<<<<<<<<<<
 *              region=None,
 *              fields=None,
 */
  __pyx_tuple__59 = PyTuple_Pack(21, __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, __pyx_n_s_flatten_filter, __pyx_n_s_verbose, __pyx_n_s_cache, __pyx_n_s_cachedir, __pyx_n_s_skip_cached, __pyx_n_s_cache_fn, __pyx_n_s_A); if (unlikely(!__pyx_tuple__59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__59);
  __Pyx_GIVEREF(__pyx_tuple__59);
  __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(19, 0, 21, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_aliman_src_github_alimanfo, __pyx_n_s_variants, 372, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":534
 * 
 * 
 * def _mk_cache_fn(vcf_fn, type, region=None, cachedir=None):             # <<<<<<<<<<<<<<
 *     if cachedir is None:
 *         cachedir = vcf_fn + cachedir_suffix
 */
  __pyx_tuple__61 = PyTuple_Pack(5, __pyx_n_s_vcf_fn, __pyx_n_s_type, __pyx_n_s_region, __pyx_n_s_cachedir, __pyx_n_s_cache_fn); if (unlikely(!__pyx_tuple__61)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__61);
  __Pyx_GIVEREF(__pyx_tuple__61);
  __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_aliman_src_github_alimanfo, __pyx_n_s_mk_cache_fn, 534, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":549
 * 
 * 
 * def _build_variants(filename,             # <<<<<<<<<<<<<<
 *                     region=None,
 *                     fields=None,
 */
  __pyx_tuple__63 = PyTuple_Pack(24, __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, __pyx_n_s_flatten_filter, __pyx_n_s_verbose, __pyx_n_s_cache, __pyx_n_s_filenames, __pyx_n_s_infoTypes, __pyx_n_s_parseInfo, __pyx_n_s_filterIds, __pyx_n_s_fieldspec, __pyx_n_s_dtype, __pyx_n_s_it); if (unlikely(!__pyx_tuple__63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__63);
  __Pyx_GIVEREF(__pyx_tuple__63);
  __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(17, 0, 24, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_aliman_src_github_alimanfo, __pyx_n_s_build_variants, 549, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":601
 * 
 * 
 * def _fromiter(it, dtype, count, long progress=0, logstream=sys.stderr):             # <<<<<<<<<<<<<<
 *     if progress > 0:
 *         it = _iter_withprogress(it, progress, logstream)
 */
  __pyx_tuple__65 = PyTuple_Pack(6, __pyx_n_s_it, __pyx_n_s_dtype, __pyx_n_s_count, __pyx_n_s_progress, __pyx_n_s_logstream, __pyx_n_s_a); if (unlikely(!__pyx_tuple__65)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__65);
  __Pyx_GIVEREF(__pyx_tuple__65);
  __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(5, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_aliman_src_github_alimanfo, __pyx_n_s_fromiter, 601, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":611
 * 
 * 
 * def _iter_withprogress(iterable, long progress, logstream):             # <<<<<<<<<<<<<<
 *     cdef long i, n
 *     before_all = time.time()
 */
  __pyx_tuple__67 = PyTuple_Pack(10, __pyx_n_s_iterable, __pyx_n_s_progress, __pyx_n_s_logstream, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_before_all, __pyx_n_s_before, __pyx_n_s_o, __pyx_n_s_after, __pyx_n_s_after_all); if (unlikely(!__pyx_tuple__67)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__67);
  __Pyx_GIVEREF(__pyx_tuple__67);
  __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__67, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_aliman_src_github_alimanfo, __pyx_n_s_iter_withprogress, 611, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":626
 * 
 * 
 * def itervariants(filenames,             # <<<<<<<<<<<<<<
 *                  region,
 *                  list fieldspec,
 */
  __pyx_tuple__69 = PyTuple_Pack(10, __pyx_n_s_filenames, __pyx_n_s_region, __pyx_n_s_fieldspec, __pyx_n_s_filterIds, __pyx_n_s_flatten_filter, __pyx_n_s_parseInfo, __pyx_n_s_variantFile, __pyx_n_s_var, __pyx_n_s_current_filename, __pyx_n_s_region_set); if (unlikely(!__pyx_tuple__69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__69);
  __Pyx_GIVEREF(__pyx_tuple__69);
  __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(6, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_aliman_src_github_alimanfo, __pyx_n_s_itervariants, 626, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":653
 * 
 * 
 * def itervariants_with_condition(filenames,             # <<<<<<<<<<<<<<
 *                                 region,
 *                                 list fieldspec,
 */
  __pyx_tuple__71 = PyTuple_Pack(13, __pyx_n_s_filenames, __pyx_n_s_region, __pyx_n_s_fieldspec, __pyx_n_s_filterIds, __pyx_n_s_flatten_filter, __pyx_n_s_parseInfo, __pyx_n_s_condition, __pyx_n_s_variantFile, __pyx_n_s_var, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_current_filename, __pyx_n_s_region_set); if (unlikely(!__pyx_tuple__71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__71);
  __Pyx_GIVEREF(__pyx_tuple__71);
  __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(7, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__71, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_aliman_src_github_alimanfo, __pyx_n_s_itervariants_with_condition, 653, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":798
 * 
 * 
 * def _warn_duplicates(fields):             # <<<<<<<<<<<<<<
 *     visited = set()
 *     for f in fields:
 */
  __pyx_tuple__73 = PyTuple_Pack(3, __pyx_n_s_fields, __pyx_n_s_visited, __pyx_n_s_f); if (unlikely(!__pyx_tuple__73)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__73);
  __Pyx_GIVEREF(__pyx_tuple__73);
  __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__73, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_aliman_src_github_alimanfo, __pyx_n_s_warn_duplicates, 798, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":889
 * 
 * 
 * def _calldata_fields(fields, exclude_fields, formatIds):             # <<<<<<<<<<<<<<
 *     if fields is None:
 *         fields = STANDARD_CALLDATA_FIELDS + formatIds
 */
  __pyx_tuple__75 = PyTuple_Pack(4, __pyx_n_s_fields, __pyx_n_s_exclude_fields, __pyx_n_s_formatIds, __pyx_n_s_f); if (unlikely(!__pyx_tuple__75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__75);
  __Pyx_GIVEREF(__pyx_tuple__75);
  __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_aliman_src_github_alimanfo, __pyx_n_s_calldata_fields, 889, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":902
 * 
 * 
 * def _calldata_arities(fields, arities, formatCounts, ploidy):             # <<<<<<<<<<<<<<
 *     if arities is None:
 *         arities = dict()
 */
  __pyx_tuple__77 = PyTuple_Pack(8, __pyx_n_s_fields, __pyx_n_s_arities, __pyx_n_s_formatCounts, __pyx_n_s_ploidy, __pyx_n_s_f, __pyx_n_s_vcf_count, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__77);
  __Pyx_GIVEREF(__pyx_tuple__77);
  __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_aliman_src_github_alimanfo, __pyx_n_s_calldata_arities, 902, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":926
 * 
 * 
 * def _calldata_fills(fields, fills, formatTypes, ploidy):             # <<<<<<<<<<<<<<
 *     if fills is None:
 *         fills = dict()
 */
  __pyx_tuple__79 = PyTuple_Pack(8, __pyx_n_s_fields, __pyx_n_s_fills, __pyx_n_s_formatTypes, __pyx_n_s_ploidy, __pyx_n_s_f, __pyx_n_s_vcf_type, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__79)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__79);
  __Pyx_GIVEREF(__pyx_tuple__79);
  __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_aliman_src_github_alimanfo, __pyx_n_s_calldata_fills, 926, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":940
 * 
 * 
 * def _calldata_dtype(fields, dtypes, formatTypes, arities, samples, ploidy):             # <<<<<<<<<<<<<<
 * 
 *     # construct a numpy dtype for structured array cells
 */
  __pyx_tuple__81 = PyTuple_Pack(13, __pyx_n_s_fields, __pyx_n_s_dtypes, __pyx_n_s_formatTypes, __pyx_n_s_arities, __pyx_n_s_samples, __pyx_n_s_ploidy, __pyx_n_s_cell_dtype, __pyx_n_s_f, __pyx_n_s_vcf_type, __pyx_n_s_n, __pyx_n_s_t, __pyx_n_s_dtype, __pyx_n_s_s); if (unlikely(!__pyx_tuple__81)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__81);
  __Pyx_GIVEREF(__pyx_tuple__81);
  __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(6, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__81, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_aliman_src_github_alimanfo, __pyx_n_s_calldata_dtype, 940, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":964
 * 
 * 
 * def calldata(filename,             # <<<<<<<<<<<<<<
 *              region=None,
 *              samples=None,
 */
  __pyx_tuple__83 = PyTuple_Pack(21, __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_vcf_types, __pyx_n_s_count, __pyx_n_s_progress, __pyx_n_s_logstream, __pyx_n_s_condition, __pyx_n_s_slice, __pyx_n_s_verbose, __pyx_n_s_cache, __pyx_n_s_cachedir, __pyx_n_s_skip_cached, __pyx_n_s_cache_fn, __pyx_n_s_A); if (unlikely(!__pyx_tuple__83)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__83);
  __Pyx_GIVEREF(__pyx_tuple__83);
  __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(19, 0, 21, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_aliman_src_github_alimanfo, __pyx_n_s_calldata, 964, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":1190
 * 
 * 
 * def _build_calldata(filename,             # <<<<<<<<<<<<<<
 *                     region=None,
 *                     samples=None,
 */
  __pyx_tuple__85 = PyTuple_Pack(30, __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_vcf_types, __pyx_n_s_count, __pyx_n_s_progress, __pyx_n_s_logstream, __pyx_n_s_condition, __pyx_n_s_slice, __pyx_n_s_verbose, __pyx_n_s_filenames, __pyx_n_s_vcf, __pyx_n_s_formatIds, __pyx_n_s_formatTypes, __pyx_n_s_formatCounts, __pyx_n_s_all_samples, __pyx_n_s_s, __pyx_n_s_f, __pyx_n_s_dtype, __pyx_n_s_fieldspec, __pyx_n_s_it, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__85)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__85);
  __Pyx_GIVEREF(__pyx_tuple__85);
  __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(16, 0, 30, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_aliman_src_github_alimanfo, __pyx_n_s_build_calldata, 1190, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":1271
 * 
 * 
 * def calldata_2d(filename,             # <<<<<<<<<<<<<<
 *                 region=None,
 *                 samples=None,
 */
  __pyx_tuple__87 = PyTuple_Pack(21, __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_vcf_types, __pyx_n_s_count, __pyx_n_s_progress, __pyx_n_s_logstream, __pyx_n_s_condition, __pyx_n_s_slice, __pyx_n_s_verbose, __pyx_n_s_cache, __pyx_n_s_cachedir, __pyx_n_s_skip_cached, __pyx_n_s_cache_fn, __pyx_n_s_A); if (unlikely(!__pyx_tuple__87)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__87);
  __Pyx_GIVEREF(__pyx_tuple__87);
  __pyx_codeobj__88 = (PyObject*)__Pyx_PyCode_New(19, 0, 21, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__87, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_aliman_src_github_alimanfo, __pyx_n_s_calldata_2d, 1271, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__88)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":1399
 * 
 * 
 * def _build_calldata_2d(*args, **kwargs):             # <<<<<<<<<<<<<<
 *     C = calldata(*args, **kwargs)
 *     C2d = view2d(C)
 */
  __pyx_tuple__89 = PyTuple_Pack(4, __pyx_n_s_args, __pyx_n_s_kwargs, __pyx_n_s_C, __pyx_n_s_C2d); if (unlikely(!__pyx_tuple__89)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__89);
  __Pyx_GIVEREF(__pyx_tuple__89);
  __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(0, 0, 4, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__89, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_aliman_src_github_alimanfo, __pyx_n_s_build_calldata_2d, 1399, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":1405
 * 
 * 
 * def itercalldata(filenames,             # <<<<<<<<<<<<<<
 *                   region,
 *                   tuple samples,
 */
  __pyx_tuple__91 = PyTuple_Pack(9, __pyx_n_s_filenames, __pyx_n_s_region, __pyx_n_s_samples, __pyx_n_s_ploidy, __pyx_n_s_fieldspec, __pyx_n_s_variantFile, __pyx_n_s_var, __pyx_n_s_current_filename, __pyx_n_s_region_set); if (unlikely(!__pyx_tuple__91)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__91);
  __Pyx_GIVEREF(__pyx_tuple__91);
  __pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(5, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__91, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_aliman_src_github_alimanfo, __pyx_n_s_itercalldata, 1405, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__92)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":1431
 * 
 * 
 * def itercalldata_with_condition(filenames,             # <<<<<<<<<<<<<<
 *                                  region,
 *                                  tuple samples,
 */
  __pyx_tuple__93 = PyTuple_Pack(12, __pyx_n_s_filenames, __pyx_n_s_region, __pyx_n_s_samples, __pyx_n_s_ploidy, __pyx_n_s_fieldspec, __pyx_n_s_condition, __pyx_n_s_variantFile, __pyx_n_s_var, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_current_filename, __pyx_n_s_region_set); if (unlikely(!__pyx_tuple__93)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__93);
  __Pyx_GIVEREF(__pyx_tuple__93);
  __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(6, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__93, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_aliman_src_github_alimanfo, __pyx_n_s_itercalldata_with_condition, 1431, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":1556
 * 
 * 
 * def view2d(a):             # <<<<<<<<<<<<<<
 *     """
 *     Utility function to view a structured 1D array where all fields have a
 */
  __pyx_tuple__95 = PyTuple_Pack(5, __pyx_n_s_a, __pyx_n_s_rows, __pyx_n_s_cols, __pyx_n_s_dtype, __pyx_n_s_b); if (unlikely(!__pyx_tuple__95)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__95);
  __Pyx_GIVEREF(__pyx_tuple__95);
  __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__95, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_aliman_src_github_alimanfo, __pyx_n_s_view2d, 1556, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":1641
 * 
 * EFF_DEFAULT_DTYPE = [
 *     ('Effect', 'a33'),             # <<<<<<<<<<<<<<
 *     ('Effect_Impact', 'a8'),
 *     ('Functional_Class', 'a8'),
 */
  __pyx_tuple__97 = PyTuple_Pack(2, __pyx_n_s_Effect, __pyx_n_s_a33); if (unlikely(!__pyx_tuple__97)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__97);
  __Pyx_GIVEREF(__pyx_tuple__97);

  /* "vcfnp.pyx":1642
 * EFF_DEFAULT_DTYPE = [
 *     ('Effect', 'a33'),
 *     ('Effect_Impact', 'a8'),             # <<<<<<<<<<<<<<
 *     ('Functional_Class', 'a8'),
 *     ('Codon_Change', 'a7'), # N.B., will lose information for indels
 */
  __pyx_tuple__98 = PyTuple_Pack(2, __pyx_n_s_Effect_Impact, __pyx_n_s_a8); if (unlikely(!__pyx_tuple__98)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__98);
  __Pyx_GIVEREF(__pyx_tuple__98);

  /* "vcfnp.pyx":1643
 *     ('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_tuple__99 = PyTuple_Pack(2, __pyx_n_s_Functional_Class, __pyx_n_s_a8); if (unlikely(!__pyx_tuple__99)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__99);
  __Pyx_GIVEREF(__pyx_tuple__99);

  /* "vcfnp.pyx":1644
 *     ('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_tuple__100 = PyTuple_Pack(2, __pyx_n_s_Codon_Change, __pyx_n_s_a7); if (unlikely(!__pyx_tuple__100)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__100);
  __Pyx_GIVEREF(__pyx_tuple__100);

  /* "vcfnp.pyx":1645
 *     ('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_tuple__101 = PyTuple_Pack(2, __pyx_n_s_Amino_Acid_Change, __pyx_n_s_a6); if (unlikely(!__pyx_tuple__101)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__101);
  __Pyx_GIVEREF(__pyx_tuple__101);

  /* "vcfnp.pyx":1646
 *     ('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_tuple__102 = PyTuple_Pack(2, __pyx_n_s_Amino_Acid_Length, __pyx_n_s_i4); if (unlikely(!__pyx_tuple__102)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__102);
  __Pyx_GIVEREF(__pyx_tuple__102);

  /* "vcfnp.pyx":1647
 *     ('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_tuple__103 = PyTuple_Pack(2, __pyx_n_s_Gene_Name, __pyx_n_s_a14); if (unlikely(!__pyx_tuple__103)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__103);
  __Pyx_GIVEREF(__pyx_tuple__103);

  /* "vcfnp.pyx":1648
 *     ('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_tuple__104 = PyTuple_Pack(2, __pyx_n_s_Transcript_BioType, __pyx_n_s_a20); if (unlikely(!__pyx_tuple__104)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__104);
  __Pyx_GIVEREF(__pyx_tuple__104);

  /* "vcfnp.pyx":1649
 *     ('Gene_Name', 'a14'), # N.B., may be too short for some species
 *     ('Transcript_BioType', 'a20'),
 *     ('Gene_Coding', 'i1'),             # <<<<<<<<<<<<<<
 *     ('Transcript_ID', 'a20'),
 *     ('Exon', 'i1')
 */
  __pyx_tuple__105 = PyTuple_Pack(2, __pyx_n_s_Gene_Coding, __pyx_n_s_i1); if (unlikely(!__pyx_tuple__105)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__105);
  __Pyx_GIVEREF(__pyx_tuple__105);

  /* "vcfnp.pyx":1650
 *     ('Transcript_BioType', 'a20'),
 *     ('Gene_Coding', 'i1'),
 *     ('Transcript_ID', 'a20'),             # <<<<<<<<<<<<<<
 *     ('Exon', 'i1')
 * ]
 */
  __pyx_tuple__106 = PyTuple_Pack(2, __pyx_n_s_Transcript_ID, __pyx_n_s_a20); if (unlikely(!__pyx_tuple__106)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__106);
  __Pyx_GIVEREF(__pyx_tuple__106);

  /* "vcfnp.pyx":1651
 *     ('Gene_Coding', 'i1'),
 *     ('Transcript_ID', 'a20'),
 *     ('Exon', 'i1')             # <<<<<<<<<<<<<<
 * ]
 * 
 */
  __pyx_tuple__107 = PyTuple_Pack(2, __pyx_n_s_Exon, __pyx_n_s_i1); if (unlikely(!__pyx_tuple__107)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__107);
  __Pyx_GIVEREF(__pyx_tuple__107);

  /* "vcfnp.pyx":1655
 * 
 * 
 * EFF_DEFAULT_FILLS = ('.', '.', '.', '.', '.', -1, '.', '.', -1, '.', -1)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__108 = PyTuple_Pack(11, __pyx_kp_s__14, __pyx_kp_s__14, __pyx_kp_s__14, __pyx_kp_s__14, __pyx_kp_s__14, __pyx_int_neg_1, __pyx_kp_s__14, __pyx_kp_s__14, __pyx_int_neg_1, __pyx_kp_s__14, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__108)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__108);
  __Pyx_GIVEREF(__pyx_tuple__108);

  /* "vcfnp.pyx":1658
 * 
 * 
 * def eff_default_transformer(fills=EFF_DEFAULT_FILLS):             # <<<<<<<<<<<<<<
 *     """
 *     Return a simple transformer function for parsing EFF annotations. N.B.,
 */
  __pyx_tuple__109 = PyTuple_Pack(4, __pyx_n_s_fills, __pyx_n_s_prog_eff_main, __pyx_n_s_transformer, __pyx_n_s_transformer); if (unlikely(!__pyx_tuple__109)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__109);
  __Pyx_GIVEREF(__pyx_tuple__109);
  __pyx_codeobj__110 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__109, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_aliman_src_github_alimanfo, __pyx_n_s_eff_default_transformer, 1658, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__110)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":1684
 * class VariantsTable(object):
 * 
 *     def __init__(self,             # <<<<<<<<<<<<<<
 *                  filename,
 *                  region=None,
 */
  __pyx_tuple__111 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_filename, __pyx_n_s_region, __pyx_n_s_fields, __pyx_n_s_exclude_fields, __pyx_n_s_arities, __pyx_n_s_flatten_filter, __pyx_n_s_fill); if (unlikely(!__pyx_tuple__111)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__111);
  __Pyx_GIVEREF(__pyx_tuple__111);
  __pyx_codeobj__112 = (PyObject*)__Pyx_PyCode_New(8, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__111, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_aliman_src_github_alimanfo, __pyx_n_s_init, 1684, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__112)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_tuple__113 = PyTuple_Pack(6, ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_False), ((PyObject*)__pyx_kp_s__14)); if (unlikely(!__pyx_tuple__113)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__113);
  __Pyx_GIVEREF(__pyx_tuple__113);

  /* "vcfnp.pyx":1701
 *         self.fill = fill
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 * 
 *         filenames = _filenames_from_arg(self.filename)
 */
  __pyx_tuple__114 = PyTuple_Pack(17, __pyx_n_s_self, __pyx_n_s_filenames, __pyx_n_s_vcf, __pyx_n_s_filter_ids, __pyx_n_s_info_ids, __pyx_n_s_info_types, __pyx_n_s_fields, __pyx_n_s_arities, __pyx_n_s_parse_info, __pyx_n_s_header, __pyx_n_s_f, __pyx_n_s_t, __pyx_n_s_i, __pyx_n_s_data, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__114)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__114);
  __Pyx_GIVEREF(__pyx_tuple__114);
  __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(1, 0, 17, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_aliman_src_github_alimanfo, __pyx_n_s_iter, 1701, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":1761
 * 
 * 
 * def itervariantstable(filenames, region, fields, arities, info_types, parse_info, filter_ids, flatten_filter, fill):             # <<<<<<<<<<<<<<
 *     cdef VariantCallFile *variantFile
 *     cdef Variant *var
 */
  __pyx_tuple__116 = PyTuple_Pack(13, __pyx_n_s_filenames, __pyx_n_s_region, __pyx_n_s_fields, __pyx_n_s_arities, __pyx_n_s_info_types, __pyx_n_s_parse_info, __pyx_n_s_filter_ids, __pyx_n_s_flatten_filter, __pyx_n_s_fill, __pyx_n_s_variantFile, __pyx_n_s_var, __pyx_n_s_current_filename, __pyx_n_s_region_set); if (unlikely(!__pyx_tuple__116)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__116);
  __Pyx_GIVEREF(__pyx_tuple__116);
  __pyx_codeobj__117 = (PyObject*)__Pyx_PyCode_New(9, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__116, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_aliman_src_github_alimanfo, __pyx_n_s_itervariantstable, 1761, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__117)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1761; __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_float_0_ = PyFloat_FromDouble(0.); if (unlikely(!__pyx_float_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_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;}
  __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;}
  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;
  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_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_Utility_functions_to_extract_da), 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);
  __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;};
  }
  #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
  /*--- 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___variants_arities) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vcfnp___pyx_scope_struct___variants_arities.tp_print = 0;
  __pyx_ptype_5vcfnp___pyx_scope_struct___variants_arities = &__pyx_type_5vcfnp___pyx_scope_struct___variants_arities;
  if (PyType_Ready(&__pyx_type_5vcfnp___pyx_scope_struct_1_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vcfnp___pyx_scope_struct_1_genexpr.tp_print = 0;
  __pyx_ptype_5vcfnp___pyx_scope_struct_1_genexpr = &__pyx_type_5vcfnp___pyx_scope_struct_1_genexpr;
  if (PyType_Ready(&__pyx_type_5vcfnp___pyx_scope_struct_2__variants_fills) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vcfnp___pyx_scope_struct_2__variants_fills.tp_print = 0;
  __pyx_ptype_5vcfnp___pyx_scope_struct_2__variants_fills = &__pyx_type_5vcfnp___pyx_scope_struct_2__variants_fills;
  if (PyType_Ready(&__pyx_type_5vcfnp___pyx_scope_struct_3_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vcfnp___pyx_scope_struct_3_genexpr.tp_print = 0;
  __pyx_ptype_5vcfnp___pyx_scope_struct_3_genexpr = &__pyx_type_5vcfnp___pyx_scope_struct_3_genexpr;
  if (PyType_Ready(&__pyx_type_5vcfnp___pyx_scope_struct_4__info_transformers) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vcfnp___pyx_scope_struct_4__info_transformers.tp_print = 0;
  __pyx_ptype_5vcfnp___pyx_scope_struct_4__info_transformers = &__pyx_type_5vcfnp___pyx_scope_struct_4__info_transformers;
  if (PyType_Ready(&__pyx_type_5vcfnp___pyx_scope_struct_5_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vcfnp___pyx_scope_struct_5_genexpr.tp_print = 0;
  __pyx_ptype_5vcfnp___pyx_scope_struct_5_genexpr = &__pyx_type_5vcfnp___pyx_scope_struct_5_genexpr;
  if (PyType_Ready(&__pyx_type_5vcfnp___pyx_scope_struct_6__setup_variants) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vcfnp___pyx_scope_struct_6__setup_variants.tp_print = 0;
  __pyx_ptype_5vcfnp___pyx_scope_struct_6__setup_variants = &__pyx_type_5vcfnp___pyx_scope_struct_6__setup_variants;
  if (PyType_Ready(&__pyx_type_5vcfnp___pyx_scope_struct_7_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vcfnp___pyx_scope_struct_7_genexpr.tp_print = 0;
  __pyx_ptype_5vcfnp___pyx_scope_struct_7_genexpr = &__pyx_type_5vcfnp___pyx_scope_struct_7_genexpr;
  if (PyType_Ready(&__pyx_type_5vcfnp___pyx_scope_struct_8_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vcfnp___pyx_scope_struct_8_genexpr.tp_print = 0;
  __pyx_ptype_5vcfnp___pyx_scope_struct_8_genexpr = &__pyx_type_5vcfnp___pyx_scope_struct_8_genexpr;
  if (PyType_Ready(&__pyx_type_5vcfnp___pyx_scope_struct_9__iter_withprogress) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vcfnp___pyx_scope_struct_9__iter_withprogress.tp_print = 0;
  __pyx_ptype_5vcfnp___pyx_scope_struct_9__iter_withprogress = &__pyx_type_5vcfnp___pyx_scope_struct_9__iter_withprogress;
  if (PyType_Ready(&__pyx_type_5vcfnp___pyx_scope_struct_10_itervariants) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vcfnp___pyx_scope_struct_10_itervariants.tp_print = 0;
  __pyx_ptype_5vcfnp___pyx_scope_struct_10_itervariants = &__pyx_type_5vcfnp___pyx_scope_struct_10_itervariants;
  if (PyType_Ready(&__pyx_type_5vcfnp___pyx_scope_struct_11_itervariants_with_condition) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vcfnp___pyx_scope_struct_11_itervariants_with_condition.tp_print = 0;
  __pyx_ptype_5vcfnp___pyx_scope_struct_11_itervariants_with_condition = &__pyx_type_5vcfnp___pyx_scope_struct_11_itervariants_with_condition;
  if (PyType_Ready(&__pyx_type_5vcfnp___pyx_scope_struct_12__calldata_arities) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vcfnp___pyx_scope_struct_12__calldata_arities.tp_print = 0;
  __pyx_ptype_5vcfnp___pyx_scope_struct_12__calldata_arities = &__pyx_type_5vcfnp___pyx_scope_struct_12__calldata_arities;
  if (PyType_Ready(&__pyx_type_5vcfnp___pyx_scope_struct_13_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vcfnp___pyx_scope_struct_13_genexpr.tp_print = 0;
  __pyx_ptype_5vcfnp___pyx_scope_struct_13_genexpr = &__pyx_type_5vcfnp___pyx_scope_struct_13_genexpr;
  if (PyType_Ready(&__pyx_type_5vcfnp___pyx_scope_struct_14__calldata_fills) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vcfnp___pyx_scope_struct_14__calldata_fills.tp_print = 0;
  __pyx_ptype_5vcfnp___pyx_scope_struct_14__calldata_fills = &__pyx_type_5vcfnp___pyx_scope_struct_14__calldata_fills;
  if (PyType_Ready(&__pyx_type_5vcfnp___pyx_scope_struct_15_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vcfnp___pyx_scope_struct_15_genexpr.tp_print = 0;
  __pyx_ptype_5vcfnp___pyx_scope_struct_15_genexpr = &__pyx_type_5vcfnp___pyx_scope_struct_15_genexpr;
  if (PyType_Ready(&__pyx_type_5vcfnp___pyx_scope_struct_16__build_calldata) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vcfnp___pyx_scope_struct_16__build_calldata.tp_print = 0;
  __pyx_ptype_5vcfnp___pyx_scope_struct_16__build_calldata = &__pyx_type_5vcfnp___pyx_scope_struct_16__build_calldata;
  if (PyType_Ready(&__pyx_type_5vcfnp___pyx_scope_struct_17_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vcfnp___pyx_scope_struct_17_genexpr.tp_print = 0;
  __pyx_ptype_5vcfnp___pyx_scope_struct_17_genexpr = &__pyx_type_5vcfnp___pyx_scope_struct_17_genexpr;
  if (PyType_Ready(&__pyx_type_5vcfnp___pyx_scope_struct_18_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vcfnp___pyx_scope_struct_18_genexpr.tp_print = 0;
  __pyx_ptype_5vcfnp___pyx_scope_struct_18_genexpr = &__pyx_type_5vcfnp___pyx_scope_struct_18_genexpr;
  if (PyType_Ready(&__pyx_type_5vcfnp___pyx_scope_struct_19_itercalldata) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vcfnp___pyx_scope_struct_19_itercalldata.tp_print = 0;
  __pyx_ptype_5vcfnp___pyx_scope_struct_19_itercalldata = &__pyx_type_5vcfnp___pyx_scope_struct_19_itercalldata;
  if (PyType_Ready(&__pyx_type_5vcfnp___pyx_scope_struct_20_itercalldata_with_condition) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vcfnp___pyx_scope_struct_20_itercalldata_with_condition.tp_print = 0;
  __pyx_ptype_5vcfnp___pyx_scope_struct_20_itercalldata_with_condition = &__pyx_type_5vcfnp___pyx_scope_struct_20_itercalldata_with_condition;
  if (PyType_Ready(&__pyx_type_5vcfnp___pyx_scope_struct_21_eff_default_transformer) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vcfnp___pyx_scope_struct_21_eff_default_transformer.tp_print = 0;
  __pyx_ptype_5vcfnp___pyx_scope_struct_21_eff_default_transformer = &__pyx_type_5vcfnp___pyx_scope_struct_21_eff_default_transformer;
  if (PyType_Ready(&__pyx_type_5vcfnp___pyx_scope_struct_22__transformer) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vcfnp___pyx_scope_struct_22__transformer.tp_print = 0;
  __pyx_ptype_5vcfnp___pyx_scope_struct_22__transformer = &__pyx_type_5vcfnp___pyx_scope_struct_22__transformer;
  if (PyType_Ready(&__pyx_type_5vcfnp___pyx_scope_struct_23_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vcfnp___pyx_scope_struct_23_genexpr.tp_print = 0;
  __pyx_ptype_5vcfnp___pyx_scope_struct_23_genexpr = &__pyx_type_5vcfnp___pyx_scope_struct_23_genexpr;
  if (PyType_Ready(&__pyx_type_5vcfnp___pyx_scope_struct_24___iter__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vcfnp___pyx_scope_struct_24___iter__.tp_print = 0;
  __pyx_ptype_5vcfnp___pyx_scope_struct_24___iter__ = &__pyx_type_5vcfnp___pyx_scope_struct_24___iter__;
  if (PyType_Ready(&__pyx_type_5vcfnp___pyx_scope_struct_25_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vcfnp___pyx_scope_struct_25_genexpr.tp_print = 0;
  __pyx_ptype_5vcfnp___pyx_scope_struct_25_genexpr = &__pyx_type_5vcfnp___pyx_scope_struct_25_genexpr;
  if (PyType_Ready(&__pyx_type_5vcfnp___pyx_scope_struct_26_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vcfnp___pyx_scope_struct_26_genexpr.tp_print = 0;
  __pyx_ptype_5vcfnp___pyx_scope_struct_26_genexpr = &__pyx_type_5vcfnp___pyx_scope_struct_26_genexpr;
  if (PyType_Ready(&__pyx_type_5vcfnp___pyx_scope_struct_27_itervariantstable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vcfnp___pyx_scope_struct_27_itervariantstable.tp_print = 0;
  __pyx_ptype_5vcfnp___pyx_scope_struct_27_itervariantstable = &__pyx_type_5vcfnp___pyx_scope_struct_27_itervariantstable;
  /*--- 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[6]; __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[7]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Variable import code ---*/
  /*--- Function import code ---*/
  /*--- Execution code ---*/

  /* "vcfnp.pyx":13
 * 
 * 
 * __version__ = '1.9'             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_s_1_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":16
 * 
 * 
 * import sys             # <<<<<<<<<<<<<<
 * import re
 * from itertools import chain
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __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 = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":17
 * 
 * import sys
 * import re             # <<<<<<<<<<<<<<
 * from itertools import chain
 * import numpy as np
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_re, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __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 = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":18
 * import sys
 * import re
 * from itertools import chain             # <<<<<<<<<<<<<<
 * import numpy as np
 * cimport numpy as np
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_chain);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_chain);
  __Pyx_GIVEREF(__pyx_n_s_chain);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_itertools, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_chain); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_chain, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __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":19
 * import re
 * from itertools import chain
 * import numpy as np             # <<<<<<<<<<<<<<
 * cimport numpy as np
 * from vcflib cimport (PyVariantCallFile, VariantCallFile, Variant,
 */
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":31
 * from libc.stdlib cimport atoi, atol, atof
 * from cython.operator cimport dereference as deref
 * import time             # <<<<<<<<<<<<<<
 * from itertools import islice
 * import os
 */
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_time, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_time, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":32
 * from cython.operator cimport dereference as deref
 * import time
 * from itertools import islice             # <<<<<<<<<<<<<<
 * import os
 * from datetime import datetime
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_islice);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_islice);
  __Pyx_GIVEREF(__pyx_n_s_islice);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_itertools, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_islice); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_islice, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":33
 * import time
 * from itertools import islice
 * import os             # <<<<<<<<<<<<<<
 * from datetime import datetime
 * 
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":34
 * from itertools import islice
 * import os
 * from datetime import datetime             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_datetime);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_datetime);
  __Pyx_GIVEREF(__pyx_n_s_datetime);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_datetime, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_datetime, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __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":37
 * 
 * 
 * cdef size_t npos = -1             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_5vcfnp_npos = -1;

  /* "vcfnp.pyx":49
 * 
 * 
 * TYPESTRING2KEY = {             # <<<<<<<<<<<<<<
 *     'Float': FIELD_FLOAT,
 *     'Integer': FIELD_INTEGER,
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);

  /* "vcfnp.pyx":50
 * 
 * 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 = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_Float, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":51
 * 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 = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_Integer, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":52
 *     '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 = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_String, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":53
 *     '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 = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_Flag, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __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, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":58
 * # these are the possible fields in the variants array
 * STANDARD_VARIANT_FIELDS = (
 *     'CHROM', 'POS', 'ID', 'REF', 'ALT', 'QUAL', 'FILTER',             # <<<<<<<<<<<<<<
 *     'num_alleles', 'is_snp', 'svlen'
 * )
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_STANDARD_VARIANT_FIELDS, __pyx_tuple__40) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":64
 * 
 * # 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 = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_CHROM, __pyx_n_s_a12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_POS, __pyx_n_s_i4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ID, __pyx_n_s_a12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_REF, __pyx_n_s_a12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ALT, __pyx_n_s_a12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_QUAL, __pyx_n_s_f4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_num_alleles, __pyx_n_s_u1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_is_snp, __pyx_n_s_b1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_svlen, __pyx_n_s_i4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_VARIANT_DTYPE, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":78
 * 
 * # 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 = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_CHROM, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_POS, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ID, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_REF, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ALT, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_QUAL, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_num_alleles, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_is_snp, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_svlen, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_VARIANT_ARITY, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":92
 * 
 * # default fill values for the variants fields if values are missing
 * DEFAULT_VARIANT_FILL = {             # <<<<<<<<<<<<<<
 *     'CHROM': '',
 *     'POS': 0,
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_CHROM, __pyx_kp_s__24) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_POS, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ID, __pyx_kp_s__24) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_REF, __pyx_kp_s__24) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ALT, __pyx_kp_s__24) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_QUAL, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_num_alleles, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":100
 *     'QUAL': 0,
 *     'num_alleles': 0,
 *     'is_snp': False,             # <<<<<<<<<<<<<<
 *     'svlen': 0,
 * }
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_is_snp, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_svlen, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_VARIANT_FILL, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":106
 * 
 * # default mapping from VCF field types to numpy dtypes
 * DEFAULT_TYPE_MAP = {             # <<<<<<<<<<<<<<
 *     FIELD_FLOAT: 'f4',
 *     FIELD_INTEGER: 'i4',
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);

  /* "vcfnp.pyx":107
 * # default mapping from VCF field types to numpy dtypes
 * DEFAULT_TYPE_MAP = {
 *     FIELD_FLOAT: 'f4',             # <<<<<<<<<<<<<<
 *     FIELD_INTEGER: 'i4',
 *     FIELD_STRING: 'a12',
 */
  __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);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, __pyx_n_s_f4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":108
 * 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 = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, __pyx_n_s_i4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":109
 *     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 = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, __pyx_n_s_a12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":110
 *     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 = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, __pyx_n_s_b1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":111
 *     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 = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, __pyx_n_s_a12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __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, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":116
 * 
 * # default mapping from VCF field types to fill values for missing values
 * DEFAULT_FILL_MAP = {             # <<<<<<<<<<<<<<
 *     FIELD_FLOAT: 0.,
 *     FIELD_INTEGER: 0,
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);

  /* "vcfnp.pyx":117
 * # 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_1 = PyInt_FromLong(vcf::FIELD_FLOAT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, __pyx_float_0_) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":118
 * DEFAULT_FILL_MAP = {
 *     FIELD_FLOAT: 0.,
 *     FIELD_INTEGER: 0,             # <<<<<<<<<<<<<<
 *     FIELD_STRING: '',
 *     FIELD_BOOL: False,
 */
  __pyx_t_1 = PyInt_FromLong(vcf::FIELD_INTEGER); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":119
 *     FIELD_FLOAT: 0.,
 *     FIELD_INTEGER: 0,
 *     FIELD_STRING: '',             # <<<<<<<<<<<<<<
 *     FIELD_BOOL: False,
 *     FIELD_UNKNOWN: ''
 */
  __pyx_t_1 = PyInt_FromLong(vcf::FIELD_STRING); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, __pyx_kp_s__24) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":120
 *     FIELD_INTEGER: 0,
 *     FIELD_STRING: '',
 *     FIELD_BOOL: False,             # <<<<<<<<<<<<<<
 *     FIELD_UNKNOWN: ''
 * }
 */
  __pyx_t_1 = PyInt_FromLong(vcf::FIELD_BOOL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":121
 *     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 = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, __pyx_kp_s__24) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __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, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":126
 * 
 * # default dtypes for some known INFO fields where lower precision is acceptable in most cases
 * DEFAULT_INFO_DTYPE = {             # <<<<<<<<<<<<<<
 *     'ABHet': 'f2',
 *     'ABHom': 'f2',
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ABHet, __pyx_n_s_f2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ABHom, __pyx_n_s_f2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_AC, __pyx_n_s_u2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_AF, __pyx_n_s_f2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_AN, __pyx_n_s_u2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_BaseQRankSum, __pyx_n_s_f2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ClippingRankSum, __pyx_n_s_f2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_Dels, __pyx_n_s_f2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_FS, __pyx_n_s_f2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_HRun, __pyx_n_s_u1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_HaplotypeScore, __pyx_n_s_f2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_InbreedingCoeff, __pyx_n_s_f2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_VariantType, __pyx_n_s_a12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_MLEAC, __pyx_n_s_u2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_MLEAF, __pyx_n_s_f2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_MQ, __pyx_n_s_f2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_MQ0Fraction, __pyx_n_s_f2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_MQRankSum, __pyx_n_s_f2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_OND, __pyx_n_s_f2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_QD, __pyx_n_s_f2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_RPA, __pyx_n_s_u2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_RU, __pyx_n_s_a12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ReadPosRankSum, __pyx_n_s_f2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_INFO_DTYPE, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":153
 * 
 * 
 * STANDARD_CALLDATA_FIELDS = ('is_called', 'is_phased', 'genotype')             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_STANDARD_CALLDATA_FIELDS, __pyx_tuple__41) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":156
 * 
 * 
 * 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 = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_is_called, __pyx_n_s_b1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_is_phased, __pyx_n_s_b1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_genotype, __pyx_n_s_i1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_AD, __pyx_n_s_u2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_DP, __pyx_n_s_u2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_GQ, __pyx_n_s_u1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_MLPSAC, __pyx_n_s_u1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_MLPSAF, __pyx_n_s_f2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_MQ0, __pyx_n_s_u2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_PL, __pyx_n_s_u2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_CALLDATA_DTYPE, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":171
 * 
 * 
 * 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 = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);

  /* "vcfnp.pyx":172
 * 
 * DEFAULT_CALLDATA_FILL = {
 *     'is_called': False,             # <<<<<<<<<<<<<<
 *     'is_phased': False,
 *     'genotype': -1,
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_is_called, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":173
 * DEFAULT_CALLDATA_FILL = {
 *     'is_called': False,
 *     'is_phased': False,             # <<<<<<<<<<<<<<
 *     'genotype': -1,
 * }
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_is_phased, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_genotype, __pyx_int_neg_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_CALLDATA_FILL, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":178
 * 
 * 
 * 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 = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_is_called, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_is_phased, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_AD, __pyx_int_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_CALLDATA_ARITY, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":186
 * 
 * 
 * cdef char SEMICOLON = ';'             # <<<<<<<<<<<<<<
 * cdef string DOT = '.'
 * cdef string GT_DELIMS = '/|'
 */
  __pyx_v_5vcfnp_SEMICOLON = ';';

  /* "vcfnp.pyx":187
 * 
 * cdef char SEMICOLON = ';'
 * cdef string DOT = '.'             # <<<<<<<<<<<<<<
 * cdef string GT_DELIMS = '/|'
 * cdef string FIELD_NAME_CHROM = 'CHROM'
 */
  __pyx_t_3 = __pyx_convert_string_from_py_(__pyx_kp_b__14); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_5vcfnp_DOT = __pyx_t_3;

  /* "vcfnp.pyx":188
 * cdef char SEMICOLON = ';'
 * cdef string DOT = '.'
 * cdef string GT_DELIMS = '/|'             # <<<<<<<<<<<<<<
 * cdef string FIELD_NAME_CHROM = 'CHROM'
 * cdef string FIELD_NAME_POS = 'POS'
 */
  __pyx_t_3 = __pyx_convert_string_from_py_(__pyx_kp_b__42); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_5vcfnp_GT_DELIMS = __pyx_t_3;

  /* "vcfnp.pyx":189
 * 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_3 = __pyx_convert_string_from_py_(__pyx_n_b_CHROM); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_5vcfnp_FIELD_NAME_CHROM = __pyx_t_3;

  /* "vcfnp.pyx":190
 * 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_3 = __pyx_convert_string_from_py_(__pyx_n_b_POS); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_5vcfnp_FIELD_NAME_POS = __pyx_t_3;

  /* "vcfnp.pyx":191
 * 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_3 = __pyx_convert_string_from_py_(__pyx_n_b_ID); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_5vcfnp_FIELD_NAME_ID = __pyx_t_3;

  /* "vcfnp.pyx":192
 * 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_3 = __pyx_convert_string_from_py_(__pyx_n_b_REF); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_5vcfnp_FIELD_NAME_REF = __pyx_t_3;

  /* "vcfnp.pyx":193
 * 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_3 = __pyx_convert_string_from_py_(__pyx_n_b_ALT); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_5vcfnp_FIELD_NAME_ALT = __pyx_t_3;

  /* "vcfnp.pyx":194
 * 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_3 = __pyx_convert_string_from_py_(__pyx_n_b_QUAL); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_5vcfnp_FIELD_NAME_QUAL = __pyx_t_3;

  /* "vcfnp.pyx":195
 * 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_3 = __pyx_convert_string_from_py_(__pyx_n_b_FILTER); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_5vcfnp_FIELD_NAME_FILTER = __pyx_t_3;

  /* "vcfnp.pyx":196
 * 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_3 = __pyx_convert_string_from_py_(__pyx_n_b_INFO); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_5vcfnp_FIELD_NAME_INFO = __pyx_t_3;

  /* "vcfnp.pyx":197
 * 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_SVLEN = 'svlen'
 */
  __pyx_t_3 = __pyx_convert_string_from_py_(__pyx_n_b_num_alleles); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_5vcfnp_FIELD_NAME_NUM_ALLELES = __pyx_t_3;

  /* "vcfnp.pyx":198
 * 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_SVLEN = 'svlen'
 * cdef string FIELD_NAME_IS_CALLED = 'is_called'
 */
  __pyx_t_3 = __pyx_convert_string_from_py_(__pyx_n_b_is_snp); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_5vcfnp_FIELD_NAME_IS_SNP = __pyx_t_3;

  /* "vcfnp.pyx":199
 * cdef string FIELD_NAME_NUM_ALLELES = 'num_alleles'
 * cdef string FIELD_NAME_IS_SNP = 'is_snp'
 * cdef string FIELD_NAME_SVLEN = 'svlen'             # <<<<<<<<<<<<<<
 * cdef string FIELD_NAME_IS_CALLED = 'is_called'
 * cdef string FIELD_NAME_IS_PHASED = 'is_phased'
 */
  __pyx_t_3 = __pyx_convert_string_from_py_(__pyx_n_b_svlen); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_5vcfnp_FIELD_NAME_SVLEN = __pyx_t_3;

  /* "vcfnp.pyx":200
 * cdef string FIELD_NAME_IS_SNP = 'is_snp'
 * cdef string FIELD_NAME_SVLEN = 'svlen'
 * cdef string FIELD_NAME_IS_CALLED = 'is_called'             # <<<<<<<<<<<<<<
 * cdef string FIELD_NAME_IS_PHASED = 'is_phased'
 * cdef string FIELD_NAME_GENOTYPE = 'genotype'
 */
  __pyx_t_3 = __pyx_convert_string_from_py_(__pyx_n_b_is_called); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_5vcfnp_FIELD_NAME_IS_CALLED = __pyx_t_3;

  /* "vcfnp.pyx":201
 * cdef string FIELD_NAME_SVLEN = 'svlen'
 * 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_3 = __pyx_convert_string_from_py_(__pyx_n_b_is_phased); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_5vcfnp_FIELD_NAME_IS_PHASED = __pyx_t_3;

  /* "vcfnp.pyx":202
 * 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_3 = __pyx_convert_string_from_py_(__pyx_n_b_genotype); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_5vcfnp_FIELD_NAME_GENOTYPE = __pyx_t_3;

  /* "vcfnp.pyx":203
 * cdef string FIELD_NAME_IS_PHASED = 'is_phased'
 * cdef string FIELD_NAME_GENOTYPE = 'genotype'
 * cdef string FIELD_NAME_GT = 'GT'             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_3 = __pyx_convert_string_from_py_(__pyx_n_b_GT); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_5vcfnp_FIELD_NAME_GT = __pyx_t_3;

  /* "vcfnp.pyx":206
 * 
 * 
 * def _variants_fields(fields, exclude_fields, infoIds):             # <<<<<<<<<<<<<<
 *     if fields is None:
 *         fields = STANDARD_VARIANT_FIELDS + infoIds
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_1_variants_fields, NULL, __pyx_n_s_vcfnp_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_variants_fields, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":219
 * 
 * 
 * def _variants_arities(fields, arities, infoCounts):             # <<<<<<<<<<<<<<
 *     if arities is None:
 *         arities = dict()
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_3_variants_arities, NULL, __pyx_n_s_vcfnp_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_variants_arities, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":240
 * 
 * 
 * def _variants_fills(fields, fills, infoTypes):             # <<<<<<<<<<<<<<
 *     if fills is None:
 *         fills = dict()
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_5_variants_fills, NULL, __pyx_n_s_vcfnp_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_variants_fills, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":255
 * 
 * 
 * def _info_transformers(fields, transformers):             # <<<<<<<<<<<<<<
 *     if transformers is None:
 *         transformers = dict()
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_7_info_transformers, NULL, __pyx_n_s_vcfnp_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_info_transformers, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":264
 * 
 * 
 * def _variants_dtype(fields, dtypes, arities, filterIds, flatten_filter, infoTypes):             # <<<<<<<<<<<<<<
 * 
 *     dtype = list()
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_9_variants_dtype, NULL, __pyx_n_s_vcfnp_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_variants_dtype, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":296
 * 
 * 
 * def _filenames_from_arg(filename):             # <<<<<<<<<<<<<<
 *     if isinstance(filename, basestring):
 *         filenames = [filename]
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_11_filenames_from_arg, NULL, __pyx_n_s_vcfnp_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_filenames_from_arg, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":309
 * 
 * 
 * def _setup_variants(filename,             # <<<<<<<<<<<<<<
 *                     region,
 *                     fields,
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_13_setup_variants, NULL, __pyx_n_s_vcfnp_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setup_variants, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":367
 * 
 * 
 * def log(logstream, *msg):             # <<<<<<<<<<<<<<
 *     print >>logstream, '[vcfnp] ' + str(datetime.now()) + ' :: ' + ' '.join([str(m) for m in msg])
 *     sys.stderr.flush()
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_15log, NULL, __pyx_n_s_vcfnp_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_log, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":383
 *              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 = 383; __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 = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_k__4 = __pyx_t_1;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "vcfnp.pyx":372
 * 
 * 
 * def variants(filename,             # <<<<<<<<<<<<<<
 *              region=None,
 *              fields=None,
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_17variants, NULL, __pyx_n_s_vcfnp_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __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 = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":531
 * 
 * 
 * cachedir_suffix = '.vcfnp_cache'             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cachedir_suffix, __pyx_kp_s_vcfnp_cache) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":534
 * 
 * 
 * def _mk_cache_fn(vcf_fn, type, region=None, cachedir=None):             # <<<<<<<<<<<<<<
 *     if cachedir is None:
 *         cachedir = vcf_fn + cachedir_suffix
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_19_mk_cache_fn, NULL, __pyx_n_s_vcfnp_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mk_cache_fn, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":560
 *                     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 = 560; __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 = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_k__11 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "vcfnp.pyx":549
 * 
 * 
 * def _build_variants(filename,             # <<<<<<<<<<<<<<
 *                     region=None,
 *                     fields=None,
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_21_build_variants, NULL, __pyx_n_s_vcfnp_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_build_variants, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":601
 * 
 * 
 * def _fromiter(it, dtype, count, long progress=0, logstream=sys.stderr):             # <<<<<<<<<<<<<<
 *     if progress > 0:
 *         it = _iter_withprogress(it, progress, logstream)
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __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 = 601; __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;
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_23_fromiter, NULL, __pyx_n_s_vcfnp_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_fromiter, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":611
 * 
 * 
 * def _iter_withprogress(iterable, long progress, logstream):             # <<<<<<<<<<<<<<
 *     cdef long i, n
 *     before_all = time.time()
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_25_iter_withprogress, NULL, __pyx_n_s_vcfnp_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_iter_withprogress, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":626
 * 
 * 
 * def itervariants(filenames,             # <<<<<<<<<<<<<<
 *                  region,
 *                  list fieldspec,
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_28itervariants, NULL, __pyx_n_s_vcfnp_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_itervariants, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":653
 * 
 * 
 * def itervariants_with_condition(filenames,             # <<<<<<<<<<<<<<
 *                                 region,
 *                                 list fieldspec,
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_31itervariants_with_condition, NULL, __pyx_n_s_vcfnp_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_itervariants_with_condition, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":798
 * 
 * 
 * def _warn_duplicates(fields):             # <<<<<<<<<<<<<<
 *     visited = set()
 *     for f in fields:
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_34_warn_duplicates, NULL, __pyx_n_s_vcfnp_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_warn_duplicates, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":889
 * 
 * 
 * def _calldata_fields(fields, exclude_fields, formatIds):             # <<<<<<<<<<<<<<
 *     if fields is None:
 *         fields = STANDARD_CALLDATA_FIELDS + formatIds
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_36_calldata_fields, NULL, __pyx_n_s_vcfnp_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calldata_fields, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":902
 * 
 * 
 * def _calldata_arities(fields, arities, formatCounts, ploidy):             # <<<<<<<<<<<<<<
 *     if arities is None:
 *         arities = dict()
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_38_calldata_arities, NULL, __pyx_n_s_vcfnp_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calldata_arities, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":926
 * 
 * 
 * def _calldata_fills(fields, fills, formatTypes, ploidy):             # <<<<<<<<<<<<<<
 *     if fills is None:
 *         fills = dict()
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_40_calldata_fills, NULL, __pyx_n_s_vcfnp_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calldata_fills, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":940
 * 
 * 
 * def _calldata_dtype(fields, dtypes, formatTypes, arities, samples, ploidy):             # <<<<<<<<<<<<<<
 * 
 *     # construct a numpy dtype for structured array cells
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_42_calldata_dtype, NULL, __pyx_n_s_vcfnp_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calldata_dtype, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":976
 *              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 = 976; __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 = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_k__15 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "vcfnp.pyx":964
 * 
 * 
 * def calldata(filename,             # <<<<<<<<<<<<<<
 *              region=None,
 *              samples=None,
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_44calldata, NULL, __pyx_n_s_vcfnp_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __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 = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":1202
 *                     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 = 1202; __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 = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_k__17 = __pyx_t_1;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "vcfnp.pyx":1190
 * 
 * 
 * def _build_calldata(filename,             # <<<<<<<<<<<<<<
 *                     region=None,
 *                     samples=None,
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_46_build_calldata, NULL, __pyx_n_s_vcfnp_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_build_calldata, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vcfnp.pyx":1283
 *                 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 = 1283; __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 = 1283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_k__18 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "vcfnp.pyx":1271
 * 
 * 
 * def calldata_2d(filename,             # <<<<<<<<<<<<<<
 *                 region=None,
 *                 samples=None,
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_48calldata_2d, NULL, __pyx_n_s_vcfnp_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calldata_2d, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":1399
 * 
 * 
 * def _build_calldata_2d(*args, **kwargs):             # <<<<<<<<<<<<<<
 *     C = calldata(*args, **kwargs)
 *     C2d = view2d(C)
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_50_build_calldata_2d, NULL, __pyx_n_s_vcfnp_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_build_calldata_2d, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":1405
 * 
 * 
 * def itercalldata(filenames,             # <<<<<<<<<<<<<<
 *                   region,
 *                   tuple samples,
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_52itercalldata, NULL, __pyx_n_s_vcfnp_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1405; __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 = 1405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":1431
 * 
 * 
 * def itercalldata_with_condition(filenames,             # <<<<<<<<<<<<<<
 *                                  region,
 *                                  tuple samples,
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_55itercalldata_with_condition, NULL, __pyx_n_s_vcfnp_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_itercalldata_with_condition, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":1556
 * 
 * 
 * def view2d(a):             # <<<<<<<<<<<<<<
 *     """
 *     Utility function to view a structured 1D array where all fields have a
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_58view2d, NULL, __pyx_n_s_vcfnp_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1556; __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 = 1556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":1640
 * 
 * 
 * EFF_DEFAULT_DTYPE = [             # <<<<<<<<<<<<<<
 *     ('Effect', 'a33'),
 *     ('Effect_Impact', 'a8'),
 */
  __pyx_t_2 = PyList_New(11); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_tuple__97);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_tuple__97);
  __Pyx_GIVEREF(__pyx_tuple__97);
  __Pyx_INCREF(__pyx_tuple__98);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_tuple__98);
  __Pyx_GIVEREF(__pyx_tuple__98);
  __Pyx_INCREF(__pyx_tuple__99);
  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_tuple__99);
  __Pyx_GIVEREF(__pyx_tuple__99);
  __Pyx_INCREF(__pyx_tuple__100);
  PyList_SET_ITEM(__pyx_t_2, 3, __pyx_tuple__100);
  __Pyx_GIVEREF(__pyx_tuple__100);
  __Pyx_INCREF(__pyx_tuple__101);
  PyList_SET_ITEM(__pyx_t_2, 4, __pyx_tuple__101);
  __Pyx_GIVEREF(__pyx_tuple__101);
  __Pyx_INCREF(__pyx_tuple__102);
  PyList_SET_ITEM(__pyx_t_2, 5, __pyx_tuple__102);
  __Pyx_GIVEREF(__pyx_tuple__102);
  __Pyx_INCREF(__pyx_tuple__103);
  PyList_SET_ITEM(__pyx_t_2, 6, __pyx_tuple__103);
  __Pyx_GIVEREF(__pyx_tuple__103);
  __Pyx_INCREF(__pyx_tuple__104);
  PyList_SET_ITEM(__pyx_t_2, 7, __pyx_tuple__104);
  __Pyx_GIVEREF(__pyx_tuple__104);
  __Pyx_INCREF(__pyx_tuple__105);
  PyList_SET_ITEM(__pyx_t_2, 8, __pyx_tuple__105);
  __Pyx_GIVEREF(__pyx_tuple__105);
  __Pyx_INCREF(__pyx_tuple__106);
  PyList_SET_ITEM(__pyx_t_2, 9, __pyx_tuple__106);
  __Pyx_GIVEREF(__pyx_tuple__106);
  __Pyx_INCREF(__pyx_tuple__107);
  PyList_SET_ITEM(__pyx_t_2, 10, __pyx_tuple__107);
  __Pyx_GIVEREF(__pyx_tuple__107);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_EFF_DEFAULT_DTYPE, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":1655
 * 
 * 
 * EFF_DEFAULT_FILLS = ('.', '.', '.', '.', '.', -1, '.', '.', -1, '.', -1)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_EFF_DEFAULT_FILLS, __pyx_tuple__108) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vcfnp.pyx":1658
 * 
 * 
 * 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 = 1658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__22 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_60eff_default_transformer, NULL, __pyx_n_s_vcfnp_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_eff_default_transformer, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":1682
 * 
 * 
 * class VariantsTable(object):             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self,
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_VariantsTable, __pyx_n_s_VariantsTable, (PyObject *) NULL, __pyx_n_s_vcfnp_2, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);

  /* "vcfnp.pyx":1684
 * class VariantsTable(object):
 * 
 *     def __init__(self,             # <<<<<<<<<<<<<<
 *                  filename,
 *                  region=None,
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5vcfnp_13VariantsTable_1__init__, 0, __pyx_n_s_VariantsTable___init, NULL, __pyx_n_s_vcfnp_2, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__112)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__113);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_init, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "vcfnp.pyx":1701
 *         self.fill = fill
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 * 
 *         filenames = _filenames_from_arg(self.filename)
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5vcfnp_13VariantsTable_3__iter__, 0, __pyx_n_s_VariantsTable___iter, NULL, __pyx_n_s_vcfnp_2, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__115)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_iter, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "vcfnp.pyx":1682
 * 
 * 
 * class VariantsTable(object):             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self,
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_VariantsTable, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_VariantsTable, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":1761
 * 
 * 
 * def itervariantstable(filenames, region, fields, arities, info_types, parse_info, filter_ids, flatten_filter, fill):             # <<<<<<<<<<<<<<
 *     cdef VariantCallFile *variantFile
 *     cdef Variant *var
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5vcfnp_62itervariantstable, NULL, __pyx_n_s_vcfnp_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_itervariantstable, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vcfnp.pyx":1
 * # cython: profile = False             # <<<<<<<<<<<<<<
 * # cython: boundscheck = False
 * # cython: wraparound = 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(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_variants_line_372, __pyx_kp_u_Load_an_numpy_structured_array) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_calldata_line_964, __pyx_kp_u_Load_a_numpy_1_dimensional_stru) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_view2d_line_1556, __pyx_kp_u_Utility_function_to_view_a_stru) < 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, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__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_4);
  __Pyx_XDECREF(__pyx_t_5);
  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 '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

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,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

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,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

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;
}

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = func->ob_type->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
#if PY_VERSION_HEX >= 0x02060000
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
#endif
    result = (*call)(func, arg, kw);
#if PY_VERSION_HEX >= 0x02060000
    Py_LeaveRecursiveCall();
#endif
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

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%.1s 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 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)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result = memcmp(ps1, ps2, (size_t)length);
            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 CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
#if PY_MAJOR_VERSION < 3
    PyObject* owned_ref = NULL;
#endif
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
#if PY_MAJOR_VERSION < 3
    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
        owned_ref = PyUnicode_FromObject(s2);
        if (unlikely(!owned_ref))
            return -1;
        s2 = owned_ref;
        s2_is_unicode = 1;
    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
        owned_ref = PyUnicode_FromObject(s1);
        if (unlikely(!owned_ref))
            return -1;
        s1 = owned_ref;
        s1_is_unicode = 1;
    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
        return __Pyx_PyBytes_Equals(s1, s2, equals);
    }
#endif
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length;
        int kind;
        void *data1, *data2;
        #if CYTHON_PEP393_ENABLED
        if (unlikely(PyUnicode_READY(s1) < 0) || unlikely(PyUnicode_READY(s2) < 0))
            return -1;
        #endif
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
            goto return_ne;
        }
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, length * kind);
            #if PY_MAJOR_VERSION < 3
            Py_XDECREF(owned_ref);
            #endif
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_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;
    }
return_eq:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_EQ);
return_ne:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_NE);
#endif
}

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 *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                if (PyObject_IsSubclass(instance_class, type)) {
                    type = instance_class;
                } else {
                    instance_class = NULL;
                }
            }
        }
        if (!instance_class) {
            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 = PyObject_Call(type, args, NULL);
            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_PyObject_Append(PyObject* L, PyObject* x) {
    if (likely(PyList_CheckExact(L))) {
        if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
    } else {
        PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
        if (unlikely(!retval))
            return -1;
        Py_DECREF(retval);
    }
    return 0;
}

#if !CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) {
    return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL)
}
#endif

static CYTHON_INLINE long __Pyx_mod_long(long a, long b) {
    long r = a % b;
    r += ((r != 0) & ((r ^ b) < 0)) * b;
    return r;
}

static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) {
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
        name, type->tp_name, Py_TYPE(obj)->tp_name);
}
static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
    const char *name, int exact)
{
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (none_allowed && obj == Py_None) return 1;
    else if (exact) {
        if (likely(Py_TYPE(obj) == type)) return 1;
        #if PY_MAJOR_VERSION == 2
        else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
        #endif
    }
    else {
        if (likely(PyObject_TypeCheck(obj, type))) return 1;
    }
    __Pyx_RaiseArgumentTypeInvalid(name, obj, type);
    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_CheckKeywordStrings(
    PyObject *kwdict,
    const char* function_name,
    int kw_allowed)
{
    PyObject* key = 0;
    Py_ssize_t pos = 0;
#if CPYTHON_COMPILING_IN_PYPY
    if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
        goto invalid_keyword;
    return 1;
#else
    while (PyDict_Next(kwdict, &pos, &key, 0)) {
        #if PY_MAJOR_VERSION < 3
        if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key)))
        #endif
            if (unlikely(!PyUnicode_Check(key)))
                goto invalid_keyword_type;
    }
    if ((!kw_allowed) && unlikely(key))
        goto invalid_keyword;
    return 1;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    return 0;
#endif
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
    return 0;
}

static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
                                  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
                                  int full_traceback) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
    if (full_traceback) {
        Py_XINCREF(old_exc);
        Py_XINCREF(old_val);
        Py_XINCREF(old_tb);
        __Pyx_ErrRestore(old_exc, old_val, old_tb);
        PyErr_PrintEx(1);
    }
    #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 PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
    PyObject* fake_module;
    PyTypeObject* cached_type = NULL;
    fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
    if (!fake_module) return NULL;
    Py_INCREF(fake_module);
    cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
    if (cached_type) {
        if (!PyType_Check((PyObject*)cached_type)) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s is not a type object",
                type->tp_name);
            goto bad;
        }
        if (cached_type->tp_basicsize != type->tp_basicsize) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s has the wrong size, try recompiling",
                type->tp_name);
            goto bad;
        }
    } else {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
        PyErr_Clear();
        if (PyType_Ready(type) < 0) goto bad;
        if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
            goto bad;
        Py_INCREF(type);
        cached_type = type;
    }
done:
    Py_DECREF(fake_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

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(__pyx_CyFunctionObject *op)
{
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
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* globals, 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;
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    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_globals);
    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_globals);
    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
#if PY_VERSION_HEX >= 0x030400a1
    0,                                  /*tp_finalize*/
#endif
};
static int __Pyx_CyFunction_init(void) {
#if !CYTHON_COMPILING_IN_PYPY
    __pyx_CyFunctionType_type.tp_call = PyCFunction_Call;
#endif
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
    if (__pyx_CyFunctionType == NULL) {
        return -1;
    }
    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_SetString(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 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_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
    Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
    for (i=0; i < nbases; i++) {
        PyTypeObject *tmptype;
        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
        tmptype = Py_TYPE(tmp);
#if PY_MAJOR_VERSION < 3
        if (tmptype == &PyClass_Type)
            continue;
#endif
        if (!metaclass) {
            metaclass = tmptype;
            continue;
        }
        if (PyType_IsSubtype(metaclass, tmptype))
            continue;
        if (PyType_IsSubtype(tmptype, metaclass)) {
            metaclass = tmptype;
            continue;
        }
        PyErr_SetString(PyExc_TypeError,
                        "metaclass conflict: "
                        "the metaclass of a derived class "
                        "must be a (non-strict) subclass "
                        "of the metaclasses of all its bases");
        return NULL;
    }
    if (!metaclass) {
#if PY_MAJOR_VERSION < 3
        metaclass = &PyClass_Type;
#else
        metaclass = &PyType_Type;
#endif
    }
    Py_INCREF((PyObject*) metaclass);
    return (PyObject*) metaclass;
}

static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
                                           PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
    PyObject *ns;
    if (metaclass) {
        PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
        if (prep) {
            PyObject *pargs = PyTuple_Pack(2, name, bases);
            if (unlikely(!pargs)) {
                Py_DECREF(prep);
                return NULL;
            }
            ns = PyObject_Call(prep, pargs, mkw);
            Py_DECREF(prep);
            Py_DECREF(pargs);
        } else {
            if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
                return NULL;
            PyErr_Clear();
            ns = PyDict_New();
        }
    } else {
        ns = PyDict_New();
    }
    if (unlikely(!ns))
        return NULL;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
    if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
    return ns;
bad:
    Py_DECREF(ns);
    return NULL;
}
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
                                      PyObject *dict, PyObject *mkw,
                                      int calculate_metaclass, int allow_py2_metaclass) {
    PyObject *result, *margs;
    PyObject *owned_metaclass = NULL;
    if (allow_py2_metaclass) {
        owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
        if (owned_metaclass) {
            metaclass = owned_metaclass;
        } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
            PyErr_Clear();
        } else {
            return NULL;
        }
    }
    if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
        metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
        Py_XDECREF(owned_metaclass);
        if (unlikely(!metaclass))
            return NULL;
        owned_metaclass = metaclass;
    }
    margs = PyTuple_Pack(3, name, bases, dict);
    if (unlikely(!margs)) {
        result = NULL;
    } else {
        result = PyObject_Call(metaclass, margs, mkw);
        Py_DECREF(margs);
    }
    Py_XDECREF(owned_metaclass);
    return result;
}

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;
}

#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func)             \
    {                                                                     \
        func_type value = func(x);                                        \
        if (sizeof(target_type) < sizeof(func_type)) {                    \
            if (unlikely(value != (func_type) (target_type) value)) {     \
                func_type zero = 0;                                       \
                PyErr_SetString(PyExc_OverflowError,                      \
                    (is_unsigned && unlikely(value < zero)) ?             \
                    "can't convert negative value to " #target_type :     \
                    "value too large to convert to " #target_type);       \
                return (target_type) -1;                                  \
            }                                                             \
        }                                                                 \
        return (target_type) value;                                       \
    }

#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_As_long(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))) {
        if (sizeof(long) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG)
        } else {
            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;
            }
            if (sizeof(long) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT(long, unsigned long, PyLong_AsUnsignedLong)
            } else if (sizeof(long) <= sizeof(unsigned long long)) {
                __PYX_VERIFY_RETURN_INT(long, unsigned long long, PyLong_AsUnsignedLongLong)
            }
        } 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
            if (sizeof(long) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT(long, long, PyLong_AsLong)
            } else if (sizeof(long) <= sizeof(long long)) {
                __PYX_VERIFY_RETURN_INT(long, long long, PyLong_AsLongLong)
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            long val;
            PyObject *v = __Pyx_PyNumber_Int(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(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 int __Pyx_PyInt_As_int(PyObject *x) {
    const int neg_one = (int) -1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG)
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to int");
                return (int) -1;
            }
            return (int) 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(int)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return (int) ((PyLongObject*)x)->ob_digit[0];
                }
            }
 #endif
#endif
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to int");
                return (int) -1;
            }
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT(int, unsigned long, PyLong_AsUnsignedLong)
            } else if (sizeof(int) <= sizeof(unsigned long long)) {
                __PYX_VERIFY_RETURN_INT(int, unsigned long long, PyLong_AsUnsignedLongLong)
            }
        } else {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(int)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return +(int) ((PyLongObject*)x)->ob_digit[0];
                    case -1: return -(int) ((PyLongObject*)x)->ob_digit[0];
                }
            }
 #endif
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT(int, long, PyLong_AsLong)
            } else if (sizeof(int) <= sizeof(long long)) {
                __PYX_VERIFY_RETURN_INT(int, long long, PyLong_AsLongLong)
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_Int(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

#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) {
                switch (s[len-1]) {
                    case ' ': break;
                    case '\f': case '\r': case '\n': case '\t': case '\v':
                        PyFile_SoftSpace(f, 0);
                        break;
                    default:  break;
                }
            }
        }
    }
    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

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
    const long neg_one = (long) -1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(long) <= sizeof(unsigned long long)) {
            return PyLong_FromUnsignedLongLong((unsigned long long) value);
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(long long)) {
            return PyLong_FromLongLong((long long) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
    const int neg_one = (int) -1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(int) <= sizeof(unsigned long long)) {
            return PyLong_FromUnsignedLongLong((unsigned long long) value);
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(long long)) {
            return PyLong_FromLongLong((long long) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
    }
}

#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 PyObject* __Pyx_PyInt_From_ptrdiff_t(ptrdiff_t value) {
    const ptrdiff_t neg_one = (ptrdiff_t) -1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ptrdiff_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ptrdiff_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(ptrdiff_t) <= sizeof(unsigned long long)) {
            return PyLong_FromUnsignedLongLong((unsigned long long) value);
        }
    } else {
        if (sizeof(ptrdiff_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ptrdiff_t) <= sizeof(long long)) {
            return PyLong_FromLongLong((long long) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(ptrdiff_t),
                                     little, !is_unsigned);
    }
}

#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
 #endif
#endif
static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) {
    const size_t neg_one = (size_t) -1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(size_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG)
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to size_t");
                return (size_t) -1;
            }
            return (size_t) 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(size_t)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return (size_t) ((PyLongObject*)x)->ob_digit[0];
                }
            }
 #endif
#endif
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to size_t");
                return (size_t) -1;
            }
            if (sizeof(size_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT(size_t, unsigned long, PyLong_AsUnsignedLong)
            } else if (sizeof(size_t) <= sizeof(unsigned long long)) {
                __PYX_VERIFY_RETURN_INT(size_t, unsigned long long, PyLong_AsUnsignedLongLong)
            }
        } else {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(size_t)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return +(size_t) ((PyLongObject*)x)->ob_digit[0];
                    case -1: return -(size_t) ((PyLongObject*)x)->ob_digit[0];
                }
            }
 #endif
#endif
            if (sizeof(size_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT(size_t, long, PyLong_AsLong)
            } else if (sizeof(size_t) <= sizeof(long long)) {
                __PYX_VERIFY_RETURN_INT(size_t, long long, PyLong_AsLongLong)
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            size_t val;
            PyObject *v = __Pyx_PyNumber_Int(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (size_t) -1;
        }
    } else {
        size_t val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (size_t) -1;
        val = __Pyx_PyInt_As_size_t(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);
    if (gen->resume_label > 0) {
        PyObject_GC_Track(self);
#if PY_VERSION_HEX >= 0x030400a1
        if (PyObject_CallFinalizerFromDealloc(self))
#else
        Py_TYPE(gen)->tp_del(self);
        if (self->ob_refcnt > 0)
#endif
            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 ;
#if PY_VERSION_HEX < 0x030400a1
    assert(self->ob_refcnt == 0);
    self->ob_refcnt = 1;
#endif
    __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);
#if PY_VERSION_HEX < 0x030400a1
    /* 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
#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 | Py_TPFLAGS_HAVE_FINALIZE, /* 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*/
#if PY_VERSION_HEX >= 0x030400a1
    0,                                  /*tp_del*/
#else
    __Pyx_Generator_del,                /*tp_del*/
#endif
#if PY_VERSION_HEX >= 0x02060000
    0,                                  /*tp_version_tag*/
#endif
#if PY_VERSION_HEX >= 0x030400a1
    __Pyx_Generator_del,                /*tp_finalize*/
#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;
    __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
    if (__pyx_GeneratorType == NULL) {
        return -1;
    }
    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,
            "%.200s.%.200s 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,
            "%.200s.%.200s 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 */
#if !CYTHON_COMPILING_IN_PYPY
#if PY_VERSION_HEX >= 0x02060000
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(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,
                   "__%.4s__ returned non-%.4s (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;
}
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
 #endif
#endif
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b)))
      return PyInt_AS_LONG(b);
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
     #if CYTHON_USE_PYLONG_INTERNALS
       switch (Py_SIZE(b)) {
       case -1: return -(sdigit)((PyLongObject*)b)->ob_digit[0];
       case  0: return 0;
       case  1: return ((PyLongObject*)b)->ob_digit[0];
       }
     #endif
    #endif
  #if PY_VERSION_HEX < 0x02060000
    return PyInt_AsSsize_t(b);
  #else
    return PyLong_AsSsize_t(b);
  #endif
  }
  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
}


#endif /* Py_PYTHON_H */
