/* Generated by Cython 0.25.2 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "define_macros": [
            [
                "CYTHON_TRACE",
                "1"
            ]
        ],
        "depends": [
            "/usr/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h",
            "/usr/lib/python3.6/site-packages/numpy/core/include/numpy/ufuncobject.h"
        ],
        "extra_compile_args": [
            "-O3",
            "-march=native",
            "-w"
        ],
        "include_dirs": [
            "/usr/lib/python3.6/site-packages/numpy/core/include"
        ]
    },
    "module_name": "km3pipe.dataclasses"
}
END: Cython Metadata */

#define PY_SSIZE_T_CLEAN
#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 < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
    #error Cython requires Python 2.6+ or Python 3.2+.
#else
#define CYTHON_ABI "0_25_2"
#include <stddef.h>
#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 HAVE_LONG_LONG
  #if PY_VERSION_HEX >= 0x03030000 || (PY_MAJOR_VERSION == 2 && PY_VERSION_HEX >= 0x02070000)
    #define HAVE_LONG_LONG
  #endif
#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_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_ASYNC_SLOTS
  #define CYTHON_USE_ASYNC_SLOTS 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
#elif defined(PYSTON_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #undef CYTHON_USE_ASYNC_SLOTS
  #define CYTHON_USE_ASYNC_SLOTS 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #if PY_MAJOR_VERSION < 3
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 0
  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
    #define CYTHON_USE_PYLONG_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if PY_VERSION_HEX < 0x030300F0
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #ifndef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL 1
  #endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
  #undef SHIFT
  #undef BASE
  #undef MASK
#endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  #define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#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
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#ifndef METH_FASTCALL
  #define METH_FASTCALL 0x80
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject **args,
                                              Py_ssize_t nargs, PyObject *kwnames);
#else
  #define __Pyx_PyCFunctionFast _PyCFunctionFast
#endif
#if CYTHON_FAST_PYCCALL
#define __Pyx_PyFastCFunction_Check(func)\
    ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)))))
#else
#define __Pyx_PyFastCFunction_Check(func) 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_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #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)
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
#else
  #define CYTHON_PEP393_ENABLED 0
  #define PyUnicode_1BYTE_KIND  1
  #define PyUnicode_2BYTE_KIND  2
  #define PyUnicode_4BYTE_KIND  4
  #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_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
  #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]))
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
#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
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
  #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
  #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
  #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
  #define PyObject_Free(p)     PyMem_Free(p)
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_PYSTON
  #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#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 && !defined(PyObject_ASCII)
  #define PyObject_ASCII(o)            PyObject_Repr(o)
#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_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_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
#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_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#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
  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
#else
  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
#if CYTHON_USE_ASYNC_SLOTS
  #if PY_VERSION_HEX >= 0x030500B1
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
    #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  #else
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
    } __Pyx_PyAsyncMethodsStruct;
    #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  #endif
#else
  #define __Pyx_PyType_AsAsync(obj) NULL
#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
#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
#ifndef CYTHON_MAYBE_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)

#ifndef CYTHON_INLINE
  #if defined(__clang__)
    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  #elif 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

#if defined(WIN32) || defined(MS_WINDOWS)
  #define _USE_MATH_DEFINES
#endif
#include <math.h>
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
  float value;
  memset(&value, 0xFF, sizeof(value));
  return value;
}
#endif
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif


#define __PYX_ERR(f_index, lineno, Ln_error) \
{ \
  __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
}

#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_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#endif

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

#define __PYX_HAVE__km3pipe__dataclasses
#define __PYX_HAVE_API__km3pipe__dataclasses
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "numpy/arrayobject.h"
#include "numpy/ufuncobject.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#ifdef PYREX_WITHOUT_ASSERTIONS
#define CYTHON_WITHOUT_ASSERTIONS
#endif

typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;

#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_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#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)))  )
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER) && defined (_M_X64)
    #define __Pyx_sst_abs(value) _abs64(value)
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
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(const 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_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const 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 (size_t)(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_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
#define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False))
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(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_ASSUME_SAFE_MACROS
#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
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#else
#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
#endif
#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(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;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    const char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    if (strcmp(default_encoding_c, "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        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) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(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_DECREF(ascii_chars_u);
        Py_DECREF(ascii_chars_b);
    }
    Py_DECREF(default_encoding);
    return 0;
bad:
    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;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


/* Test for GCC > 2.95 */
#if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  #define likely(x)   __builtin_expect(!!(x), 1)
  #define unlikely(x) __builtin_expect(!!(x), 0)
#else /* !__GNUC__ or GCC < 2.95 */
  #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 PyObject *__pyx_empty_unicode;
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;

/* Header.proto */
#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[] = {
  "km3pipe/dataclasses.pyx",
  "__init__.pxd",
  "type.pxd",
};

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":725
 * # 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;

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":726
 * 
 * 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;

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":727
 * 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;

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":728
 * 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;

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":732
 * #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;

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":733
 * 
 * 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;

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":734
 * 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;

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":735
 * 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;

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":739
 * #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;

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":740
 * 
 * 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;

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":749
 * # 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;

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":750
 * # 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;

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":751
 * 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;

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":753
 * 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;

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":754
 * 
 * ctypedef npy_ulong      uint_t
 * ctypedef npy_ulonglong  ulong_t             # <<<<<<<<<<<<<<
 * ctypedef npy_ulonglong  ulonglong_t
 * 
 */
typedef npy_ulonglong __pyx_t_5numpy_ulong_t;

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":755
 * 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;

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":757
 * ctypedef npy_ulonglong  ulonglong_t
 * 
 * ctypedef npy_intp       intp_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uintp      uintp_t
 * 
 */
typedef npy_intp __pyx_t_5numpy_intp_t;

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":758
 * 
 * ctypedef npy_intp       intp_t
 * ctypedef npy_uintp      uintp_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_double     float_t
 */
typedef npy_uintp __pyx_t_5numpy_uintp_t;

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":760
 * 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;

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":761
 * 
 * ctypedef npy_double     float_t
 * ctypedef npy_double     double_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longdouble longdouble_t
 * 
 */
typedef npy_double __pyx_t_5numpy_double_t;

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":762
 * 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;
/* Declarations.proto */
#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
static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);

/* Declarations.proto */
#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
static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);


/*--- Type declarations ---*/
struct __pyx_obj_7km3pipe_11dataclasses_Hit;
struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit;
struct __pyx_obj_7km3pipe_11dataclasses_MCHit;
struct __pyx_obj_7km3pipe_11dataclasses_Track;
struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row;
struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr;
struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator;
struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator;
struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator;
struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator;
struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict;
struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr;

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":764
 * 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;

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":765
 * 
 * ctypedef npy_cfloat      cfloat_t
 * ctypedef npy_cdouble     cdouble_t             # <<<<<<<<<<<<<<
 * ctypedef npy_clongdouble clongdouble_t
 * 
 */
typedef npy_cdouble __pyx_t_5numpy_cdouble_t;

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":766
 * 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;

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":768
 * ctypedef npy_clongdouble clongdouble_t
 * 
 * ctypedef npy_cdouble     complex_t             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew1(a):
 */
typedef npy_cdouble __pyx_t_5numpy_complex_t;
struct __pyx_defaults;
typedef struct __pyx_defaults __pyx_defaults;
struct __pyx_defaults {
  PyObject *__pyx_arg_input_array;
};

/* "km3pipe/dataclasses.pyx":519
 * 
 * 
 * cdef class Hit:             # <<<<<<<<<<<<<<
 *     """Hit on a PMT.
 * 
 */
struct __pyx_obj_7km3pipe_11dataclasses_Hit {
  PyObject_HEAD
  int id;
  int dom_id;
  int time;
  int tot;
  int channel_id;
  int pmt_id;
  unsigned short triggered;
  float pos_x;
  float pos_y;
  float pos_z;
  float dir_x;
  float dir_y;
  float dir_z;
  float t0;
};


/* "km3pipe/dataclasses.pyx":597
 * 
 * 
 * cdef class TimesliceHit:             # <<<<<<<<<<<<<<
 *     """Timeslice hit on a PMT.
 * 
 */
struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit {
  PyObject_HEAD
  int dom_id;
  int time;
  int tot;
  int channel_id;
  PyArrayObject *pos;
  PyArrayObject *dir;
};


/* "km3pipe/dataclasses.pyx":636
 * 
 * 
 * cdef class MCHit:             # <<<<<<<<<<<<<<
 *     """Monte Carlo Hit on a PMT.
 * 
 */
struct __pyx_obj_7km3pipe_11dataclasses_MCHit {
  PyObject_HEAD
  int id;
  int dom_id;
  int time;
  int tot;
  int channel_id;
  int pmt_id;
  unsigned short triggered;
  PyArrayObject *pos;
  PyArrayObject *dir;
};


/* "km3pipe/dataclasses.pyx":687
 * 
 * 
 * cdef class Track:             # <<<<<<<<<<<<<<
 *     """Particle track.
 * 
 */
struct __pyx_obj_7km3pipe_11dataclasses_Track {
  PyObject_HEAD
  int id;
  int time;
  int type;
  int interaction_channel;
  float energy;
  float length;
  float bjorkeny;
  unsigned short is_cc;
  PyArrayObject *pos;
  PyArrayObject *dir;
};


/* "km3pipe/dataclasses.pyx":376
 * 
 *     @classmethod
 *     def from_row(cls, row, **kwargs):             # <<<<<<<<<<<<<<
 *         args = tuple((row[col] for col in cls.dtype.names))
 *         return cls(np.array(args, dtype=cls.dtype), **kwargs)
 */
struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row {
  PyObject_HEAD
  PyObject *__pyx_v_cls;
  PyObject *__pyx_v_row;
};


/* "km3pipe/dataclasses.pyx":377
 *     @classmethod
 *     def from_row(cls, row, **kwargs):
 *         args = tuple((row[col] for col in cls.dtype.names))             # <<<<<<<<<<<<<<
 *         return cls(np.array(args, dtype=cls.dtype), **kwargs)
 * 
 */
struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr {
  PyObject_HEAD
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row *__pyx_outer_scope;
  PyObject *__pyx_v_col;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "km3pipe/dataclasses.pyx":1025
 *             raise TypeError("index must be int or slice")
 * 
 *     def _slice_generator(self, index):             # <<<<<<<<<<<<<<
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 */
struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator {
  PyObject_HEAD
  PyObject *__pyx_v_i;
  PyObject *__pyx_v_index;
  PyObject *__pyx_v_self;
  PyObject *__pyx_v_start;
  PyObject *__pyx_v_step;
  PyObject *__pyx_v_stop;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "km3pipe/dataclasses.pyx":1163
 *             raise TypeError("index must be int or slice")
 * 
 *     def _slice_generator(self, index):             # <<<<<<<<<<<<<<
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 */
struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator {
  PyObject_HEAD
  PyObject *__pyx_v_i;
  PyObject *__pyx_v_index;
  PyObject *__pyx_v_self;
  PyObject *__pyx_v_start;
  PyObject *__pyx_v_step;
  PyObject *__pyx_v_stop;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "km3pipe/dataclasses.pyx":1447
 *             raise TypeError("index must be int or slice")
 * 
 *     def _slice_generator(self, index):             # <<<<<<<<<<<<<<
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 */
struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator {
  PyObject_HEAD
  PyObject *__pyx_v_i;
  PyObject *__pyx_v_index;
  PyObject *__pyx_v_self;
  PyObject *__pyx_v_start;
  PyObject *__pyx_v_step;
  PyObject *__pyx_v_stop;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "km3pipe/dataclasses.pyx":1562
 *             raise TypeError("index must be int or slice")
 * 
 *     def _slice_generator(self, index):             # <<<<<<<<<<<<<<
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 */
struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator {
  PyObject_HEAD
  PyObject *__pyx_v_i;
  PyObject *__pyx_v_index;
  PyObject *__pyx_v_self;
  PyObject *__pyx_v_start;
  PyObject *__pyx_v_step;
  PyObject *__pyx_v_stop;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "km3pipe/dataclasses.pyx":1620
 * 
 *     @classmethod
 *     def from_dict(cls, map, dtype=None, **kwargs):             # <<<<<<<<<<<<<<
 *         if dtype is None:
 *             dtype = np.dtype([(key, float) for key in sorted(map.keys())])
 */
struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict {
  PyObject_HEAD
  PyObject *__pyx_v_dtype;
  PyObject *__pyx_v_map;
};


/* "km3pipe/dataclasses.pyx":1623
 *         if dtype is None:
 *             dtype = np.dtype([(key, float) for key in sorted(map.keys())])
 *         return cls(np.array([tuple((map[key] for key in dtype.names))],             # <<<<<<<<<<<<<<
 *                             dtype=dtype), **kwargs)
 * 
 */
struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr {
  PyObject_HEAD
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict *__pyx_outer_scope;
  PyObject *__pyx_v_key;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#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);
  #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
#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)

/* PyObjectGetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
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

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

/* RaiseArgTupleInvalid.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);

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

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

/* Profile.proto */
#ifndef CYTHON_PROFILE
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
  #define CYTHON_PROFILE 0
#else
  #define CYTHON_PROFILE 1
#endif
#endif
#ifndef CYTHON_TRACE_NOGIL
  #define CYTHON_TRACE_NOGIL 0
#else
  #if CYTHON_TRACE_NOGIL && !defined(CYTHON_TRACE)
    #define CYTHON_TRACE 1
  #endif
#endif
#ifndef CYTHON_TRACE
  #define CYTHON_TRACE 0
#endif
#if CYTHON_TRACE
  #undef CYTHON_PROFILE_REUSE_FRAME
#endif
#ifndef CYTHON_PROFILE_REUSE_FRAME
  #define CYTHON_PROFILE_REUSE_FRAME 0
#endif
#if CYTHON_PROFILE || CYTHON_TRACE
  #include "compile.h"
  #include "frameobject.h"
  #include "traceback.h"
  #if CYTHON_PROFILE_REUSE_FRAME
    #define CYTHON_FRAME_MODIFIER static
    #define CYTHON_FRAME_DEL(frame)
  #else
    #define CYTHON_FRAME_MODIFIER
    #define CYTHON_FRAME_DEL(frame) Py_CLEAR(frame)
  #endif
  #define __Pyx_TraceDeclarations\
  static PyCodeObject *__pyx_frame_code = NULL;\
  CYTHON_FRAME_MODIFIER PyFrameObject *__pyx_frame = NULL;\
  int __Pyx_use_tracing = 0;
  #define __Pyx_TraceFrameInit(codeobj)\
  if (codeobj) __pyx_frame_code = (PyCodeObject*) codeobj;
  #ifdef WITH_THREAD
  #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\
  if (nogil) {\
      if (CYTHON_TRACE_NOGIL) {\
          PyThreadState *tstate;\
          PyGILState_STATE state = PyGILState_Ensure();\
          tstate = PyThreadState_GET();\
          if (unlikely(tstate->use_tracing) && !tstate->tracing &&\
                  (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\
              __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, funcname, srcfile, firstlineno);\
          }\
          PyGILState_Release(state);\
          if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
      }\
  } else {\
      PyThreadState* tstate = PyThreadState_GET();\
      if (unlikely(tstate->use_tracing) && !tstate->tracing &&\
              (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\
          __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, funcname, srcfile, firstlineno);\
          if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
      }\
  }
  #else
  #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\
  {   PyThreadState* tstate = PyThreadState_GET();\
      if (unlikely(tstate->use_tracing) && !tstate->tracing &&\
              (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\
          __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, funcname, srcfile, firstlineno);\
          if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
      }\
  }
  #endif
  #define __Pyx_TraceException()\
  if (likely(!__Pyx_use_tracing)); else {\
      PyThreadState* tstate = PyThreadState_GET();\
      if (tstate->use_tracing &&\
              (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\
          tstate->tracing++;\
          tstate->use_tracing = 0;\
          PyObject *exc_info = __Pyx_GetExceptionTuple(tstate);\
          if (exc_info) {\
              if (CYTHON_TRACE && tstate->c_tracefunc)\
                  tstate->c_tracefunc(\
                      tstate->c_traceobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\
              tstate->c_profilefunc(\
                  tstate->c_profileobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\
              Py_DECREF(exc_info);\
          }\
          tstate->use_tracing = 1;\
          tstate->tracing--;\
      }\
  }
  static void __Pyx_call_return_trace_func(PyThreadState *tstate, PyFrameObject *frame, PyObject *result) {
      PyObject *type, *value, *traceback;
      PyErr_Fetch(&type, &value, &traceback);
      tstate->tracing++;
      tstate->use_tracing = 0;
      if (CYTHON_TRACE && tstate->c_tracefunc)
          tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_RETURN, result);
      if (tstate->c_profilefunc)
          tstate->c_profilefunc(tstate->c_profileobj, frame, PyTrace_RETURN, result);
      CYTHON_FRAME_DEL(frame);
      tstate->use_tracing = 1;
      tstate->tracing--;
      PyErr_Restore(type, value, traceback);
  }
  #ifdef WITH_THREAD
  #define __Pyx_TraceReturn(result, nogil)\
  if (likely(!__Pyx_use_tracing)); else {\
      if (nogil) {\
          if (CYTHON_TRACE_NOGIL) {\
              PyThreadState *tstate;\
              PyGILState_STATE state = PyGILState_Ensure();\
              tstate = PyThreadState_GET();\
              if (tstate->use_tracing) {\
                  __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
              }\
              PyGILState_Release(state);\
          }\
      } else {\
          PyThreadState* tstate = PyThreadState_GET();\
          if (tstate->use_tracing) {\
              __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
          }\
      }\
  }
  #else
  #define __Pyx_TraceReturn(result, nogil)\
  if (likely(!__Pyx_use_tracing)); else {\
      PyThreadState* tstate = PyThreadState_GET();\
      if (tstate->use_tracing) {\
          __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
      }\
  }
  #endif
  static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno);
  static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, const char *funcname, const char *srcfile, int firstlineno);
#else
  #define __Pyx_TraceDeclarations
  #define __Pyx_TraceFrameInit(codeobj)
  #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)   if (1); else goto_error;
  #define __Pyx_TraceException()
  #define __Pyx_TraceReturn(result, nogil)
#endif
#if CYTHON_TRACE
  static int __Pyx_call_line_trace_func(PyThreadState *tstate, PyFrameObject *frame, int lineno) {
      int ret;
      PyObject *type, *value, *traceback;
      PyErr_Fetch(&type, &value, &traceback);
      __Pyx_PyFrame_SetLineNumber(frame, lineno);
      tstate->tracing++;
      tstate->use_tracing = 0;
      ret = tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_LINE, NULL);
      tstate->use_tracing = 1;
      tstate->tracing--;
      if (likely(!ret)) {
          PyErr_Restore(type, value, traceback);
      } else {
          Py_XDECREF(type);
          Py_XDECREF(value);
          Py_XDECREF(traceback);
      }
      return ret;
  }
  #ifdef WITH_THREAD
  #define __Pyx_TraceLine(lineno, nogil, goto_error)\
  if (likely(!__Pyx_use_tracing)); else {\
      if (nogil) {\
          if (CYTHON_TRACE_NOGIL) {\
              int ret = 0;\
              PyThreadState *tstate;\
              PyGILState_STATE state = PyGILState_Ensure();\
              tstate = PyThreadState_GET();\
              if (unlikely(tstate->use_tracing && tstate->c_tracefunc)) {\
                  ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
              }\
              PyGILState_Release(state);\
              if (unlikely(ret)) goto_error;\
          }\
      } else {\
          PyThreadState* tstate = PyThreadState_GET();\
          if (unlikely(tstate->use_tracing && tstate->c_tracefunc)) {\
              int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
              if (unlikely(ret)) goto_error;\
          }\
      }\
  }
  #else
  #define __Pyx_TraceLine(lineno, nogil, goto_error)\
  if (likely(!__Pyx_use_tracing)); else {\
      PyThreadState* tstate = PyThreadState_GET();\
      if (unlikely(tstate->use_tracing && tstate->c_tracefunc)) {\
          int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
          if (unlikely(ret)) goto_error;\
      }\
  }
  #endif
#else
  #define __Pyx_TraceLine(lineno, nogil, goto_error)   if (1); else goto_error;
#endif

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

/* RaiseTooManyValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

/* RaiseNeedMoreValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

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

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

/* PyFunctionFastCall.proto */
#if CYTHON_FAST_PYCALL
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
    __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
#else
#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
#endif
#endif

/* PyObjectCallMethO.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif

/* PyObjectCallNoArg.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
#else
#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
#endif

/* PyCFunctionFastCall.proto */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
#else
#define __Pyx_PyCFunction_FastCall(func, args, nargs)  (assert(0), NULL)
#endif

/* PyObjectCallOneArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);

/* PyObjectCallMethod0.proto */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);

/* RaiseNoneIterError.proto */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);

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

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

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

/* IncludeStringH.proto */
#include <string.h>

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

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

/* StrEquals.proto */
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
#else
#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
#endif

/* FetchCommonType.proto */
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);

/* CythonFunction.proto */
#define __Pyx_CyFunction_USED 1
#include <structmember.h>
#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
#define __Pyx_CYFUNCTION_CCLASS        0x04
#define __Pyx_CyFunction_GetClosure(f)\
    (((__pyx_CyFunctionObject *) (f))->func_closure)
#define __Pyx_CyFunction_GetClassObj(f)\
    (((__pyx_CyFunctionObject *) (f))->func_classobj)
#define __Pyx_CyFunction_Defaults(type, f)\
    ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
    ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
typedef struct {
    PyCFunctionObject func;
#if PY_VERSION_HEX < 0x030500A0
    PyObject *func_weakreflist;
#endif
    PyObject *func_dict;
    PyObject *func_name;
    PyObject *func_qualname;
    PyObject *func_doc;
    PyObject *func_globals;
    PyObject *func_code;
    PyObject *func_closure;
    PyObject *func_classobj;
    void *defaults;
    int defaults_pyobjects;
    int flags;
    PyObject *defaults_tuple;
    PyObject *defaults_kwdict;
    PyObject *(*defaults_getter)(PyObject *);
    PyObject *func_annotations;
} __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);

/* ListAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
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

/* PyThreadStateGet.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = PyThreadState_GET();
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#endif

/* SaveResetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
#else
#define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
#define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
#endif

/* PyErrExceptionMatches.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
#else
#define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
#endif

/* GetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
#endif

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

/* GetItemInt.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);

/* PyObjectSetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
#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

/* None.proto */
static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);

/* MergeKeywords.proto */
static int __Pyx_MergeKeywords(PyObject *kwdict, PyObject *source_mapping);

/* SetItemInt.proto */
#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
               __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
                                               int is_list, int wraparound, int boundscheck);

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

/* ListCompAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
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

/* UnicodeAsUCS4.proto */
static CYTHON_INLINE Py_UCS4 __Pyx_PyUnicode_AsPy_UCS4(PyObject*);

/* object_ord.proto */
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyObject_Ord(c)\
    (likely(PyUnicode_Check(c)) ? (long)__Pyx_PyUnicode_AsPy_UCS4(c) : __Pyx__PyObject_Ord(c))
#else
#define __Pyx_PyObject_Ord(c) __Pyx__PyObject_Ord(c)
#endif
static long __Pyx__PyObject_Ord(PyObject* c);

/* PyErrFetchRestore.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
#define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
#endif

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

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
#else
#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\
    (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
#endif

/* StringJoin.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);
#endif

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
#else
#define __Pyx_PyInt_EqObjC(op1, op2, intval, inplace)\
    PyObject_RichCompare(op1, op2, Py_EQ)
    #endif

/* GetAttr.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);

/* GetAttr3.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);

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

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

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

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

/* CalculateMetaclass.proto */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);

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

/* ClassMethod.proto */
#include "descrobject.h"
static PyObject* __Pyx_Method_ClassMethod(PyObject *method);

/* CodeObjectCache.proto */
typedef struct {
    PyCodeObject* code_object;
    int code_line;
} __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);

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_short(unsigned short value);

/* RealImag.proto */
#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(__cplusplus) && CYTHON_CCOMPLEX\
        && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
    #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

/* Arithmetic.proto */
#if CYTHON_CCOMPLEX
    #define __Pyx_c_eq_float(a, b)   ((a)==(b))
    #define __Pyx_c_sum_float(a, b)  ((a)+(b))
    #define __Pyx_c_diff_float(a, b) ((a)-(b))
    #define __Pyx_c_prod_float(a, b) ((a)*(b))
    #define __Pyx_c_quot_float(a, b) ((a)/(b))
    #define __Pyx_c_neg_float(a)     (-(a))
  #ifdef __cplusplus
    #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
    #define __Pyx_c_conj_float(z)    (::std::conj(z))
    #if 1
        #define __Pyx_c_abs_float(z)     (::std::abs(z))
        #define __Pyx_c_pow_float(a, b)  (::std::pow(a, b))
    #endif
  #else
    #define __Pyx_c_is_zero_float(z) ((z)==0)
    #define __Pyx_c_conj_float(z)    (conjf(z))
    #if 1
        #define __Pyx_c_abs_float(z)     (cabsf(z))
        #define __Pyx_c_pow_float(a, b)  (cpowf(a, b))
    #endif
 #endif
#else
    static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
    static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
    #if 1
        static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
        static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
    #endif
#endif

/* Arithmetic.proto */
#if CYTHON_CCOMPLEX
    #define __Pyx_c_eq_double(a, b)   ((a)==(b))
    #define __Pyx_c_sum_double(a, b)  ((a)+(b))
    #define __Pyx_c_diff_double(a, b) ((a)-(b))
    #define __Pyx_c_prod_double(a, b) ((a)*(b))
    #define __Pyx_c_quot_double(a, b) ((a)/(b))
    #define __Pyx_c_neg_double(a)     (-(a))
  #ifdef __cplusplus
    #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
    #define __Pyx_c_conj_double(z)    (::std::conj(z))
    #if 1
        #define __Pyx_c_abs_double(z)     (::std::abs(z))
        #define __Pyx_c_pow_double(a, b)  (::std::pow(a, b))
    #endif
  #else
    #define __Pyx_c_is_zero_double(z) ((z)==0)
    #define __Pyx_c_conj_double(z)    (conj(z))
    #if 1
        #define __Pyx_c_abs_double(z)     (cabs(z))
        #define __Pyx_c_pow_double(a, b)  (cpow(a, b))
    #endif
 #endif
#else
    static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
    static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
    #if 1
        static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
        static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
    #endif
#endif

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value);

/* CIntFromPy.proto */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE unsigned short __Pyx_PyInt_As_unsigned_short(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE npy_int64 __Pyx_PyInt_As_npy_int64(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);

/* SwapException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSwap(type, value, tb)  __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* PyObjectCallMethod1.proto */
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);

/* CoroutineBase.proto */
typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyObject *);
typedef struct {
    PyObject_HEAD
    __pyx_coroutine_body_t body;
    PyObject *closure;
    PyObject *exc_type;
    PyObject *exc_value;
    PyObject *exc_traceback;
    PyObject *gi_weakreflist;
    PyObject *classobj;
    PyObject *yieldfrom;
    PyObject *gi_name;
    PyObject *gi_qualname;
    PyObject *gi_modulename;
    int resume_label;
    char is_running;
} __pyx_CoroutineObject;
static __pyx_CoroutineObject *__Pyx__Coroutine_New(
    PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *closure,
    PyObject *name, PyObject *qualname, PyObject *module_name);
static int __Pyx_Coroutine_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

/* PatchModuleWithCoroutine.proto */
static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);

/* PatchGeneratorABC.proto */
static int __Pyx_patch_abc(void);

/* Generator.proto */
#define __Pyx_Generator_USED
static PyTypeObject *__pyx_GeneratorType = 0;
#define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
#define __Pyx_Generator_New(body, closure, name, qualname, module_name)\
    __Pyx__Coroutine_New(__pyx_GeneratorType, body, closure, name, qualname, module_name)
static PyObject *__Pyx_Generator_Next(PyObject *self);
static int __pyx_Generator_init(void);

/* CheckBinaryVersion.proto */
static int __Pyx_check_binary_version(void);

/* PyIdentifierFromString.proto */
#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

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

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

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


/* Module declarations from 'libcpp' */

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

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

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

/* Module declarations from '__builtin__' */

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

/* Module declarations from 'cpython' */

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

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

/* 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*/
static CYTHON_INLINE int __pyx_f_5numpy_import_array(void); /*proto*/

/* Module declarations from 'cython' */

/* Module declarations from 'km3pipe.dataclasses' */
static PyTypeObject *__pyx_ptype_7km3pipe_11dataclasses_Hit = 0;
static PyTypeObject *__pyx_ptype_7km3pipe_11dataclasses_TimesliceHit = 0;
static PyTypeObject *__pyx_ptype_7km3pipe_11dataclasses_MCHit = 0;
static PyTypeObject *__pyx_ptype_7km3pipe_11dataclasses_Track = 0;
static PyTypeObject *__pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct__from_row = 0;
static PyTypeObject *__pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr = 0;
static PyTypeObject *__pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator = 0;
static PyTypeObject *__pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator = 0;
static PyTypeObject *__pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator = 0;
static PyTypeObject *__pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator = 0;
static PyTypeObject *__pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict = 0;
static PyTypeObject *__pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr = 0;
#define __Pyx_MODULE_NAME "km3pipe.dataclasses"
int __pyx_module_is_main_km3pipe__dataclasses = 0;

/* Implementation of 'km3pipe.dataclasses' */
static PyObject *__pyx_builtin_object;
static PyObject *__pyx_builtin_property;
static PyObject *__pyx_builtin_zip;
static PyObject *__pyx_builtin_KeyError;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_AttributeError;
static PyObject *__pyx_builtin_StopIteration;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_IndexError;
static PyObject *__pyx_builtin_max;
static PyObject *__pyx_builtin_super;
static PyObject *__pyx_builtin_RuntimeError;
static PyObject *__pyx_builtin_ImportError;
static const char __pyx_k_E[] = "E";
static const char __pyx_k_h[] = "h";
static const char __pyx_k_i[] = "i";
static const char __pyx_k_s[] = "s";
static const char __pyx_k_t[] = "t";
static const char __pyx_k_x[] = "x";
static const char __pyx_k_y[] = "y";
static const char __pyx_k_z[] = "z";
static const char __pyx_k__2[] = "/";
static const char __pyx_k_f8[] = "<f8";
static const char __pyx_k_i4[] = "<i4";
static const char __pyx_k_id[] = "id";
static const char __pyx_k_np[] = "np";
static const char __pyx_k_pd[] = "pd";
static const char __pyx_k_t0[] = "t0";
static const char __pyx_k_to[] = "to";
static const char __pyx_k_u1[] = "u1";
static const char __pyx_k_u4[] = "<u4";
static const char __pyx_k_u8[] = "<u8";
static const char __pyx_k_Hit[] = "Hit";
static const char __pyx_k_MIT[] = "MIT";
static const char __pyx_k_all[] = "__all__";
static const char __pyx_k_arg[] = "arg";
static const char __pyx_k_arr[] = "arr";
static const char __pyx_k_cls[] = "cls";
static const char __pyx_k_col[] = "col";
static const char __pyx_k_dir[] = "dir";
static const char __pyx_k_doc[] = "__doc__";
static const char __pyx_k_fmt[] = "fmt";
static const char __pyx_k_hit[] = "hit";
static const char __pyx_k_ids[] = "ids";
static const char __pyx_k_key[] = "key";
static const char __pyx_k_len[] = "len";
static const char __pyx_k_map[] = "map";
static const char __pyx_k_max[] = "max";
static const char __pyx_k_nan[] = "nan";
static const char __pyx_k_new[] = "__new__";
static const char __pyx_k_obj[] = "obj";
static const char __pyx_k_pop[] = "pop";
static const char __pyx_k_pos[] = "pos";
static const char __pyx_k_row[] = "row";
static const char __pyx_k_six[] = "six";
static const char __pyx_k_str[] = "__str__";
static const char __pyx_k_t0s[] = "t0s";
static const char __pyx_k_tot[] = "tot";
static const char __pyx_k_usr[] = "usr";
static const char __pyx_k_val[] = "val";
static const char __pyx_k_zip[] = "zip";
static const char __pyx_k_Hits[] = "Hits";
static const char __pyx_k__113[] = "";
static const char __pyx_k__116[] = "\n";
static const char __pyx_k__221[] = "\n...\n\n";
static const char __pyx_k_args[] = "args";
static const char __pyx_k_attr[] = "attr";
static const char __pyx_k_data[] = "data";
static const char __pyx_k_dict[] = "dict";
static const char __pyx_k_full[] = "full";
static const char __pyx_k_hits[] = "_hits";
static const char __pyx_k_id_2[] = "_id";
static const char __pyx_k_init[] = "__init__";
static const char __pyx_k_insp[] = "__insp__";
static const char __pyx_k_item[] = "item";
static const char __pyx_k_iter[] = "__iter__";
static const char __pyx_k_join[] = "join";
static const char __pyx_k_keys[] = "keys";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_mc_t[] = "mc_t";
static const char __pyx_k_name[] = "name";
static const char __pyx_k_next[] = "__next__";
static const char __pyx_k_norm[] = "norm";
static const char __pyx_k_read[] = "read";
static const char __pyx_k_repr[] = "__repr__";
static const char __pyx_k_self[] = "self";
static const char __pyx_k_send[] = "send";
static const char __pyx_k_size[] = "_size";
static const char __pyx_k_step[] = "step";
static const char __pyx_k_stop[] = "stop";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_time[] = "time";
static const char __pyx_k_tots[] = "tots";
static const char __pyx_k_trig[] = "trig";
static const char __pyx_k_type[] = "type";
static const char __pyx_k_view[] = "view";
static const char __pyx_k_IS_CC[] = "IS_CC";
static const char __pyx_k_Point[] = "Point";
static const char __pyx_k_Track[] = "Track";
static const char __pyx_k_arr_2[] = "_arr";
static const char __pyx_k_array[] = "array";
static const char __pyx_k_close[] = "close";
static const char __pyx_k_dir_2[] = "_dir";
static const char __pyx_k_dir_x[] = "dir_x";
static const char __pyx_k_dir_y[] = "dir_y";
static const char __pyx_k_dir_z[] = "dir_z";
static const char __pyx_k_dtype[] = "dtype";
static const char __pyx_k_email[] = "__email__";
static const char __pyx_k_empty[] = "empty";
static const char __pyx_k_h5loc[] = "h5loc";
static const char __pyx_k_index[] = "_index";
static const char __pyx_k_is_cc[] = "is_cc";
static const char __pyx_k_items[] = "items";
static const char __pyx_k_km3df[] = "km3df";
static const char __pyx_k_len_2[] = "__len__";
static const char __pyx_k_mc_id[] = "mc_id";
static const char __pyx_k_muons[] = "muons";
static const char __pyx_k_names[] = "names";
static const char __pyx_k_numpy[] = "numpy";
static const char __pyx_k_pos_2[] = "_pos";
static const char __pyx_k_pos_x[] = "pos_x";
static const char __pyx_k_pos_y[] = "pos_y";
static const char __pyx_k_pos_z[] = "pos_z";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_shape[] = "shape";
static const char __pyx_k_start[] = "start";
static const char __pyx_k_super[] = "super";
static const char __pyx_k_table[] = "table";
static const char __pyx_k_throw[] = "throw";
static const char __pyx_k_times[] = "times";
static const char __pyx_k_tools[] = "tools";
static const char __pyx_k_track[] = "track";
static const char __pyx_k_types[] = "types";
static const char __pyx_k_value[] = "value";
static const char __pyx_k_McHits[] = "McHits";
static const char __pyx_k_Struct[] = "Struct";
static const char __pyx_k_Tracks[] = "Tracks";
static const char __pyx_k_author[] = "__author__";
static const char __pyx_k_ctypes[] = "ctypes";
static const char __pyx_k_det_id[] = "det_id";
static const char __pyx_k_dir_xs[] = "dir_xs";
static const char __pyx_k_dir_ys[] = "dir_ys";
static const char __pyx_k_dir_zs[] = "dir_zs";
static const char __pyx_k_dom_id[] = "dom_id";
static const char __pyx_k_energy[] = "energy";
static const char __pyx_k_fields[] = "_fields";
static const char __pyx_k_format[] = "format";
static const char __pyx_k_frames[] = "_frames";
static const char __pyx_k_hits_2[] = "hits";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_is_ccs[] = "is_ccs";
static const char __pyx_k_kwargs[] = "kwargs";
static const char __pyx_k_length[] = "length";
static const char __pyx_k_linalg[] = "linalg";
static const char __pyx_k_module[] = "__module__";
static const char __pyx_k_n_hits[] = "n_hits";
static const char __pyx_k_next_2[] = "next";
static const char __pyx_k_object[] = "object";
static const char __pyx_k_pandas[] = "pandas";
static const char __pyx_k_plural[] = "plural";
static const char __pyx_k_pmt_id[] = "pmt_id";
static const char __pyx_k_pos_xs[] = "pos_xs";
static const char __pyx_k_pos_ys[] = "pos_ys";
static const char __pyx_k_pos_zs[] = "pos_zs";
static const char __pyx_k_run_id[] = "run_id";
static const char __pyx_k_setter[] = "setter";
static const char __pyx_k_status[] = "__status__";
static const char __pyx_k_stream[] = "stream";
static const char __pyx_k_struct[] = "struct";
static const char __pyx_k_subset[] = "subset";
static const char __pyx_k_time_2[] = "_time";
static const char __pyx_k_tracks[] = "tracks";
static const char __pyx_k_type_2[] = "_type";
static const char __pyx_k_zenith[] = "zenith";
static const char __pyx_k_Point_x[] = "Point.x";
static const char __pyx_k_Point_y[] = "Point.y";
static const char __pyx_k_Point_z[] = "Point.z";
static const char __pyx_k_array_2[] = "__array__";
static const char __pyx_k_asarray[] = "asarray";
static const char __pyx_k_conv_to[] = "conv_to";
static const char __pyx_k_credits[] = "__credits__";
static const char __pyx_k_dom_ids[] = "dom_ids";
static const char __pyx_k_genexpr[] = "genexpr";
static const char __pyx_k_get_len[] = "get_len";
static const char __pyx_k_getitem[] = "__getitem__";
static const char __pyx_k_index_2[] = "index";
static const char __pyx_k_indices[] = "indices";
static const char __pyx_k_inplace[] = "inplace";
static const char __pyx_k_is_cc_2[] = "_is_cc";
static const char __pyx_k_lengths[] = "lengths";
static const char __pyx_k_license[] = "__license__";
static const char __pyx_k_pmt_ids[] = "pmt_ids";
static const char __pyx_k_prepare[] = "__prepare__";
static const char __pyx_k_reshape[] = "reshape";
static const char __pyx_k_tabname[] = "tabname";
static const char __pyx_k_KM3Array[] = "KM3Array";
static const char __pyx_k_KeyError[] = "KeyError";
static const char __pyx_k_McTracks[] = "McTracks";
static const char __pyx_k_Position[] = "Position";
static const char __pyx_k_bjorkeny[] = "bjorkeny";
static const char __pyx_k_calcsize[] = "calcsize";
static const char __pyx_k_energies[] = "energies";
static const char __pyx_k_energy_2[] = "_energy";
static const char __pyx_k_event_id[] = "event_id";
static const char __pyx_k_frame__0[] = "frame_{0}";
static const char __pyx_k_frame_id[] = "frame_id";
static const char __pyx_k_frames_2[] = "frames";
static const char __pyx_k_from_evt[] = "from_evt";
static const char __pyx_k_from_row[] = "from_row";
static const char __pyx_k_length_2[] = "_length";
static const char __pyx_k_metadata[] = "_metadata";
static const char __pyx_k_n_tracks[] = "n_tracks";
static const char __pyx_k_overlays[] = "overlays";
static const char __pyx_k_pdg2name[] = "pdg2name";
static const char __pyx_k_property[] = "property";
static const char __pyx_k_qualname[] = "__qualname__";
static const char __pyx_k_slice_id[] = "slice_id";
static const char __pyx_k_tracks_2[] = "_tracks";
static const char __pyx_k_DataFrame[] = "DataFrame";
static const char __pyx_k_Direction[] = "Direction";
static const char __pyx_k_EventInfo[] = "EventInfo";
static const char __pyx_k_HitSeries[] = "HitSeries";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_bjorkenys[] = "bjorkenys";
static const char __pyx_k_conv_from[] = "conv_from";
static const char __pyx_k_copyright[] = "__copyright__";
static const char __pyx_k_from_dict[] = "from_dict";
static const char __pyx_k_geant2pdg[] = "geant2pdg";
static const char __pyx_k_iteritems[] = "iteritems";
static const char __pyx_k_metaclass[] = "metaclass";
static const char __pyx_k_n_packets[] = "n_packets";
static const char __pyx_k_normalise[] = "_normalise";
static const char __pyx_k_positions[] = "positions";
static const char __pyx_k_serialise[] = "serialise";
static const char __pyx_k_structure[] = "_structure";
static const char __pyx_k_triggered[] = "triggered";
static const char __pyx_k_weight_w1[] = "weight_w1";
static const char __pyx_k_weight_w2[] = "weight_w2";
static const char __pyx_k_weight_w3[] = "weight_w3";
static const char __pyx_k_Hit___insp[] = "Hit.__insp__";
static const char __pyx_k_IndexError[] = "IndexError";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_bjorkeny_2[] = "_bjorkeny";
static const char __pyx_k_channel_id[] = "channel_id";
static const char __pyx_k_class_attr[] = "class_attr";
static const char __pyx_k_class_name[] = "class_name";
static const char __pyx_k_directions[] = "directions";
static const char __pyx_k_first_hits[] = "first_hits";
static const char __pyx_k_from_aanet[] = "from_aanet";
static const char __pyx_k_from_km3df[] = "from_km3df";
static const char __pyx_k_from_table[] = "from_table";
static const char __pyx_k_maintainer[] = "__maintainer__";
static const char __pyx_k_to_records[] = "to_records";
static const char __pyx_k_track_args[] = "track_args";
static const char __pyx_k_triggereds[] = "triggereds";
static const char __pyx_k_0_4_1_4_2_4[] = "({0:.4}, {1:.4}, {2:.4})";
static const char __pyx_k_Development[] = "Development";
static const char __pyx_k_Direction_2[] = "Direction_";
static const char __pyx_k_ImportError[] = "ImportError";
static const char __pyx_k_Point___new[] = "Point.__new__";
static const char __pyx_k_TrackSeries[] = "TrackSeries";
static const char __pyx_k_channel_ids[] = "channel_ids";
static const char __pyx_k_constructor[] = "_constructor";
static const char __pyx_k_deserialise[] = "deserialise";
static const char __pyx_k_fifo_status[] = "fifo_status";
static const char __pyx_k_frame_index[] = "frame_index";
static const char __pyx_k_from_arrays[] = "from_arrays";
static const char __pyx_k_input_array[] = "input_array";
static const char __pyx_k_metaclass_2[] = "__metaclass__";
static const char __pyx_k_n_files_gen[] = "n_files_gen";
static const char __pyx_k_positions_x[] = "positions_x";
static const char __pyx_k_positions_y[] = "positions_y";
static const char __pyx_k_positions_z[] = "positions_z";
static const char __pyx_k_sort_values[] = "sort_values";
static const char __pyx_k_unpack_from[] = "unpack_from";
static const char __pyx_k_utc_seconds[] = "utc_seconds";
static const char __pyx_k_BinaryStruct[] = "BinaryStruct";
static const char __pyx_k_Direction__x[] = "Direction_.x";
static const char __pyx_k_Direction__y[] = "Direction_.y";
static const char __pyx_k_Direction__z[] = "Direction_.z";
static const char __pyx_k_HitSeries_id[] = "HitSeries.id";
static const char __pyx_k_HitSeries_t0[] = "HitSeries.t0";
static const char __pyx_k_KM3DataFrame[] = "KM3DataFrame";
static const char __pyx_k_MCHit___insp[] = "MCHit.__insp__";
static const char __pyx_k_RuntimeError[] = "RuntimeError";
static const char __pyx_k_Serialisable[] = "Serialisable";
static const char __pyx_k_Track___insp[] = "Track.__insp__";
static const char __pyx_k_column_stack[] = "column_stack";
static const char __pyx_k_directions_x[] = "directions_x";
static const char __pyx_k_directions_y[] = "directions_y";
static const char __pyx_k_directions_z[] = "directions_z";
static const char __pyx_k_get_usr_item[] = "get_usr_item";
static const char __pyx_k_livetime_sec[] = "livetime_sec";
static const char __pyx_k_n_events_gen[] = "n_events_gen";
static const char __pyx_k_normed_array[] = "normed_array";
static const char __pyx_k_trigger_mask[] = "trigger_mask";
static const char __pyx_k_HitSeries_tot[] = "HitSeries.tot";
static const char __pyx_k_No_muon_found[] = "No muon found";
static const char __pyx_k_StopIteration[] = "StopIteration";
static const char __pyx_k_TimesliceHits[] = "TimesliceHits";
static const char __pyx_k_TimesliceInfo[] = "TimesliceInfo";
static const char __pyx_k_angle_between[] = "angle_between";
static const char __pyx_k_class_parents[] = "class_parents";
static const char __pyx_k_AttributeError[] = "AttributeError";
static const char __pyx_k_Event_Metadata[] = "Event Metadata.\n    ";
static const char __pyx_k_HitSeries_next[] = "HitSeries.next";
static const char __pyx_k_HitSeries_time[] = "HitSeries.time";
static const char __pyx_k_KM3Array___new[] = "KM3Array.__new__";
static const char __pyx_k_TrackSeries_id[] = "TrackSeries.id";
static const char __pyx_k_array_finalize[] = "__array_finalize__";
static const char __pyx_k_high_rate_veto[] = "high_rate_veto";
static const char __pyx_k_tgal_km3net_de[] = "tgal@km3net.de";
static const char __pyx_k_triggered_hits[] = "triggered_hits";
static const char __pyx_k_with_metaclass[] = "with_metaclass";
static const char __pyx_k_EventInfo___len[] = "EventInfo.__len__";
static const char __pyx_k_EventInfo___str[] = "EventInfo.__str__";
static const char __pyx_k_HitSeries___len[] = "HitSeries.__len__";
static const char __pyx_k_HitSeries___str[] = "HitSeries.__str__";
static const char __pyx_k_HitSeries_dir_x[] = "HitSeries.dir_x";
static const char __pyx_k_HitSeries_dir_y[] = "HitSeries.dir_y";
static const char __pyx_k_HitSeries_dir_z[] = "HitSeries.dir_z";
static const char __pyx_k_HitSeries_pos_x[] = "HitSeries.pos_x";
static const char __pyx_k_HitSeries_pos_y[] = "HitSeries.pos_y";
static const char __pyx_k_HitSeries_pos_z[] = "HitSeries.pos_z";
static const char __pyx_k_KM3Array___init[] = "KM3Array.__init__";
static const char __pyx_k_TrackSeries_dir[] = "TrackSeries.dir";
static const char __pyx_k_TrackSeries_pos[] = "TrackSeries.pos";
static const char __pyx_k_deserialise_map[] = "deserialise_map";
static const char __pyx_k_drop_duplicates[] = "drop_duplicates";
static const char __pyx_k_has_udp_trailer[] = "has_udp_trailer";
static const char __pyx_k_slice_generator[] = "_slice_generator";
static const char __pyx_k_trigger_counter[] = "trigger_counter";
static const char __pyx_k_utc_nanoseconds[] = "utc_nanoseconds";
static const char __pyx_k_Direction____new[] = "Direction_.__new__";
static const char __pyx_k_Direction____str[] = "Direction_.__str__";
static const char __pyx_k_EventInfo___init[] = "EventInfo.__init__";
static const char __pyx_k_EventInfo___insp[] = "EventInfo.__insp__";
static const char __pyx_k_EventInfo___repr[] = "EventInfo.__repr__";
static const char __pyx_k_HitSeries___init[] = "HitSeries.__init__";
static const char __pyx_k_HitSeries___insp[] = "HitSeries.__insp__";
static const char __pyx_k_HitSeries___iter[] = "HitSeries.__iter__";
static const char __pyx_k_HitSeries___next[] = "HitSeries.__next__";
static const char __pyx_k_HitSeries___repr[] = "HitSeries.__repr__";
static const char __pyx_k_HitSeries_dom_id[] = "HitSeries.dom_id";
static const char __pyx_k_HitSeries_pmt_id[] = "HitSeries.pmt_id";
static const char __pyx_k_KM3Array_conv_to[] = "KM3Array.conv_to";
static const char __pyx_k_SummaryframeInfo[] = "SummaryframeInfo";
static const char __pyx_k_SummarysliceInfo[] = "SummarysliceInfo";
static const char __pyx_k_TrackSeries_next[] = "TrackSeries.next";
static const char __pyx_k_TrackSeries_time[] = "TrackSeries.time";
static const char __pyx_k_TrackSeries_type[] = "TrackSeries.type";
static const char __pyx_k_Direction__zenith[] = "Direction_.zenith";
static const char __pyx_k_EventInfo___array[] = "EventInfo.__array__";
static const char __pyx_k_EventInfo_conv_to[] = "EventInfo.conv_to";
static const char __pyx_k_HitSeries___array[] = "HitSeries.__array__";
static const char __pyx_k_HitSeries_conv_to[] = "HitSeries.conv_to";
static const char __pyx_k_TrackSeries___len[] = "TrackSeries.__len__";
static const char __pyx_k_TrackSeries___str[] = "TrackSeries.__str__";
static const char __pyx_k_TrackSeries_is_cc[] = "TrackSeries.is_cc";
static const char __pyx_k_BinaryStruct__size[] = "BinaryStruct._size";
static const char __pyx_k_EventInfo_from_row[] = "EventInfo.from_row";
static const char __pyx_k_HitSeries_from_evt[] = "HitSeries.from_evt";
static const char __pyx_k_KM3Array_conv_from[] = "KM3Array.conv_from";
static const char __pyx_k_KM3Array_from_dict[] = "KM3Array.from_dict";
static const char __pyx_k_KM3Array_serialise[] = "KM3Array.serialise";
static const char __pyx_k_Serialisable___new[] = "Serialisable.__new__";
static const char __pyx_k_SummaryframeSeries[] = "SummaryframeSeries";
static const char __pyx_k_TimesliceFrameInfo[] = "TimesliceFrameInfo";
static const char __pyx_k_TimesliceHitSeries[] = "TimesliceHitSeries";
static const char __pyx_k_TrackSeries___init[] = "TrackSeries.__init__";
static const char __pyx_k_TrackSeries___insp[] = "TrackSeries.__insp__";
static const char __pyx_k_TrackSeries___iter[] = "TrackSeries.__iter__";
static const char __pyx_k_TrackSeries___next[] = "TrackSeries.__next__";
static const char __pyx_k_TrackSeries___repr[] = "TrackSeries.__repr__";
static const char __pyx_k_TrackSeries_energy[] = "TrackSeries.energy";
static const char __pyx_k_TrackSeries_length[] = "TrackSeries.length";
static const char __pyx_k_n_received_packets[] = "n_received_packets";
static const char __pyx_k_BinaryStruct___init[] = "BinaryStruct.__init__";
static const char __pyx_k_EventInfo_conv_from[] = "EventInfo.conv_from";
static const char __pyx_k_EventInfo_serialise[] = "EventInfo.serialise";
static const char __pyx_k_HitSeries___getitem[] = "HitSeries.__getitem__";
static const char __pyx_k_HitSeries_conv_from[] = "HitSeries.conv_from";
static const char __pyx_k_HitSeries_from_dict[] = "HitSeries.from_dict";
static const char __pyx_k_HitSeries_serialise[] = "HitSeries.serialise";
static const char __pyx_k_HitSeries_triggered[] = "HitSeries.triggered";
static const char __pyx_k_KM3DataFrame___init[] = "KM3DataFrame.__init__";
static const char __pyx_k_TimesliceHit___insp[] = "TimesliceHit.__insp__";
static const char __pyx_k_TimesliceInfo___len[] = "TimesliceInfo.__len__";
static const char __pyx_k_TimesliceInfo___str[] = "TimesliceInfo.__str__";
static const char __pyx_k_TrackSeries___array[] = "TrackSeries.__array__";
static const char __pyx_k_TrackSeries_conv_to[] = "TrackSeries.conv_to";
static const char __pyx_k_TrackSeries_get_len[] = "TrackSeries.get_len";
static const char __pyx_k_interaction_channel[] = "interaction_channel";
static const char __pyx_k_km3pipe_dataclasses[] = "km3pipe.dataclasses";
static const char __pyx_k_max_sequence_number[] = "max_sequence_number";
static const char __pyx_k_timeslices_slice__0[] = "/timeslices/slice_{0}";
static const char __pyx_k_white_rabbit_status[] = "white_rabbit_status";
static const char __pyx_k_HitSeries_channel_id[] = "HitSeries.channel_id";
static const char __pyx_k_HitSeries_first_hits[] = "HitSeries.first_hits";
static const char __pyx_k_HitSeries_from_aanet[] = "HitSeries.from_aanet";
static const char __pyx_k_HitSeries_from_table[] = "HitSeries.from_table";
static const char __pyx_k_KM3Array_deserialise[] = "KM3Array.deserialise";
static const char __pyx_k_KM3DataFrame_conv_to[] = "KM3DataFrame.conv_to";
static const char __pyx_k_TimesliceInfo___insp[] = "TimesliceInfo.__insp__";
static const char __pyx_k_TrackSeries_bjorkeny[] = "TrackSeries.bjorkeny";
static const char __pyx_k_interaction_channels[] = "interaction_channels";
static const char __pyx_k_max_sequence_numbers[] = "max_sequence_numbers";
static const char __pyx_k_Direction___normalise[] = "Direction_._normalise";
static const char __pyx_k_EventInfo_deserialise[] = "EventInfo.deserialise";
static const char __pyx_k_HitSeries_deserialise[] = "HitSeries.deserialise";
static const char __pyx_k_HitSeries_from_arrays[] = "HitSeries.from_arrays";
static const char __pyx_k_TimesliceInfo___array[] = "TimesliceInfo.__array__";
static const char __pyx_k_TimesliceInfo_conv_to[] = "TimesliceInfo.conv_to";
static const char __pyx_k_TrackSeries___getitem[] = "TrackSeries.__getitem__";
static const char __pyx_k_TrackSeries_conv_from[] = "TrackSeries.conv_from";
static const char __pyx_k_TrackSeries_serialise[] = "TrackSeries.serialise";
static const char __pyx_k_interaction_channel_2[] = "_interaction_channel";
static const char __pyx_k_HitSeries_with_0_hit_1[] = "HitSeries with {0} hit{1}.";
static const char __pyx_k_JDAQTimeslice_metadata[] = "JDAQTimeslice metadata.\n    ";
static const char __pyx_k_KM3DataFrame_conv_from[] = "KM3DataFrame.conv_from";
static const char __pyx_k_KM3DataFrame_serialise[] = "KM3DataFrame.serialise";
static const char __pyx_k_SummaryframeInfo___len[] = "SummaryframeInfo.__len__";
static const char __pyx_k_SummaryframeInfo___str[] = "SummaryframeInfo.__str__";
static const char __pyx_k_SummarysliceInfo___len[] = "SummarysliceInfo.__len__";
static const char __pyx_k_SummarysliceInfo___str[] = "SummarysliceInfo.__str__";
static const char __pyx_k_TimesliceHitSeries_tot[] = "TimesliceHitSeries.tot";
static const char __pyx_k_TrackSeries_from_aanet[] = "TrackSeries.from_aanet";
static const char __pyx_k_TrackSeries_from_km3df[] = "TrackSeries.from_km3df";
static const char __pyx_k_TrackSeries_from_table[] = "TrackSeries.from_table";
static const char __pyx_k_highest_energetic_muon[] = "_highest_energetic_muon";
static const char __pyx_k_SummaryframeInfo___insp[] = "SummaryframeInfo.__insp__";
static const char __pyx_k_SummaryframeSeries_next[] = "SummaryframeSeries.next";
static const char __pyx_k_SummarysliceInfo___insp[] = "SummarysliceInfo.__insp__";
static const char __pyx_k_TimesliceHitSeries_next[] = "TimesliceHitSeries.next";
static const char __pyx_k_TimesliceHitSeries_time[] = "TimesliceHitSeries.time";
static const char __pyx_k_TimesliceInfo_conv_from[] = "TimesliceInfo.conv_from";
static const char __pyx_k_TimesliceInfo_serialise[] = "TimesliceInfo.serialise";
static const char __pyx_k_TrackSeries_deserialise[] = "TrackSeries.deserialise";
static const char __pyx_k_TrackSeries_from_arrays[] = "TrackSeries.from_arrays";
static const char __pyx_k_HitSeries_triggered_hits[] = "HitSeries.triggered_hits";
static const char __pyx_k_KM3DataFrame_deserialise[] = "KM3DataFrame.deserialise";
static const char __pyx_k_SummaryframeInfo___array[] = "SummaryframeInfo.__array__";
static const char __pyx_k_SummaryframeInfo_conv_to[] = "SummaryframeInfo.conv_to";
static const char __pyx_k_SummaryframeSeries___len[] = "SummaryframeSeries.__len__";
static const char __pyx_k_SummarysliceInfo___array[] = "SummarysliceInfo.__array__";
static const char __pyx_k_SummarysliceInfo_conv_to[] = "SummarysliceInfo.conv_to";
static const char __pyx_k_TimesliceFrameInfo___len[] = "TimesliceFrameInfo.__len__";
static const char __pyx_k_TimesliceFrameInfo___str[] = "TimesliceFrameInfo.__str__";
static const char __pyx_k_TimesliceHitSeries___len[] = "TimesliceHitSeries.__len__";
static const char __pyx_k_TimesliceHitSeries___str[] = "TimesliceHitSeries.__str__";
static const char __pyx_k_TimesliceHitSeries_h5loc[] = "TimesliceHitSeries.h5loc";
static const char __pyx_k_TimesliceInfo_from_table[] = "TimesliceInfo.from_table";
static const char __pyx_k_TrackSeries_get_usr_item[] = "TrackSeries.get_usr_item";
static const char __pyx_k_highest_energetic_muon_2[] = "highest_energetic_muon";
static const char __pyx_k_JDAQSummaryslice_Metadata[] = "JDAQSummaryslice Metadata.\n    ";
static const char __pyx_k_KM3Array___array_finalize[] = "KM3Array.__array_finalize__";
static const char __pyx_k_KM3DataFrame__constructor[] = "KM3DataFrame._constructor";
static const char __pyx_k_SummaryframeSeries___init[] = "SummaryframeSeries.__init__";
static const char __pyx_k_SummaryframeSeries___iter[] = "SummaryframeSeries.__iter__";
static const char __pyx_k_SummaryframeSeries___next[] = "SummaryframeSeries.__next__";
static const char __pyx_k_TimesliceFrameInfo___insp[] = "TimesliceFrameInfo.__insp__";
static const char __pyx_k_TimesliceHitSeries___init[] = "TimesliceHitSeries.__init__";
static const char __pyx_k_TimesliceHitSeries___insp[] = "TimesliceHitSeries.__insp__";
static const char __pyx_k_TimesliceHitSeries___iter[] = "TimesliceHitSeries.__iter__";
static const char __pyx_k_TimesliceHitSeries___next[] = "TimesliceHitSeries.__next__";
static const char __pyx_k_TimesliceHitSeries___repr[] = "TimesliceHitSeries.__repr__";
static const char __pyx_k_TimesliceHitSeries_dom_id[] = "TimesliceHitSeries.dom_id";
static const char __pyx_k_TimesliceInfo_deserialise[] = "TimesliceInfo.deserialise";
static const char __pyx_k_HitSeries__slice_generator[] = "HitSeries._slice_generator";
static const char __pyx_k_SummaryframeInfo_conv_from[] = "SummaryframeInfo.conv_from";
static const char __pyx_k_SummaryframeInfo_serialise[] = "SummaryframeInfo.serialise";
static const char __pyx_k_SummaryframeSeries___array[] = "SummaryframeSeries.__array__";
static const char __pyx_k_SummaryframeSeries_conv_to[] = "SummaryframeSeries.conv_to";
static const char __pyx_k_SummaryframeSeries_dom_ids[] = "SummaryframeSeries.dom_ids";
static const char __pyx_k_SummarysliceInfo_conv_from[] = "SummarysliceInfo.conv_from";
static const char __pyx_k_SummarysliceInfo_serialise[] = "SummarysliceInfo.serialise";
static const char __pyx_k_Tamas_Gal_and_Moritz_Lotze[] = "Tamas Gal and Moritz Lotze";
static const char __pyx_k_TimesliceFrameInfo___array[] = "TimesliceFrameInfo.__array__";
static const char __pyx_k_TimesliceFrameInfo_conv_to[] = "TimesliceFrameInfo.conv_to";
static const char __pyx_k_TimesliceHitSeries___array[] = "TimesliceHitSeries.__array__";
static const char __pyx_k_TimesliceHitSeries_conv_to[] = "TimesliceHitSeries.conv_to";
static const char __pyx_k_TimesliceHitSeries_tabname[] = "TimesliceHitSeries.tabname";
static const char __pyx_k_TrackSeries_with_0_track_1[] = "TrackSeries with {0} track{1}.";
static const char __pyx_k_index_must_be_int_or_slice[] = "index must be int or slice";
static const char __pyx_k_Collection_of_multiple_Hits[] = "Collection of multiple Hits.\n    ";
static const char __pyx_k_SummaryframeInfo_from_table[] = "SummaryframeInfo.from_table";
static const char __pyx_k_SummarysliceInfo_from_table[] = "SummarysliceInfo.from_table";
static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous";
static const char __pyx_k_Collection_of_summary_frames[] = "Collection of summary frames.\n    ";
static const char __pyx_k_JDAQTimeslice_frame_metadata[] = "JDAQTimeslice frame metadata.\n    ";
static const char __pyx_k_SummaryframeInfo_deserialise[] = "SummaryframeInfo.deserialise";
static const char __pyx_k_SummaryframeSeries___getitem[] = "SummaryframeSeries.__getitem__";
static const char __pyx_k_SummaryframeSeries_conv_from[] = "SummaryframeSeries.conv_from";
static const char __pyx_k_SummaryframeSeries_serialise[] = "SummaryframeSeries.serialise";
static const char __pyx_k_SummarysliceInfo_deserialise[] = "SummarysliceInfo.deserialise";
static const char __pyx_k_TimesliceFrameInfo_conv_from[] = "TimesliceFrameInfo.conv_from";
static const char __pyx_k_TimesliceFrameInfo_serialise[] = "TimesliceFrameInfo.serialise";
static const char __pyx_k_TimesliceHitSeries___getitem[] = "TimesliceHitSeries.__getitem__";
static const char __pyx_k_TimesliceHitSeries_conv_from[] = "TimesliceHitSeries.conv_from";
static const char __pyx_k_TimesliceHitSeries_from_dict[] = "TimesliceHitSeries.from_dict";
static const char __pyx_k_TimesliceHitSeries_serialise[] = "TimesliceHitSeries.serialise";
static const char __pyx_k_TrackSeries__slice_generator[] = "TrackSeries._slice_generator";
static const char __pyx_k_SummaryframeSeries_from_table[] = "SummaryframeSeries.from_table";
static const char __pyx_k_TimesliceFrameInfo_from_table[] = "TimesliceFrameInfo.from_table";
static const char __pyx_k_TimesliceHitSeries_channel_id[] = "TimesliceHitSeries.channel_id";
static const char __pyx_k_TimesliceHitSeries_from_table[] = "TimesliceHitSeries.from_table";
static const char __pyx_k_SummaryframeSeries_deserialise[] = "SummaryframeSeries.deserialise";
static const char __pyx_k_SummaryframeSeries_from_arrays[] = "SummaryframeSeries.from_arrays";
static const char __pyx_k_TimesliceFrameInfo_deserialise[] = "TimesliceFrameInfo.deserialise";
static const char __pyx_k_TimesliceHitSeries_deserialise[] = "TimesliceHitSeries.deserialise";
static const char __pyx_k_TimesliceHitSeries_from_arrays[] = "TimesliceHitSeries.from_arrays";
static const char __pyx_k_JDAQSummaryslice_frame_metadata[] = "JDAQSummaryslice frame metadata.\n    ";
static const char __pyx_k_SummaryframeSeries_max_sequence[] = "SummaryframeSeries.max_sequence_numbers";
static const char __pyx_k_Summaryslice_frame_0_slice_id_1[] = "Summaryslice frame #{0}:\n    slice id:    {1}\n    DOM id:      {2}\n    UDP packets: {3}/{4}\n";
static const char __pyx_k_TimesliceHitSeries_with_0_hit_1[] = "TimesliceHitSeries with {0} hit{1}.";
static const char __pyx_k_TrackSeries_interaction_channel[] = "TrackSeries.interaction_channel";
static const char __pyx_k_home_moritz_pkg_km3pipe_km3pipe[] = "/home/moritz/pkg/km3pipe/km3pipe/dataclasses.pyx";
static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import";
static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)";
static const char __pyx_k_A_binary_struct_superclass_which[] = "A binary struct superclass which parses itself from a given stream.\n\n    Overwrite `_structure` and `_fields` after subclassing.\n    `_structure` should have the standard Python struct format type syntax.\n    The `_fields` are automatically translated into instance attributes\n    at init.\n\n    Parameters\n    ----------\n    _structure: struct-format as str, like '<i2f'\n    _fields: iterable of str\n\n    ";
static const char __pyx_k_A_metaclass_for_serialisable_cla[] = "A metaclass for serialisable classes.\n\n    The classes should define a `dtype` attribute in their body and are not\n    meant to define `__init__` (it will be overwritten).\n\n    Example using six.with_metaclass for py2/py3 compat\n    ---------------------------------------------------\n\n        class Foo(with_metaclass(Serialisable)):\n            dtype = np.dtype([('a', '<i4'), ('b', '>i8')])\n\n    ";
static const char __pyx_k_Collection_of_multiple_Tracks_At[] = "Collection of multiple Tracks.\n\n    Attributes\n    ----------\n    dtype: datatype of array representation\n    ";
static const char __pyx_k_Collection_of_multiple_timeslice[] = "Collection of multiple timeslice hits.\n    ";
static const char __pyx_k_Copyright_2016_Tamas_Gal_and_the[] = "Copyright 2016, Tamas Gal and the KM3NeT collaboration.";
static const char __pyx_k_EventInfo_from_row_locals_genexp[] = "EventInfo.from_row.<locals>.genexpr";
static const char __pyx_k_Event_0_detector_id_1_frame_inde[] = "Event #{0}:\n    detector id:     {1}\n    frame index:     {2}\n    UTC seconds:     {3}\n    UTC nanoseconds: {4}\n    MC id:           {5}\n    MC time:         {6}\n    overlays:        {7}\n    trigger counter: {8}\n    trigger mask:    {9}";
static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd";
static const char __pyx_k_Hit_channel_id_0_dom_id_1_pmt_id[] = "Hit: channel_id({0}), dom_id({1}), pmt_id({2}), tot({3}), time({4}), triggered({5})";
static const char __pyx_k_KM3Array_from_dict_locals_genexp[] = "KM3Array.from_dict.<locals>.genexpr";
static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported";
static const char __pyx_k_Numpy_NDarray_metadata_This_clas[] = "Numpy NDarray + metadata.\n\n    This class adds the following to ``np.ndarray``:\n\n    Attributes\n    ----------\n    h5loc: str, default='/'\n        HDF5 group where to write into.\n\n    Methods\n    -------\n    deserialise(data, h5loc='/', fmt='pandas')\n        Factory to init from data.\n    serialise(to='numpy')\n        Convert for storage.\n    ";
static const char __pyx_k_Pandas_Dataframe_metadata_This_c[] = "Pandas Dataframe + metadata.\n\n    This class adds the following to ``pd.DataFrame``:\n\n    Attributes\n    ----------\n    h5loc: str, default='/'\n        HDF5 group where to write into.\n\n    Methods\n    -------\n    deserialise(data, h5loc='/', fmt='pandas')\n        Factory to init from data.\n    serialise(to='numpy')\n        Convert for storage.\n    ";
static const char __pyx_k_Represents_a_direction_in_a_3D_s[] = "Represents a direction in a 3D space\n\n    The direction vector always normalises itself when an attribute is changed.\n\n    ";
static const char __pyx_k_Represents_a_point_in_a_3D_space[] = "Represents a point in a 3D space";
static const char __pyx_k_Serialisable___new___locals___in[] = "Serialisable.__new__.<locals>.__init__";
static const char __pyx_k_SummaryframeSeries__slice_genera[] = "SummaryframeSeries._slice_generator";
static const char __pyx_k_SummaryframeSeries_n_received_pa[] = "SummaryframeSeries.n_received_packets";
static const char __pyx_k_Summaryslice_0_detector_id_1_fra[] = "Summaryslice #{0}:\n    detector id:     {1}\n    frame index:     {2}\n    run id:          {3}\n";
static const char __pyx_k_TimesliceHitSeries__slice_genera[] = "TimesliceHitSeries._slice_generator";
static const char __pyx_k_TimesliceHit_channel_id_0_dom_id[] = "TimesliceHit: channel_id({0}), dom_id({1}), tot({2}), time({3})";
static const char __pyx_k_Timeslice_frame_slice_id_0_frame[] = "Timeslice frame:\n    slice id: {0}\n    frame id: {1}\n    DOM id:   {2}\n    n_hits:   {3}\n";
static const char __pyx_k_TrackSeries_highest_energetic_mu[] = "TrackSeries.highest_energetic_muon.<locals>.<lambda>";
static const char __pyx_k_Track_pos_0_dir_1_t_2_E_3_type_4[] = "Track: pos({0}), dir({1}), t={2}, E={3}, type={4} ({5})";
static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous";
static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";
static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short.";
static const char __pyx_k_Timeslice_frame_slice_id_0_frame_2[] = "Timeslice frame:\n    slice id: {0}\n    frame id: {1}\n    DOM id:   {2}\n    UDP packets: {3}/{4}\n";
static const char __pyx_k_TrackSeries_highest_energetic_mu_2[] = "TrackSeries.highest_energetic_muon";
static PyObject *__pyx_kp_s_0_4_1_4_2_4;
static PyObject *__pyx_kp_s_A_binary_struct_superclass_which;
static PyObject *__pyx_kp_s_A_metaclass_for_serialisable_cla;
static PyObject *__pyx_n_s_AttributeError;
static PyObject *__pyx_n_s_BinaryStruct;
static PyObject *__pyx_n_s_BinaryStruct___init;
static PyObject *__pyx_n_s_BinaryStruct__size;
static PyObject *__pyx_kp_s_Collection_of_multiple_Hits;
static PyObject *__pyx_kp_s_Collection_of_multiple_Tracks_At;
static PyObject *__pyx_kp_s_Collection_of_multiple_timeslice;
static PyObject *__pyx_kp_s_Collection_of_summary_frames;
static PyObject *__pyx_kp_s_Copyright_2016_Tamas_Gal_and_the;
static PyObject *__pyx_n_s_DataFrame;
static PyObject *__pyx_n_s_Development;
static PyObject *__pyx_n_s_Direction;
static PyObject *__pyx_n_s_Direction_2;
static PyObject *__pyx_n_s_Direction____new;
static PyObject *__pyx_n_s_Direction____str;
static PyObject *__pyx_n_s_Direction___normalise;
static PyObject *__pyx_n_s_Direction__x;
static PyObject *__pyx_n_s_Direction__y;
static PyObject *__pyx_n_s_Direction__z;
static PyObject *__pyx_n_s_Direction__zenith;
static PyObject *__pyx_n_s_E;
static PyObject *__pyx_n_s_EventInfo;
static PyObject *__pyx_n_s_EventInfo___array;
static PyObject *__pyx_n_s_EventInfo___init;
static PyObject *__pyx_n_s_EventInfo___insp;
static PyObject *__pyx_n_s_EventInfo___len;
static PyObject *__pyx_n_s_EventInfo___repr;
static PyObject *__pyx_n_s_EventInfo___str;
static PyObject *__pyx_n_s_EventInfo_conv_from;
static PyObject *__pyx_n_s_EventInfo_conv_to;
static PyObject *__pyx_n_s_EventInfo_deserialise;
static PyObject *__pyx_n_s_EventInfo_from_row;
static PyObject *__pyx_n_s_EventInfo_from_row_locals_genexp;
static PyObject *__pyx_n_s_EventInfo_serialise;
static PyObject *__pyx_kp_s_Event_0_detector_id_1_frame_inde;
static PyObject *__pyx_kp_s_Event_Metadata;
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_Hit;
static PyObject *__pyx_n_s_HitSeries;
static PyObject *__pyx_n_s_HitSeries___array;
static PyObject *__pyx_n_s_HitSeries___getitem;
static PyObject *__pyx_n_s_HitSeries___init;
static PyObject *__pyx_n_s_HitSeries___insp;
static PyObject *__pyx_n_s_HitSeries___iter;
static PyObject *__pyx_n_s_HitSeries___len;
static PyObject *__pyx_n_s_HitSeries___next;
static PyObject *__pyx_n_s_HitSeries___repr;
static PyObject *__pyx_n_s_HitSeries___str;
static PyObject *__pyx_n_s_HitSeries__slice_generator;
static PyObject *__pyx_n_s_HitSeries_channel_id;
static PyObject *__pyx_n_s_HitSeries_conv_from;
static PyObject *__pyx_n_s_HitSeries_conv_to;
static PyObject *__pyx_n_s_HitSeries_deserialise;
static PyObject *__pyx_n_s_HitSeries_dir_x;
static PyObject *__pyx_n_s_HitSeries_dir_y;
static PyObject *__pyx_n_s_HitSeries_dir_z;
static PyObject *__pyx_n_s_HitSeries_dom_id;
static PyObject *__pyx_n_s_HitSeries_first_hits;
static PyObject *__pyx_n_s_HitSeries_from_aanet;
static PyObject *__pyx_n_s_HitSeries_from_arrays;
static PyObject *__pyx_n_s_HitSeries_from_dict;
static PyObject *__pyx_n_s_HitSeries_from_evt;
static PyObject *__pyx_n_s_HitSeries_from_table;
static PyObject *__pyx_n_s_HitSeries_id;
static PyObject *__pyx_n_s_HitSeries_next;
static PyObject *__pyx_n_s_HitSeries_pmt_id;
static PyObject *__pyx_n_s_HitSeries_pos_x;
static PyObject *__pyx_n_s_HitSeries_pos_y;
static PyObject *__pyx_n_s_HitSeries_pos_z;
static PyObject *__pyx_n_s_HitSeries_serialise;
static PyObject *__pyx_n_s_HitSeries_t0;
static PyObject *__pyx_n_s_HitSeries_time;
static PyObject *__pyx_n_s_HitSeries_tot;
static PyObject *__pyx_n_s_HitSeries_triggered;
static PyObject *__pyx_n_s_HitSeries_triggered_hits;
static PyObject *__pyx_kp_s_HitSeries_with_0_hit_1;
static PyObject *__pyx_n_s_Hit___insp;
static PyObject *__pyx_kp_s_Hit_channel_id_0_dom_id_1_pmt_id;
static PyObject *__pyx_n_s_Hits;
static PyObject *__pyx_n_s_IS_CC;
static PyObject *__pyx_n_s_ImportError;
static PyObject *__pyx_n_s_IndexError;
static PyObject *__pyx_kp_s_JDAQSummaryslice_Metadata;
static PyObject *__pyx_kp_s_JDAQSummaryslice_frame_metadata;
static PyObject *__pyx_kp_s_JDAQTimeslice_frame_metadata;
static PyObject *__pyx_kp_s_JDAQTimeslice_metadata;
static PyObject *__pyx_n_s_KM3Array;
static PyObject *__pyx_n_s_KM3Array___array_finalize;
static PyObject *__pyx_n_s_KM3Array___init;
static PyObject *__pyx_n_s_KM3Array___new;
static PyObject *__pyx_n_s_KM3Array_conv_from;
static PyObject *__pyx_n_s_KM3Array_conv_to;
static PyObject *__pyx_n_s_KM3Array_deserialise;
static PyObject *__pyx_n_s_KM3Array_from_dict;
static PyObject *__pyx_n_s_KM3Array_from_dict_locals_genexp;
static PyObject *__pyx_n_s_KM3Array_serialise;
static PyObject *__pyx_n_s_KM3DataFrame;
static PyObject *__pyx_n_s_KM3DataFrame___init;
static PyObject *__pyx_n_s_KM3DataFrame__constructor;
static PyObject *__pyx_n_s_KM3DataFrame_conv_from;
static PyObject *__pyx_n_s_KM3DataFrame_conv_to;
static PyObject *__pyx_n_s_KM3DataFrame_deserialise;
static PyObject *__pyx_n_s_KM3DataFrame_serialise;
static PyObject *__pyx_n_s_KeyError;
static PyObject *__pyx_n_s_MCHit___insp;
static PyObject *__pyx_n_s_MIT;
static PyObject *__pyx_n_s_McHits;
static PyObject *__pyx_n_s_McTracks;
static PyObject *__pyx_kp_s_No_muon_found;
static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor;
static PyObject *__pyx_kp_s_Numpy_NDarray_metadata_This_clas;
static PyObject *__pyx_kp_s_Pandas_Dataframe_metadata_This_c;
static PyObject *__pyx_n_s_Point;
static PyObject *__pyx_n_s_Point___new;
static PyObject *__pyx_n_s_Point_x;
static PyObject *__pyx_n_s_Point_y;
static PyObject *__pyx_n_s_Point_z;
static PyObject *__pyx_n_s_Position;
static PyObject *__pyx_kp_s_Represents_a_direction_in_a_3D_s;
static PyObject *__pyx_kp_s_Represents_a_point_in_a_3D_space;
static PyObject *__pyx_n_s_RuntimeError;
static PyObject *__pyx_n_s_Serialisable;
static PyObject *__pyx_n_s_Serialisable___new;
static PyObject *__pyx_n_s_Serialisable___new___locals___in;
static PyObject *__pyx_n_s_StopIteration;
static PyObject *__pyx_n_s_Struct;
static PyObject *__pyx_n_s_SummaryframeInfo;
static PyObject *__pyx_n_s_SummaryframeInfo___array;
static PyObject *__pyx_n_s_SummaryframeInfo___insp;
static PyObject *__pyx_n_s_SummaryframeInfo___len;
static PyObject *__pyx_n_s_SummaryframeInfo___str;
static PyObject *__pyx_n_s_SummaryframeInfo_conv_from;
static PyObject *__pyx_n_s_SummaryframeInfo_conv_to;
static PyObject *__pyx_n_s_SummaryframeInfo_deserialise;
static PyObject *__pyx_n_s_SummaryframeInfo_from_table;
static PyObject *__pyx_n_s_SummaryframeInfo_serialise;
static PyObject *__pyx_n_s_SummaryframeSeries;
static PyObject *__pyx_n_s_SummaryframeSeries___array;
static PyObject *__pyx_n_s_SummaryframeSeries___getitem;
static PyObject *__pyx_n_s_SummaryframeSeries___init;
static PyObject *__pyx_n_s_SummaryframeSeries___iter;
static PyObject *__pyx_n_s_SummaryframeSeries___len;
static PyObject *__pyx_n_s_SummaryframeSeries___next;
static PyObject *__pyx_n_s_SummaryframeSeries__slice_genera;
static PyObject *__pyx_n_s_SummaryframeSeries_conv_from;
static PyObject *__pyx_n_s_SummaryframeSeries_conv_to;
static PyObject *__pyx_n_s_SummaryframeSeries_deserialise;
static PyObject *__pyx_n_s_SummaryframeSeries_dom_ids;
static PyObject *__pyx_n_s_SummaryframeSeries_from_arrays;
static PyObject *__pyx_n_s_SummaryframeSeries_from_table;
static PyObject *__pyx_n_s_SummaryframeSeries_max_sequence;
static PyObject *__pyx_n_s_SummaryframeSeries_n_received_pa;
static PyObject *__pyx_n_s_SummaryframeSeries_next;
static PyObject *__pyx_n_s_SummaryframeSeries_serialise;
static PyObject *__pyx_n_s_SummarysliceInfo;
static PyObject *__pyx_n_s_SummarysliceInfo___array;
static PyObject *__pyx_n_s_SummarysliceInfo___insp;
static PyObject *__pyx_n_s_SummarysliceInfo___len;
static PyObject *__pyx_n_s_SummarysliceInfo___str;
static PyObject *__pyx_n_s_SummarysliceInfo_conv_from;
static PyObject *__pyx_n_s_SummarysliceInfo_conv_to;
static PyObject *__pyx_n_s_SummarysliceInfo_deserialise;
static PyObject *__pyx_n_s_SummarysliceInfo_from_table;
static PyObject *__pyx_n_s_SummarysliceInfo_serialise;
static PyObject *__pyx_kp_s_Summaryslice_0_detector_id_1_fra;
static PyObject *__pyx_kp_s_Summaryslice_frame_0_slice_id_1;
static PyObject *__pyx_kp_s_Tamas_Gal_and_Moritz_Lotze;
static PyObject *__pyx_n_s_TimesliceFrameInfo;
static PyObject *__pyx_n_s_TimesliceFrameInfo___array;
static PyObject *__pyx_n_s_TimesliceFrameInfo___insp;
static PyObject *__pyx_n_s_TimesliceFrameInfo___len;
static PyObject *__pyx_n_s_TimesliceFrameInfo___str;
static PyObject *__pyx_n_s_TimesliceFrameInfo_conv_from;
static PyObject *__pyx_n_s_TimesliceFrameInfo_conv_to;
static PyObject *__pyx_n_s_TimesliceFrameInfo_deserialise;
static PyObject *__pyx_n_s_TimesliceFrameInfo_from_table;
static PyObject *__pyx_n_s_TimesliceFrameInfo_serialise;
static PyObject *__pyx_n_s_TimesliceHitSeries;
static PyObject *__pyx_n_s_TimesliceHitSeries___array;
static PyObject *__pyx_n_s_TimesliceHitSeries___getitem;
static PyObject *__pyx_n_s_TimesliceHitSeries___init;
static PyObject *__pyx_n_s_TimesliceHitSeries___insp;
static PyObject *__pyx_n_s_TimesliceHitSeries___iter;
static PyObject *__pyx_n_s_TimesliceHitSeries___len;
static PyObject *__pyx_n_s_TimesliceHitSeries___next;
static PyObject *__pyx_n_s_TimesliceHitSeries___repr;
static PyObject *__pyx_n_s_TimesliceHitSeries___str;
static PyObject *__pyx_n_s_TimesliceHitSeries__slice_genera;
static PyObject *__pyx_n_s_TimesliceHitSeries_channel_id;
static PyObject *__pyx_n_s_TimesliceHitSeries_conv_from;
static PyObject *__pyx_n_s_TimesliceHitSeries_conv_to;
static PyObject *__pyx_n_s_TimesliceHitSeries_deserialise;
static PyObject *__pyx_n_s_TimesliceHitSeries_dom_id;
static PyObject *__pyx_n_s_TimesliceHitSeries_from_arrays;
static PyObject *__pyx_n_s_TimesliceHitSeries_from_dict;
static PyObject *__pyx_n_s_TimesliceHitSeries_from_table;
static PyObject *__pyx_n_s_TimesliceHitSeries_h5loc;
static PyObject *__pyx_n_s_TimesliceHitSeries_next;
static PyObject *__pyx_n_s_TimesliceHitSeries_serialise;
static PyObject *__pyx_n_s_TimesliceHitSeries_tabname;
static PyObject *__pyx_n_s_TimesliceHitSeries_time;
static PyObject *__pyx_n_s_TimesliceHitSeries_tot;
static PyObject *__pyx_kp_s_TimesliceHitSeries_with_0_hit_1;
static PyObject *__pyx_n_s_TimesliceHit___insp;
static PyObject *__pyx_kp_s_TimesliceHit_channel_id_0_dom_id;
static PyObject *__pyx_n_s_TimesliceHits;
static PyObject *__pyx_n_s_TimesliceInfo;
static PyObject *__pyx_n_s_TimesliceInfo___array;
static PyObject *__pyx_n_s_TimesliceInfo___insp;
static PyObject *__pyx_n_s_TimesliceInfo___len;
static PyObject *__pyx_n_s_TimesliceInfo___str;
static PyObject *__pyx_n_s_TimesliceInfo_conv_from;
static PyObject *__pyx_n_s_TimesliceInfo_conv_to;
static PyObject *__pyx_n_s_TimesliceInfo_deserialise;
static PyObject *__pyx_n_s_TimesliceInfo_from_table;
static PyObject *__pyx_n_s_TimesliceInfo_serialise;
static PyObject *__pyx_kp_s_Timeslice_frame_slice_id_0_frame;
static PyObject *__pyx_kp_s_Timeslice_frame_slice_id_0_frame_2;
static PyObject *__pyx_n_s_Track;
static PyObject *__pyx_n_s_TrackSeries;
static PyObject *__pyx_n_s_TrackSeries___array;
static PyObject *__pyx_n_s_TrackSeries___getitem;
static PyObject *__pyx_n_s_TrackSeries___init;
static PyObject *__pyx_n_s_TrackSeries___insp;
static PyObject *__pyx_n_s_TrackSeries___iter;
static PyObject *__pyx_n_s_TrackSeries___len;
static PyObject *__pyx_n_s_TrackSeries___next;
static PyObject *__pyx_n_s_TrackSeries___repr;
static PyObject *__pyx_n_s_TrackSeries___str;
static PyObject *__pyx_n_s_TrackSeries__slice_generator;
static PyObject *__pyx_n_s_TrackSeries_bjorkeny;
static PyObject *__pyx_n_s_TrackSeries_conv_from;
static PyObject *__pyx_n_s_TrackSeries_conv_to;
static PyObject *__pyx_n_s_TrackSeries_deserialise;
static PyObject *__pyx_n_s_TrackSeries_dir;
static PyObject *__pyx_n_s_TrackSeries_energy;
static PyObject *__pyx_n_s_TrackSeries_from_aanet;
static PyObject *__pyx_n_s_TrackSeries_from_arrays;
static PyObject *__pyx_n_s_TrackSeries_from_km3df;
static PyObject *__pyx_n_s_TrackSeries_from_table;
static PyObject *__pyx_n_s_TrackSeries_get_len;
static PyObject *__pyx_n_s_TrackSeries_get_usr_item;
static PyObject *__pyx_n_s_TrackSeries_highest_energetic_mu;
static PyObject *__pyx_n_s_TrackSeries_highest_energetic_mu_2;
static PyObject *__pyx_n_s_TrackSeries_id;
static PyObject *__pyx_n_s_TrackSeries_interaction_channel;
static PyObject *__pyx_n_s_TrackSeries_is_cc;
static PyObject *__pyx_n_s_TrackSeries_length;
static PyObject *__pyx_n_s_TrackSeries_next;
static PyObject *__pyx_n_s_TrackSeries_pos;
static PyObject *__pyx_n_s_TrackSeries_serialise;
static PyObject *__pyx_n_s_TrackSeries_time;
static PyObject *__pyx_n_s_TrackSeries_type;
static PyObject *__pyx_kp_s_TrackSeries_with_0_track_1;
static PyObject *__pyx_n_s_Track___insp;
static PyObject *__pyx_kp_s_Track_pos_0_dir_1_t_2_E_3_type_4;
static PyObject *__pyx_n_s_Tracks;
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_n_s_ValueError;
static PyObject *__pyx_kp_s__113;
static PyObject *__pyx_kp_s__116;
static PyObject *__pyx_kp_s__2;
static PyObject *__pyx_n_s_all;
static PyObject *__pyx_n_s_angle_between;
static PyObject *__pyx_n_s_arg;
static PyObject *__pyx_n_s_args;
static PyObject *__pyx_n_s_arr;
static PyObject *__pyx_n_s_arr_2;
static PyObject *__pyx_n_s_array;
static PyObject *__pyx_n_s_array_2;
static PyObject *__pyx_n_s_array_finalize;
static PyObject *__pyx_n_s_asarray;
static PyObject *__pyx_n_s_attr;
static PyObject *__pyx_n_s_author;
static PyObject *__pyx_n_s_bjorkeny;
static PyObject *__pyx_n_s_bjorkeny_2;
static PyObject *__pyx_n_s_bjorkenys;
static PyObject *__pyx_n_s_calcsize;
static PyObject *__pyx_n_s_channel_id;
static PyObject *__pyx_n_s_channel_ids;
static PyObject *__pyx_n_s_class_attr;
static PyObject *__pyx_n_s_class_name;
static PyObject *__pyx_n_s_class_parents;
static PyObject *__pyx_n_s_close;
static PyObject *__pyx_n_s_cls;
static PyObject *__pyx_n_s_col;
static PyObject *__pyx_n_s_column_stack;
static PyObject *__pyx_n_s_constructor;
static PyObject *__pyx_n_s_conv_from;
static PyObject *__pyx_n_s_conv_to;
static PyObject *__pyx_n_s_copyright;
static PyObject *__pyx_n_s_credits;
static PyObject *__pyx_n_s_ctypes;
static PyObject *__pyx_n_s_data;
static PyObject *__pyx_n_s_deserialise;
static PyObject *__pyx_n_s_deserialise_map;
static PyObject *__pyx_n_s_det_id;
static PyObject *__pyx_n_s_dict;
static PyObject *__pyx_n_s_dir;
static PyObject *__pyx_n_s_dir_2;
static PyObject *__pyx_n_s_dir_x;
static PyObject *__pyx_n_s_dir_xs;
static PyObject *__pyx_n_s_dir_y;
static PyObject *__pyx_n_s_dir_ys;
static PyObject *__pyx_n_s_dir_z;
static PyObject *__pyx_n_s_dir_zs;
static PyObject *__pyx_n_s_directions;
static PyObject *__pyx_n_s_directions_x;
static PyObject *__pyx_n_s_directions_y;
static PyObject *__pyx_n_s_directions_z;
static PyObject *__pyx_n_s_doc;
static PyObject *__pyx_n_s_dom_id;
static PyObject *__pyx_n_s_dom_ids;
static PyObject *__pyx_n_s_drop_duplicates;
static PyObject *__pyx_n_s_dtype;
static PyObject *__pyx_n_s_email;
static PyObject *__pyx_n_s_empty;
static PyObject *__pyx_n_s_energies;
static PyObject *__pyx_n_s_energy;
static PyObject *__pyx_n_s_energy_2;
static PyObject *__pyx_n_s_event_id;
static PyObject *__pyx_kp_s_f8;
static PyObject *__pyx_n_s_fields;
static PyObject *__pyx_n_s_fifo_status;
static PyObject *__pyx_n_s_first_hits;
static PyObject *__pyx_n_s_fmt;
static PyObject *__pyx_n_s_format;
static PyObject *__pyx_kp_s_frame__0;
static PyObject *__pyx_n_s_frame_id;
static PyObject *__pyx_n_s_frame_index;
static PyObject *__pyx_n_s_frames;
static PyObject *__pyx_n_s_frames_2;
static PyObject *__pyx_n_s_from_aanet;
static PyObject *__pyx_n_s_from_arrays;
static PyObject *__pyx_n_s_from_dict;
static PyObject *__pyx_n_s_from_evt;
static PyObject *__pyx_n_s_from_km3df;
static PyObject *__pyx_n_s_from_row;
static PyObject *__pyx_n_s_from_table;
static PyObject *__pyx_n_s_full;
static PyObject *__pyx_n_s_geant2pdg;
static PyObject *__pyx_n_s_genexpr;
static PyObject *__pyx_n_s_get_len;
static PyObject *__pyx_n_s_get_usr_item;
static PyObject *__pyx_n_s_getitem;
static PyObject *__pyx_n_s_h;
static PyObject *__pyx_n_s_h5loc;
static PyObject *__pyx_n_s_has_udp_trailer;
static PyObject *__pyx_n_s_high_rate_veto;
static PyObject *__pyx_n_s_highest_energetic_muon;
static PyObject *__pyx_n_s_highest_energetic_muon_2;
static PyObject *__pyx_n_s_hit;
static PyObject *__pyx_n_s_hits;
static PyObject *__pyx_n_s_hits_2;
static PyObject *__pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe;
static PyObject *__pyx_n_s_i;
static PyObject *__pyx_kp_s_i4;
static PyObject *__pyx_n_s_id;
static PyObject *__pyx_n_s_id_2;
static PyObject *__pyx_n_s_ids;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_index;
static PyObject *__pyx_n_s_index_2;
static PyObject *__pyx_kp_s_index_must_be_int_or_slice;
static PyObject *__pyx_n_s_indices;
static PyObject *__pyx_n_s_init;
static PyObject *__pyx_n_s_inplace;
static PyObject *__pyx_n_s_input_array;
static PyObject *__pyx_n_s_insp;
static PyObject *__pyx_n_s_interaction_channel;
static PyObject *__pyx_n_s_interaction_channel_2;
static PyObject *__pyx_n_s_interaction_channels;
static PyObject *__pyx_n_s_is_cc;
static PyObject *__pyx_n_s_is_cc_2;
static PyObject *__pyx_n_s_is_ccs;
static PyObject *__pyx_n_s_item;
static PyObject *__pyx_n_s_items;
static PyObject *__pyx_n_s_iter;
static PyObject *__pyx_n_s_iteritems;
static PyObject *__pyx_n_s_join;
static PyObject *__pyx_n_s_key;
static PyObject *__pyx_n_s_keys;
static PyObject *__pyx_n_s_km3df;
static PyObject *__pyx_n_s_km3pipe_dataclasses;
static PyObject *__pyx_n_s_kwargs;
static PyObject *__pyx_n_s_len;
static PyObject *__pyx_n_s_len_2;
static PyObject *__pyx_n_s_length;
static PyObject *__pyx_n_s_length_2;
static PyObject *__pyx_n_s_lengths;
static PyObject *__pyx_n_s_license;
static PyObject *__pyx_n_s_linalg;
static PyObject *__pyx_n_s_livetime_sec;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_maintainer;
static PyObject *__pyx_n_s_map;
static PyObject *__pyx_n_s_max;
static PyObject *__pyx_n_s_max_sequence_number;
static PyObject *__pyx_n_s_max_sequence_numbers;
static PyObject *__pyx_n_s_mc_id;
static PyObject *__pyx_n_s_mc_t;
static PyObject *__pyx_n_s_metaclass;
static PyObject *__pyx_n_s_metaclass_2;
static PyObject *__pyx_n_s_metadata;
static PyObject *__pyx_n_s_module;
static PyObject *__pyx_n_s_muons;
static PyObject *__pyx_n_s_n_events_gen;
static PyObject *__pyx_n_s_n_files_gen;
static PyObject *__pyx_n_s_n_hits;
static PyObject *__pyx_n_s_n_packets;
static PyObject *__pyx_n_s_n_received_packets;
static PyObject *__pyx_n_s_n_tracks;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_names;
static PyObject *__pyx_n_s_nan;
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_new;
static PyObject *__pyx_n_s_next;
static PyObject *__pyx_n_s_next_2;
static PyObject *__pyx_n_s_norm;
static PyObject *__pyx_n_s_normalise;
static PyObject *__pyx_n_s_normed_array;
static PyObject *__pyx_n_s_np;
static PyObject *__pyx_n_s_numpy;
static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;
static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor;
static PyObject *__pyx_n_s_obj;
static PyObject *__pyx_n_s_object;
static PyObject *__pyx_n_s_overlays;
static PyObject *__pyx_n_s_pandas;
static PyObject *__pyx_n_s_pd;
static PyObject *__pyx_n_s_pdg2name;
static PyObject *__pyx_n_s_plural;
static PyObject *__pyx_n_s_pmt_id;
static PyObject *__pyx_n_s_pmt_ids;
static PyObject *__pyx_n_s_pop;
static PyObject *__pyx_n_s_pos;
static PyObject *__pyx_n_s_pos_2;
static PyObject *__pyx_n_s_pos_x;
static PyObject *__pyx_n_s_pos_xs;
static PyObject *__pyx_n_s_pos_y;
static PyObject *__pyx_n_s_pos_ys;
static PyObject *__pyx_n_s_pos_z;
static PyObject *__pyx_n_s_pos_zs;
static PyObject *__pyx_n_s_positions;
static PyObject *__pyx_n_s_positions_x;
static PyObject *__pyx_n_s_positions_y;
static PyObject *__pyx_n_s_positions_z;
static PyObject *__pyx_n_s_prepare;
static PyObject *__pyx_n_s_property;
static PyObject *__pyx_n_s_qualname;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_read;
static PyObject *__pyx_n_s_repr;
static PyObject *__pyx_n_s_reshape;
static PyObject *__pyx_n_s_row;
static PyObject *__pyx_n_s_run_id;
static PyObject *__pyx_n_s_s;
static PyObject *__pyx_n_s_self;
static PyObject *__pyx_n_s_send;
static PyObject *__pyx_n_s_serialise;
static PyObject *__pyx_n_s_setter;
static PyObject *__pyx_n_s_shape;
static PyObject *__pyx_n_s_six;
static PyObject *__pyx_n_s_size;
static PyObject *__pyx_n_s_slice_generator;
static PyObject *__pyx_n_s_slice_id;
static PyObject *__pyx_n_s_sort_values;
static PyObject *__pyx_n_s_start;
static PyObject *__pyx_n_s_status;
static PyObject *__pyx_n_s_step;
static PyObject *__pyx_n_s_stop;
static PyObject *__pyx_n_s_str;
static PyObject *__pyx_n_s_stream;
static PyObject *__pyx_n_s_struct;
static PyObject *__pyx_n_s_structure;
static PyObject *__pyx_n_s_subset;
static PyObject *__pyx_n_s_super;
static PyObject *__pyx_n_s_t;
static PyObject *__pyx_n_s_t0;
static PyObject *__pyx_n_s_t0s;
static PyObject *__pyx_n_s_table;
static PyObject *__pyx_n_s_tabname;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_kp_s_tgal_km3net_de;
static PyObject *__pyx_n_s_throw;
static PyObject *__pyx_n_s_time;
static PyObject *__pyx_n_s_time_2;
static PyObject *__pyx_n_s_times;
static PyObject *__pyx_kp_s_timeslices_slice__0;
static PyObject *__pyx_n_s_to;
static PyObject *__pyx_n_s_to_records;
static PyObject *__pyx_n_s_tools;
static PyObject *__pyx_n_s_tot;
static PyObject *__pyx_n_s_tots;
static PyObject *__pyx_n_s_track;
static PyObject *__pyx_n_s_track_args;
static PyObject *__pyx_n_s_tracks;
static PyObject *__pyx_n_s_tracks_2;
static PyObject *__pyx_n_s_trig;
static PyObject *__pyx_n_s_trigger_counter;
static PyObject *__pyx_n_s_trigger_mask;
static PyObject *__pyx_n_s_triggered;
static PyObject *__pyx_n_s_triggered_hits;
static PyObject *__pyx_n_s_triggereds;
static PyObject *__pyx_n_s_type;
static PyObject *__pyx_n_s_type_2;
static PyObject *__pyx_n_s_types;
static PyObject *__pyx_n_s_u1;
static PyObject *__pyx_kp_s_u4;
static PyObject *__pyx_kp_s_u8;
static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd;
static PyObject *__pyx_n_s_unpack_from;
static PyObject *__pyx_n_s_usr;
static PyObject *__pyx_n_s_utc_nanoseconds;
static PyObject *__pyx_n_s_utc_seconds;
static PyObject *__pyx_n_s_val;
static PyObject *__pyx_n_s_value;
static PyObject *__pyx_n_s_view;
static PyObject *__pyx_n_s_weight_w1;
static PyObject *__pyx_n_s_weight_w2;
static PyObject *__pyx_n_s_weight_w3;
static PyObject *__pyx_n_s_white_rabbit_status;
static PyObject *__pyx_n_s_with_metaclass;
static PyObject *__pyx_n_s_x;
static PyObject *__pyx_n_s_y;
static PyObject *__pyx_n_s_z;
static PyObject *__pyx_n_s_zenith;
static PyObject *__pyx_n_s_zip;
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12Serialisable_7__new_____init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12Serialisable___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_metaclass, PyObject *__pyx_v_class_name, PyObject *__pyx_v_class_parents, PyObject *__pyx_v_class_attr); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_from_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_row); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_2deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_4serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_6conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_event_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_8conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_10__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_12__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_14__insp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_16__len__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13TimesliceInfo_from_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_row); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13TimesliceInfo_2deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13TimesliceInfo_4serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13TimesliceInfo_6conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_frame_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13TimesliceInfo_8conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13TimesliceInfo_10__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13TimesliceInfo_12__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13TimesliceInfo_14__insp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13TimesliceInfo_16__len__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceFrameInfo_from_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_row); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceFrameInfo_2deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceFrameInfo_4serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceFrameInfo_6conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_frame_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceFrameInfo_8conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceFrameInfo_10__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceFrameInfo_12__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceFrameInfo_14__insp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceFrameInfo_16__len__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_from_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_row); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_2deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_4serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_6conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_frame_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_8conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_10__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_12__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_14__insp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_16__len__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_h5loc); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_8from_row_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_2from_row(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_row, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_4deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_6serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_8conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_event_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_10conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_12__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_14__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_16__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_18__insp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_20__len__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses___defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Point___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_input_array); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Point_2x(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Point_4x(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Point_6y(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Point_8y(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Point_10z(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Point_12z(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_10Direction____new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_input_array); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_10Direction__2_normalise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_10Direction__4x(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_10Direction__6x(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_10Direction__8y(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_10Direction__10y(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_10Direction__12z(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_10Direction__14z(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_10Direction__16zenith(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_10Direction__18__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_3Hit___cinit__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, int __pyx_v_channel_id, float __pyx_v_dir_x, float __pyx_v_dir_y, float __pyx_v_dir_z, int __pyx_v_dom_id, int __pyx_v_id, int __pyx_v_pmt_id, float __pyx_v_pos_x, float __pyx_v_pos_y, float __pyx_v_pos_z, int __pyx_v_t0, int __pyx_v_time, int __pyx_v_tot, unsigned short __pyx_v_triggered, CYTHON_UNUSED int __pyx_v_event_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_3dir___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_3pos___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_2__str__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_4__repr__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_6__insp__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_2id___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_3Hit_2id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_6dom_id___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_3Hit_6dom_id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_4time___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_3Hit_4time_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_3tot___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_3Hit_3tot_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_10channel_id___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_3Hit_10channel_id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_6pmt_id___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_3Hit_6pmt_id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_9triggered___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_3Hit_9triggered_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_5pos_x___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_3Hit_5pos_x_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_5pos_y___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_3Hit_5pos_y_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_5pos_z___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_3Hit_5pos_z_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_5dir_x___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_3Hit_5dir_x_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_5dir_y___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_3Hit_5dir_y_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_5dir_z___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_3Hit_5dir_z_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_2t0___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_3Hit_2t0_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit___cinit__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self, int __pyx_v_channel_id, int __pyx_v_dom_id, int __pyx_v_time, int __pyx_v_tot, CYTHON_UNUSED int __pyx_v_frame_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_2__str__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_4__repr__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_6__insp__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_6dom_id___get__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_6dom_id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_4time___get__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_4time_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3tot___get__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3tot_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_10channel_id___get__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_10channel_id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3pos___get__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3pos_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3pos_4__del__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3dir___get__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3dir_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3dir_4__del__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5MCHit___cinit__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self, int __pyx_v_channel_id, int __pyx_v_dom_id, int __pyx_v_id, int __pyx_v_pmt_id, int __pyx_v_time, int __pyx_v_tot, unsigned short __pyx_v_triggered); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5MCHit_2__str__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5MCHit_4__repr__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5MCHit_6__insp__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5MCHit_2id___get__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5MCHit_2id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5MCHit_6dom_id___get__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5MCHit_6dom_id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5MCHit_4time___get__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5MCHit_4time_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5MCHit_3tot___get__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5MCHit_3tot_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5MCHit_10channel_id___get__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5MCHit_10channel_id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5MCHit_6pmt_id___get__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5MCHit_6pmt_id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5MCHit_9triggered___get__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5MCHit_9triggered_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5MCHit_3pos___get__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5MCHit_3pos_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5MCHit_3pos_4__del__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5MCHit_3dir___get__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5MCHit_3dir_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5MCHit_3dir_4__del__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5Track___cinit__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, float __pyx_v_bjorkeny, PyObject *__pyx_v_dir, float __pyx_v_energy, int __pyx_v_id, __pyx_t_5numpy_int64_t __pyx_v_interaction_channel, unsigned short __pyx_v_is_cc, float __pyx_v_length, PyObject *__pyx_v_pos, int __pyx_v_time, int __pyx_v_type); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_2__str__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_4__repr__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_6__insp__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_2id___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5Track_2id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_4time___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5Track_4time_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_4type___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5Track_4type_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_19interaction_channel___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5Track_19interaction_channel_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_6energy___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5Track_6energy_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_6length___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5Track_6length_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_8bjorkeny___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5Track_8bjorkeny_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_5is_cc___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5Track_5is_cc_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_3pos___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5Track_3pos_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5Track_3pos_4__del__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_3dir___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5Track_3dir_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5Track_3dir_4__del__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_h5loc); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_2from_aanet(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_hits, PyObject *__pyx_v_event_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_4from_evt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_hits, PyObject *__pyx_v_event_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_6from_arrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_channel_ids, PyObject *__pyx_v_dir_xs, PyObject *__pyx_v_dir_ys, PyObject *__pyx_v_dir_zs, PyObject *__pyx_v_dom_ids, PyObject *__pyx_v_ids, PyObject *__pyx_v_pmt_ids, PyObject *__pyx_v_pos_xs, PyObject *__pyx_v_pos_ys, PyObject *__pyx_v_pos_zs, PyObject *__pyx_v_t0s, PyObject *__pyx_v_times, PyObject *__pyx_v_tots, PyObject *__pyx_v_triggereds, PyObject *__pyx_v_event_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_8from_dict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_map, PyObject *__pyx_v_event_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_10from_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_table, PyObject *__pyx_v_event_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_12deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_14serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_16conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_event_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_18conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_20__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_22__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_24id(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_26time(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_28triggered_hits(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_30first_hits(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_32triggered(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_34tot(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_36dom_id(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_38pmt_id(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_40id(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_42channel_id(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_44pos_x(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_46pos_y(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_48pos_z(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_50dir_x(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_52dir_y(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_54dir_z(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_56t0(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_58next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_60__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_62__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_64__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_66_slice_generator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_69__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_71__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_73__insp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_slice_id, PyObject *__pyx_v_frame_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_2h5loc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_4tabname(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_6from_arrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_channel_ids, PyObject *__pyx_v_dom_ids, PyObject *__pyx_v_times, PyObject *__pyx_v_tots, PyObject *__pyx_v_slice_id, PyObject *__pyx_v_frame_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_8from_dict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_map, PyObject *__pyx_v_slice_id, PyObject *__pyx_v_frame_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_10from_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_table, PyObject *__pyx_v_slice_id, PyObject *__pyx_v_frame_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_12deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_14serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_16conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, PyObject *__pyx_v_slice_id, PyObject *__pyx_v_frame_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_18conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_20__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_22__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_24time(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_26tot(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_28dom_id(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_30channel_id(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_32next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_34__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_36__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_38__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_40_slice_generator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_43__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_45__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_47__insp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tracks, PyObject *__pyx_v_event_id, PyObject *__pyx_v_h5loc); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_2from_aanet(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_tracks, PyObject *__pyx_v_event_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_4from_arrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_bjorkenys, PyObject *__pyx_v_directions_x, PyObject *__pyx_v_directions_y, PyObject *__pyx_v_directions_z, PyObject *__pyx_v_energies, PyObject *__pyx_v_ids, PyObject *__pyx_v_interaction_channels, PyObject *__pyx_v_is_ccs, PyObject *__pyx_v_lengths, PyObject *__pyx_v_positions_x, PyObject *__pyx_v_positions_y, PyObject *__pyx_v_positions_z, PyObject *__pyx_v_times, PyObject *__pyx_v_types, PyObject *__pyx_v_event_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_6from_km3df(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_km3df); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_8from_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_table, PyObject *__pyx_v_event_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_10deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_12serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_14conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, PyObject *__pyx_v_event_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_16conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_18__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_20get_len(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_track); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_22get_usr_item(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_track, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda1(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_m); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_24highest_energetic_muon(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_26__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_28__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_30bjorkeny(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_32is_cc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_34interaction_channel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_36id(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_38time(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_40energy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_42length(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_44type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_46pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_48dir(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_50next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_52__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_54__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_56__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_58_slice_generator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_61__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_63__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_65__insp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_arr); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_2from_arrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_dom_ids, PyObject *__pyx_v_max_sequence_numbers, PyObject *__pyx_v_n_received_packets, PyObject *__pyx_v_slice_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_4from_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_table, PyObject *__pyx_v_slice_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_6deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_8serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_10conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_slice_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_12conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_14n_received_packets(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_16dom_ids(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_18max_sequence_numbers(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_20__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_22__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_24next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_26__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_28__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_30__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_32_slice_generator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_8KM3Array___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_arr, PyObject *__pyx_v_h5loc); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_8KM3Array_2__init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_h5loc); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_8KM3Array_4__array_finalize__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_8KM3Array_6deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_8KM3Array_8serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_8KM3Array_10conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_event_id, PyObject *__pyx_v_h5loc, PyObject *__pyx_v_fmt, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_8KM3Array_12conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_8KM3Array_9from_dict_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_8KM3Array_14from_dict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_map, PyObject *__pyx_v_dtype, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12KM3DataFrame__constructor(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12KM3DataFrame_2__init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12KM3DataFrame_4deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12KM3DataFrame_6serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12KM3DataFrame_8conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_event_id, PyObject *__pyx_v_h5loc, PyObject *__pyx_v_fmt, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12KM3DataFrame_10conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12BinaryStruct___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12BinaryStruct_2_size(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* 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_7km3pipe_11dataclasses_Hit(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7km3pipe_11dataclasses_TimesliceHit(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7km3pipe_11dataclasses_MCHit(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7km3pipe_11dataclasses_Track(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct__from_row(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_float_0_;
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_3;
static PyObject *__pyx_int_13;
static PyObject *__pyx_int_neg_1;
static PyObject *__pyx_codeobj_;
static PyObject *__pyx_tuple__3;
static PyObject *__pyx_tuple__42;
static PyObject *__pyx_tuple__60;
static PyObject *__pyx_tuple__70;
static PyObject *__pyx_tuple__92;
static PyObject *__pyx_codeobj__4;
static PyObject *__pyx_codeobj__5;
static PyObject *__pyx_codeobj__6;
static PyObject *__pyx_codeobj__7;
static PyObject *__pyx_codeobj__8;
static PyObject *__pyx_codeobj__9;
static PyObject *__pyx_tuple__110;
static PyObject *__pyx_tuple__137;
static PyObject *__pyx_tuple__155;
static PyObject *__pyx_tuple__172;
static PyObject *__pyx_tuple__193;
static PyObject *__pyx_tuple__205;
static PyObject *__pyx_tuple__212;
static PyObject *__pyx_tuple__213;
static PyObject *__pyx_tuple__214;
static PyObject *__pyx_tuple__215;
static PyObject *__pyx_tuple__216;
static PyObject *__pyx_tuple__217;
static PyObject *__pyx_tuple__218;
static PyObject *__pyx_tuple__219;
static PyObject *__pyx_tuple__220;
static PyObject *__pyx_tuple__222;
static PyObject *__pyx_tuple__223;
static PyObject *__pyx_tuple__224;
static PyObject *__pyx_tuple__225;
static PyObject *__pyx_tuple__226;
static PyObject *__pyx_tuple__227;
static PyObject *__pyx_tuple__228;
static PyObject *__pyx_tuple__229;
static PyObject *__pyx_tuple__230;
static PyObject *__pyx_tuple__231;
static PyObject *__pyx_tuple__232;
static PyObject *__pyx_tuple__233;
static PyObject *__pyx_tuple__234;
static PyObject *__pyx_tuple__235;
static PyObject *__pyx_tuple__236;
static PyObject *__pyx_tuple__237;
static PyObject *__pyx_tuple__238;
static PyObject *__pyx_tuple__239;
static PyObject *__pyx_tuple__240;
static PyObject *__pyx_tuple__241;
static PyObject *__pyx_tuple__242;
static PyObject *__pyx_tuple__243;
static PyObject *__pyx_tuple__244;
static PyObject *__pyx_tuple__245;
static PyObject *__pyx_tuple__246;
static PyObject *__pyx_tuple__247;
static PyObject *__pyx_tuple__248;
static PyObject *__pyx_tuple__249;
static PyObject *__pyx_tuple__250;
static PyObject *__pyx_tuple__251;
static PyObject *__pyx_tuple__252;
static PyObject *__pyx_tuple__253;
static PyObject *__pyx_tuple__254;
static PyObject *__pyx_tuple__255;
static PyObject *__pyx_tuple__256;
static PyObject *__pyx_tuple__257;
static PyObject *__pyx_tuple__258;
static PyObject *__pyx_tuple__259;
static PyObject *__pyx_tuple__260;
static PyObject *__pyx_tuple__261;
static PyObject *__pyx_tuple__262;
static PyObject *__pyx_tuple__263;
static PyObject *__pyx_tuple__264;
static PyObject *__pyx_tuple__265;
static PyObject *__pyx_tuple__266;
static PyObject *__pyx_tuple__267;
static PyObject *__pyx_tuple__268;
static PyObject *__pyx_tuple__269;
static PyObject *__pyx_tuple__270;
static PyObject *__pyx_tuple__271;
static PyObject *__pyx_tuple__272;
static PyObject *__pyx_tuple__273;
static PyObject *__pyx_tuple__274;
static PyObject *__pyx_tuple__275;
static PyObject *__pyx_tuple__276;
static PyObject *__pyx_tuple__277;
static PyObject *__pyx_tuple__278;
static PyObject *__pyx_tuple__279;
static PyObject *__pyx_tuple__280;
static PyObject *__pyx_tuple__281;
static PyObject *__pyx_tuple__282;
static PyObject *__pyx_tuple__283;
static PyObject *__pyx_tuple__284;
static PyObject *__pyx_tuple__285;
static PyObject *__pyx_tuple__286;
static PyObject *__pyx_tuple__287;
static PyObject *__pyx_tuple__288;
static PyObject *__pyx_tuple__289;
static PyObject *__pyx_tuple__290;
static PyObject *__pyx_tuple__291;
static PyObject *__pyx_tuple__292;
static PyObject *__pyx_tuple__293;
static PyObject *__pyx_tuple__294;
static PyObject *__pyx_tuple__295;
static PyObject *__pyx_tuple__296;
static PyObject *__pyx_tuple__297;
static PyObject *__pyx_tuple__298;
static PyObject *__pyx_tuple__299;
static PyObject *__pyx_tuple__300;
static PyObject *__pyx_tuple__301;
static PyObject *__pyx_tuple__302;
static PyObject *__pyx_tuple__303;
static PyObject *__pyx_tuple__304;
static PyObject *__pyx_tuple__305;
static PyObject *__pyx_tuple__306;
static PyObject *__pyx_tuple__307;
static PyObject *__pyx_tuple__308;
static PyObject *__pyx_tuple__309;
static PyObject *__pyx_tuple__310;
static PyObject *__pyx_tuple__311;
static PyObject *__pyx_tuple__312;
static PyObject *__pyx_tuple__313;
static PyObject *__pyx_tuple__314;
static PyObject *__pyx_tuple__315;
static PyObject *__pyx_tuple__316;
static PyObject *__pyx_tuple__317;
static PyObject *__pyx_tuple__318;
static PyObject *__pyx_tuple__319;
static PyObject *__pyx_tuple__320;
static PyObject *__pyx_tuple__321;
static PyObject *__pyx_tuple__322;
static PyObject *__pyx_tuple__323;
static PyObject *__pyx_tuple__324;
static PyObject *__pyx_tuple__325;
static PyObject *__pyx_tuple__326;
static PyObject *__pyx_tuple__327;
static PyObject *__pyx_tuple__328;
static PyObject *__pyx_tuple__329;
static PyObject *__pyx_tuple__330;
static PyObject *__pyx_tuple__331;
static PyObject *__pyx_tuple__332;
static PyObject *__pyx_tuple__333;
static PyObject *__pyx_tuple__334;
static PyObject *__pyx_tuple__335;
static PyObject *__pyx_tuple__336;
static PyObject *__pyx_tuple__337;
static PyObject *__pyx_tuple__338;
static PyObject *__pyx_tuple__339;
static PyObject *__pyx_tuple__340;
static PyObject *__pyx_tuple__341;
static PyObject *__pyx_tuple__342;
static PyObject *__pyx_tuple__343;
static PyObject *__pyx_tuple__344;
static PyObject *__pyx_tuple__345;
static PyObject *__pyx_tuple__346;
static PyObject *__pyx_tuple__347;
static PyObject *__pyx_tuple__348;
static PyObject *__pyx_tuple__349;
static PyObject *__pyx_tuple__350;
static PyObject *__pyx_tuple__351;
static PyObject *__pyx_tuple__352;
static PyObject *__pyx_tuple__353;
static PyObject *__pyx_tuple__354;
static PyObject *__pyx_tuple__355;
static PyObject *__pyx_tuple__356;
static PyObject *__pyx_tuple__357;
static PyObject *__pyx_tuple__358;
static PyObject *__pyx_tuple__359;
static PyObject *__pyx_tuple__360;
static PyObject *__pyx_tuple__361;
static PyObject *__pyx_tuple__362;
static PyObject *__pyx_tuple__363;
static PyObject *__pyx_tuple__364;
static PyObject *__pyx_tuple__365;
static PyObject *__pyx_tuple__366;
static PyObject *__pyx_tuple__367;
static PyObject *__pyx_tuple__368;
static PyObject *__pyx_tuple__369;
static PyObject *__pyx_tuple__370;
static PyObject *__pyx_tuple__371;
static PyObject *__pyx_tuple__372;
static PyObject *__pyx_tuple__373;
static PyObject *__pyx_tuple__374;
static PyObject *__pyx_tuple__375;
static PyObject *__pyx_tuple__376;
static PyObject *__pyx_tuple__377;
static PyObject *__pyx_tuple__378;
static PyObject *__pyx_tuple__379;
static PyObject *__pyx_tuple__380;
static PyObject *__pyx_tuple__381;
static PyObject *__pyx_tuple__382;
static PyObject *__pyx_tuple__383;
static PyObject *__pyx_tuple__384;
static PyObject *__pyx_tuple__385;
static PyObject *__pyx_tuple__386;
static PyObject *__pyx_tuple__387;
static PyObject *__pyx_tuple__388;
static PyObject *__pyx_tuple__389;
static PyObject *__pyx_tuple__390;
static PyObject *__pyx_tuple__391;
static PyObject *__pyx_tuple__392;
static PyObject *__pyx_tuple__393;
static PyObject *__pyx_tuple__394;
static PyObject *__pyx_tuple__395;
static PyObject *__pyx_tuple__396;
static PyObject *__pyx_tuple__397;
static PyObject *__pyx_tuple__398;
static PyObject *__pyx_tuple__399;
static PyObject *__pyx_tuple__400;
static PyObject *__pyx_tuple__401;
static PyObject *__pyx_tuple__402;
static PyObject *__pyx_tuple__403;
static PyObject *__pyx_tuple__404;
static PyObject *__pyx_tuple__405;
static PyObject *__pyx_tuple__406;
static PyObject *__pyx_tuple__407;
static PyObject *__pyx_tuple__408;
static PyObject *__pyx_tuple__409;
static PyObject *__pyx_tuple__410;
static PyObject *__pyx_tuple__411;
static PyObject *__pyx_tuple__412;
static PyObject *__pyx_tuple__413;
static PyObject *__pyx_tuple__414;
static PyObject *__pyx_tuple__415;
static PyObject *__pyx_tuple__416;
static PyObject *__pyx_tuple__417;
static PyObject *__pyx_tuple__418;
static PyObject *__pyx_tuple__419;
static PyObject *__pyx_tuple__420;
static PyObject *__pyx_tuple__421;
static PyObject *__pyx_tuple__422;
static PyObject *__pyx_tuple__423;
static PyObject *__pyx_tuple__424;
static PyObject *__pyx_tuple__425;
static PyObject *__pyx_tuple__426;
static PyObject *__pyx_tuple__427;
static PyObject *__pyx_tuple__428;
static PyObject *__pyx_tuple__429;
static PyObject *__pyx_tuple__430;
static PyObject *__pyx_tuple__431;
static PyObject *__pyx_tuple__432;
static PyObject *__pyx_tuple__433;
static PyObject *__pyx_tuple__434;
static PyObject *__pyx_tuple__435;
static PyObject *__pyx_tuple__436;
static PyObject *__pyx_tuple__437;
static PyObject *__pyx_tuple__438;
static PyObject *__pyx_tuple__439;
static PyObject *__pyx_tuple__440;
static PyObject *__pyx_tuple__441;
static PyObject *__pyx_tuple__442;
static PyObject *__pyx_tuple__443;
static PyObject *__pyx_tuple__444;
static PyObject *__pyx_tuple__445;
static PyObject *__pyx_tuple__446;
static PyObject *__pyx_tuple__447;
static PyObject *__pyx_tuple__448;
static PyObject *__pyx_tuple__449;
static PyObject *__pyx_tuple__450;
static PyObject *__pyx_tuple__451;
static PyObject *__pyx_tuple__452;
static PyObject *__pyx_tuple__453;
static PyObject *__pyx_tuple__454;
static PyObject *__pyx_tuple__455;
static PyObject *__pyx_tuple__456;
static PyObject *__pyx_tuple__457;
static PyObject *__pyx_tuple__458;
static PyObject *__pyx_tuple__459;
static PyObject *__pyx_tuple__460;
static PyObject *__pyx_tuple__461;
static PyObject *__pyx_tuple__462;
static PyObject *__pyx_tuple__463;
static PyObject *__pyx_tuple__464;
static PyObject *__pyx_tuple__465;
static PyObject *__pyx_tuple__466;
static PyObject *__pyx_tuple__467;
static PyObject *__pyx_tuple__468;
static PyObject *__pyx_tuple__469;
static PyObject *__pyx_tuple__470;
static PyObject *__pyx_tuple__471;
static PyObject *__pyx_tuple__472;
static PyObject *__pyx_tuple__473;
static PyObject *__pyx_tuple__474;
static PyObject *__pyx_tuple__475;
static PyObject *__pyx_tuple__476;
static PyObject *__pyx_tuple__477;
static PyObject *__pyx_tuple__478;
static PyObject *__pyx_tuple__479;
static PyObject *__pyx_tuple__480;
static PyObject *__pyx_tuple__481;
static PyObject *__pyx_tuple__482;
static PyObject *__pyx_tuple__483;
static PyObject *__pyx_tuple__484;
static PyObject *__pyx_tuple__485;
static PyObject *__pyx_tuple__486;
static PyObject *__pyx_tuple__487;
static PyObject *__pyx_tuple__488;
static PyObject *__pyx_tuple__489;
static PyObject *__pyx_tuple__490;
static PyObject *__pyx_tuple__491;
static PyObject *__pyx_tuple__492;
static PyObject *__pyx_tuple__493;
static PyObject *__pyx_tuple__494;
static PyObject *__pyx_tuple__495;
static PyObject *__pyx_tuple__496;
static PyObject *__pyx_tuple__497;
static PyObject *__pyx_tuple__498;
static PyObject *__pyx_tuple__499;
static PyObject *__pyx_tuple__500;
static PyObject *__pyx_tuple__501;
static PyObject *__pyx_tuple__502;
static PyObject *__pyx_tuple__503;
static PyObject *__pyx_tuple__504;
static PyObject *__pyx_tuple__505;
static PyObject *__pyx_tuple__506;
static PyObject *__pyx_tuple__507;
static PyObject *__pyx_tuple__508;
static PyObject *__pyx_tuple__509;
static PyObject *__pyx_tuple__510;
static PyObject *__pyx_tuple__511;
static PyObject *__pyx_tuple__512;
static PyObject *__pyx_tuple__513;
static PyObject *__pyx_tuple__514;
static PyObject *__pyx_tuple__515;
static PyObject *__pyx_tuple__516;
static PyObject *__pyx_tuple__517;
static PyObject *__pyx_tuple__518;
static PyObject *__pyx_tuple__519;
static PyObject *__pyx_tuple__520;
static PyObject *__pyx_tuple__521;
static PyObject *__pyx_tuple__522;
static PyObject *__pyx_tuple__523;
static PyObject *__pyx_tuple__524;
static PyObject *__pyx_tuple__525;
static PyObject *__pyx_tuple__526;
static PyObject *__pyx_tuple__527;
static PyObject *__pyx_tuple__528;
static PyObject *__pyx_tuple__529;
static PyObject *__pyx_tuple__530;
static PyObject *__pyx_tuple__531;
static PyObject *__pyx_tuple__532;
static PyObject *__pyx_tuple__533;
static PyObject *__pyx_codeobj__10;
static PyObject *__pyx_codeobj__11;
static PyObject *__pyx_codeobj__12;
static PyObject *__pyx_codeobj__13;
static PyObject *__pyx_codeobj__14;
static PyObject *__pyx_codeobj__15;
static PyObject *__pyx_codeobj__16;
static PyObject *__pyx_codeobj__17;
static PyObject *__pyx_codeobj__18;
static PyObject *__pyx_codeobj__19;
static PyObject *__pyx_codeobj__20;
static PyObject *__pyx_codeobj__21;
static PyObject *__pyx_codeobj__22;
static PyObject *__pyx_codeobj__23;
static PyObject *__pyx_codeobj__24;
static PyObject *__pyx_codeobj__25;
static PyObject *__pyx_codeobj__26;
static PyObject *__pyx_codeobj__27;
static PyObject *__pyx_codeobj__28;
static PyObject *__pyx_codeobj__29;
static PyObject *__pyx_codeobj__30;
static PyObject *__pyx_codeobj__31;
static PyObject *__pyx_codeobj__32;
static PyObject *__pyx_codeobj__33;
static PyObject *__pyx_codeobj__34;
static PyObject *__pyx_codeobj__35;
static PyObject *__pyx_codeobj__36;
static PyObject *__pyx_codeobj__37;
static PyObject *__pyx_codeobj__38;
static PyObject *__pyx_codeobj__39;
static PyObject *__pyx_codeobj__40;
static PyObject *__pyx_codeobj__41;
static PyObject *__pyx_codeobj__43;
static PyObject *__pyx_codeobj__44;
static PyObject *__pyx_codeobj__45;
static PyObject *__pyx_codeobj__46;
static PyObject *__pyx_codeobj__47;
static PyObject *__pyx_codeobj__48;
static PyObject *__pyx_codeobj__49;
static PyObject *__pyx_codeobj__50;
static PyObject *__pyx_codeobj__51;
static PyObject *__pyx_codeobj__52;
static PyObject *__pyx_codeobj__53;
static PyObject *__pyx_codeobj__54;
static PyObject *__pyx_codeobj__55;
static PyObject *__pyx_codeobj__56;
static PyObject *__pyx_codeobj__57;
static PyObject *__pyx_codeobj__58;
static PyObject *__pyx_codeobj__59;
static PyObject *__pyx_codeobj__61;
static PyObject *__pyx_codeobj__62;
static PyObject *__pyx_codeobj__63;
static PyObject *__pyx_codeobj__64;
static PyObject *__pyx_codeobj__65;
static PyObject *__pyx_codeobj__66;
static PyObject *__pyx_codeobj__67;
static PyObject *__pyx_codeobj__68;
static PyObject *__pyx_codeobj__69;
static PyObject *__pyx_codeobj__71;
static PyObject *__pyx_codeobj__72;
static PyObject *__pyx_codeobj__73;
static PyObject *__pyx_codeobj__74;
static PyObject *__pyx_codeobj__75;
static PyObject *__pyx_codeobj__76;
static PyObject *__pyx_codeobj__77;
static PyObject *__pyx_codeobj__78;
static PyObject *__pyx_codeobj__79;
static PyObject *__pyx_codeobj__80;
static PyObject *__pyx_codeobj__81;
static PyObject *__pyx_codeobj__82;
static PyObject *__pyx_codeobj__83;
static PyObject *__pyx_codeobj__84;
static PyObject *__pyx_codeobj__85;
static PyObject *__pyx_codeobj__86;
static PyObject *__pyx_codeobj__87;
static PyObject *__pyx_codeobj__88;
static PyObject *__pyx_codeobj__89;
static PyObject *__pyx_codeobj__90;
static PyObject *__pyx_codeobj__91;
static PyObject *__pyx_codeobj__93;
static PyObject *__pyx_codeobj__94;
static PyObject *__pyx_codeobj__95;
static PyObject *__pyx_codeobj__96;
static PyObject *__pyx_codeobj__97;
static PyObject *__pyx_codeobj__98;
static PyObject *__pyx_codeobj__99;
static PyObject *__pyx_codeobj__100;
static PyObject *__pyx_codeobj__101;
static PyObject *__pyx_codeobj__102;
static PyObject *__pyx_codeobj__103;
static PyObject *__pyx_codeobj__104;
static PyObject *__pyx_codeobj__105;
static PyObject *__pyx_codeobj__106;
static PyObject *__pyx_codeobj__107;
static PyObject *__pyx_codeobj__108;
static PyObject *__pyx_codeobj__109;
static PyObject *__pyx_codeobj__111;
static PyObject *__pyx_codeobj__112;
static PyObject *__pyx_codeobj__114;
static PyObject *__pyx_codeobj__115;
static PyObject *__pyx_codeobj__117;
static PyObject *__pyx_codeobj__118;
static PyObject *__pyx_codeobj__119;
static PyObject *__pyx_codeobj__120;
static PyObject *__pyx_codeobj__121;
static PyObject *__pyx_codeobj__122;
static PyObject *__pyx_codeobj__123;
static PyObject *__pyx_codeobj__124;
static PyObject *__pyx_codeobj__125;
static PyObject *__pyx_codeobj__126;
static PyObject *__pyx_codeobj__127;
static PyObject *__pyx_codeobj__128;
static PyObject *__pyx_codeobj__129;
static PyObject *__pyx_codeobj__130;
static PyObject *__pyx_codeobj__131;
static PyObject *__pyx_codeobj__132;
static PyObject *__pyx_codeobj__133;
static PyObject *__pyx_codeobj__134;
static PyObject *__pyx_codeobj__135;
static PyObject *__pyx_codeobj__136;
static PyObject *__pyx_codeobj__138;
static PyObject *__pyx_codeobj__139;
static PyObject *__pyx_codeobj__140;
static PyObject *__pyx_codeobj__141;
static PyObject *__pyx_codeobj__142;
static PyObject *__pyx_codeobj__143;
static PyObject *__pyx_codeobj__144;
static PyObject *__pyx_codeobj__145;
static PyObject *__pyx_codeobj__146;
static PyObject *__pyx_codeobj__147;
static PyObject *__pyx_codeobj__148;
static PyObject *__pyx_codeobj__149;
static PyObject *__pyx_codeobj__150;
static PyObject *__pyx_codeobj__151;
static PyObject *__pyx_codeobj__152;
static PyObject *__pyx_codeobj__153;
static PyObject *__pyx_codeobj__154;
static PyObject *__pyx_codeobj__156;
static PyObject *__pyx_codeobj__157;
static PyObject *__pyx_codeobj__158;
static PyObject *__pyx_codeobj__159;
static PyObject *__pyx_codeobj__160;
static PyObject *__pyx_codeobj__161;
static PyObject *__pyx_codeobj__162;
static PyObject *__pyx_codeobj__163;
static PyObject *__pyx_codeobj__164;
static PyObject *__pyx_codeobj__165;
static PyObject *__pyx_codeobj__166;
static PyObject *__pyx_codeobj__167;
static PyObject *__pyx_codeobj__168;
static PyObject *__pyx_codeobj__169;
static PyObject *__pyx_codeobj__170;
static PyObject *__pyx_codeobj__171;
static PyObject *__pyx_codeobj__173;
static PyObject *__pyx_codeobj__174;
static PyObject *__pyx_codeobj__175;
static PyObject *__pyx_codeobj__176;
static PyObject *__pyx_codeobj__177;
static PyObject *__pyx_codeobj__178;
static PyObject *__pyx_codeobj__179;
static PyObject *__pyx_codeobj__180;
static PyObject *__pyx_codeobj__181;
static PyObject *__pyx_codeobj__182;
static PyObject *__pyx_codeobj__183;
static PyObject *__pyx_codeobj__184;
static PyObject *__pyx_codeobj__185;
static PyObject *__pyx_codeobj__186;
static PyObject *__pyx_codeobj__187;
static PyObject *__pyx_codeobj__188;
static PyObject *__pyx_codeobj__189;
static PyObject *__pyx_codeobj__190;
static PyObject *__pyx_codeobj__191;
static PyObject *__pyx_codeobj__192;
static PyObject *__pyx_codeobj__194;
static PyObject *__pyx_codeobj__195;
static PyObject *__pyx_codeobj__196;
static PyObject *__pyx_codeobj__197;
static PyObject *__pyx_codeobj__198;
static PyObject *__pyx_codeobj__199;
static PyObject *__pyx_codeobj__200;
static PyObject *__pyx_codeobj__201;
static PyObject *__pyx_codeobj__202;
static PyObject *__pyx_codeobj__203;
static PyObject *__pyx_codeobj__204;
static PyObject *__pyx_codeobj__206;
static PyObject *__pyx_codeobj__207;
static PyObject *__pyx_codeobj__208;
static PyObject *__pyx_codeobj__209;
static PyObject *__pyx_codeobj__210;
static PyObject *__pyx_codeobj__211;

/* "km3pipe/dataclasses.pyx":60
 * 
 *     """
 *     def __new__(metaclass, class_name, class_parents, class_attr):             # <<<<<<<<<<<<<<
 *         attr = {'h5loc': '/'}
 *         for name, val in class_attr.items():
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12Serialisable_1__new__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12Serialisable___new__[] = "Serialisable.__new__(metaclass, class_name, class_parents, class_attr)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12Serialisable_1__new__ = {"__new__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12Serialisable_1__new__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_12Serialisable___new__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12Serialisable_1__new__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_metaclass = 0;
  PyObject *__pyx_v_class_name = 0;
  PyObject *__pyx_v_class_parents = 0;
  PyObject *__pyx_v_class_attr = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_metaclass,&__pyx_n_s_class_name,&__pyx_n_s_class_parents,&__pyx_n_s_class_attr,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_metaclass)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_class_name)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__new__", 1, 4, 4, 1); __PYX_ERR(0, 60, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_class_parents)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__new__", 1, 4, 4, 2); __PYX_ERR(0, 60, __pyx_L3_error)
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_class_attr)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__new__", 1, 4, 4, 3); __PYX_ERR(0, 60, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__new__") < 0)) __PYX_ERR(0, 60, __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_metaclass = values[0];
    __pyx_v_class_name = values[1];
    __pyx_v_class_parents = values[2];
    __pyx_v_class_attr = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 60, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Serialisable.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12Serialisable___new__(__pyx_self, __pyx_v_metaclass, __pyx_v_class_name, __pyx_v_class_parents, __pyx_v_class_attr);

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

/* "km3pipe/dataclasses.pyx":68
 *                 attr[name] = val
 * 
 *         def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *             """Take care of the attribute settings."""
 *             for arg, name in zip(args, self.dtype.names):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12Serialisable_7__new___1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12Serialisable_7__new_____init__[] = "Take care of the attribute settings.";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12Serialisable_7__new___1__init__ = {"__init__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12Serialisable_7__new___1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_12Serialisable_7__new_____init__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12Serialisable_7__new___1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,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_self)) != 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, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(0, 68, __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_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 68, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.Serialisable.__new__.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12Serialisable_7__new_____init__(__pyx_self, __pyx_v_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_7km3pipe_11dataclasses_12Serialisable_7__new_____init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_arg = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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)(PyObject *);
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 68, 0, __PYX_ERR(0, 68, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":70
 *         def __init__(self, *args, **kwargs):
 *             """Take care of the attribute settings."""
 *             for arg, name in zip(args, self.dtype.names):             # <<<<<<<<<<<<<<
 *                 setattr(self, name, arg)
 *             for key, value in kwargs.iteritems():
 */
  __Pyx_TraceLine(70,0,__PYX_ERR(0, 70, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_names); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_args);
  __Pyx_GIVEREF(__pyx_v_args);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_args);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(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_ERR(0, 70, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 70, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 70, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 70, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #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_ERR(0, 70, __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_PYPY
      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_ERR(0, 70, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      #else
      __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 70, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 70, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 70, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
      index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 70, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 70, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "km3pipe/dataclasses.pyx":71
 *             """Take care of the attribute settings."""
 *             for arg, name in zip(args, self.dtype.names):
 *                 setattr(self, name, arg)             # <<<<<<<<<<<<<<
 *             for key, value in kwargs.iteritems():
 *                 setattr(self, key, value)
 */
    __Pyx_TraceLine(71,0,__PYX_ERR(0, 71, __pyx_L1_error))
    __pyx_t_9 = PyObject_SetAttr(__pyx_v_self, __pyx_v_name, __pyx_v_arg); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 71, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":70
 *         def __init__(self, *args, **kwargs):
 *             """Take care of the attribute settings."""
 *             for arg, name in zip(args, self.dtype.names):             # <<<<<<<<<<<<<<
 *                 setattr(self, name, arg)
 *             for key, value in kwargs.iteritems():
 */
    __Pyx_TraceLine(70,0,__PYX_ERR(0, 70, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":72
 *             for arg, name in zip(args, self.dtype.names):
 *                 setattr(self, name, arg)
 *             for key, value in kwargs.iteritems():             # <<<<<<<<<<<<<<
 *                 setattr(self, key, value)
 * 
 */
  __Pyx_TraceLine(72,0,__PYX_ERR(0, 72, __pyx_L1_error))
  __pyx_t_3 = 0;
  __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_kwargs, 1, __pyx_n_s_iteritems, (&__pyx_t_10), (&__pyx_t_11)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_2;
  __pyx_t_2 = 0;
  while (1) {
    __pyx_t_12 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_10, &__pyx_t_3, &__pyx_t_2, &__pyx_t_6, NULL, __pyx_t_11);
    if (unlikely(__pyx_t_12 == 0)) break;
    if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 72, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "km3pipe/dataclasses.pyx":73
 *                 setattr(self, name, arg)
 *             for key, value in kwargs.iteritems():
 *                 setattr(self, key, value)             # <<<<<<<<<<<<<<
 * 
 *         attr['__init__'] = __init__
 */
    __Pyx_TraceLine(73,0,__PYX_ERR(0, 73, __pyx_L1_error))
    __pyx_t_9 = PyObject_SetAttr(__pyx_v_self, __pyx_v_key, __pyx_v_value); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 73, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":68
 *                 attr[name] = val
 * 
 *         def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *             """Take care of the attribute settings."""
 *             for arg, name in zip(args, self.dtype.names):
 */

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.Serialisable.__new__.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_arg);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":60
 * 
 *     """
 *     def __new__(metaclass, class_name, class_parents, class_attr):             # <<<<<<<<<<<<<<
 *         attr = {'h5loc': '/'}
 *         for name, val in class_attr.items():
 */

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12Serialisable___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_metaclass, PyObject *__pyx_v_class_name, PyObject *__pyx_v_class_parents, PyObject *__pyx_v_class_attr) {
  PyObject *__pyx_v_attr = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_v___init__ = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_t_9;
  __Pyx_TraceFrameInit(__pyx_codeobj_)
  __Pyx_RefNannySetupContext("__new__", 0);
  __Pyx_TraceCall("__new__", __pyx_f[0], 60, 0, __PYX_ERR(0, 60, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":61
 *     """
 *     def __new__(metaclass, class_name, class_parents, class_attr):
 *         attr = {'h5loc': '/'}             # <<<<<<<<<<<<<<
 *         for name, val in class_attr.items():
 *             if name == 'dtype':
 */
  __Pyx_TraceLine(61,0,__PYX_ERR(0, 61, __pyx_L1_error))
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_h5loc, __pyx_kp_s__2) < 0) __PYX_ERR(0, 61, __pyx_L1_error)
  __pyx_v_attr = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":62
 *     def __new__(metaclass, class_name, class_parents, class_attr):
 *         attr = {'h5loc': '/'}
 *         for name, val in class_attr.items():             # <<<<<<<<<<<<<<
 *             if name == 'dtype':
 *                 attr['dtype'] = np.dtype(val)
 */
  __Pyx_TraceLine(62,0,__PYX_ERR(0, 62, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_class_attr, __pyx_n_s_items); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 62, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 62, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 62, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_5(__pyx_t_2);
      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_ERR(0, 62, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      #if !CYTHON_COMPILING_IN_PYPY
      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_ERR(0, 62, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 62, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 62, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 62, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
      index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 62, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 62, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "km3pipe/dataclasses.pyx":63
 *         attr = {'h5loc': '/'}
 *         for name, val in class_attr.items():
 *             if name == 'dtype':             # <<<<<<<<<<<<<<
 *                 attr['dtype'] = np.dtype(val)
 *             else:
 */
    __Pyx_TraceLine(63,0,__PYX_ERR(0, 63, __pyx_L1_error))
    __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_dtype, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 63, __pyx_L1_error)
    if (__pyx_t_9) {

      /* "km3pipe/dataclasses.pyx":64
 *         for name, val in class_attr.items():
 *             if name == 'dtype':
 *                 attr['dtype'] = np.dtype(val)             # <<<<<<<<<<<<<<
 *             else:
 *                 attr[name] = val
 */
      __Pyx_TraceLine(64,0,__PYX_ERR(0, 64, __pyx_L1_error))
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 64, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_val);
      __Pyx_GIVEREF(__pyx_v_val);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_val);
      __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_dtype), __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 64, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(PyDict_SetItem(__pyx_v_attr, __pyx_n_s_dtype, __pyx_t_6) < 0)) __PYX_ERR(0, 64, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "km3pipe/dataclasses.pyx":63
 *         attr = {'h5loc': '/'}
 *         for name, val in class_attr.items():
 *             if name == 'dtype':             # <<<<<<<<<<<<<<
 *                 attr['dtype'] = np.dtype(val)
 *             else:
 */
      goto __pyx_L7;
    }

    /* "km3pipe/dataclasses.pyx":66
 *                 attr['dtype'] = np.dtype(val)
 *             else:
 *                 attr[name] = val             # <<<<<<<<<<<<<<
 * 
 *         def __init__(self, *args, **kwargs):
 */
    __Pyx_TraceLine(66,0,__PYX_ERR(0, 66, __pyx_L1_error))
    /*else*/ {
      if (unlikely(PyDict_SetItem(__pyx_v_attr, __pyx_v_name, __pyx_v_val) < 0)) __PYX_ERR(0, 66, __pyx_L1_error)
    }
    __pyx_L7:;

    /* "km3pipe/dataclasses.pyx":62
 *     def __new__(metaclass, class_name, class_parents, class_attr):
 *         attr = {'h5loc': '/'}
 *         for name, val in class_attr.items():             # <<<<<<<<<<<<<<
 *             if name == 'dtype':
 *                 attr['dtype'] = np.dtype(val)
 */
    __Pyx_TraceLine(62,0,__PYX_ERR(0, 62, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":68
 *                 attr[name] = val
 * 
 *         def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *             """Take care of the attribute settings."""
 *             for arg, name in zip(args, self.dtype.names):
 */
  __Pyx_TraceLine(68,0,__PYX_ERR(0, 68, __pyx_L1_error))
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12Serialisable_7__new___1__init__, 0, __pyx_n_s_Serialisable___new___locals___in, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v___init__ = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":75
 *                 setattr(self, key, value)
 * 
 *         attr['__init__'] = __init__             # <<<<<<<<<<<<<<
 * 
 *         return type(class_name, class_parents, attr)
 */
  __Pyx_TraceLine(75,0,__PYX_ERR(0, 75, __pyx_L1_error))
  if (unlikely(PyDict_SetItem(__pyx_v_attr, __pyx_n_s_init, __pyx_v___init__) < 0)) __PYX_ERR(0, 75, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":77
 *         attr['__init__'] = __init__
 * 
 *         return type(class_name, class_parents, attr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(77,0,__PYX_ERR(0, 77, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_class_name);
  __Pyx_GIVEREF(__pyx_v_class_name);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_class_name);
  __Pyx_INCREF(__pyx_v_class_parents);
  __Pyx_GIVEREF(__pyx_v_class_parents);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_class_parents);
  __Pyx_INCREF(__pyx_v_attr);
  __Pyx_GIVEREF(__pyx_v_attr);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_attr);
  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyType_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":60
 * 
 *     """
 *     def __new__(metaclass, class_name, class_parents, class_attr):             # <<<<<<<<<<<<<<
 *         attr = {'h5loc': '/'}
 *         for name, val in class_attr.items():
 */

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.Serialisable.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_attr);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v___init__);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":92
 * 
 *     @classmethod
 *     def from_table(cls, row):             # <<<<<<<<<<<<<<
 *         args = []
 *         for col in cls.dtype.names:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_1from_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_16SummarysliceInfo_from_table[] = "SummarysliceInfo.from_table(cls, row)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_16SummarysliceInfo_1from_table = {"from_table", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_1from_table, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_16SummarysliceInfo_from_table};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_1from_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_row = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_table (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_row,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_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_row)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_table", 1, 2, 2, 1); __PYX_ERR(0, 92, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_table") < 0)) __PYX_ERR(0, 92, __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_cls = values[0];
    __pyx_v_row = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_table", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 92, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummarysliceInfo.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_from_table(__pyx_self, __pyx_v_cls, __pyx_v_row);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_from_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_row) {
  PyObject *__pyx_v_args = NULL;
  PyObject *__pyx_v_col = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  int __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__5)
  __Pyx_RefNannySetupContext("from_table", 0);
  __Pyx_TraceCall("from_table", __pyx_f[0], 92, 0, __PYX_ERR(0, 92, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":93
 *     @classmethod
 *     def from_table(cls, row):
 *         args = []             # <<<<<<<<<<<<<<
 *         for col in cls.dtype.names:
 *             try:
 */
  __Pyx_TraceLine(93,0,__PYX_ERR(0, 93, __pyx_L1_error))
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":94
 *     def from_table(cls, row):
 *         args = []
 *         for col in cls.dtype.names:             # <<<<<<<<<<<<<<
 *             try:
 *                 args.append(row[col])
 */
  __Pyx_TraceLine(94,0,__PYX_ERR(0, 94, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_names); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(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_ERR(0, 94, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 94, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 94, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 94, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #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_ERR(0, 94, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_col, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "km3pipe/dataclasses.pyx":95
 *         args = []
 *         for col in cls.dtype.names:
 *             try:             # <<<<<<<<<<<<<<
 *                 args.append(row[col])
 *             except KeyError:
 */
    __Pyx_TraceLine(95,0,__PYX_ERR(0, 95, __pyx_L5_error))
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);
      /*try:*/ {

        /* "km3pipe/dataclasses.pyx":96
 *         for col in cls.dtype.names:
 *             try:
 *                 args.append(row[col])             # <<<<<<<<<<<<<<
 *             except KeyError:
 *                 args.append(np.nan)
 */
        __Pyx_TraceLine(96,0,__PYX_ERR(0, 96, __pyx_L5_error))
        __pyx_t_2 = PyObject_GetItem(__pyx_v_row, __pyx_v_col); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_args, __pyx_t_2); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 96, __pyx_L5_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "km3pipe/dataclasses.pyx":95
 *         args = []
 *         for col in cls.dtype.names:
 *             try:             # <<<<<<<<<<<<<<
 *                 args.append(row[col])
 *             except KeyError:
 */
      }
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L12_try_end;
      __pyx_L5_error:;
      __Pyx_PyThreadState_assign
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "km3pipe/dataclasses.pyx":97
 *             try:
 *                 args.append(row[col])
 *             except KeyError:             # <<<<<<<<<<<<<<
 *                 args.append(np.nan)
 *         return cls(*args)
 */
      __Pyx_TraceLine(97,0,__PYX_ERR(0, 97, __pyx_L7_except_error))
      __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
      if (__pyx_t_9) {
        __Pyx_AddTraceback("km3pipe.dataclasses.SummarysliceInfo.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_10, &__pyx_t_11) < 0) __PYX_ERR(0, 97, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_GOTREF(__pyx_t_11);

        /* "km3pipe/dataclasses.pyx":98
 *                 args.append(row[col])
 *             except KeyError:
 *                 args.append(np.nan)             # <<<<<<<<<<<<<<
 *         return cls(*args)
 * 
 */
        __Pyx_TraceLine(98,0,__PYX_ERR(0, 98, __pyx_L7_except_error))
        __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 98, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_nan); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 98, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_args, __pyx_t_13); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 98, __pyx_L7_except_error)
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        goto __pyx_L6_exception_handled;
      }
      goto __pyx_L7_except_error;
      __pyx_L7_except_error:;

      /* "km3pipe/dataclasses.pyx":95
 *         args = []
 *         for col in cls.dtype.names:
 *             try:             # <<<<<<<<<<<<<<
 *                 args.append(row[col])
 *             except KeyError:
 */
      __Pyx_PyThreadState_assign
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
      goto __pyx_L1_error;
      __pyx_L6_exception_handled:;
      __Pyx_PyThreadState_assign
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
      __pyx_L12_try_end:;
    }

    /* "km3pipe/dataclasses.pyx":94
 *     def from_table(cls, row):
 *         args = []
 *         for col in cls.dtype.names:             # <<<<<<<<<<<<<<
 *             try:
 *                 args.append(row[col])
 */
    __Pyx_TraceLine(94,0,__PYX_ERR(0, 94, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":99
 *             except KeyError:
 *                 args.append(np.nan)
 *         return cls(*args)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(99,0,__PYX_ERR(0, 99, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_v_cls, __pyx_t_1, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_11;
  __pyx_t_11 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":92
 * 
 *     @classmethod
 *     def from_table(cls, row):             # <<<<<<<<<<<<<<
 *         args = []
 *         for col in cls.dtype.names:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummarysliceInfo.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_col);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":102
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_3deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_16SummarysliceInfo_2deserialise[] = "SummarysliceInfo.deserialise(cls, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_16SummarysliceInfo_3deserialise = {"deserialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_3deserialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_16SummarysliceInfo_2deserialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_3deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("deserialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,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_cls)) != 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, __pyx_v_kwargs, values, used_pos_args, "deserialise") < 0)) __PYX_ERR(0, 102, __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_cls = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("deserialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 102, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummarysliceInfo.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_2deserialise(__pyx_self, __pyx_v_cls, __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_7km3pipe_11dataclasses_16SummarysliceInfo_2deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__6)
  __Pyx_RefNannySetupContext("deserialise", 0);
  __Pyx_TraceCall("deserialise", __pyx_f[0], 102, 0, __PYX_ERR(0, 102, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":103
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def serialise(self, *args, **kwargs):
 */
  __Pyx_TraceLine(103,0,__PYX_ERR(0, 103, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_conv_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":102
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummarysliceInfo.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":105
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_5serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_16SummarysliceInfo_4serialise[] = "SummarysliceInfo.serialise(self, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_16SummarysliceInfo_5serialise = {"serialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_5serialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_16SummarysliceInfo_4serialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_5serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,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_self)) != 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, __pyx_v_kwargs, values, used_pos_args, "serialise") < 0)) __PYX_ERR(0, 105, __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_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 105, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummarysliceInfo.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_4serialise(__pyx_self, __pyx_v_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_7km3pipe_11dataclasses_16SummarysliceInfo_4serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__7)
  __Pyx_RefNannySetupContext("serialise", 0);
  __Pyx_TraceCall("serialise", __pyx_f[0], 105, 0, __PYX_ERR(0, 105, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":106
 * 
 *     def serialise(self, *args, **kwargs):
 *         return self.conv_to(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(106,0,__PYX_ERR(0, 106, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":105
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummarysliceInfo.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":109
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_7conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_16SummarysliceInfo_6conv_from[] = "SummarysliceInfo.conv_from(cls, data, event_id, fmt='numpy', h5loc='/')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_16SummarysliceInfo_7conv_from = {"conv_from", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_7conv_from, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_16SummarysliceInfo_6conv_from};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_7conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_data = 0;
  CYTHON_UNUSED PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_v_fmt = 0;
  CYTHON_UNUSED PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_from (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_data,&__pyx_n_s_event_id,&__pyx_n_s_fmt,&__pyx_n_s_h5loc,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[3] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    values[4] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    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_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, 1); __PYX_ERR(0, 109, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, 2); __PYX_ERR(0, 109, __pyx_L3_error)
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fmt);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_from") < 0)) __PYX_ERR(0, 109, __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_cls = values[0];
    __pyx_v_data = values[1];
    __pyx_v_event_id = values[2];
    __pyx_v_fmt = values[3];
    __pyx_v_h5loc = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 109, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummarysliceInfo.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_6conv_from(__pyx_self, __pyx_v_cls, __pyx_v_data, __pyx_v_event_id, __pyx_v_fmt, __pyx_v_h5loc);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_6conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_event_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  __Pyx_TraceFrameInit(__pyx_codeobj__8)
  __Pyx_RefNannySetupContext("conv_from", 0);
  __Pyx_TraceCall("conv_from", __pyx_f[0], 109, 0, __PYX_ERR(0, 109, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":110
 *     @classmethod
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls.from_table(data[0])
 * 
 */
  __Pyx_TraceLine(110,0,__PYX_ERR(0, 110, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_fmt, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 110, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":111
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])             # <<<<<<<<<<<<<<
 * 
 *     def conv_to(self, to='numpy'):
 */
    __Pyx_TraceLine(111,0,__PYX_ERR(0, 111, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_from_table); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_data, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 111, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":110
 *     @classmethod
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls.from_table(data[0])
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":109
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummarysliceInfo.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":113
 *             return cls.from_table(data[0])
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_9conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_16SummarysliceInfo_8conv_to[] = "SummarysliceInfo.conv_to(self, to='numpy')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_16SummarysliceInfo_9conv_to = {"conv_to", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_9conv_to, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_16SummarysliceInfo_8conv_to};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_9conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_to = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_to (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_to,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_to);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_to") < 0)) __PYX_ERR(0, 113, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        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_self = values[0];
    __pyx_v_to = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_to", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 113, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummarysliceInfo.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_8conv_to(__pyx_self, __pyx_v_self, __pyx_v_to);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_8conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  __Pyx_TraceFrameInit(__pyx_codeobj__9)
  __Pyx_RefNannySetupContext("conv_to", 0);
  __Pyx_TraceCall("conv_to", __pyx_f[0], 113, 0, __PYX_ERR(0, 113, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":114
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)
 */
  __Pyx_TraceLine(114,0,__PYX_ERR(0, 114, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 114, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":115
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),             # <<<<<<<<<<<<<<
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':
 */
    __Pyx_TraceLine(115,0,__PYX_ERR(0, 115, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3Array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_array_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (__pyx_t_6) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 115, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 115, __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_ERR(0, 115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 115, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "km3pipe/dataclasses.pyx":116
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)             # <<<<<<<<<<<<<<
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 */
    __Pyx_TraceLine(116,0,__PYX_ERR(0, 116, __pyx_L1_error))
    __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_h5loc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_h5loc, __pyx_t_5) < 0) __PYX_ERR(0, 116, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "km3pipe/dataclasses.pyx":115
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),             # <<<<<<<<<<<<<<
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':
 */
    __Pyx_TraceLine(115,0,__PYX_ERR(0, 115, __pyx_L1_error))
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":114
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)
 */
  }

  /* "km3pipe/dataclasses.pyx":117
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  __Pyx_TraceLine(117,0,__PYX_ERR(0, 117, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_pandas, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 117, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":118
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)             # <<<<<<<<<<<<<<
 * 
 *     def __array__(self):
 */
    __Pyx_TraceLine(118,0,__PYX_ERR(0, 118, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3DataFrame); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_to, __pyx_n_s_numpy) < 0) __PYX_ERR(0, 118, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_h5loc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_h5loc, __pyx_t_6) < 0) __PYX_ERR(0, 118, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":117
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":113
 *             return cls.from_table(data[0])
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummarysliceInfo.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":120
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return [(
 *             self.det_id, self.frame_index, self.run_id, self.slice_id,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_11__array__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_16SummarysliceInfo_10__array__[] = "SummarysliceInfo.__array__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_16SummarysliceInfo_11__array__ = {"__array__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_11__array__, METH_O, __pyx_doc_7km3pipe_11dataclasses_16SummarysliceInfo_10__array__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_11__array__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__array__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_10__array__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_10__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__10)
  __Pyx_RefNannySetupContext("__array__", 0);
  __Pyx_TraceCall("__array__", __pyx_f[0], 120, 0, __PYX_ERR(0, 120, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":121
 * 
 *     def __array__(self):
 *         return [(             # <<<<<<<<<<<<<<
 *             self.det_id, self.frame_index, self.run_id, self.slice_id,
 *         ), ]
 */
  __Pyx_TraceLine(121,0,__PYX_ERR(0, 121, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);

  /* "km3pipe/dataclasses.pyx":122
 *     def __array__(self):
 *         return [(
 *             self.det_id, self.frame_index, self.run_id, self.slice_id,             # <<<<<<<<<<<<<<
 *         ), ]
 * 
 */
  __Pyx_TraceLine(122,0,__PYX_ERR(0, 122, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_det_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_frame_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_run_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_slice_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":121
 * 
 *     def __array__(self):
 *         return [(             # <<<<<<<<<<<<<<
 *             self.det_id, self.frame_index, self.run_id, self.slice_id,
 *         ), ]
 */
  __Pyx_TraceLine(121,0,__PYX_ERR(0, 121, __pyx_L1_error))
  __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":120
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return [(
 *             self.det_id, self.frame_index, self.run_id, self.slice_id,
 */

  /* 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_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummarysliceInfo.__array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":125
 *         ), ]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Summaryslice #{0}:\n" \
 *                "    detector id:     {1}\n" \
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_13__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_16SummarysliceInfo_12__str__[] = "SummarysliceInfo.__str__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_16SummarysliceInfo_13__str__ = {"__str__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_13__str__, METH_O, __pyx_doc_7km3pipe_11dataclasses_16SummarysliceInfo_12__str__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_13__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_12__str__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_12__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__11)
  __Pyx_RefNannySetupContext("__str__", 0);
  __Pyx_TraceCall("__str__", __pyx_f[0], 125, 0, __PYX_ERR(0, 125, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":126
 * 
 *     def __str__(self):
 *         return "Summaryslice #{0}:\n" \             # <<<<<<<<<<<<<<
 *                "    detector id:     {1}\n" \
 *                "    frame index:     {2}\n" \
 */
  __Pyx_TraceLine(126,0,__PYX_ERR(0, 126, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);

  /* "km3pipe/dataclasses.pyx":130
 *                "    frame index:     {2}\n" \
 *                "    run id:          {3}\n" \
 *                .format(self.slice_id,             # <<<<<<<<<<<<<<
 *                        self.det_id, self.frame_index, self.run_id,
 *                        )
 */
  __Pyx_TraceLine(130,0,__PYX_ERR(0, 130, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Summaryslice_0_detector_id_1_fra, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_slice_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "km3pipe/dataclasses.pyx":131
 *                "    run id:          {3}\n" \
 *                .format(self.slice_id,
 *                        self.det_id, self.frame_index, self.run_id,             # <<<<<<<<<<<<<<
 *                        )
 * 
 */
  __Pyx_TraceLine(131,0,__PYX_ERR(0, 131, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_det_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_frame_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_run_id); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __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;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __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;
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(4+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 130, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_8, __pyx_t_6);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":125
 *         ), ]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Summaryslice #{0}:\n" \
 *                "    detector id:     {1}\n" \
 */

  /* 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummarysliceInfo.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":134
 *                        )
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_15__insp__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_16SummarysliceInfo_14__insp__[] = "SummarysliceInfo.__insp__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_16SummarysliceInfo_15__insp__ = {"__insp__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_15__insp__, METH_O, __pyx_doc_7km3pipe_11dataclasses_16SummarysliceInfo_14__insp__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_15__insp__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__insp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_14__insp__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_14__insp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__12)
  __Pyx_RefNannySetupContext("__insp__", 0);
  __Pyx_TraceCall("__insp__", __pyx_f[0], 134, 0, __PYX_ERR(0, 134, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":135
 * 
 *     def __insp__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_TraceLine(135,0,__PYX_ERR(0, 135, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":134
 *                        )
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummarysliceInfo.__insp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":137
 *         return self.__str__()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_17__len__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_16SummarysliceInfo_16__len__[] = "SummarysliceInfo.__len__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_16SummarysliceInfo_17__len__ = {"__len__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_17__len__, METH_O, __pyx_doc_7km3pipe_11dataclasses_16SummarysliceInfo_16__len__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_17__len__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_16__len__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_16__len__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__13)
  __Pyx_RefNannySetupContext("__len__", 0);
  __Pyx_TraceCall("__len__", __pyx_f[0], 137, 0, __PYX_ERR(0, 137, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":138
 * 
 *     def __len__(self):
 *         return 1             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(138,0,__PYX_ERR(0, 138, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_int_1);
  __pyx_r = __pyx_int_1;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":137
 *         return self.__str__()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummarysliceInfo.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":153
 * 
 *     @classmethod
 *     def from_table(cls, row):             # <<<<<<<<<<<<<<
 *         args = []
 *         for col in cls.dtype.names:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13TimesliceInfo_1from_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13TimesliceInfo_from_table[] = "TimesliceInfo.from_table(cls, row)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13TimesliceInfo_1from_table = {"from_table", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13TimesliceInfo_1from_table, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_13TimesliceInfo_from_table};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13TimesliceInfo_1from_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_row = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_table (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_row,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_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_row)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_table", 1, 2, 2, 1); __PYX_ERR(0, 153, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_table") < 0)) __PYX_ERR(0, 153, __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_cls = values[0];
    __pyx_v_row = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_table", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 153, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceInfo.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13TimesliceInfo_from_table(__pyx_self, __pyx_v_cls, __pyx_v_row);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13TimesliceInfo_from_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_row) {
  PyObject *__pyx_v_args = NULL;
  PyObject *__pyx_v_col = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  int __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__14)
  __Pyx_RefNannySetupContext("from_table", 0);
  __Pyx_TraceCall("from_table", __pyx_f[0], 153, 0, __PYX_ERR(0, 153, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":154
 *     @classmethod
 *     def from_table(cls, row):
 *         args = []             # <<<<<<<<<<<<<<
 *         for col in cls.dtype.names:
 *             try:
 */
  __Pyx_TraceLine(154,0,__PYX_ERR(0, 154, __pyx_L1_error))
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":155
 *     def from_table(cls, row):
 *         args = []
 *         for col in cls.dtype.names:             # <<<<<<<<<<<<<<
 *             try:
 *                 args.append(row[col])
 */
  __Pyx_TraceLine(155,0,__PYX_ERR(0, 155, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_names); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(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_ERR(0, 155, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 155, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 155, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 155, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 155, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 155, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #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_ERR(0, 155, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_col, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "km3pipe/dataclasses.pyx":156
 *         args = []
 *         for col in cls.dtype.names:
 *             try:             # <<<<<<<<<<<<<<
 *                 args.append(row[col])
 *             except KeyError:
 */
    __Pyx_TraceLine(156,0,__PYX_ERR(0, 156, __pyx_L5_error))
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);
      /*try:*/ {

        /* "km3pipe/dataclasses.pyx":157
 *         for col in cls.dtype.names:
 *             try:
 *                 args.append(row[col])             # <<<<<<<<<<<<<<
 *             except KeyError:
 *                 args.append(np.nan)
 */
        __Pyx_TraceLine(157,0,__PYX_ERR(0, 157, __pyx_L5_error))
        __pyx_t_2 = PyObject_GetItem(__pyx_v_row, __pyx_v_col); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 157, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_args, __pyx_t_2); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 157, __pyx_L5_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "km3pipe/dataclasses.pyx":156
 *         args = []
 *         for col in cls.dtype.names:
 *             try:             # <<<<<<<<<<<<<<
 *                 args.append(row[col])
 *             except KeyError:
 */
      }
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L12_try_end;
      __pyx_L5_error:;
      __Pyx_PyThreadState_assign
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "km3pipe/dataclasses.pyx":158
 *             try:
 *                 args.append(row[col])
 *             except KeyError:             # <<<<<<<<<<<<<<
 *                 args.append(np.nan)
 *         return cls(*args)
 */
      __Pyx_TraceLine(158,0,__PYX_ERR(0, 158, __pyx_L7_except_error))
      __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
      if (__pyx_t_9) {
        __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceInfo.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_10, &__pyx_t_11) < 0) __PYX_ERR(0, 158, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_GOTREF(__pyx_t_11);

        /* "km3pipe/dataclasses.pyx":159
 *                 args.append(row[col])
 *             except KeyError:
 *                 args.append(np.nan)             # <<<<<<<<<<<<<<
 *         return cls(*args)
 * 
 */
        __Pyx_TraceLine(159,0,__PYX_ERR(0, 159, __pyx_L7_except_error))
        __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 159, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_nan); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 159, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_args, __pyx_t_13); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 159, __pyx_L7_except_error)
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        goto __pyx_L6_exception_handled;
      }
      goto __pyx_L7_except_error;
      __pyx_L7_except_error:;

      /* "km3pipe/dataclasses.pyx":156
 *         args = []
 *         for col in cls.dtype.names:
 *             try:             # <<<<<<<<<<<<<<
 *                 args.append(row[col])
 *             except KeyError:
 */
      __Pyx_PyThreadState_assign
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
      goto __pyx_L1_error;
      __pyx_L6_exception_handled:;
      __Pyx_PyThreadState_assign
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
      __pyx_L12_try_end:;
    }

    /* "km3pipe/dataclasses.pyx":155
 *     def from_table(cls, row):
 *         args = []
 *         for col in cls.dtype.names:             # <<<<<<<<<<<<<<
 *             try:
 *                 args.append(row[col])
 */
    __Pyx_TraceLine(155,0,__PYX_ERR(0, 155, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":160
 *             except KeyError:
 *                 args.append(np.nan)
 *         return cls(*args)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(160,0,__PYX_ERR(0, 160, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_v_cls, __pyx_t_1, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_11;
  __pyx_t_11 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":153
 * 
 *     @classmethod
 *     def from_table(cls, row):             # <<<<<<<<<<<<<<
 *         args = []
 *         for col in cls.dtype.names:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceInfo.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_col);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":163
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13TimesliceInfo_3deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13TimesliceInfo_2deserialise[] = "TimesliceInfo.deserialise(cls, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13TimesliceInfo_3deserialise = {"deserialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13TimesliceInfo_3deserialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_13TimesliceInfo_2deserialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13TimesliceInfo_3deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("deserialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,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_cls)) != 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, __pyx_v_kwargs, values, used_pos_args, "deserialise") < 0)) __PYX_ERR(0, 163, __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_cls = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("deserialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 163, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceInfo.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13TimesliceInfo_2deserialise(__pyx_self, __pyx_v_cls, __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_7km3pipe_11dataclasses_13TimesliceInfo_2deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__15)
  __Pyx_RefNannySetupContext("deserialise", 0);
  __Pyx_TraceCall("deserialise", __pyx_f[0], 163, 0, __PYX_ERR(0, 163, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":164
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def serialise(self, *args, **kwargs):
 */
  __Pyx_TraceLine(164,0,__PYX_ERR(0, 164, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_conv_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":163
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceInfo.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":166
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13TimesliceInfo_5serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13TimesliceInfo_4serialise[] = "TimesliceInfo.serialise(self, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13TimesliceInfo_5serialise = {"serialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13TimesliceInfo_5serialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_13TimesliceInfo_4serialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13TimesliceInfo_5serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,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_self)) != 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, __pyx_v_kwargs, values, used_pos_args, "serialise") < 0)) __PYX_ERR(0, 166, __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_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 166, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceInfo.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13TimesliceInfo_4serialise(__pyx_self, __pyx_v_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_7km3pipe_11dataclasses_13TimesliceInfo_4serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__16)
  __Pyx_RefNannySetupContext("serialise", 0);
  __Pyx_TraceCall("serialise", __pyx_f[0], 166, 0, __PYX_ERR(0, 166, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":167
 * 
 *     def serialise(self, *args, **kwargs):
 *         return self.conv_to(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(167,0,__PYX_ERR(0, 167, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":166
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceInfo.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":170
 * 
 *     @classmethod
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13TimesliceInfo_7conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13TimesliceInfo_6conv_from[] = "TimesliceInfo.conv_from(cls, data, frame_id, fmt='numpy', h5loc='/')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13TimesliceInfo_7conv_from = {"conv_from", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13TimesliceInfo_7conv_from, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_13TimesliceInfo_6conv_from};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13TimesliceInfo_7conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_data = 0;
  CYTHON_UNUSED PyObject *__pyx_v_frame_id = 0;
  PyObject *__pyx_v_fmt = 0;
  CYTHON_UNUSED PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_from (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_data,&__pyx_n_s_frame_id,&__pyx_n_s_fmt,&__pyx_n_s_h5loc,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[3] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    values[4] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    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_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, 1); __PYX_ERR(0, 170, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_frame_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, 2); __PYX_ERR(0, 170, __pyx_L3_error)
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fmt);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_from") < 0)) __PYX_ERR(0, 170, __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_cls = values[0];
    __pyx_v_data = values[1];
    __pyx_v_frame_id = values[2];
    __pyx_v_fmt = values[3];
    __pyx_v_h5loc = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 170, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceInfo.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13TimesliceInfo_6conv_from(__pyx_self, __pyx_v_cls, __pyx_v_data, __pyx_v_frame_id, __pyx_v_fmt, __pyx_v_h5loc);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13TimesliceInfo_6conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_frame_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  __Pyx_TraceFrameInit(__pyx_codeobj__17)
  __Pyx_RefNannySetupContext("conv_from", 0);
  __Pyx_TraceCall("conv_from", __pyx_f[0], 170, 0, __PYX_ERR(0, 170, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":171
 *     @classmethod
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls.from_table(data[0])
 * 
 */
  __Pyx_TraceLine(171,0,__PYX_ERR(0, 171, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_fmt, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 171, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":172
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])             # <<<<<<<<<<<<<<
 * 
 *     def conv_to(self, to='numpy'):
 */
    __Pyx_TraceLine(172,0,__PYX_ERR(0, 172, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_from_table); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_data, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 172, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 172, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 172, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 172, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 172, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":171
 *     @classmethod
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls.from_table(data[0])
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":170
 * 
 *     @classmethod
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceInfo.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":174
 *             return cls.from_table(data[0])
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13TimesliceInfo_9conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13TimesliceInfo_8conv_to[] = "TimesliceInfo.conv_to(self, to='numpy')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13TimesliceInfo_9conv_to = {"conv_to", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13TimesliceInfo_9conv_to, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_13TimesliceInfo_8conv_to};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13TimesliceInfo_9conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_to = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_to (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_to,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_to);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_to") < 0)) __PYX_ERR(0, 174, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        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_self = values[0];
    __pyx_v_to = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_to", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 174, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceInfo.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13TimesliceInfo_8conv_to(__pyx_self, __pyx_v_self, __pyx_v_to);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13TimesliceInfo_8conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  __Pyx_TraceFrameInit(__pyx_codeobj__18)
  __Pyx_RefNannySetupContext("conv_to", 0);
  __Pyx_TraceCall("conv_to", __pyx_f[0], 174, 0, __PYX_ERR(0, 174, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":175
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)
 */
  __Pyx_TraceLine(175,0,__PYX_ERR(0, 175, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 175, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":176
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),             # <<<<<<<<<<<<<<
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':
 */
    __Pyx_TraceLine(176,0,__PYX_ERR(0, 176, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3Array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_array_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (__pyx_t_6) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 176, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 176, __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_ERR(0, 176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 176, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "km3pipe/dataclasses.pyx":177
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)             # <<<<<<<<<<<<<<
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 */
    __Pyx_TraceLine(177,0,__PYX_ERR(0, 177, __pyx_L1_error))
    __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_h5loc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_h5loc, __pyx_t_5) < 0) __PYX_ERR(0, 177, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "km3pipe/dataclasses.pyx":176
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),             # <<<<<<<<<<<<<<
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':
 */
    __Pyx_TraceLine(176,0,__PYX_ERR(0, 176, __pyx_L1_error))
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":175
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)
 */
  }

  /* "km3pipe/dataclasses.pyx":178
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  __Pyx_TraceLine(178,0,__PYX_ERR(0, 178, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_pandas, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 178, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":179
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)             # <<<<<<<<<<<<<<
 * 
 *     def __array__(self):
 */
    __Pyx_TraceLine(179,0,__PYX_ERR(0, 179, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3DataFrame); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_to, __pyx_n_s_numpy) < 0) __PYX_ERR(0, 179, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_h5loc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_h5loc, __pyx_t_6) < 0) __PYX_ERR(0, 179, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":178
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":174
 *             return cls.from_table(data[0])
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceInfo.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":181
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return [(
 *             self.dom_id, self.frame_id, self.n_hits, self.slice_id,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13TimesliceInfo_11__array__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13TimesliceInfo_10__array__[] = "TimesliceInfo.__array__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13TimesliceInfo_11__array__ = {"__array__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13TimesliceInfo_11__array__, METH_O, __pyx_doc_7km3pipe_11dataclasses_13TimesliceInfo_10__array__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13TimesliceInfo_11__array__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__array__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13TimesliceInfo_10__array__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13TimesliceInfo_10__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__19)
  __Pyx_RefNannySetupContext("__array__", 0);
  __Pyx_TraceCall("__array__", __pyx_f[0], 181, 0, __PYX_ERR(0, 181, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":182
 * 
 *     def __array__(self):
 *         return [(             # <<<<<<<<<<<<<<
 *             self.dom_id, self.frame_id, self.n_hits, self.slice_id,
 *         ), ]
 */
  __Pyx_TraceLine(182,0,__PYX_ERR(0, 182, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);

  /* "km3pipe/dataclasses.pyx":183
 *     def __array__(self):
 *         return [(
 *             self.dom_id, self.frame_id, self.n_hits, self.slice_id,             # <<<<<<<<<<<<<<
 *         ), ]
 * 
 */
  __Pyx_TraceLine(183,0,__PYX_ERR(0, 183, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dom_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_frame_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_n_hits); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_slice_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":182
 * 
 *     def __array__(self):
 *         return [(             # <<<<<<<<<<<<<<
 *             self.dom_id, self.frame_id, self.n_hits, self.slice_id,
 *         ), ]
 */
  __Pyx_TraceLine(182,0,__PYX_ERR(0, 182, __pyx_L1_error))
  __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":181
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return [(
 *             self.dom_id, self.frame_id, self.n_hits, self.slice_id,
 */

  /* 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_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceInfo.__array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":186
 *         ), ]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Timeslice frame:\n" \
 *                "    slice id: {0}\n" \
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13TimesliceInfo_13__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13TimesliceInfo_12__str__[] = "TimesliceInfo.__str__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13TimesliceInfo_13__str__ = {"__str__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13TimesliceInfo_13__str__, METH_O, __pyx_doc_7km3pipe_11dataclasses_13TimesliceInfo_12__str__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13TimesliceInfo_13__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13TimesliceInfo_12__str__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13TimesliceInfo_12__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__20)
  __Pyx_RefNannySetupContext("__str__", 0);
  __Pyx_TraceCall("__str__", __pyx_f[0], 186, 0, __PYX_ERR(0, 186, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":187
 * 
 *     def __str__(self):
 *         return "Timeslice frame:\n" \             # <<<<<<<<<<<<<<
 *                "    slice id: {0}\n" \
 *                "    frame id: {1}\n" \
 */
  __Pyx_TraceLine(187,0,__PYX_ERR(0, 187, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);

  /* "km3pipe/dataclasses.pyx":192
 *                "    DOM id:   {2}\n" \
 *                "    n_hits:   {3}\n" \
 *                .format(self.slice_id, self.frame_id, self.dom_id, self.n_hits)             # <<<<<<<<<<<<<<
 * 
 *     def __insp__(self):
 */
  __Pyx_TraceLine(192,0,__PYX_ERR(0, 192, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Timeslice_frame_slice_id_0_frame, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_slice_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_frame_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dom_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_n_hits); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __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;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __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;
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(4+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_8, __pyx_t_6);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":186
 *         ), ]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Timeslice frame:\n" \
 *                "    slice id: {0}\n" \
 */

  /* 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceInfo.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":194
 *                .format(self.slice_id, self.frame_id, self.dom_id, self.n_hits)
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13TimesliceInfo_15__insp__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13TimesliceInfo_14__insp__[] = "TimesliceInfo.__insp__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13TimesliceInfo_15__insp__ = {"__insp__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13TimesliceInfo_15__insp__, METH_O, __pyx_doc_7km3pipe_11dataclasses_13TimesliceInfo_14__insp__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13TimesliceInfo_15__insp__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__insp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13TimesliceInfo_14__insp__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13TimesliceInfo_14__insp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__21)
  __Pyx_RefNannySetupContext("__insp__", 0);
  __Pyx_TraceCall("__insp__", __pyx_f[0], 194, 0, __PYX_ERR(0, 194, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":195
 * 
 *     def __insp__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_TraceLine(195,0,__PYX_ERR(0, 195, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":194
 *                .format(self.slice_id, self.frame_id, self.dom_id, self.n_hits)
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceInfo.__insp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":197
 *         return self.__str__()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13TimesliceInfo_17__len__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13TimesliceInfo_16__len__[] = "TimesliceInfo.__len__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13TimesliceInfo_17__len__ = {"__len__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13TimesliceInfo_17__len__, METH_O, __pyx_doc_7km3pipe_11dataclasses_13TimesliceInfo_16__len__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13TimesliceInfo_17__len__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13TimesliceInfo_16__len__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13TimesliceInfo_16__len__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__22)
  __Pyx_RefNannySetupContext("__len__", 0);
  __Pyx_TraceCall("__len__", __pyx_f[0], 197, 0, __PYX_ERR(0, 197, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":198
 * 
 *     def __len__(self):
 *         return 1             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(198,0,__PYX_ERR(0, 198, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_int_1);
  __pyx_r = __pyx_int_1;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":197
 *         return self.__str__()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceInfo.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":221
 * 
 *     @classmethod
 *     def from_table(cls, row):             # <<<<<<<<<<<<<<
 *         args = []
 *         for col in cls.dtype.names:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceFrameInfo_1from_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceFrameInfo_from_table[] = "TimesliceFrameInfo.from_table(cls, row)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceFrameInfo_1from_table = {"from_table", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceFrameInfo_1from_table, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18TimesliceFrameInfo_from_table};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceFrameInfo_1from_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_row = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_table (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_row,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_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_row)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_table", 1, 2, 2, 1); __PYX_ERR(0, 221, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_table") < 0)) __PYX_ERR(0, 221, __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_cls = values[0];
    __pyx_v_row = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_table", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 221, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceFrameInfo.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceFrameInfo_from_table(__pyx_self, __pyx_v_cls, __pyx_v_row);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceFrameInfo_from_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_row) {
  PyObject *__pyx_v_args = NULL;
  PyObject *__pyx_v_col = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  int __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__23)
  __Pyx_RefNannySetupContext("from_table", 0);
  __Pyx_TraceCall("from_table", __pyx_f[0], 221, 0, __PYX_ERR(0, 221, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":222
 *     @classmethod
 *     def from_table(cls, row):
 *         args = []             # <<<<<<<<<<<<<<
 *         for col in cls.dtype.names:
 *             try:
 */
  __Pyx_TraceLine(222,0,__PYX_ERR(0, 222, __pyx_L1_error))
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":223
 *     def from_table(cls, row):
 *         args = []
 *         for col in cls.dtype.names:             # <<<<<<<<<<<<<<
 *             try:
 *                 args.append(row[col])
 */
  __Pyx_TraceLine(223,0,__PYX_ERR(0, 223, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_names); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(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_ERR(0, 223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 223, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 223, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 223, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 223, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 223, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #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_ERR(0, 223, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_col, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "km3pipe/dataclasses.pyx":224
 *         args = []
 *         for col in cls.dtype.names:
 *             try:             # <<<<<<<<<<<<<<
 *                 args.append(row[col])
 *             except KeyError:
 */
    __Pyx_TraceLine(224,0,__PYX_ERR(0, 224, __pyx_L5_error))
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);
      /*try:*/ {

        /* "km3pipe/dataclasses.pyx":225
 *         for col in cls.dtype.names:
 *             try:
 *                 args.append(row[col])             # <<<<<<<<<<<<<<
 *             except KeyError:
 *                 args.append(np.nan)
 */
        __Pyx_TraceLine(225,0,__PYX_ERR(0, 225, __pyx_L5_error))
        __pyx_t_2 = PyObject_GetItem(__pyx_v_row, __pyx_v_col); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 225, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_args, __pyx_t_2); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 225, __pyx_L5_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "km3pipe/dataclasses.pyx":224
 *         args = []
 *         for col in cls.dtype.names:
 *             try:             # <<<<<<<<<<<<<<
 *                 args.append(row[col])
 *             except KeyError:
 */
      }
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L12_try_end;
      __pyx_L5_error:;
      __Pyx_PyThreadState_assign
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "km3pipe/dataclasses.pyx":226
 *             try:
 *                 args.append(row[col])
 *             except KeyError:             # <<<<<<<<<<<<<<
 *                 args.append(np.nan)
 *         return cls(*args)
 */
      __Pyx_TraceLine(226,0,__PYX_ERR(0, 226, __pyx_L7_except_error))
      __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
      if (__pyx_t_9) {
        __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceFrameInfo.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_10, &__pyx_t_11) < 0) __PYX_ERR(0, 226, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_GOTREF(__pyx_t_11);

        /* "km3pipe/dataclasses.pyx":227
 *                 args.append(row[col])
 *             except KeyError:
 *                 args.append(np.nan)             # <<<<<<<<<<<<<<
 *         return cls(*args)
 * 
 */
        __Pyx_TraceLine(227,0,__PYX_ERR(0, 227, __pyx_L7_except_error))
        __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 227, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_nan); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 227, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_args, __pyx_t_13); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 227, __pyx_L7_except_error)
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        goto __pyx_L6_exception_handled;
      }
      goto __pyx_L7_except_error;
      __pyx_L7_except_error:;

      /* "km3pipe/dataclasses.pyx":224
 *         args = []
 *         for col in cls.dtype.names:
 *             try:             # <<<<<<<<<<<<<<
 *                 args.append(row[col])
 *             except KeyError:
 */
      __Pyx_PyThreadState_assign
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
      goto __pyx_L1_error;
      __pyx_L6_exception_handled:;
      __Pyx_PyThreadState_assign
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
      __pyx_L12_try_end:;
    }

    /* "km3pipe/dataclasses.pyx":223
 *     def from_table(cls, row):
 *         args = []
 *         for col in cls.dtype.names:             # <<<<<<<<<<<<<<
 *             try:
 *                 args.append(row[col])
 */
    __Pyx_TraceLine(223,0,__PYX_ERR(0, 223, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":228
 *             except KeyError:
 *                 args.append(np.nan)
 *         return cls(*args)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(228,0,__PYX_ERR(0, 228, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_v_cls, __pyx_t_1, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_11;
  __pyx_t_11 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":221
 * 
 *     @classmethod
 *     def from_table(cls, row):             # <<<<<<<<<<<<<<
 *         args = []
 *         for col in cls.dtype.names:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceFrameInfo.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_col);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":231
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceFrameInfo_3deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceFrameInfo_2deserialise[] = "TimesliceFrameInfo.deserialise(cls, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceFrameInfo_3deserialise = {"deserialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceFrameInfo_3deserialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18TimesliceFrameInfo_2deserialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceFrameInfo_3deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("deserialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,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_cls)) != 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, __pyx_v_kwargs, values, used_pos_args, "deserialise") < 0)) __PYX_ERR(0, 231, __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_cls = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("deserialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 231, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceFrameInfo.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceFrameInfo_2deserialise(__pyx_self, __pyx_v_cls, __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_7km3pipe_11dataclasses_18TimesliceFrameInfo_2deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__24)
  __Pyx_RefNannySetupContext("deserialise", 0);
  __Pyx_TraceCall("deserialise", __pyx_f[0], 231, 0, __PYX_ERR(0, 231, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":232
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def serialise(self, *args, **kwargs):
 */
  __Pyx_TraceLine(232,0,__PYX_ERR(0, 232, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_conv_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":231
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceFrameInfo.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":234
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceFrameInfo_5serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceFrameInfo_4serialise[] = "TimesliceFrameInfo.serialise(self, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceFrameInfo_5serialise = {"serialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceFrameInfo_5serialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18TimesliceFrameInfo_4serialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceFrameInfo_5serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,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_self)) != 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, __pyx_v_kwargs, values, used_pos_args, "serialise") < 0)) __PYX_ERR(0, 234, __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_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 234, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceFrameInfo.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceFrameInfo_4serialise(__pyx_self, __pyx_v_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_7km3pipe_11dataclasses_18TimesliceFrameInfo_4serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__25)
  __Pyx_RefNannySetupContext("serialise", 0);
  __Pyx_TraceCall("serialise", __pyx_f[0], 234, 0, __PYX_ERR(0, 234, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":235
 * 
 *     def serialise(self, *args, **kwargs):
 *         return self.conv_to(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(235,0,__PYX_ERR(0, 235, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":234
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceFrameInfo.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":238
 * 
 *     @classmethod
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceFrameInfo_7conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceFrameInfo_6conv_from[] = "TimesliceFrameInfo.conv_from(cls, data, frame_id, fmt='numpy', h5loc='/')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceFrameInfo_7conv_from = {"conv_from", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceFrameInfo_7conv_from, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18TimesliceFrameInfo_6conv_from};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceFrameInfo_7conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_data = 0;
  CYTHON_UNUSED PyObject *__pyx_v_frame_id = 0;
  PyObject *__pyx_v_fmt = 0;
  CYTHON_UNUSED PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_from (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_data,&__pyx_n_s_frame_id,&__pyx_n_s_fmt,&__pyx_n_s_h5loc,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[3] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    values[4] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    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_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, 1); __PYX_ERR(0, 238, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_frame_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, 2); __PYX_ERR(0, 238, __pyx_L3_error)
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fmt);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_from") < 0)) __PYX_ERR(0, 238, __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_cls = values[0];
    __pyx_v_data = values[1];
    __pyx_v_frame_id = values[2];
    __pyx_v_fmt = values[3];
    __pyx_v_h5loc = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 238, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceFrameInfo.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceFrameInfo_6conv_from(__pyx_self, __pyx_v_cls, __pyx_v_data, __pyx_v_frame_id, __pyx_v_fmt, __pyx_v_h5loc);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceFrameInfo_6conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_frame_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  __Pyx_TraceFrameInit(__pyx_codeobj__26)
  __Pyx_RefNannySetupContext("conv_from", 0);
  __Pyx_TraceCall("conv_from", __pyx_f[0], 238, 0, __PYX_ERR(0, 238, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":239
 *     @classmethod
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls.from_table(data[0])
 * 
 */
  __Pyx_TraceLine(239,0,__PYX_ERR(0, 239, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_fmt, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 239, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":240
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])             # <<<<<<<<<<<<<<
 * 
 *     def conv_to(self, to='numpy'):
 */
    __Pyx_TraceLine(240,0,__PYX_ERR(0, 240, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_from_table); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 240, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_data, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 240, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 240, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 240, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 240, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 240, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 240, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":239
 *     @classmethod
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls.from_table(data[0])
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":238
 * 
 *     @classmethod
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceFrameInfo.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":242
 *             return cls.from_table(data[0])
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceFrameInfo_9conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceFrameInfo_8conv_to[] = "TimesliceFrameInfo.conv_to(self, to='numpy')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceFrameInfo_9conv_to = {"conv_to", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceFrameInfo_9conv_to, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18TimesliceFrameInfo_8conv_to};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceFrameInfo_9conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_to = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_to (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_to,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_to);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_to") < 0)) __PYX_ERR(0, 242, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        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_self = values[0];
    __pyx_v_to = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_to", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 242, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceFrameInfo.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceFrameInfo_8conv_to(__pyx_self, __pyx_v_self, __pyx_v_to);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceFrameInfo_8conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  __Pyx_TraceFrameInit(__pyx_codeobj__27)
  __Pyx_RefNannySetupContext("conv_to", 0);
  __Pyx_TraceCall("conv_to", __pyx_f[0], 242, 0, __PYX_ERR(0, 242, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":243
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)
 */
  __Pyx_TraceLine(243,0,__PYX_ERR(0, 243, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 243, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":244
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),             # <<<<<<<<<<<<<<
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':
 */
    __Pyx_TraceLine(244,0,__PYX_ERR(0, 244, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3Array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 244, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 244, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 244, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_array_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 244, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (__pyx_t_6) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 244, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 244, __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_ERR(0, 244, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 244, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 244, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 244, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 244, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 244, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "km3pipe/dataclasses.pyx":245
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)             # <<<<<<<<<<<<<<
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 */
    __Pyx_TraceLine(245,0,__PYX_ERR(0, 245, __pyx_L1_error))
    __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_h5loc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_h5loc, __pyx_t_5) < 0) __PYX_ERR(0, 245, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "km3pipe/dataclasses.pyx":244
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),             # <<<<<<<<<<<<<<
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':
 */
    __Pyx_TraceLine(244,0,__PYX_ERR(0, 244, __pyx_L1_error))
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 244, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":243
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)
 */
  }

  /* "km3pipe/dataclasses.pyx":246
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  __Pyx_TraceLine(246,0,__PYX_ERR(0, 246, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_pandas, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 246, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":247
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)             # <<<<<<<<<<<<<<
 * 
 *     def __array__(self):
 */
    __Pyx_TraceLine(247,0,__PYX_ERR(0, 247, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3DataFrame); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_to, __pyx_n_s_numpy) < 0) __PYX_ERR(0, 247, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_h5loc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_h5loc, __pyx_t_6) < 0) __PYX_ERR(0, 247, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":246
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":242
 *             return cls.from_table(data[0])
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceFrameInfo.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":249
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return [(
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceFrameInfo_11__array__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceFrameInfo_10__array__[] = "TimesliceFrameInfo.__array__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceFrameInfo_11__array__ = {"__array__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceFrameInfo_11__array__, METH_O, __pyx_doc_7km3pipe_11dataclasses_18TimesliceFrameInfo_10__array__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceFrameInfo_11__array__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__array__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceFrameInfo_10__array__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceFrameInfo_10__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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;
  __Pyx_TraceFrameInit(__pyx_codeobj__28)
  __Pyx_RefNannySetupContext("__array__", 0);
  __Pyx_TraceCall("__array__", __pyx_f[0], 249, 0, __PYX_ERR(0, 249, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":250
 * 
 *     def __array__(self):
 *         return [(             # <<<<<<<<<<<<<<
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,
 *             self.has_udp_trailer, self.high_rate_veto,
 */
  __Pyx_TraceLine(250,0,__PYX_ERR(0, 250, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);

  /* "km3pipe/dataclasses.pyx":251
 *     def __array__(self):
 *         return [(
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,             # <<<<<<<<<<<<<<
 *             self.has_udp_trailer, self.high_rate_veto,
 *             self.max_sequence_number, self.n_packets, self.slice_id,
 */
  __Pyx_TraceLine(251,0,__PYX_ERR(0, 251, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dom_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fifo_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_frame_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_frame_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "km3pipe/dataclasses.pyx":252
 *         return [(
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,
 *             self.has_udp_trailer, self.high_rate_veto,             # <<<<<<<<<<<<<<
 *             self.max_sequence_number, self.n_packets, self.slice_id,
 *             self.utc_nanoseconds, self.utc_seconds, self.white_rabbit_status
 */
  __Pyx_TraceLine(252,0,__PYX_ERR(0, 252, __pyx_L1_error))
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_has_udp_trailer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_high_rate_veto); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":253
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,
 *             self.has_udp_trailer, self.high_rate_veto,
 *             self.max_sequence_number, self.n_packets, self.slice_id,             # <<<<<<<<<<<<<<
 *             self.utc_nanoseconds, self.utc_seconds, self.white_rabbit_status
 *         ), ]
 */
  __Pyx_TraceLine(253,0,__PYX_ERR(0, 253, __pyx_L1_error))
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_max_sequence_number); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_n_packets); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_slice_id); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);

  /* "km3pipe/dataclasses.pyx":254
 *             self.has_udp_trailer, self.high_rate_veto,
 *             self.max_sequence_number, self.n_packets, self.slice_id,
 *             self.utc_nanoseconds, self.utc_seconds, self.white_rabbit_status             # <<<<<<<<<<<<<<
 *         ), ]
 * 
 */
  __Pyx_TraceLine(254,0,__PYX_ERR(0, 254, __pyx_L1_error))
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_utc_nanoseconds); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_utc_seconds); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_white_rabbit_status); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);

  /* "km3pipe/dataclasses.pyx":251
 *     def __array__(self):
 *         return [(
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,             # <<<<<<<<<<<<<<
 *             self.has_udp_trailer, self.high_rate_veto,
 *             self.max_sequence_number, self.n_packets, self.slice_id,
 */
  __Pyx_TraceLine(251,0,__PYX_ERR(0, 251, __pyx_L1_error))
  __pyx_t_13 = PyTuple_New(12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_13, 3, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_13, 4, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_13, 5, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_13, 6, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_13, 7, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_13, 8, __pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_10);
  PyTuple_SET_ITEM(__pyx_t_13, 9, __pyx_t_10);
  __Pyx_GIVEREF(__pyx_t_11);
  PyTuple_SET_ITEM(__pyx_t_13, 10, __pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_12);
  PyTuple_SET_ITEM(__pyx_t_13, 11, __pyx_t_12);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_t_7 = 0;
  __pyx_t_8 = 0;
  __pyx_t_9 = 0;
  __pyx_t_10 = 0;
  __pyx_t_11 = 0;
  __pyx_t_12 = 0;

  /* "km3pipe/dataclasses.pyx":250
 * 
 *     def __array__(self):
 *         return [(             # <<<<<<<<<<<<<<
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,
 *             self.has_udp_trailer, self.high_rate_veto,
 */
  __Pyx_TraceLine(250,0,__PYX_ERR(0, 250, __pyx_L1_error))
  __pyx_t_12 = PyList_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_GIVEREF(__pyx_t_13);
  PyList_SET_ITEM(__pyx_t_12, 0, __pyx_t_13);
  __pyx_t_13 = 0;
  __pyx_r = __pyx_t_12;
  __pyx_t_12 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":249
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return [(
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,
 */

  /* 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_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("km3pipe.dataclasses.TimesliceFrameInfo.__array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":257
 *         ), ]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Timeslice frame:\n" \
 *                "    slice id: {0}\n" \
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceFrameInfo_13__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceFrameInfo_12__str__[] = "TimesliceFrameInfo.__str__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceFrameInfo_13__str__ = {"__str__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceFrameInfo_13__str__, METH_O, __pyx_doc_7km3pipe_11dataclasses_18TimesliceFrameInfo_12__str__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceFrameInfo_13__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceFrameInfo_12__str__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceFrameInfo_12__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__29)
  __Pyx_RefNannySetupContext("__str__", 0);
  __Pyx_TraceCall("__str__", __pyx_f[0], 257, 0, __PYX_ERR(0, 257, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":258
 * 
 *     def __str__(self):
 *         return "Timeslice frame:\n" \             # <<<<<<<<<<<<<<
 *                "    slice id: {0}\n" \
 *                "    frame id: {1}\n" \
 */
  __Pyx_TraceLine(258,0,__PYX_ERR(0, 258, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);

  /* "km3pipe/dataclasses.pyx":263
 *                "    DOM id:   {2}\n" \
 *                "    UDP packets: {3}/{4}\n" \
 *                .format(self.slice_id, self.frame_id, self.dom_id,             # <<<<<<<<<<<<<<
 *                        self.n_packets,
 *                        self.max_sequence_number)
 */
  __Pyx_TraceLine(263,0,__PYX_ERR(0, 263, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Timeslice_frame_slice_id_0_frame_2, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_slice_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_frame_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dom_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":264
 *                "    UDP packets: {3}/{4}\n" \
 *                .format(self.slice_id, self.frame_id, self.dom_id,
 *                        self.n_packets,             # <<<<<<<<<<<<<<
 *                        self.max_sequence_number)
 * 
 */
  __Pyx_TraceLine(264,0,__PYX_ERR(0, 264, __pyx_L1_error))
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_n_packets); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":265
 *                .format(self.slice_id, self.frame_id, self.dom_id,
 *                        self.n_packets,
 *                        self.max_sequence_number)             # <<<<<<<<<<<<<<
 * 
 *     def __insp__(self):
 */
  __Pyx_TraceLine(265,0,__PYX_ERR(0, 265, __pyx_L1_error))
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_max_sequence_number); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[6] = {__pyx_t_8, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 5+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 263, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __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_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[6] = {__pyx_t_8, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 5+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 263, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __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_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  {
    __pyx_t_10 = PyTuple_New(5+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 263, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_8) {
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_10, 3+__pyx_t_9, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_10, 4+__pyx_t_9, __pyx_t_7);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 263, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":257
 *         ), ]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Timeslice frame:\n" \
 *                "    slice id: {0}\n" \
 */

  /* 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceFrameInfo.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":267
 *                        self.max_sequence_number)
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceFrameInfo_15__insp__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceFrameInfo_14__insp__[] = "TimesliceFrameInfo.__insp__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceFrameInfo_15__insp__ = {"__insp__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceFrameInfo_15__insp__, METH_O, __pyx_doc_7km3pipe_11dataclasses_18TimesliceFrameInfo_14__insp__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceFrameInfo_15__insp__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__insp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceFrameInfo_14__insp__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceFrameInfo_14__insp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__30)
  __Pyx_RefNannySetupContext("__insp__", 0);
  __Pyx_TraceCall("__insp__", __pyx_f[0], 267, 0, __PYX_ERR(0, 267, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":268
 * 
 *     def __insp__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_TraceLine(268,0,__PYX_ERR(0, 268, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":267
 *                        self.max_sequence_number)
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceFrameInfo.__insp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":270
 *         return self.__str__()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceFrameInfo_17__len__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceFrameInfo_16__len__[] = "TimesliceFrameInfo.__len__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceFrameInfo_17__len__ = {"__len__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceFrameInfo_17__len__, METH_O, __pyx_doc_7km3pipe_11dataclasses_18TimesliceFrameInfo_16__len__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceFrameInfo_17__len__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceFrameInfo_16__len__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceFrameInfo_16__len__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__31)
  __Pyx_RefNannySetupContext("__len__", 0);
  __Pyx_TraceCall("__len__", __pyx_f[0], 270, 0, __PYX_ERR(0, 270, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":271
 * 
 *     def __len__(self):
 *         return 1             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(271,0,__PYX_ERR(0, 271, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_int_1);
  __pyx_r = __pyx_int_1;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":270
 *         return self.__str__()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceFrameInfo.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":294
 * 
 *     @classmethod
 *     def from_table(cls, row):             # <<<<<<<<<<<<<<
 *         args = []
 *         for col in cls.dtype.names:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_1from_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_16SummaryframeInfo_from_table[] = "SummaryframeInfo.from_table(cls, row)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_16SummaryframeInfo_1from_table = {"from_table", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_1from_table, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_16SummaryframeInfo_from_table};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_1from_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_row = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_table (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_row,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_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_row)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_table", 1, 2, 2, 1); __PYX_ERR(0, 294, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_table") < 0)) __PYX_ERR(0, 294, __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_cls = values[0];
    __pyx_v_row = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_table", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 294, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeInfo.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_from_table(__pyx_self, __pyx_v_cls, __pyx_v_row);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_from_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_row) {
  PyObject *__pyx_v_args = NULL;
  PyObject *__pyx_v_col = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  int __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__32)
  __Pyx_RefNannySetupContext("from_table", 0);
  __Pyx_TraceCall("from_table", __pyx_f[0], 294, 0, __PYX_ERR(0, 294, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":295
 *     @classmethod
 *     def from_table(cls, row):
 *         args = []             # <<<<<<<<<<<<<<
 *         for col in cls.dtype.names:
 *             try:
 */
  __Pyx_TraceLine(295,0,__PYX_ERR(0, 295, __pyx_L1_error))
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":296
 *     def from_table(cls, row):
 *         args = []
 *         for col in cls.dtype.names:             # <<<<<<<<<<<<<<
 *             try:
 *                 args.append(row[col])
 */
  __Pyx_TraceLine(296,0,__PYX_ERR(0, 296, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_names); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(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_ERR(0, 296, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 296, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 296, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 296, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 296, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 296, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #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_ERR(0, 296, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_col, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "km3pipe/dataclasses.pyx":297
 *         args = []
 *         for col in cls.dtype.names:
 *             try:             # <<<<<<<<<<<<<<
 *                 args.append(row[col])
 *             except KeyError:
 */
    __Pyx_TraceLine(297,0,__PYX_ERR(0, 297, __pyx_L5_error))
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);
      /*try:*/ {

        /* "km3pipe/dataclasses.pyx":298
 *         for col in cls.dtype.names:
 *             try:
 *                 args.append(row[col])             # <<<<<<<<<<<<<<
 *             except KeyError:
 *                 args.append(np.nan)
 */
        __Pyx_TraceLine(298,0,__PYX_ERR(0, 298, __pyx_L5_error))
        __pyx_t_2 = PyObject_GetItem(__pyx_v_row, __pyx_v_col); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 298, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_args, __pyx_t_2); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 298, __pyx_L5_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "km3pipe/dataclasses.pyx":297
 *         args = []
 *         for col in cls.dtype.names:
 *             try:             # <<<<<<<<<<<<<<
 *                 args.append(row[col])
 *             except KeyError:
 */
      }
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L12_try_end;
      __pyx_L5_error:;
      __Pyx_PyThreadState_assign
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "km3pipe/dataclasses.pyx":299
 *             try:
 *                 args.append(row[col])
 *             except KeyError:             # <<<<<<<<<<<<<<
 *                 args.append(np.nan)
 *         return cls(*args)
 */
      __Pyx_TraceLine(299,0,__PYX_ERR(0, 299, __pyx_L7_except_error))
      __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
      if (__pyx_t_9) {
        __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeInfo.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_10, &__pyx_t_11) < 0) __PYX_ERR(0, 299, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_GOTREF(__pyx_t_11);

        /* "km3pipe/dataclasses.pyx":300
 *                 args.append(row[col])
 *             except KeyError:
 *                 args.append(np.nan)             # <<<<<<<<<<<<<<
 *         return cls(*args)
 * 
 */
        __Pyx_TraceLine(300,0,__PYX_ERR(0, 300, __pyx_L7_except_error))
        __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 300, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_nan); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 300, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_args, __pyx_t_13); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 300, __pyx_L7_except_error)
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        goto __pyx_L6_exception_handled;
      }
      goto __pyx_L7_except_error;
      __pyx_L7_except_error:;

      /* "km3pipe/dataclasses.pyx":297
 *         args = []
 *         for col in cls.dtype.names:
 *             try:             # <<<<<<<<<<<<<<
 *                 args.append(row[col])
 *             except KeyError:
 */
      __Pyx_PyThreadState_assign
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
      goto __pyx_L1_error;
      __pyx_L6_exception_handled:;
      __Pyx_PyThreadState_assign
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
      __pyx_L12_try_end:;
    }

    /* "km3pipe/dataclasses.pyx":296
 *     def from_table(cls, row):
 *         args = []
 *         for col in cls.dtype.names:             # <<<<<<<<<<<<<<
 *             try:
 *                 args.append(row[col])
 */
    __Pyx_TraceLine(296,0,__PYX_ERR(0, 296, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":301
 *             except KeyError:
 *                 args.append(np.nan)
 *         return cls(*args)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(301,0,__PYX_ERR(0, 301, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_v_cls, __pyx_t_1, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_11;
  __pyx_t_11 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":294
 * 
 *     @classmethod
 *     def from_table(cls, row):             # <<<<<<<<<<<<<<
 *         args = []
 *         for col in cls.dtype.names:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeInfo.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_col);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":304
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_3deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_16SummaryframeInfo_2deserialise[] = "SummaryframeInfo.deserialise(cls, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_16SummaryframeInfo_3deserialise = {"deserialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_3deserialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_16SummaryframeInfo_2deserialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_3deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("deserialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,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_cls)) != 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, __pyx_v_kwargs, values, used_pos_args, "deserialise") < 0)) __PYX_ERR(0, 304, __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_cls = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("deserialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 304, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeInfo.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_2deserialise(__pyx_self, __pyx_v_cls, __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_7km3pipe_11dataclasses_16SummaryframeInfo_2deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__33)
  __Pyx_RefNannySetupContext("deserialise", 0);
  __Pyx_TraceCall("deserialise", __pyx_f[0], 304, 0, __PYX_ERR(0, 304, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":305
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def serialise(self, *args, **kwargs):
 */
  __Pyx_TraceLine(305,0,__PYX_ERR(0, 305, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_conv_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":304
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeInfo.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":307
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_5serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_16SummaryframeInfo_4serialise[] = "SummaryframeInfo.serialise(self, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_16SummaryframeInfo_5serialise = {"serialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_5serialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_16SummaryframeInfo_4serialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_5serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,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_self)) != 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, __pyx_v_kwargs, values, used_pos_args, "serialise") < 0)) __PYX_ERR(0, 307, __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_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 307, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeInfo.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_4serialise(__pyx_self, __pyx_v_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_7km3pipe_11dataclasses_16SummaryframeInfo_4serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__34)
  __Pyx_RefNannySetupContext("serialise", 0);
  __Pyx_TraceCall("serialise", __pyx_f[0], 307, 0, __PYX_ERR(0, 307, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":308
 * 
 *     def serialise(self, *args, **kwargs):
 *         return self.conv_to(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(308,0,__PYX_ERR(0, 308, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":307
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeInfo.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":311
 * 
 *     @classmethod
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_7conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_16SummaryframeInfo_6conv_from[] = "SummaryframeInfo.conv_from(cls, data, frame_id, fmt='numpy', h5loc='/')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_16SummaryframeInfo_7conv_from = {"conv_from", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_7conv_from, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_16SummaryframeInfo_6conv_from};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_7conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_data = 0;
  CYTHON_UNUSED PyObject *__pyx_v_frame_id = 0;
  PyObject *__pyx_v_fmt = 0;
  CYTHON_UNUSED PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_from (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_data,&__pyx_n_s_frame_id,&__pyx_n_s_fmt,&__pyx_n_s_h5loc,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[3] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    values[4] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    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_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, 1); __PYX_ERR(0, 311, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_frame_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, 2); __PYX_ERR(0, 311, __pyx_L3_error)
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fmt);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_from") < 0)) __PYX_ERR(0, 311, __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_cls = values[0];
    __pyx_v_data = values[1];
    __pyx_v_frame_id = values[2];
    __pyx_v_fmt = values[3];
    __pyx_v_h5loc = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 311, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeInfo.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_6conv_from(__pyx_self, __pyx_v_cls, __pyx_v_data, __pyx_v_frame_id, __pyx_v_fmt, __pyx_v_h5loc);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_6conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_frame_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  __Pyx_TraceFrameInit(__pyx_codeobj__35)
  __Pyx_RefNannySetupContext("conv_from", 0);
  __Pyx_TraceCall("conv_from", __pyx_f[0], 311, 0, __PYX_ERR(0, 311, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":312
 *     @classmethod
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls.from_table(data[0])
 * 
 */
  __Pyx_TraceLine(312,0,__PYX_ERR(0, 312, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_fmt, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 312, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":313
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])             # <<<<<<<<<<<<<<
 * 
 *     def conv_to(self, to='numpy'):
 */
    __Pyx_TraceLine(313,0,__PYX_ERR(0, 313, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_from_table); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 313, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_data, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 313, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 313, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 313, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 313, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 313, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 313, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":312
 *     @classmethod
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls.from_table(data[0])
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":311
 * 
 *     @classmethod
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeInfo.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":315
 *             return cls.from_table(data[0])
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_9conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_16SummaryframeInfo_8conv_to[] = "SummaryframeInfo.conv_to(self, to='numpy')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_16SummaryframeInfo_9conv_to = {"conv_to", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_9conv_to, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_16SummaryframeInfo_8conv_to};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_9conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_to = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_to (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_to,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_to);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_to") < 0)) __PYX_ERR(0, 315, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        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_self = values[0];
    __pyx_v_to = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_to", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 315, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeInfo.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_8conv_to(__pyx_self, __pyx_v_self, __pyx_v_to);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_8conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  __Pyx_TraceFrameInit(__pyx_codeobj__36)
  __Pyx_RefNannySetupContext("conv_to", 0);
  __Pyx_TraceCall("conv_to", __pyx_f[0], 315, 0, __PYX_ERR(0, 315, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":316
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)
 */
  __Pyx_TraceLine(316,0,__PYX_ERR(0, 316, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 316, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":317
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),             # <<<<<<<<<<<<<<
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':
 */
    __Pyx_TraceLine(317,0,__PYX_ERR(0, 317, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3Array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 317, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 317, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 317, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_array_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 317, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (__pyx_t_6) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 317, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 317, __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_ERR(0, 317, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 317, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 317, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 317, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 317, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 317, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "km3pipe/dataclasses.pyx":318
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)             # <<<<<<<<<<<<<<
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 */
    __Pyx_TraceLine(318,0,__PYX_ERR(0, 318, __pyx_L1_error))
    __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 318, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_h5loc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 318, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_h5loc, __pyx_t_5) < 0) __PYX_ERR(0, 318, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "km3pipe/dataclasses.pyx":317
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),             # <<<<<<<<<<<<<<
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':
 */
    __Pyx_TraceLine(317,0,__PYX_ERR(0, 317, __pyx_L1_error))
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 317, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":316
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)
 */
  }

  /* "km3pipe/dataclasses.pyx":319
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  __Pyx_TraceLine(319,0,__PYX_ERR(0, 319, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_pandas, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 319, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":320
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)             # <<<<<<<<<<<<<<
 * 
 *     def __array__(self):
 */
    __Pyx_TraceLine(320,0,__PYX_ERR(0, 320, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3DataFrame); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_to, __pyx_n_s_numpy) < 0) __PYX_ERR(0, 320, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_h5loc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_h5loc, __pyx_t_6) < 0) __PYX_ERR(0, 320, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":319
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":315
 *             return cls.from_table(data[0])
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeInfo.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":322
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return [(
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_11__array__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_16SummaryframeInfo_10__array__[] = "SummaryframeInfo.__array__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_16SummaryframeInfo_11__array__ = {"__array__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_11__array__, METH_O, __pyx_doc_7km3pipe_11dataclasses_16SummaryframeInfo_10__array__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_11__array__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__array__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_10__array__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_10__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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;
  __Pyx_TraceFrameInit(__pyx_codeobj__37)
  __Pyx_RefNannySetupContext("__array__", 0);
  __Pyx_TraceCall("__array__", __pyx_f[0], 322, 0, __PYX_ERR(0, 322, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":323
 * 
 *     def __array__(self):
 *         return [(             # <<<<<<<<<<<<<<
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,
 *             self.has_udp_trailer, self.high_rate_veto,
 */
  __Pyx_TraceLine(323,0,__PYX_ERR(0, 323, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);

  /* "km3pipe/dataclasses.pyx":324
 *     def __array__(self):
 *         return [(
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,             # <<<<<<<<<<<<<<
 *             self.has_udp_trailer, self.high_rate_veto,
 *             self.max_sequence_number, self.n_packets, self.slice_id,
 */
  __Pyx_TraceLine(324,0,__PYX_ERR(0, 324, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dom_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fifo_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_frame_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_frame_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "km3pipe/dataclasses.pyx":325
 *         return [(
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,
 *             self.has_udp_trailer, self.high_rate_veto,             # <<<<<<<<<<<<<<
 *             self.max_sequence_number, self.n_packets, self.slice_id,
 *             self.utc_nanoseconds, self.utc_seconds, self.white_rabbit_status
 */
  __Pyx_TraceLine(325,0,__PYX_ERR(0, 325, __pyx_L1_error))
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_has_udp_trailer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_high_rate_veto); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":326
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,
 *             self.has_udp_trailer, self.high_rate_veto,
 *             self.max_sequence_number, self.n_packets, self.slice_id,             # <<<<<<<<<<<<<<
 *             self.utc_nanoseconds, self.utc_seconds, self.white_rabbit_status
 *         ), ]
 */
  __Pyx_TraceLine(326,0,__PYX_ERR(0, 326, __pyx_L1_error))
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_max_sequence_number); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_n_packets); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_slice_id); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);

  /* "km3pipe/dataclasses.pyx":327
 *             self.has_udp_trailer, self.high_rate_veto,
 *             self.max_sequence_number, self.n_packets, self.slice_id,
 *             self.utc_nanoseconds, self.utc_seconds, self.white_rabbit_status             # <<<<<<<<<<<<<<
 *         ), ]
 * 
 */
  __Pyx_TraceLine(327,0,__PYX_ERR(0, 327, __pyx_L1_error))
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_utc_nanoseconds); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_utc_seconds); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_white_rabbit_status); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);

  /* "km3pipe/dataclasses.pyx":324
 *     def __array__(self):
 *         return [(
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,             # <<<<<<<<<<<<<<
 *             self.has_udp_trailer, self.high_rate_veto,
 *             self.max_sequence_number, self.n_packets, self.slice_id,
 */
  __Pyx_TraceLine(324,0,__PYX_ERR(0, 324, __pyx_L1_error))
  __pyx_t_13 = PyTuple_New(12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_13, 3, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_13, 4, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_13, 5, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_13, 6, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_13, 7, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_13, 8, __pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_10);
  PyTuple_SET_ITEM(__pyx_t_13, 9, __pyx_t_10);
  __Pyx_GIVEREF(__pyx_t_11);
  PyTuple_SET_ITEM(__pyx_t_13, 10, __pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_12);
  PyTuple_SET_ITEM(__pyx_t_13, 11, __pyx_t_12);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_t_7 = 0;
  __pyx_t_8 = 0;
  __pyx_t_9 = 0;
  __pyx_t_10 = 0;
  __pyx_t_11 = 0;
  __pyx_t_12 = 0;

  /* "km3pipe/dataclasses.pyx":323
 * 
 *     def __array__(self):
 *         return [(             # <<<<<<<<<<<<<<
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,
 *             self.has_udp_trailer, self.high_rate_veto,
 */
  __Pyx_TraceLine(323,0,__PYX_ERR(0, 323, __pyx_L1_error))
  __pyx_t_12 = PyList_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_GIVEREF(__pyx_t_13);
  PyList_SET_ITEM(__pyx_t_12, 0, __pyx_t_13);
  __pyx_t_13 = 0;
  __pyx_r = __pyx_t_12;
  __pyx_t_12 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":322
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return [(
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,
 */

  /* 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_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("km3pipe.dataclasses.SummaryframeInfo.__array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":330
 *         ), ]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Summaryslice frame #{0}:\n" \
 *                "    slice id:    {1}\n" \
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_13__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_16SummaryframeInfo_12__str__[] = "SummaryframeInfo.__str__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_16SummaryframeInfo_13__str__ = {"__str__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_13__str__, METH_O, __pyx_doc_7km3pipe_11dataclasses_16SummaryframeInfo_12__str__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_13__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_12__str__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_12__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__38)
  __Pyx_RefNannySetupContext("__str__", 0);
  __Pyx_TraceCall("__str__", __pyx_f[0], 330, 0, __PYX_ERR(0, 330, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":331
 * 
 *     def __str__(self):
 *         return "Summaryslice frame #{0}:\n" \             # <<<<<<<<<<<<<<
 *                "    slice id:    {1}\n" \
 *                "    DOM id:      {2}\n" \
 */
  __Pyx_TraceLine(331,0,__PYX_ERR(0, 331, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);

  /* "km3pipe/dataclasses.pyx":335
 *                "    DOM id:      {2}\n" \
 *                "    UDP packets: {3}/{4}\n" \
 *                .format(self, self.frame_id, self.slice_id, self.dom_id,             # <<<<<<<<<<<<<<
 *                        self.n_packets,
 *                        self.max_sequence_number)
 */
  __Pyx_TraceLine(335,0,__PYX_ERR(0, 335, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Summaryslice_frame_0_slice_id_1, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_frame_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_slice_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dom_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":336
 *                "    UDP packets: {3}/{4}\n" \
 *                .format(self, self.frame_id, self.slice_id, self.dom_id,
 *                        self.n_packets,             # <<<<<<<<<<<<<<
 *                        self.max_sequence_number)
 * 
 */
  __Pyx_TraceLine(336,0,__PYX_ERR(0, 336, __pyx_L1_error))
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_n_packets); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":337
 *                .format(self, self.frame_id, self.slice_id, self.dom_id,
 *                        self.n_packets,
 *                        self.max_sequence_number)             # <<<<<<<<<<<<<<
 * 
 *     def __insp__(self):
 */
  __Pyx_TraceLine(337,0,__PYX_ERR(0, 337, __pyx_L1_error))
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_max_sequence_number); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[7] = {__pyx_t_8, __pyx_v_self, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 6+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 335, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __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_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[7] = {__pyx_t_8, __pyx_v_self, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 6+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 335, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __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_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  {
    __pyx_t_10 = PyTuple_New(6+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 335, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_8) {
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_self);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_10, 3+__pyx_t_9, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_10, 4+__pyx_t_9, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_10, 5+__pyx_t_9, __pyx_t_7);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 335, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":330
 *         ), ]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Summaryslice frame #{0}:\n" \
 *                "    slice id:    {1}\n" \
 */

  /* 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeInfo.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":339
 *                        self.max_sequence_number)
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_15__insp__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_16SummaryframeInfo_14__insp__[] = "SummaryframeInfo.__insp__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_16SummaryframeInfo_15__insp__ = {"__insp__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_15__insp__, METH_O, __pyx_doc_7km3pipe_11dataclasses_16SummaryframeInfo_14__insp__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_15__insp__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__insp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_14__insp__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_14__insp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__39)
  __Pyx_RefNannySetupContext("__insp__", 0);
  __Pyx_TraceCall("__insp__", __pyx_f[0], 339, 0, __PYX_ERR(0, 339, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":340
 * 
 *     def __insp__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_TraceLine(340,0,__PYX_ERR(0, 340, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 340, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 340, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 340, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":339
 *                        self.max_sequence_number)
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeInfo.__insp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":342
 *         return self.__str__()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_17__len__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_16SummaryframeInfo_16__len__[] = "SummaryframeInfo.__len__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_16SummaryframeInfo_17__len__ = {"__len__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_17__len__, METH_O, __pyx_doc_7km3pipe_11dataclasses_16SummaryframeInfo_16__len__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_17__len__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_16__len__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_16__len__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__40)
  __Pyx_RefNannySetupContext("__len__", 0);
  __Pyx_TraceCall("__len__", __pyx_f[0], 342, 0, __PYX_ERR(0, 342, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":343
 * 
 *     def __len__(self):
 *         return 1             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(343,0,__PYX_ERR(0, 343, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_int_1);
  __pyx_r = __pyx_int_1;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":342
 *         return self.__str__()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeInfo.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":369
 *     ])
 * 
 *     def __init__(self, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._arr = np.array(arr, dtype=self.dtype).reshape(1)
 *         for col in self.dtype.names:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9EventInfo___init__[] = "EventInfo.__init__(self, arr, h5loc='/')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9EventInfo_1__init__ = {"__init__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9EventInfo_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9EventInfo___init__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_arr,&__pyx_n_s_h5loc,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); __PYX_ERR(0, 369, __pyx_L3_error)
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 369, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        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_arr = values[1];
    __pyx_v_h5loc = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 369, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.EventInfo.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9EventInfo___init__(__pyx_self, __pyx_v_self, __pyx_v_arr, __pyx_v_h5loc);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_h5loc) {
  PyObject *__pyx_v_col = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  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;
  __Pyx_TraceFrameInit(__pyx_codeobj__41)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 369, 0, __PYX_ERR(0, 369, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":370
 * 
 *     def __init__(self, arr, h5loc='/'):
 *         self._arr = np.array(arr, dtype=self.dtype).reshape(1)             # <<<<<<<<<<<<<<
 *         for col in self.dtype.names:
 *             setattr(self, col, self._arr[col])
 */
  __Pyx_TraceLine(370,0,__PYX_ERR(0, 370, __pyx_L1_error))
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 370, __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_ERR(0, 370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_arr);
  __Pyx_GIVEREF(__pyx_v_arr);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_arr);
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 370, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_arr_2, __pyx_t_4) < 0) __PYX_ERR(0, 370, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":371
 *     def __init__(self, arr, h5loc='/'):
 *         self._arr = np.array(arr, dtype=self.dtype).reshape(1)
 *         for col in self.dtype.names:             # <<<<<<<<<<<<<<
 *             setattr(self, col, self._arr[col])
 *         self.h5loc = h5loc
 */
  __Pyx_TraceLine(371,0,__PYX_ERR(0, 371, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_names); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
    __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 371, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 371, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 371, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 371, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 371, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #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_ERR(0, 371, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF_SET(__pyx_v_col, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "km3pipe/dataclasses.pyx":372
 *         self._arr = np.array(arr, dtype=self.dtype).reshape(1)
 *         for col in self.dtype.names:
 *             setattr(self, col, self._arr[col])             # <<<<<<<<<<<<<<
 *         self.h5loc = h5loc
 * 
 */
    __Pyx_TraceLine(372,0,__PYX_ERR(0, 372, __pyx_L1_error))
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyObject_GetItem(__pyx_t_3, __pyx_v_col); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = PyObject_SetAttr(__pyx_v_self, __pyx_v_col, __pyx_t_1); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 372, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "km3pipe/dataclasses.pyx":371
 *     def __init__(self, arr, h5loc='/'):
 *         self._arr = np.array(arr, dtype=self.dtype).reshape(1)
 *         for col in self.dtype.names:             # <<<<<<<<<<<<<<
 *             setattr(self, col, self._arr[col])
 *         self.h5loc = h5loc
 */
    __Pyx_TraceLine(371,0,__PYX_ERR(0, 371, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":373
 *         for col in self.dtype.names:
 *             setattr(self, col, self._arr[col])
 *         self.h5loc = h5loc             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(373,0,__PYX_ERR(0, 373, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_h5loc, __pyx_v_h5loc) < 0) __PYX_ERR(0, 373, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":369
 *     ])
 * 
 *     def __init__(self, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._arr = np.array(arr, dtype=self.dtype).reshape(1)
 *         for col in self.dtype.names:
 */

  /* 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_4);
  __Pyx_AddTraceback("km3pipe.dataclasses.EventInfo.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_col);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":376
 * 
 *     @classmethod
 *     def from_row(cls, row, **kwargs):             # <<<<<<<<<<<<<<
 *         args = tuple((row[col] for col in cls.dtype.names))
 *         return cls(np.array(args, dtype=cls.dtype), **kwargs)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_3from_row(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9EventInfo_2from_row[] = "EventInfo.from_row(cls, row, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9EventInfo_3from_row = {"from_row", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9EventInfo_3from_row, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9EventInfo_2from_row};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_3from_row(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_row = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_row (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_row,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_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_row)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_row", 1, 2, 2, 1); __PYX_ERR(0, 376, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "from_row") < 0)) __PYX_ERR(0, 376, __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_cls = values[0];
    __pyx_v_row = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_row", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 376, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.EventInfo.from_row", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9EventInfo_2from_row(__pyx_self, __pyx_v_cls, __pyx_v_row, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_7km3pipe_11dataclasses_9EventInfo_8from_row_2generator4(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "km3pipe/dataclasses.pyx":377
 *     @classmethod
 *     def from_row(cls, row, **kwargs):
 *         args = tuple((row[col] for col in cls.dtype.names))             # <<<<<<<<<<<<<<
 *         return cls(np.array(args, dtype=cls.dtype), **kwargs)
 * 
 */

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_8from_row_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr *)__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr(__pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 377, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 377, 0, __PYX_ERR(0, 377, __pyx_L1_error));
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7km3pipe_11dataclasses_9EventInfo_8from_row_2generator4, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_EventInfo_from_row_locals_genexp, __pyx_n_s_km3pipe_dataclasses); if (unlikely(!gen)) __PYX_ERR(0, 377, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.EventInfo.from_row.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_7km3pipe_11dataclasses_9EventInfo_8from_row_2generator4(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr *__pyx_cur_scope = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  __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_ERR(0, 377, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_cls)) { __Pyx_RaiseClosureNameError("cls"); __PYX_ERR(0, 377, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_names); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(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_ERR(0, 377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 377, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 377, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 377, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 377, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 377, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #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_ERR(0, 377, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_col);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_col, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_row)) { __Pyx_RaiseClosureNameError("row"); __PYX_ERR(0, 377, __pyx_L1_error) }
    __pyx_t_2 = PyObject_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_row, __pyx_cur_scope->__pyx_v_col); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    __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_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;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 377, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":376
 * 
 *     @classmethod
 *     def from_row(cls, row, **kwargs):             # <<<<<<<<<<<<<<
 *         args = tuple((row[col] for col in cls.dtype.names))
 *         return cls(np.array(args, dtype=cls.dtype), **kwargs)
 */

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_2from_row(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_row, PyObject *__pyx_v_kwargs) {
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row *__pyx_cur_scope;
  PyObject *__pyx_v_args = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__43)
  __Pyx_RefNannySetupContext("from_row", 0);
  __pyx_cur_scope = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row *)__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct__from_row(__pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct__from_row, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 376, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("from_row", __pyx_f[0], 376, 0, __PYX_ERR(0, 376, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_cls = __pyx_v_cls;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_cls);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_cls);
  __pyx_cur_scope->__pyx_v_row = __pyx_v_row;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_row);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_row);

  /* "km3pipe/dataclasses.pyx":377
 *     @classmethod
 *     def from_row(cls, row, **kwargs):
 *         args = tuple((row[col] for col in cls.dtype.names))             # <<<<<<<<<<<<<<
 *         return cls(np.array(args, dtype=cls.dtype), **kwargs)
 * 
 */
  __Pyx_TraceLine(377,0,__PYX_ERR(0, 377, __pyx_L1_error))
  __pyx_t_1 = __pyx_pf_7km3pipe_11dataclasses_9EventInfo_8from_row_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_args = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":378
 *     def from_row(cls, row, **kwargs):
 *         args = tuple((row[col] for col in cls.dtype.names))
 *         return cls(np.array(args, dtype=cls.dtype), **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(378,0,__PYX_ERR(0, 378, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 378, __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_ERR(0, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_args);
  __Pyx_GIVEREF(__pyx_v_args);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_args);
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 378, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 378, __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_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_cls, __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":376
 * 
 *     @classmethod
 *     def from_row(cls, row, **kwargs):             # <<<<<<<<<<<<<<
 *         args = tuple((row[col] for col in cls.dtype.names))
 *         return cls(np.array(args, dtype=cls.dtype), **kwargs)
 */

  /* 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("km3pipe.dataclasses.EventInfo.from_row", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":381
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_5deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9EventInfo_4deserialise[] = "EventInfo.deserialise(cls, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9EventInfo_5deserialise = {"deserialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9EventInfo_5deserialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9EventInfo_4deserialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_5deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("deserialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,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_cls)) != 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, __pyx_v_kwargs, values, used_pos_args, "deserialise") < 0)) __PYX_ERR(0, 381, __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_cls = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("deserialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 381, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.EventInfo.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9EventInfo_4deserialise(__pyx_self, __pyx_v_cls, __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_7km3pipe_11dataclasses_9EventInfo_4deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__44)
  __Pyx_RefNannySetupContext("deserialise", 0);
  __Pyx_TraceCall("deserialise", __pyx_f[0], 381, 0, __PYX_ERR(0, 381, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":382
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def serialise(self, *args, **kwargs):
 */
  __Pyx_TraceLine(382,0,__PYX_ERR(0, 382, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_conv_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":381
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.EventInfo.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":384
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_7serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9EventInfo_6serialise[] = "EventInfo.serialise(self, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9EventInfo_7serialise = {"serialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9EventInfo_7serialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9EventInfo_6serialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_7serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,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_self)) != 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, __pyx_v_kwargs, values, used_pos_args, "serialise") < 0)) __PYX_ERR(0, 384, __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_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 384, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.EventInfo.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9EventInfo_6serialise(__pyx_self, __pyx_v_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_7km3pipe_11dataclasses_9EventInfo_6serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__45)
  __Pyx_RefNannySetupContext("serialise", 0);
  __Pyx_TraceCall("serialise", __pyx_f[0], 384, 0, __PYX_ERR(0, 384, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":385
 * 
 *     def serialise(self, *args, **kwargs):
 *         return self.conv_to(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(385,0,__PYX_ERR(0, 385, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":384
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.EventInfo.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":388
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/', **kwargs):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_row(data, **kwargs)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_9conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9EventInfo_8conv_from[] = "EventInfo.conv_from(cls, data, event_id, fmt='numpy', h5loc='/', **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9EventInfo_9conv_from = {"conv_from", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9EventInfo_9conv_from, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9EventInfo_8conv_from};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_9conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_data = 0;
  CYTHON_UNUSED PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_v_fmt = 0;
  CYTHON_UNUSED PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_from (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_data,&__pyx_n_s_event_id,&__pyx_n_s_fmt,&__pyx_n_s_h5loc,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[3] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    values[4] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    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_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, 1); __PYX_ERR(0, 388, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, 2); __PYX_ERR(0, 388, __pyx_L3_error)
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fmt);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "conv_from") < 0)) __PYX_ERR(0, 388, __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_cls = values[0];
    __pyx_v_data = values[1];
    __pyx_v_event_id = values[2];
    __pyx_v_fmt = values[3];
    __pyx_v_h5loc = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 388, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.EventInfo.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9EventInfo_8conv_from(__pyx_self, __pyx_v_cls, __pyx_v_data, __pyx_v_event_id, __pyx_v_fmt, __pyx_v_h5loc, __pyx_v_kwargs);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_8conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_event_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__46)
  __Pyx_RefNannySetupContext("conv_from", 0);
  __Pyx_TraceCall("conv_from", __pyx_f[0], 388, 0, __PYX_ERR(0, 388, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":389
 *     @classmethod
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/', **kwargs):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls.from_row(data, **kwargs)
 * 
 */
  __Pyx_TraceLine(389,0,__PYX_ERR(0, 389, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_fmt, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 389, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":390
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/', **kwargs):
 *         if fmt == 'numpy':
 *             return cls.from_row(data, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def conv_to(self, to='numpy', **kwargs):
 */
    __Pyx_TraceLine(390,0,__PYX_ERR(0, 390, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_from_row); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 390, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 390, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_data);
    __Pyx_GIVEREF(__pyx_v_data);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_data);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 390, __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_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":389
 *     @classmethod
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/', **kwargs):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls.from_row(data, **kwargs)
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":388
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/', **kwargs):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_row(data, **kwargs)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("km3pipe.dataclasses.EventInfo.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":392
 *             return cls.from_row(data, **kwargs)
 * 
 *     def conv_to(self, to='numpy', **kwargs):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_11conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9EventInfo_10conv_to[] = "EventInfo.conv_to(self, to='numpy', **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9EventInfo_11conv_to = {"conv_to", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9EventInfo_11conv_to, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9EventInfo_10conv_to};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_11conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_to = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_to (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_to,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_to);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "conv_to") < 0)) __PYX_ERR(0, 392, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        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_self = values[0];
    __pyx_v_to = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_to", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 392, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.EventInfo.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9EventInfo_10conv_to(__pyx_self, __pyx_v_self, __pyx_v_to, __pyx_v_kwargs);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_10conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  __Pyx_TraceFrameInit(__pyx_codeobj__47)
  __Pyx_RefNannySetupContext("conv_to", 0);
  __Pyx_TraceCall("conv_to", __pyx_f[0], 392, 0, __PYX_ERR(0, 392, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":393
 * 
 *     def conv_to(self, to='numpy', **kwargs):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)
 */
  __Pyx_TraceLine(393,0,__PYX_ERR(0, 393, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 393, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":394
 *     def conv_to(self, to='numpy', **kwargs):
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),             # <<<<<<<<<<<<<<
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':
 */
    __Pyx_TraceLine(394,0,__PYX_ERR(0, 394, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3Array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_array_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (__pyx_t_6) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 394, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 394, __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_ERR(0, 394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 394, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "km3pipe/dataclasses.pyx":395
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)             # <<<<<<<<<<<<<<
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc,
 */
    __Pyx_TraceLine(395,0,__PYX_ERR(0, 395, __pyx_L1_error))
    __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 395, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_h5loc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 395, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_h5loc, __pyx_t_5) < 0) __PYX_ERR(0, 395, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "km3pipe/dataclasses.pyx":394
 *     def conv_to(self, to='numpy', **kwargs):
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),             # <<<<<<<<<<<<<<
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':
 */
    __Pyx_TraceLine(394,0,__PYX_ERR(0, 394, __pyx_L1_error))
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":393
 * 
 *     def conv_to(self, to='numpy', **kwargs):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)
 */
  }

  /* "km3pipe/dataclasses.pyx":396
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc,
 *                                 **kwargs)
 */
  __Pyx_TraceLine(396,0,__PYX_ERR(0, 396, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_pandas, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 396, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":397
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc,             # <<<<<<<<<<<<<<
 *                                 **kwargs)
 * 
 */
    __Pyx_TraceLine(397,0,__PYX_ERR(0, 397, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3DataFrame); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_to, __pyx_n_s_numpy) < 0) __PYX_ERR(0, 397, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_h5loc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_h5loc, __pyx_t_4) < 0) __PYX_ERR(0, 397, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_2 = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "km3pipe/dataclasses.pyx":398
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc,
 *                                 **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def __array__(self):
 */
    __Pyx_TraceLine(398,0,__PYX_ERR(0, 398, __pyx_L1_error))
    if (__Pyx_MergeKeywords(__pyx_t_2, __pyx_v_kwargs) < 0) __PYX_ERR(0, 398, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":397
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc,             # <<<<<<<<<<<<<<
 *                                 **kwargs)
 * 
 */
    __Pyx_TraceLine(397,0,__PYX_ERR(0, 397, __pyx_L1_error))
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":396
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc,
 *                                 **kwargs)
 */
  }

  /* "km3pipe/dataclasses.pyx":392
 *             return cls.from_row(data, **kwargs)
 * 
 *     def conv_to(self, to='numpy', **kwargs):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.EventInfo.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":400
 *                                 **kwargs)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_13__array__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9EventInfo_12__array__[] = "EventInfo.__array__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9EventInfo_13__array__ = {"__array__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9EventInfo_13__array__, METH_O, __pyx_doc_7km3pipe_11dataclasses_9EventInfo_12__array__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_13__array__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__array__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9EventInfo_12__array__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_12__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__48)
  __Pyx_RefNannySetupContext("__array__", 0);
  __Pyx_TraceCall("__array__", __pyx_f[0], 400, 0, __PYX_ERR(0, 400, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":401
 * 
 *     def __array__(self):
 *         return self._arr             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_TraceLine(401,0,__PYX_ERR(0, 401, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":400
 *                                 **kwargs)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.EventInfo.__array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":403
 *         return self._arr
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Event #{0}:\n" \
 *                "    detector id:     {1}\n" \
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_15__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9EventInfo_14__str__[] = "EventInfo.__str__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9EventInfo_15__str__ = {"__str__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9EventInfo_15__str__, METH_O, __pyx_doc_7km3pipe_11dataclasses_9EventInfo_14__str__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_15__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9EventInfo_14__str__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_14__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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;
  int __pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__49)
  __Pyx_RefNannySetupContext("__str__", 0);
  __Pyx_TraceCall("__str__", __pyx_f[0], 403, 0, __PYX_ERR(0, 403, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":404
 * 
 *     def __str__(self):
 *         return "Event #{0}:\n" \             # <<<<<<<<<<<<<<
 *                "    detector id:     {1}\n" \
 *                "    frame index:     {2}\n" \
 */
  __Pyx_TraceLine(404,0,__PYX_ERR(0, 404, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);

  /* "km3pipe/dataclasses.pyx":414
 *                "    trigger counter: {8}\n" \
 *                "    trigger mask:    {9}" \
 *                .format(self.event_id, self.det_id,             # <<<<<<<<<<<<<<
 *                        self.frame_index, self.utc_seconds,
 *                        self.utc_nanoseconds, self.mc_id, self.mc_t,
 */
  __Pyx_TraceLine(414,0,__PYX_ERR(0, 414, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Event_0_detector_id_1_frame_inde, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_event_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_det_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "km3pipe/dataclasses.pyx":415
 *                "    trigger mask:    {9}" \
 *                .format(self.event_id, self.det_id,
 *                        self.frame_index, self.utc_seconds,             # <<<<<<<<<<<<<<
 *                        self.utc_nanoseconds, self.mc_id, self.mc_t,
 *                        self.overlays, self.trigger_counter, self.trigger_mask,
 */
  __Pyx_TraceLine(415,0,__PYX_ERR(0, 415, __pyx_L1_error))
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_frame_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_utc_seconds); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":416
 *                .format(self.event_id, self.det_id,
 *                        self.frame_index, self.utc_seconds,
 *                        self.utc_nanoseconds, self.mc_id, self.mc_t,             # <<<<<<<<<<<<<<
 *                        self.overlays, self.trigger_counter, self.trigger_mask,
 *                        # self.run_id,
 */
  __Pyx_TraceLine(416,0,__PYX_ERR(0, 416, __pyx_L1_error))
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_utc_nanoseconds); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mc_id); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mc_t); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);

  /* "km3pipe/dataclasses.pyx":417
 *                        self.frame_index, self.utc_seconds,
 *                        self.utc_nanoseconds, self.mc_id, self.mc_t,
 *                        self.overlays, self.trigger_counter, self.trigger_mask,             # <<<<<<<<<<<<<<
 *                        # self.run_id,
 *                        )
 */
  __Pyx_TraceLine(417,0,__PYX_ERR(0, 417, __pyx_L1_error))
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_overlays); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_trigger_counter); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_trigger_mask); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_13 = NULL;
  __pyx_t_14 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_13)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_13);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_14 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[11] = {__pyx_t_13, __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_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 10+__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 414, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __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_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[11] = {__pyx_t_13, __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_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 10+__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 414, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __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_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  } else
  #endif
  {
    __pyx_t_15 = PyTuple_New(10+__pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 414, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    if (__pyx_t_13) {
      __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_13); __pyx_t_13 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_14, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_14, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_15, 2+__pyx_t_14, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_15, 3+__pyx_t_14, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_15, 4+__pyx_t_14, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_15, 5+__pyx_t_14, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_15, 6+__pyx_t_14, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_15, 7+__pyx_t_14, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_15, 8+__pyx_t_14, __pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_15, 9+__pyx_t_14, __pyx_t_12);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_8 = 0;
    __pyx_t_9 = 0;
    __pyx_t_10 = 0;
    __pyx_t_11 = 0;
    __pyx_t_12 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 414, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":403
 *         return self._arr
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Event #{0}:\n" \
 *                "    detector id:     {1}\n" \
 */

  /* 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_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_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("km3pipe.dataclasses.EventInfo.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":421
 *                        )
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_17__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9EventInfo_16__repr__[] = "EventInfo.__repr__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9EventInfo_17__repr__ = {"__repr__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9EventInfo_17__repr__, METH_O, __pyx_doc_7km3pipe_11dataclasses_9EventInfo_16__repr__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_17__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9EventInfo_16__repr__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_16__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__50)
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 421, 0, __PYX_ERR(0, 421, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":422
 * 
 *     def __repr__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 *     def __insp__(self):
 */
  __Pyx_TraceLine(422,0,__PYX_ERR(0, 422, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 422, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 422, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":421
 *                        )
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.EventInfo.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":424
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_19__insp__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9EventInfo_18__insp__[] = "EventInfo.__insp__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9EventInfo_19__insp__ = {"__insp__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9EventInfo_19__insp__, METH_O, __pyx_doc_7km3pipe_11dataclasses_9EventInfo_18__insp__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_19__insp__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__insp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9EventInfo_18__insp__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_18__insp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__51)
  __Pyx_RefNannySetupContext("__insp__", 0);
  __Pyx_TraceCall("__insp__", __pyx_f[0], 424, 0, __PYX_ERR(0, 424, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":425
 * 
 *     def __insp__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_TraceLine(425,0,__PYX_ERR(0, 425, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":424
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.EventInfo.__insp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":427
 *         return self.__str__()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_21__len__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9EventInfo_20__len__[] = "EventInfo.__len__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9EventInfo_21__len__ = {"__len__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9EventInfo_21__len__, METH_O, __pyx_doc_7km3pipe_11dataclasses_9EventInfo_20__len__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_21__len__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9EventInfo_20__len__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_20__len__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__52)
  __Pyx_RefNannySetupContext("__len__", 0);
  __Pyx_TraceCall("__len__", __pyx_f[0], 427, 0, __PYX_ERR(0, 427, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":428
 * 
 *     def __len__(self):
 *         return 1             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(428,0,__PYX_ERR(0, 428, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_int_1);
  __pyx_r = __pyx_int_1;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":427
 *         return self.__str__()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.EventInfo.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":433
 * class Point(np.ndarray):
 *     """Represents a point in a 3D space"""
 *     def __new__(cls, input_array=(np.nan, np.nan, np.nan)):             # <<<<<<<<<<<<<<
 *         """Add x, y and z to the ndarray"""
 *         obj = np.asarray(input_array).view(cls)
 */

static PyObject *__pyx_pf_7km3pipe_11dataclasses___defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_TraceCall("__defaults__", __pyx_f[0], 433, 0, __PYX_ERR(0, 433, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_input_array);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_input_array);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_input_array);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Point_1__new__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_5Point___new__[] = "Point.__new__(cls, input_array=<\077\077?>)\nAdd x, y and z to the ndarray";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_5Point_1__new__ = {"__new__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_5Point_1__new__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_5Point___new__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Point_1__new__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_input_array = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_input_array,0};
    PyObject* values[2] = {0,0};
    __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self);
    values[1] = __pyx_dynamic_args->__pyx_arg_input_array;
    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_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_input_array);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__new__") < 0)) __PYX_ERR(0, 433, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        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_cls = values[0];
    __pyx_v_input_array = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 433, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Point.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Point___new__(__pyx_self, __pyx_v_cls, __pyx_v_input_array);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Point___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_input_array) {
  PyObject *__pyx_v_obj = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__53)
  __Pyx_RefNannySetupContext("__new__", 0);
  __Pyx_TraceCall("__new__", __pyx_f[0], 433, 0, __PYX_ERR(0, 433, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":435
 *     def __new__(cls, input_array=(np.nan, np.nan, np.nan)):
 *         """Add x, y and z to the ndarray"""
 *         obj = np.asarray(input_array).view(cls)             # <<<<<<<<<<<<<<
 *         return obj
 * 
 */
  __Pyx_TraceLine(435,0,__PYX_ERR(0, 435, __pyx_L1_error))
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_input_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 435, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_input_array};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 435, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_input_array};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 435, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 435, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_INCREF(__pyx_v_input_array);
      __Pyx_GIVEREF(__pyx_v_input_array);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_input_array);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 435, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_view); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_cls); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 435, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_cls};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 435, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_cls};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 435, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 435, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_INCREF(__pyx_v_cls);
      __Pyx_GIVEREF(__pyx_v_cls);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_cls);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 435, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_obj = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":436
 *         """Add x, y and z to the ndarray"""
 *         obj = np.asarray(input_array).view(cls)
 *         return obj             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(436,0,__PYX_ERR(0, 436, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_obj);
  __pyx_r = __pyx_v_obj;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":433
 * class Point(np.ndarray):
 *     """Represents a point in a 3D space"""
 *     def __new__(cls, input_array=(np.nan, np.nan, np.nan)):             # <<<<<<<<<<<<<<
 *         """Add x, y and z to the ndarray"""
 *         obj = np.asarray(input_array).view(cls)
 */

  /* 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_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.Point.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_obj);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":439
 * 
 *     @property
 *     def x(self):             # <<<<<<<<<<<<<<
 *         return self[0]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Point_3x(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_5Point_2x[] = "Point.x(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_5Point_3x = {"x", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_5Point_3x, METH_O, __pyx_doc_7km3pipe_11dataclasses_5Point_2x};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Point_3x(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("x (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Point_2x(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Point_2x(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__54)
  __Pyx_RefNannySetupContext("x", 0);
  __Pyx_TraceCall("x", __pyx_f[0], 439, 0, __PYX_ERR(0, 439, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":440
 *     @property
 *     def x(self):
 *         return self[0]             # <<<<<<<<<<<<<<
 * 
 *     @x.setter
 */
  __Pyx_TraceLine(440,0,__PYX_ERR(0, 440, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_self, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":439
 * 
 *     @property
 *     def x(self):             # <<<<<<<<<<<<<<
 *         return self[0]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Point.x", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":443
 * 
 *     @x.setter
 *     def x(self, value):             # <<<<<<<<<<<<<<
 *         self[0] = value
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Point_5x(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_5Point_4x[] = "Point.x(self, value)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_5Point_5x = {"x", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_5Point_5x, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_5Point_4x};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Point_5x(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("x (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("x", 1, 2, 2, 1); __PYX_ERR(0, 443, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "x") < 0)) __PYX_ERR(0, 443, __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_self = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("x", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 443, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Point.x", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Point_4x(__pyx_self, __pyx_v_self, __pyx_v_value);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Point_4x(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__55)
  __Pyx_RefNannySetupContext("x", 0);
  __Pyx_TraceCall("x", __pyx_f[0], 443, 0, __PYX_ERR(0, 443, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":444
 *     @x.setter
 *     def x(self, value):
 *         self[0] = value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(444,0,__PYX_ERR(0, 444, __pyx_L1_error))
  if (unlikely(__Pyx_SetItemInt(__pyx_v_self, 0, __pyx_v_value, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) __PYX_ERR(0, 444, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":443
 * 
 *     @x.setter
 *     def x(self, value):             # <<<<<<<<<<<<<<
 *         self[0] = value
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Point.x", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":447
 * 
 *     @property
 *     def y(self):             # <<<<<<<<<<<<<<
 *         return self[1]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Point_7y(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_5Point_6y[] = "Point.y(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_5Point_7y = {"y", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_5Point_7y, METH_O, __pyx_doc_7km3pipe_11dataclasses_5Point_6y};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Point_7y(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("y (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Point_6y(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Point_6y(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__56)
  __Pyx_RefNannySetupContext("y", 0);
  __Pyx_TraceCall("y", __pyx_f[0], 447, 0, __PYX_ERR(0, 447, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":448
 *     @property
 *     def y(self):
 *         return self[1]             # <<<<<<<<<<<<<<
 * 
 *     @y.setter
 */
  __Pyx_TraceLine(448,0,__PYX_ERR(0, 448, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_self, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":447
 * 
 *     @property
 *     def y(self):             # <<<<<<<<<<<<<<
 *         return self[1]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Point.y", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":451
 * 
 *     @y.setter
 *     def y(self, value):             # <<<<<<<<<<<<<<
 *         self[1] = value
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Point_9y(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_5Point_8y[] = "Point.y(self, value)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_5Point_9y = {"y", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_5Point_9y, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_5Point_8y};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Point_9y(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("y (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("y", 1, 2, 2, 1); __PYX_ERR(0, 451, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "y") < 0)) __PYX_ERR(0, 451, __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_self = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("y", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 451, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Point.y", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Point_8y(__pyx_self, __pyx_v_self, __pyx_v_value);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Point_8y(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__57)
  __Pyx_RefNannySetupContext("y", 0);
  __Pyx_TraceCall("y", __pyx_f[0], 451, 0, __PYX_ERR(0, 451, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":452
 *     @y.setter
 *     def y(self, value):
 *         self[1] = value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(452,0,__PYX_ERR(0, 452, __pyx_L1_error))
  if (unlikely(__Pyx_SetItemInt(__pyx_v_self, 1, __pyx_v_value, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) __PYX_ERR(0, 452, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":451
 * 
 *     @y.setter
 *     def y(self, value):             # <<<<<<<<<<<<<<
 *         self[1] = value
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Point.y", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":455
 * 
 *     @property
 *     def z(self):             # <<<<<<<<<<<<<<
 *         return self[2]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Point_11z(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_5Point_10z[] = "Point.z(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_5Point_11z = {"z", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_5Point_11z, METH_O, __pyx_doc_7km3pipe_11dataclasses_5Point_10z};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Point_11z(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("z (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Point_10z(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Point_10z(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__58)
  __Pyx_RefNannySetupContext("z", 0);
  __Pyx_TraceCall("z", __pyx_f[0], 455, 0, __PYX_ERR(0, 455, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":456
 *     @property
 *     def z(self):
 *         return self[2]             # <<<<<<<<<<<<<<
 * 
 *     @z.setter
 */
  __Pyx_TraceLine(456,0,__PYX_ERR(0, 456, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_self, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":455
 * 
 *     @property
 *     def z(self):             # <<<<<<<<<<<<<<
 *         return self[2]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Point.z", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":459
 * 
 *     @z.setter
 *     def z(self, value):             # <<<<<<<<<<<<<<
 *         self[2] = value
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Point_13z(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_5Point_12z[] = "Point.z(self, value)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_5Point_13z = {"z", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_5Point_13z, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_5Point_12z};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Point_13z(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("z (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("z", 1, 2, 2, 1); __PYX_ERR(0, 459, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "z") < 0)) __PYX_ERR(0, 459, __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_self = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("z", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 459, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Point.z", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Point_12z(__pyx_self, __pyx_v_self, __pyx_v_value);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Point_12z(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__59)
  __Pyx_RefNannySetupContext("z", 0);
  __Pyx_TraceCall("z", __pyx_f[0], 459, 0, __PYX_ERR(0, 459, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":460
 *     @z.setter
 *     def z(self, value):
 *         self[2] = value             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(460,0,__PYX_ERR(0, 460, __pyx_L1_error))
  if (unlikely(__Pyx_SetItemInt(__pyx_v_self, 2, __pyx_v_value, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) __PYX_ERR(0, 460, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":459
 * 
 *     @z.setter
 *     def z(self, value):             # <<<<<<<<<<<<<<
 *         self[2] = value
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Point.z", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":472
 * 
 *     """
 *     def __new__(cls, input_array=(1, 0, 0)):             # <<<<<<<<<<<<<<
 *         """Add x, y and z to the ndarray"""
 *         normed_array = np.array(input_array) / np.linalg.norm(input_array)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_10Direction__1__new__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_10Direction____new__[] = "Direction_.__new__(cls, input_array=(1, 0, 0))\nAdd x, y and z to the ndarray";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_10Direction__1__new__ = {"__new__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_10Direction__1__new__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_10Direction____new__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_10Direction__1__new__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_input_array = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_input_array,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_tuple__60));
    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_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_input_array);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__new__") < 0)) __PYX_ERR(0, 472, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        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_cls = values[0];
    __pyx_v_input_array = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 472, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Direction_.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_10Direction____new__(__pyx_self, __pyx_v_cls, __pyx_v_input_array);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_10Direction____new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_input_array) {
  PyObject *__pyx_v_normed_array = NULL;
  PyObject *__pyx_v_obj = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__61)
  __Pyx_RefNannySetupContext("__new__", 0);
  __Pyx_TraceCall("__new__", __pyx_f[0], 472, 0, __PYX_ERR(0, 472, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":474
 *     def __new__(cls, input_array=(1, 0, 0)):
 *         """Add x, y and z to the ndarray"""
 *         normed_array = np.array(input_array) / np.linalg.norm(input_array)             # <<<<<<<<<<<<<<
 *         obj = np.asarray(normed_array).view(cls)
 *         return obj
 */
  __Pyx_TraceLine(474,0,__PYX_ERR(0, 474, __pyx_L1_error))
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_input_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 474, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_input_array};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 474, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_input_array};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 474, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 474, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_INCREF(__pyx_v_input_array);
      __Pyx_GIVEREF(__pyx_v_input_array);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_input_array);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 474, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_linalg); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_norm); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_input_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 474, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_input_array};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 474, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_input_array};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 474, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 474, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_INCREF(__pyx_v_input_array);
      __Pyx_GIVEREF(__pyx_v_input_array);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_input_array);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 474, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 474, __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_normed_array = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":475
 *         """Add x, y and z to the ndarray"""
 *         normed_array = np.array(input_array) / np.linalg.norm(input_array)
 *         obj = np.asarray(normed_array).view(cls)             # <<<<<<<<<<<<<<
 *         return obj
 * 
 */
  __Pyx_TraceLine(475,0,__PYX_ERR(0, 475, __pyx_L1_error))
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_1) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_normed_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_normed_array};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 475, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_normed_array};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 475, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    {
      __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 475, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = NULL;
      __Pyx_INCREF(__pyx_v_normed_array);
      __Pyx_GIVEREF(__pyx_v_normed_array);
      PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_normed_array);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 475, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_view); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_cls); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_cls};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 475, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_cls};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 475, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    {
      __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 475, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_INCREF(__pyx_v_cls);
      __Pyx_GIVEREF(__pyx_v_cls);
      PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_cls);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 475, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_obj = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":476
 *         normed_array = np.array(input_array) / np.linalg.norm(input_array)
 *         obj = np.asarray(normed_array).view(cls)
 *         return obj             # <<<<<<<<<<<<<<
 * 
 *     def _normalise(self):
 */
  __Pyx_TraceLine(476,0,__PYX_ERR(0, 476, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_obj);
  __pyx_r = __pyx_v_obj;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":472
 * 
 *     """
 *     def __new__(cls, input_array=(1, 0, 0)):             # <<<<<<<<<<<<<<
 *         """Add x, y and z to the ndarray"""
 *         normed_array = np.array(input_array) / np.linalg.norm(input_array)
 */

  /* 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_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.Direction_.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_normed_array);
  __Pyx_XDECREF(__pyx_v_obj);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":478
 *         return obj
 * 
 *     def _normalise(self):             # <<<<<<<<<<<<<<
 *         normed_array = self / np.linalg.norm(self)
 *         self[0] = normed_array[0]
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_10Direction__3_normalise(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_10Direction__2_normalise[] = "Direction_._normalise(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_10Direction__3_normalise = {"_normalise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_10Direction__3_normalise, METH_O, __pyx_doc_7km3pipe_11dataclasses_10Direction__2_normalise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_10Direction__3_normalise(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_normalise (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_10Direction__2_normalise(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_10Direction__2_normalise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_normed_array = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__62)
  __Pyx_RefNannySetupContext("_normalise", 0);
  __Pyx_TraceCall("_normalise", __pyx_f[0], 478, 0, __PYX_ERR(0, 478, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":479
 * 
 *     def _normalise(self):
 *         normed_array = self / np.linalg.norm(self)             # <<<<<<<<<<<<<<
 *         self[0] = normed_array[0]
 *         self[1] = normed_array[1]
 */
  __Pyx_TraceLine(479,0,__PYX_ERR(0, 479, __pyx_L1_error))
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_linalg); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 479, __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_norm); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 479, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_self};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 479, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_self};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 479, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 479, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_INCREF(__pyx_v_self);
      __Pyx_GIVEREF(__pyx_v_self);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_self);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 479, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_v_self, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_normed_array = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":480
 *     def _normalise(self):
 *         normed_array = self / np.linalg.norm(self)
 *         self[0] = normed_array[0]             # <<<<<<<<<<<<<<
 *         self[1] = normed_array[1]
 *         self[2] = normed_array[2]
 */
  __Pyx_TraceLine(480,0,__PYX_ERR(0, 480, __pyx_L1_error))
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_normed_array, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(__Pyx_SetItemInt(__pyx_v_self, 0, __pyx_t_2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) __PYX_ERR(0, 480, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":481
 *         normed_array = self / np.linalg.norm(self)
 *         self[0] = normed_array[0]
 *         self[1] = normed_array[1]             # <<<<<<<<<<<<<<
 *         self[2] = normed_array[2]
 * 
 */
  __Pyx_TraceLine(481,0,__PYX_ERR(0, 481, __pyx_L1_error))
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_normed_array, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(__Pyx_SetItemInt(__pyx_v_self, 1, __pyx_t_2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) __PYX_ERR(0, 481, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":482
 *         self[0] = normed_array[0]
 *         self[1] = normed_array[1]
 *         self[2] = normed_array[2]             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(482,0,__PYX_ERR(0, 482, __pyx_L1_error))
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_normed_array, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(__Pyx_SetItemInt(__pyx_v_self, 2, __pyx_t_2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) __PYX_ERR(0, 482, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":478
 *         return obj
 * 
 *     def _normalise(self):             # <<<<<<<<<<<<<<
 *         normed_array = self / np.linalg.norm(self)
 *         self[0] = normed_array[0]
 */

  /* 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_4);
  __Pyx_AddTraceback("km3pipe.dataclasses.Direction_._normalise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_normed_array);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":485
 * 
 *     @property
 *     def x(self):             # <<<<<<<<<<<<<<
 *         return self[0]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_10Direction__5x(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_10Direction__4x[] = "Direction_.x(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_10Direction__5x = {"x", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_10Direction__5x, METH_O, __pyx_doc_7km3pipe_11dataclasses_10Direction__4x};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_10Direction__5x(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("x (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_10Direction__4x(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_10Direction__4x(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__63)
  __Pyx_RefNannySetupContext("x", 0);
  __Pyx_TraceCall("x", __pyx_f[0], 485, 0, __PYX_ERR(0, 485, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":486
 *     @property
 *     def x(self):
 *         return self[0]             # <<<<<<<<<<<<<<
 * 
 *     @x.setter
 */
  __Pyx_TraceLine(486,0,__PYX_ERR(0, 486, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_self, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":485
 * 
 *     @property
 *     def x(self):             # <<<<<<<<<<<<<<
 *         return self[0]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Direction_.x", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":489
 * 
 *     @x.setter
 *     def x(self, value):             # <<<<<<<<<<<<<<
 *         self[0] = value
 *         self._normalise()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_10Direction__7x(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_10Direction__6x[] = "Direction_.x(self, value)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_10Direction__7x = {"x", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_10Direction__7x, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_10Direction__6x};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_10Direction__7x(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("x (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("x", 1, 2, 2, 1); __PYX_ERR(0, 489, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "x") < 0)) __PYX_ERR(0, 489, __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_self = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("x", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 489, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Direction_.x", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_10Direction__6x(__pyx_self, __pyx_v_self, __pyx_v_value);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_10Direction__6x(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__64)
  __Pyx_RefNannySetupContext("x", 0);
  __Pyx_TraceCall("x", __pyx_f[0], 489, 0, __PYX_ERR(0, 489, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":490
 *     @x.setter
 *     def x(self, value):
 *         self[0] = value             # <<<<<<<<<<<<<<
 *         self._normalise()
 * 
 */
  __Pyx_TraceLine(490,0,__PYX_ERR(0, 490, __pyx_L1_error))
  if (unlikely(__Pyx_SetItemInt(__pyx_v_self, 0, __pyx_v_value, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) __PYX_ERR(0, 490, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":491
 *     def x(self, value):
 *         self[0] = value
 *         self._normalise()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(491,0,__PYX_ERR(0, 491, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_normalise); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 491, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 491, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":489
 * 
 *     @x.setter
 *     def x(self, value):             # <<<<<<<<<<<<<<
 *         self[0] = value
 *         self._normalise()
 */

  /* 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_AddTraceback("km3pipe.dataclasses.Direction_.x", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":494
 * 
 *     @property
 *     def y(self):             # <<<<<<<<<<<<<<
 *         return self[1]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_10Direction__9y(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_10Direction__8y[] = "Direction_.y(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_10Direction__9y = {"y", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_10Direction__9y, METH_O, __pyx_doc_7km3pipe_11dataclasses_10Direction__8y};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_10Direction__9y(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("y (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_10Direction__8y(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_10Direction__8y(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__65)
  __Pyx_RefNannySetupContext("y", 0);
  __Pyx_TraceCall("y", __pyx_f[0], 494, 0, __PYX_ERR(0, 494, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":495
 *     @property
 *     def y(self):
 *         return self[1]             # <<<<<<<<<<<<<<
 * 
 *     @y.setter
 */
  __Pyx_TraceLine(495,0,__PYX_ERR(0, 495, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_self, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":494
 * 
 *     @property
 *     def y(self):             # <<<<<<<<<<<<<<
 *         return self[1]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Direction_.y", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":498
 * 
 *     @y.setter
 *     def y(self, value):             # <<<<<<<<<<<<<<
 *         self[1] = value
 *         self._normalise()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_10Direction__11y(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_10Direction__10y[] = "Direction_.y(self, value)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_10Direction__11y = {"y", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_10Direction__11y, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_10Direction__10y};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_10Direction__11y(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("y (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("y", 1, 2, 2, 1); __PYX_ERR(0, 498, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "y") < 0)) __PYX_ERR(0, 498, __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_self = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("y", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 498, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Direction_.y", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_10Direction__10y(__pyx_self, __pyx_v_self, __pyx_v_value);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_10Direction__10y(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__66)
  __Pyx_RefNannySetupContext("y", 0);
  __Pyx_TraceCall("y", __pyx_f[0], 498, 0, __PYX_ERR(0, 498, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":499
 *     @y.setter
 *     def y(self, value):
 *         self[1] = value             # <<<<<<<<<<<<<<
 *         self._normalise()
 * 
 */
  __Pyx_TraceLine(499,0,__PYX_ERR(0, 499, __pyx_L1_error))
  if (unlikely(__Pyx_SetItemInt(__pyx_v_self, 1, __pyx_v_value, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) __PYX_ERR(0, 499, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":500
 *     def y(self, value):
 *         self[1] = value
 *         self._normalise()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(500,0,__PYX_ERR(0, 500, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_normalise); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":498
 * 
 *     @y.setter
 *     def y(self, value):             # <<<<<<<<<<<<<<
 *         self[1] = value
 *         self._normalise()
 */

  /* 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_AddTraceback("km3pipe.dataclasses.Direction_.y", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":503
 * 
 *     @property
 *     def z(self):             # <<<<<<<<<<<<<<
 *         return self[2]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_10Direction__13z(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_10Direction__12z[] = "Direction_.z(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_10Direction__13z = {"z", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_10Direction__13z, METH_O, __pyx_doc_7km3pipe_11dataclasses_10Direction__12z};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_10Direction__13z(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("z (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_10Direction__12z(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_10Direction__12z(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__67)
  __Pyx_RefNannySetupContext("z", 0);
  __Pyx_TraceCall("z", __pyx_f[0], 503, 0, __PYX_ERR(0, 503, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":504
 *     @property
 *     def z(self):
 *         return self[2]             # <<<<<<<<<<<<<<
 * 
 *     @z.setter
 */
  __Pyx_TraceLine(504,0,__PYX_ERR(0, 504, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_self, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":503
 * 
 *     @property
 *     def z(self):             # <<<<<<<<<<<<<<
 *         return self[2]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Direction_.z", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":507
 * 
 *     @z.setter
 *     def z(self, value):             # <<<<<<<<<<<<<<
 *         self[2] = value
 *         self._normalise()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_10Direction__15z(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_10Direction__14z[] = "Direction_.z(self, value)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_10Direction__15z = {"z", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_10Direction__15z, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_10Direction__14z};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_10Direction__15z(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("z (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("z", 1, 2, 2, 1); __PYX_ERR(0, 507, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "z") < 0)) __PYX_ERR(0, 507, __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_self = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("z", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 507, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Direction_.z", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_10Direction__14z(__pyx_self, __pyx_v_self, __pyx_v_value);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_10Direction__14z(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__68)
  __Pyx_RefNannySetupContext("z", 0);
  __Pyx_TraceCall("z", __pyx_f[0], 507, 0, __PYX_ERR(0, 507, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":508
 *     @z.setter
 *     def z(self, value):
 *         self[2] = value             # <<<<<<<<<<<<<<
 *         self._normalise()
 * 
 */
  __Pyx_TraceLine(508,0,__PYX_ERR(0, 508, __pyx_L1_error))
  if (unlikely(__Pyx_SetItemInt(__pyx_v_self, 2, __pyx_v_value, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) __PYX_ERR(0, 508, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":509
 *     def z(self, value):
 *         self[2] = value
 *         self._normalise()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(509,0,__PYX_ERR(0, 509, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_normalise); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 509, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 509, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":507
 * 
 *     @z.setter
 *     def z(self, value):             # <<<<<<<<<<<<<<
 *         self[2] = value
 *         self._normalise()
 */

  /* 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_AddTraceback("km3pipe.dataclasses.Direction_.z", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":512
 * 
 *     @property
 *     def zenith(self):             # <<<<<<<<<<<<<<
 *         return angle_between(self, (0, 0, -1))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_10Direction__17zenith(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_10Direction__16zenith[] = "Direction_.zenith(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_10Direction__17zenith = {"zenith", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_10Direction__17zenith, METH_O, __pyx_doc_7km3pipe_11dataclasses_10Direction__16zenith};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_10Direction__17zenith(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("zenith (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_10Direction__16zenith(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_10Direction__16zenith(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__69)
  __Pyx_RefNannySetupContext("zenith", 0);
  __Pyx_TraceCall("zenith", __pyx_f[0], 512, 0, __PYX_ERR(0, 512, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":513
 *     @property
 *     def zenith(self):
 *         return angle_between(self, (0, 0, -1))             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_TraceLine(513,0,__PYX_ERR(0, 513, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_angle_between); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_self, __pyx_tuple__70};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 513, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_self, __pyx_tuple__70};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 513, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 513, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_self);
    __Pyx_INCREF(__pyx_tuple__70);
    __Pyx_GIVEREF(__pyx_tuple__70);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_tuple__70);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 513, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":512
 * 
 *     @property
 *     def zenith(self):             # <<<<<<<<<<<<<<
 *         return angle_between(self, (0, 0, -1))
 * 
 */

  /* 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_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.Direction_.zenith", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":515
 *         return angle_between(self, (0, 0, -1))
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "({0:.4}, {1:.4}, {2:.4})".format(self.x, self.y, self.z)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_10Direction__19__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_10Direction__18__str__[] = "Direction_.__str__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_10Direction__19__str__ = {"__str__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_10Direction__19__str__, METH_O, __pyx_doc_7km3pipe_11dataclasses_10Direction__18__str__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_10Direction__19__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_10Direction__18__str__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_10Direction__18__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__71)
  __Pyx_RefNannySetupContext("__str__", 0);
  __Pyx_TraceCall("__str__", __pyx_f[0], 515, 0, __PYX_ERR(0, 515, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":516
 * 
 *     def __str__(self):
 *         return "({0:.4}, {1:.4}, {2:.4})".format(self.x, self.y, self.z)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(516,0,__PYX_ERR(0, 516, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_4_1_4_2_4, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_y); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_z); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_3, __pyx_t_4, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_3, __pyx_t_4, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 516, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_5);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":515
 *         return angle_between(self, (0, 0, -1))
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "({0:.4}, {1:.4}, {2:.4})".format(self.x, self.y, self.z)
 * 
 */

  /* 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("km3pipe.dataclasses.Direction_.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":544
 *     cdef public float pos_x, pos_y, pos_z, dir_x, dir_y, dir_z, t0
 * 
 *     def __cinit__(self,             # <<<<<<<<<<<<<<
 *                   int channel_id,
 *                   float dir_x,
 */

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_channel_id;
  float __pyx_v_dir_x;
  float __pyx_v_dir_y;
  float __pyx_v_dir_z;
  int __pyx_v_dom_id;
  int __pyx_v_id;
  int __pyx_v_pmt_id;
  float __pyx_v_pos_x;
  float __pyx_v_pos_y;
  float __pyx_v_pos_z;
  int __pyx_v_t0;
  int __pyx_v_time;
  int __pyx_v_tot;
  unsigned short __pyx_v_triggered;
  CYTHON_UNUSED int __pyx_v_event_id;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_channel_id,&__pyx_n_s_dir_x,&__pyx_n_s_dir_y,&__pyx_n_s_dir_z,&__pyx_n_s_dom_id,&__pyx_n_s_id,&__pyx_n_s_pmt_id,&__pyx_n_s_pos_x,&__pyx_n_s_pos_y,&__pyx_n_s_pos_z,&__pyx_n_s_t0,&__pyx_n_s_time,&__pyx_n_s_tot,&__pyx_n_s_triggered,&__pyx_n_s_event_id,0};
    PyObject* values[15] = {0,0,0,0,0,0,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 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_channel_id)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dir_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 1); __PYX_ERR(0, 544, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dir_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 2); __PYX_ERR(0, 544, __pyx_L3_error)
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dir_z)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 3); __PYX_ERR(0, 544, __pyx_L3_error)
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dom_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 4); __PYX_ERR(0, 544, __pyx_L3_error)
        }
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 5); __PYX_ERR(0, 544, __pyx_L3_error)
        }
        case  6:
        if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pmt_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 6); __PYX_ERR(0, 544, __pyx_L3_error)
        }
        case  7:
        if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 7); __PYX_ERR(0, 544, __pyx_L3_error)
        }
        case  8:
        if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 8); __PYX_ERR(0, 544, __pyx_L3_error)
        }
        case  9:
        if (likely((values[9] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos_z)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 9); __PYX_ERR(0, 544, __pyx_L3_error)
        }
        case 10:
        if (likely((values[10] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_t0)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 10); __PYX_ERR(0, 544, __pyx_L3_error)
        }
        case 11:
        if (likely((values[11] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_time)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 11); __PYX_ERR(0, 544, __pyx_L3_error)
        }
        case 12:
        if (likely((values[12] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tot)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 12); __PYX_ERR(0, 544, __pyx_L3_error)
        }
        case 13:
        if (likely((values[13] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_triggered)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 13); __PYX_ERR(0, 544, __pyx_L3_error)
        }
        case 14:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id);
          if (value) { values[14] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 544, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
        case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
        values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
        values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
        values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        values[3] = PyTuple_GET_ITEM(__pyx_args, 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_channel_id = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_channel_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 545, __pyx_L3_error)
    __pyx_v_dir_x = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_dir_x == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 546, __pyx_L3_error)
    __pyx_v_dir_y = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_dir_y == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 547, __pyx_L3_error)
    __pyx_v_dir_z = __pyx_PyFloat_AsFloat(values[3]); if (unlikely((__pyx_v_dir_z == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 548, __pyx_L3_error)
    __pyx_v_dom_id = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_dom_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 549, __pyx_L3_error)
    __pyx_v_id = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 550, __pyx_L3_error)
    __pyx_v_pmt_id = __Pyx_PyInt_As_int(values[6]); if (unlikely((__pyx_v_pmt_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 551, __pyx_L3_error)
    __pyx_v_pos_x = __pyx_PyFloat_AsFloat(values[7]); if (unlikely((__pyx_v_pos_x == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 552, __pyx_L3_error)
    __pyx_v_pos_y = __pyx_PyFloat_AsFloat(values[8]); if (unlikely((__pyx_v_pos_y == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 553, __pyx_L3_error)
    __pyx_v_pos_z = __pyx_PyFloat_AsFloat(values[9]); if (unlikely((__pyx_v_pos_z == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 554, __pyx_L3_error)
    __pyx_v_t0 = __Pyx_PyInt_As_int(values[10]); if (unlikely((__pyx_v_t0 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 555, __pyx_L3_error)
    __pyx_v_time = __Pyx_PyInt_As_int(values[11]); if (unlikely((__pyx_v_time == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 556, __pyx_L3_error)
    __pyx_v_tot = __Pyx_PyInt_As_int(values[12]); if (unlikely((__pyx_v_tot == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 557, __pyx_L3_error)
    __pyx_v_triggered = __Pyx_PyInt_As_unsigned_short(values[13]); if (unlikely((__pyx_v_triggered == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(0, 558, __pyx_L3_error)
    if (values[14]) {
      __pyx_v_event_id = __Pyx_PyInt_As_int(values[14]); if (unlikely((__pyx_v_event_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 559, __pyx_L3_error)
    } else {
      __pyx_v_event_id = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 544, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit___cinit__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self), __pyx_v_channel_id, __pyx_v_dir_x, __pyx_v_dir_y, __pyx_v_dir_z, __pyx_v_dom_id, __pyx_v_id, __pyx_v_pmt_id, __pyx_v_pos_x, __pyx_v_pos_y, __pyx_v_pos_z, __pyx_v_t0, __pyx_v_time, __pyx_v_tot, __pyx_v_triggered, __pyx_v_event_id);

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

static int __pyx_pf_7km3pipe_11dataclasses_3Hit___cinit__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, int __pyx_v_channel_id, float __pyx_v_dir_x, float __pyx_v_dir_y, float __pyx_v_dir_z, int __pyx_v_dom_id, int __pyx_v_id, int __pyx_v_pmt_id, float __pyx_v_pos_x, float __pyx_v_pos_y, float __pyx_v_pos_z, int __pyx_v_t0, int __pyx_v_time, int __pyx_v_tot, unsigned short __pyx_v_triggered, CYTHON_UNUSED int __pyx_v_event_id) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 544, 0, __PYX_ERR(0, 544, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":561
 *                   int event_id=0        # ignore this!
 *                   ):
 *         self.channel_id = channel_id             # <<<<<<<<<<<<<<
 *         self.dir_x = dir_x
 *         self.dir_y = dir_y
 */
  __Pyx_TraceLine(561,0,__PYX_ERR(0, 561, __pyx_L1_error))
  __pyx_v_self->channel_id = __pyx_v_channel_id;

  /* "km3pipe/dataclasses.pyx":562
 *                   ):
 *         self.channel_id = channel_id
 *         self.dir_x = dir_x             # <<<<<<<<<<<<<<
 *         self.dir_y = dir_y
 *         self.dir_z = dir_z
 */
  __Pyx_TraceLine(562,0,__PYX_ERR(0, 562, __pyx_L1_error))
  __pyx_v_self->dir_x = __pyx_v_dir_x;

  /* "km3pipe/dataclasses.pyx":563
 *         self.channel_id = channel_id
 *         self.dir_x = dir_x
 *         self.dir_y = dir_y             # <<<<<<<<<<<<<<
 *         self.dir_z = dir_z
 *         self.dom_id = dom_id
 */
  __Pyx_TraceLine(563,0,__PYX_ERR(0, 563, __pyx_L1_error))
  __pyx_v_self->dir_y = __pyx_v_dir_y;

  /* "km3pipe/dataclasses.pyx":564
 *         self.dir_x = dir_x
 *         self.dir_y = dir_y
 *         self.dir_z = dir_z             # <<<<<<<<<<<<<<
 *         self.dom_id = dom_id
 *         self.id = id
 */
  __Pyx_TraceLine(564,0,__PYX_ERR(0, 564, __pyx_L1_error))
  __pyx_v_self->dir_z = __pyx_v_dir_z;

  /* "km3pipe/dataclasses.pyx":565
 *         self.dir_y = dir_y
 *         self.dir_z = dir_z
 *         self.dom_id = dom_id             # <<<<<<<<<<<<<<
 *         self.id = id
 *         self.pmt_id = pmt_id
 */
  __Pyx_TraceLine(565,0,__PYX_ERR(0, 565, __pyx_L1_error))
  __pyx_v_self->dom_id = __pyx_v_dom_id;

  /* "km3pipe/dataclasses.pyx":566
 *         self.dir_z = dir_z
 *         self.dom_id = dom_id
 *         self.id = id             # <<<<<<<<<<<<<<
 *         self.pmt_id = pmt_id
 *         self.pos_x = pos_x
 */
  __Pyx_TraceLine(566,0,__PYX_ERR(0, 566, __pyx_L1_error))
  __pyx_v_self->id = __pyx_v_id;

  /* "km3pipe/dataclasses.pyx":567
 *         self.dom_id = dom_id
 *         self.id = id
 *         self.pmt_id = pmt_id             # <<<<<<<<<<<<<<
 *         self.pos_x = pos_x
 *         self.pos_y = pos_y
 */
  __Pyx_TraceLine(567,0,__PYX_ERR(0, 567, __pyx_L1_error))
  __pyx_v_self->pmt_id = __pyx_v_pmt_id;

  /* "km3pipe/dataclasses.pyx":568
 *         self.id = id
 *         self.pmt_id = pmt_id
 *         self.pos_x = pos_x             # <<<<<<<<<<<<<<
 *         self.pos_y = pos_y
 *         self.pos_z = pos_z
 */
  __Pyx_TraceLine(568,0,__PYX_ERR(0, 568, __pyx_L1_error))
  __pyx_v_self->pos_x = __pyx_v_pos_x;

  /* "km3pipe/dataclasses.pyx":569
 *         self.pmt_id = pmt_id
 *         self.pos_x = pos_x
 *         self.pos_y = pos_y             # <<<<<<<<<<<<<<
 *         self.pos_z = pos_z
 *         self.t0 = t0
 */
  __Pyx_TraceLine(569,0,__PYX_ERR(0, 569, __pyx_L1_error))
  __pyx_v_self->pos_y = __pyx_v_pos_y;

  /* "km3pipe/dataclasses.pyx":570
 *         self.pos_x = pos_x
 *         self.pos_y = pos_y
 *         self.pos_z = pos_z             # <<<<<<<<<<<<<<
 *         self.t0 = t0
 *         self.time = time
 */
  __Pyx_TraceLine(570,0,__PYX_ERR(0, 570, __pyx_L1_error))
  __pyx_v_self->pos_z = __pyx_v_pos_z;

  /* "km3pipe/dataclasses.pyx":571
 *         self.pos_y = pos_y
 *         self.pos_z = pos_z
 *         self.t0 = t0             # <<<<<<<<<<<<<<
 *         self.time = time
 *         self.tot = tot
 */
  __Pyx_TraceLine(571,0,__PYX_ERR(0, 571, __pyx_L1_error))
  __pyx_v_self->t0 = __pyx_v_t0;

  /* "km3pipe/dataclasses.pyx":572
 *         self.pos_z = pos_z
 *         self.t0 = t0
 *         self.time = time             # <<<<<<<<<<<<<<
 *         self.tot = tot
 *         self.triggered = triggered
 */
  __Pyx_TraceLine(572,0,__PYX_ERR(0, 572, __pyx_L1_error))
  __pyx_v_self->time = __pyx_v_time;

  /* "km3pipe/dataclasses.pyx":573
 *         self.t0 = t0
 *         self.time = time
 *         self.tot = tot             # <<<<<<<<<<<<<<
 *         self.triggered = triggered
 * 
 */
  __Pyx_TraceLine(573,0,__PYX_ERR(0, 573, __pyx_L1_error))
  __pyx_v_self->tot = __pyx_v_tot;

  /* "km3pipe/dataclasses.pyx":574
 *         self.time = time
 *         self.tot = tot
 *         self.triggered = triggered             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(574,0,__PYX_ERR(0, 574, __pyx_L1_error))
  __pyx_v_self->triggered = __pyx_v_triggered;

  /* "km3pipe/dataclasses.pyx":544
 *     cdef public float pos_x, pos_y, pos_z, dir_x, dir_y, dir_z, t0
 * 
 *     def __cinit__(self,             # <<<<<<<<<<<<<<
 *                   int channel_id,
 *                   float dir_x,
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":577
 * 
 *     @property
 *     def dir(self):             # <<<<<<<<<<<<<<
 *         return np.array((self.dir_x, self.dir_y, self.dir_z))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_3dir_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_3dir_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_3dir___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_3dir___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 577, 0, __PYX_ERR(0, 577, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":578
 *     @property
 *     def dir(self):
 *         return np.array((self.dir_x, self.dir_y, self.dir_z))             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(578,0,__PYX_ERR(0, 578, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->dir_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->dir_y); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_self->dir_z); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5);
  __pyx_t_2 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 578, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 578, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 578, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 578, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 578, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":577
 * 
 *     @property
 *     def dir(self):             # <<<<<<<<<<<<<<
 *         return np.array((self.dir_x, self.dir_y, self.dir_z))
 * 
 */

  /* 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.dir.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":581
 * 
 *     @property
 *     def pos(self):             # <<<<<<<<<<<<<<
 *         return np.array((self.pos_x, self.pos_y, self.pos_z))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_3pos_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_3pos_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_3pos___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_3pos___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 581, 0, __PYX_ERR(0, 581, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":582
 *     @property
 *     def pos(self):
 *         return np.array((self.pos_x, self.pos_y, self.pos_z))             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_TraceLine(582,0,__PYX_ERR(0, 582, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->pos_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->pos_y); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_self->pos_z); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5);
  __pyx_t_2 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 582, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 582, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 582, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 582, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 582, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":581
 * 
 *     @property
 *     def pos(self):             # <<<<<<<<<<<<<<
 *         return np.array((self.pos_x, self.pos_y, self.pos_z))
 * 
 */

  /* 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.pos.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":584
 *         return np.array((self.pos_x, self.pos_y, self.pos_z))
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Hit: channel_id({0}), dom_id({1}), pmt_id({2}), tot({3}), " \
 *                "time({4}), triggered({5})" \
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_3__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_3__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_2__str__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_2__str__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  __Pyx_RefNannySetupContext("__str__", 0);
  __Pyx_TraceCall("__str__", __pyx_f[0], 584, 0, __PYX_ERR(0, 584, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":585
 * 
 *     def __str__(self):
 *         return "Hit: channel_id({0}), dom_id({1}), pmt_id({2}), tot({3}), " \             # <<<<<<<<<<<<<<
 *                "time({4}), triggered({5})" \
 *                .format(self.channel_id, self.dom_id, self.pmt_id, self.tot,
 */
  __Pyx_TraceLine(585,0,__PYX_ERR(0, 585, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);

  /* "km3pipe/dataclasses.pyx":587
 *         return "Hit: channel_id({0}), dom_id({1}), pmt_id({2}), tot({3}), " \
 *                "time({4}), triggered({5})" \
 *                .format(self.channel_id, self.dom_id, self.pmt_id, self.tot,             # <<<<<<<<<<<<<<
 *                        self.time, self.triggered)
 * 
 */
  __Pyx_TraceLine(587,0,__PYX_ERR(0, 587, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Hit_channel_id_0_dom_id_1_pmt_id, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->channel_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->dom_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->pmt_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->tot); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":588
 *                "time({4}), triggered({5})" \
 *                .format(self.channel_id, self.dom_id, self.pmt_id, self.tot,
 *                        self.time, self.triggered)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_TraceLine(588,0,__PYX_ERR(0, 588, __pyx_L1_error))
  __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_self->time); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyInt_From_unsigned_short(__pyx_v_self->triggered); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  __pyx_t_10 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_10 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[7] = {__pyx_t_9, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 6+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 587, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __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_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[7] = {__pyx_t_9, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 6+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 587, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __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_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  } else
  #endif
  {
    __pyx_t_11 = PyTuple_New(6+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 587, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    if (__pyx_t_9) {
      __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_10, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_11, 3+__pyx_t_10, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_11, 4+__pyx_t_10, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_11, 5+__pyx_t_10, __pyx_t_8);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_8 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 587, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":584
 *         return np.array((self.pos_x, self.pos_y, self.pos_z))
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Hit: channel_id({0}), dom_id({1}), pmt_id({2}), tot({3}), " \
 *                "time({4}), triggered({5})" \
 */

  /* 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_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_11);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":590
 *                        self.time, self.triggered)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_4__repr__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_4__repr__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 590, 0, __PYX_ERR(0, 590, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":591
 * 
 *     def __repr__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 *     def __insp__(self):
 */
  __Pyx_TraceLine(591,0,__PYX_ERR(0, 591, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 591, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 591, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":590
 *                        self.time, self.triggered)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":593
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_7__insp__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_3Hit_6__insp__[] = "Hit.__insp__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_3Hit_7__insp__ = {"__insp__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_3Hit_7__insp__, METH_NOARGS, __pyx_doc_7km3pipe_11dataclasses_3Hit_6__insp__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_7__insp__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__insp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_6__insp__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_6__insp__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__72)
  __Pyx_RefNannySetupContext("__insp__", 0);
  __Pyx_TraceCall("__insp__", __pyx_f[0], 593, 0, __PYX_ERR(0, 593, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":594
 * 
 *     def __insp__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(594,0,__PYX_ERR(0, 594, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 594, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 594, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":593
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.__insp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":540
 * 
 *     """
 *     cdef public int id, dom_id, time, tot, channel_id, pmt_id             # <<<<<<<<<<<<<<
 *     cdef public unsigned short int triggered
 *     cdef public float pos_x, pos_y, pos_z, dir_x, dir_y, dir_z, t0
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_2id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_2id_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_2id___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_2id___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 540, 0, __PYX_ERR(0, 540, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_2id_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_3Hit_2id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 540, 0, __PYX_ERR(0, 540, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 540, __pyx_L1_error)
  __pyx_v_self->id = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_6dom_id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_6dom_id_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_6dom_id___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_6dom_id___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 540, 0, __PYX_ERR(0, 540, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->dom_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.dom_id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_6dom_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_6dom_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_6dom_id_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_3Hit_6dom_id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 540, 0, __PYX_ERR(0, 540, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 540, __pyx_L1_error)
  __pyx_v_self->dom_id = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.dom_id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_4time_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_4time_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_4time___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_4time___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 540, 0, __PYX_ERR(0, 540, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.time.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_4time_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_4time_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_4time_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_3Hit_4time_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 540, 0, __PYX_ERR(0, 540, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 540, __pyx_L1_error)
  __pyx_v_self->time = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.time.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_3tot_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_3tot_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_3tot___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_3tot___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 540, 0, __PYX_ERR(0, 540, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->tot); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.tot.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_3tot_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_3tot_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_3tot_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_3Hit_3tot_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 540, 0, __PYX_ERR(0, 540, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 540, __pyx_L1_error)
  __pyx_v_self->tot = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.tot.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_10channel_id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_10channel_id_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_10channel_id___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_10channel_id___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 540, 0, __PYX_ERR(0, 540, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->channel_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.channel_id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_10channel_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_10channel_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_10channel_id_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_3Hit_10channel_id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 540, 0, __PYX_ERR(0, 540, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 540, __pyx_L1_error)
  __pyx_v_self->channel_id = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.channel_id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_6pmt_id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_6pmt_id_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_6pmt_id___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_6pmt_id___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 540, 0, __PYX_ERR(0, 540, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->pmt_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.pmt_id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_6pmt_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_6pmt_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_6pmt_id_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_3Hit_6pmt_id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 540, 0, __PYX_ERR(0, 540, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 540, __pyx_L1_error)
  __pyx_v_self->pmt_id = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.pmt_id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":541
 *     """
 *     cdef public int id, dom_id, time, tot, channel_id, pmt_id
 *     cdef public unsigned short int triggered             # <<<<<<<<<<<<<<
 *     cdef public float pos_x, pos_y, pos_z, dir_x, dir_y, dir_z, t0
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_9triggered_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_9triggered_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_9triggered___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_9triggered___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 541, 0, __PYX_ERR(0, 541, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_short(__pyx_v_self->triggered); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.triggered.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_9triggered_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_9triggered_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_9triggered_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_3Hit_9triggered_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  unsigned short __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 541, 0, __PYX_ERR(0, 541, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_unsigned_short(__pyx_v_value); if (unlikely((__pyx_t_1 == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(0, 541, __pyx_L1_error)
  __pyx_v_self->triggered = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.triggered.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":542
 *     cdef public int id, dom_id, time, tot, channel_id, pmt_id
 *     cdef public unsigned short int triggered
 *     cdef public float pos_x, pos_y, pos_z, dir_x, dir_y, dir_z, t0             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_5pos_x_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_5pos_x_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_5pos_x___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_5pos_x___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 542, 0, __PYX_ERR(0, 542, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->pos_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.pos_x.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_5pos_x_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_5pos_x_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_5pos_x_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_3Hit_5pos_x_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 542, 0, __PYX_ERR(0, 542, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 542, __pyx_L1_error)
  __pyx_v_self->pos_x = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.pos_x.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_5pos_y_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_5pos_y_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_5pos_y___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_5pos_y___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 542, 0, __PYX_ERR(0, 542, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->pos_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.pos_y.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_5pos_y_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_5pos_y_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_5pos_y_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_3Hit_5pos_y_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 542, 0, __PYX_ERR(0, 542, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 542, __pyx_L1_error)
  __pyx_v_self->pos_y = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.pos_y.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_5pos_z_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_5pos_z_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_5pos_z___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_5pos_z___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 542, 0, __PYX_ERR(0, 542, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->pos_z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.pos_z.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_5pos_z_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_5pos_z_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_5pos_z_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_3Hit_5pos_z_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 542, 0, __PYX_ERR(0, 542, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 542, __pyx_L1_error)
  __pyx_v_self->pos_z = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.pos_z.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_5dir_x_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_5dir_x_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_5dir_x___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_5dir_x___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 542, 0, __PYX_ERR(0, 542, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->dir_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.dir_x.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_5dir_x_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_5dir_x_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_5dir_x_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_3Hit_5dir_x_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 542, 0, __PYX_ERR(0, 542, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 542, __pyx_L1_error)
  __pyx_v_self->dir_x = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.dir_x.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_5dir_y_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_5dir_y_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_5dir_y___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_5dir_y___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 542, 0, __PYX_ERR(0, 542, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->dir_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.dir_y.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_5dir_y_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_5dir_y_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_5dir_y_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_3Hit_5dir_y_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 542, 0, __PYX_ERR(0, 542, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 542, __pyx_L1_error)
  __pyx_v_self->dir_y = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.dir_y.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_5dir_z_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_5dir_z_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_5dir_z___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_5dir_z___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 542, 0, __PYX_ERR(0, 542, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->dir_z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.dir_z.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_5dir_z_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_5dir_z_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_5dir_z_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_3Hit_5dir_z_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 542, 0, __PYX_ERR(0, 542, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 542, __pyx_L1_error)
  __pyx_v_self->dir_z = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.dir_z.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_2t0_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_2t0_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_2t0___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_2t0___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 542, 0, __PYX_ERR(0, 542, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->t0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.t0.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_2t0_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_2t0_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_2t0_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_3Hit_2t0_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 542, 0, __PYX_ERR(0, 542, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 542, __pyx_L1_error)
  __pyx_v_self->t0 = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.t0.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":612
 *     cdef public np.ndarray dir
 * 
 *     def __cinit__(self,             # <<<<<<<<<<<<<<
 *                   int channel_id,
 *                   int dom_id,
 */

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_channel_id;
  int __pyx_v_dom_id;
  int __pyx_v_time;
  int __pyx_v_tot;
  CYTHON_UNUSED int __pyx_v_frame_id;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_channel_id,&__pyx_n_s_dom_id,&__pyx_n_s_time,&__pyx_n_s_tot,&__pyx_n_s_frame_id,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_channel_id)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dom_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 4, 5, 1); __PYX_ERR(0, 612, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_time)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 4, 5, 2); __PYX_ERR(0, 612, __pyx_L3_error)
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tot)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 4, 5, 3); __PYX_ERR(0, 612, __pyx_L3_error)
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_frame_id);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 612, __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);
        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_channel_id = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_channel_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 613, __pyx_L3_error)
    __pyx_v_dom_id = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_dom_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 614, __pyx_L3_error)
    __pyx_v_time = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_time == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 615, __pyx_L3_error)
    __pyx_v_tot = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_tot == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 616, __pyx_L3_error)
    if (values[4]) {
      __pyx_v_frame_id = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_frame_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 617, __pyx_L3_error)
    } else {
      __pyx_v_frame_id = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 612, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit___cinit__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self), __pyx_v_channel_id, __pyx_v_dom_id, __pyx_v_time, __pyx_v_tot, __pyx_v_frame_id);

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

static int __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit___cinit__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self, int __pyx_v_channel_id, int __pyx_v_dom_id, int __pyx_v_time, int __pyx_v_tot, CYTHON_UNUSED int __pyx_v_frame_id) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 612, 0, __PYX_ERR(0, 612, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":619
 *                   int frame_id=0        # ignore this!
 *                   ):
 *         self.channel_id = channel_id             # <<<<<<<<<<<<<<
 *         self.dom_id = dom_id
 *         self.time = time
 */
  __Pyx_TraceLine(619,0,__PYX_ERR(0, 619, __pyx_L1_error))
  __pyx_v_self->channel_id = __pyx_v_channel_id;

  /* "km3pipe/dataclasses.pyx":620
 *                   ):
 *         self.channel_id = channel_id
 *         self.dom_id = dom_id             # <<<<<<<<<<<<<<
 *         self.time = time
 *         self.tot = tot
 */
  __Pyx_TraceLine(620,0,__PYX_ERR(0, 620, __pyx_L1_error))
  __pyx_v_self->dom_id = __pyx_v_dom_id;

  /* "km3pipe/dataclasses.pyx":621
 *         self.channel_id = channel_id
 *         self.dom_id = dom_id
 *         self.time = time             # <<<<<<<<<<<<<<
 *         self.tot = tot
 * 
 */
  __Pyx_TraceLine(621,0,__PYX_ERR(0, 621, __pyx_L1_error))
  __pyx_v_self->time = __pyx_v_time;

  /* "km3pipe/dataclasses.pyx":622
 *         self.dom_id = dom_id
 *         self.time = time
 *         self.tot = tot             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_TraceLine(622,0,__PYX_ERR(0, 622, __pyx_L1_error))
  __pyx_v_self->tot = __pyx_v_tot;

  /* "km3pipe/dataclasses.pyx":612
 *     cdef public np.ndarray dir
 * 
 *     def __cinit__(self,             # <<<<<<<<<<<<<<
 *                   int channel_id,
 *                   int dom_id,
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":624
 *         self.tot = tot
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "TimesliceHit: channel_id({0}), dom_id({1}), tot({2}), " \
 *                "time({3})" \
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_2__str__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_2__str__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__str__", 0);
  __Pyx_TraceCall("__str__", __pyx_f[0], 624, 0, __PYX_ERR(0, 624, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":625
 * 
 *     def __str__(self):
 *         return "TimesliceHit: channel_id({0}), dom_id({1}), tot({2}), " \             # <<<<<<<<<<<<<<
 *                "time({3})" \
 *                .format(self.channel_id, self.dom_id, self.tot, self.time)
 */
  __Pyx_TraceLine(625,0,__PYX_ERR(0, 625, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);

  /* "km3pipe/dataclasses.pyx":627
 *         return "TimesliceHit: channel_id({0}), dom_id({1}), tot({2}), " \
 *                "time({3})" \
 *                .format(self.channel_id, self.dom_id, self.tot, self.time)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_TraceLine(627,0,__PYX_ERR(0, 627, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_TimesliceHit_channel_id_0_dom_id, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->channel_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->dom_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->tot); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->time); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 627, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __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;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 627, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __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;
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(4+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 627, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_8, __pyx_t_6);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 627, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":624
 *         self.tot = tot
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "TimesliceHit: channel_id({0}), dom_id({1}), tot({2}), " \
 *                "time({3})" \
 */

  /* 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":629
 *                .format(self.channel_id, self.dom_id, self.tot, self.time)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_4__repr__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_4__repr__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 629, 0, __PYX_ERR(0, 629, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":630
 * 
 *     def __repr__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 *     def __insp__(self):
 */
  __Pyx_TraceLine(630,0,__PYX_ERR(0, 630, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 630, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 630, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":629
 *                .format(self.channel_id, self.dom_id, self.tot, self.time)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":632
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_7__insp__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12TimesliceHit_6__insp__[] = "TimesliceHit.__insp__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12TimesliceHit_7__insp__ = {"__insp__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_7__insp__, METH_NOARGS, __pyx_doc_7km3pipe_11dataclasses_12TimesliceHit_6__insp__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_7__insp__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__insp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_6__insp__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_6__insp__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__73)
  __Pyx_RefNannySetupContext("__insp__", 0);
  __Pyx_TraceCall("__insp__", __pyx_f[0], 632, 0, __PYX_ERR(0, 632, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":633
 * 
 *     def __insp__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(633,0,__PYX_ERR(0, 633, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 633, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 633, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":632
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.__insp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":608
 * 
 *     """
 *     cdef public int dom_id, time, tot, channel_id             # <<<<<<<<<<<<<<
 *     cdef public np.ndarray pos
 *     cdef public np.ndarray dir
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_6dom_id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_6dom_id_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_6dom_id___get__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_6dom_id___get__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 608, 0, __PYX_ERR(0, 608, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->dom_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.dom_id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_6dom_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_6dom_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_6dom_id_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_6dom_id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 608, 0, __PYX_ERR(0, 608, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 608, __pyx_L1_error)
  __pyx_v_self->dom_id = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.dom_id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_4time_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_4time_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_4time___get__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_4time___get__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 608, 0, __PYX_ERR(0, 608, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.time.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_4time_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_4time_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_4time_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_4time_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 608, 0, __PYX_ERR(0, 608, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 608, __pyx_L1_error)
  __pyx_v_self->time = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.time.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3tot_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3tot_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3tot___get__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3tot___get__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 608, 0, __PYX_ERR(0, 608, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->tot); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.tot.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3tot_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3tot_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3tot_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3tot_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 608, 0, __PYX_ERR(0, 608, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 608, __pyx_L1_error)
  __pyx_v_self->tot = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.tot.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_10channel_id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_10channel_id_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_10channel_id___get__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_10channel_id___get__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 608, 0, __PYX_ERR(0, 608, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->channel_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.channel_id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_10channel_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_10channel_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_10channel_id_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_10channel_id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 608, 0, __PYX_ERR(0, 608, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 608, __pyx_L1_error)
  __pyx_v_self->channel_id = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.channel_id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":609
 *     """
 *     cdef public int dom_id, time, tot, channel_id
 *     cdef public np.ndarray pos             # <<<<<<<<<<<<<<
 *     cdef public np.ndarray dir
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3pos_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3pos_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3pos___get__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3pos___get__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 609, 0, __PYX_ERR(0, 609, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->pos));
  __pyx_r = ((PyObject *)__pyx_v_self->pos);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.pos.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3pos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3pos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3pos_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3pos_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 609, 0, __PYX_ERR(0, 609, __pyx_L1_error));
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 609, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->pos);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->pos));
  __pyx_v_self->pos = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.pos.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3pos_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3pos_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3pos_4__del__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self));

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

static int __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3pos_4__del__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[0], 609, 0, __PYX_ERR(0, 609, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->pos);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->pos));
  __pyx_v_self->pos = ((PyArrayObject *)Py_None);

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.pos.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":610
 *     cdef public int dom_id, time, tot, channel_id
 *     cdef public np.ndarray pos
 *     cdef public np.ndarray dir             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3dir_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3dir_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3dir___get__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3dir___get__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 610, 0, __PYX_ERR(0, 610, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->dir));
  __pyx_r = ((PyObject *)__pyx_v_self->dir);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.dir.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3dir_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3dir_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3dir_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3dir_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 610, 0, __PYX_ERR(0, 610, __pyx_L1_error));
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 610, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->dir);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->dir));
  __pyx_v_self->dir = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.dir.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3dir_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3dir_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3dir_4__del__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self));

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

static int __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3dir_4__del__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[0], 610, 0, __PYX_ERR(0, 610, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->dir);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->dir));
  __pyx_v_self->dir = ((PyArrayObject *)Py_None);

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.dir.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":657
 *     cdef public np.ndarray dir
 * 
 *     def __cinit__(self,             # <<<<<<<<<<<<<<
 *                   int channel_id,
 *                   int dom_id,
 */

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5MCHit_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5MCHit_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_channel_id;
  int __pyx_v_dom_id;
  int __pyx_v_id;
  int __pyx_v_pmt_id;
  int __pyx_v_time;
  int __pyx_v_tot;
  unsigned short __pyx_v_triggered;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_channel_id,&__pyx_n_s_dom_id,&__pyx_n_s_id,&__pyx_n_s_pmt_id,&__pyx_n_s_time,&__pyx_n_s_tot,&__pyx_n_s_triggered,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_channel_id)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dom_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 1); __PYX_ERR(0, 657, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 2); __PYX_ERR(0, 657, __pyx_L3_error)
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pmt_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 3); __PYX_ERR(0, 657, __pyx_L3_error)
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_time)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 4); __PYX_ERR(0, 657, __pyx_L3_error)
        }
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tot)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 5); __PYX_ERR(0, 657, __pyx_L3_error)
        }
        case  6:
        if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_triggered)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 6); __PYX_ERR(0, 657, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 657, __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_channel_id = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_channel_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 658, __pyx_L3_error)
    __pyx_v_dom_id = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_dom_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 659, __pyx_L3_error)
    __pyx_v_id = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 660, __pyx_L3_error)
    __pyx_v_pmt_id = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_pmt_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 661, __pyx_L3_error)
    __pyx_v_time = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_time == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 662, __pyx_L3_error)
    __pyx_v_tot = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_tot == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 663, __pyx_L3_error)
    __pyx_v_triggered = __Pyx_PyInt_As_unsigned_short(values[6]); if (unlikely((__pyx_v_triggered == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(0, 664, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 657, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.MCHit.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5MCHit___cinit__(((struct __pyx_obj_7km3pipe_11dataclasses_MCHit *)__pyx_v_self), __pyx_v_channel_id, __pyx_v_dom_id, __pyx_v_id, __pyx_v_pmt_id, __pyx_v_time, __pyx_v_tot, __pyx_v_triggered);

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

static int __pyx_pf_7km3pipe_11dataclasses_5MCHit___cinit__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self, int __pyx_v_channel_id, int __pyx_v_dom_id, int __pyx_v_id, int __pyx_v_pmt_id, int __pyx_v_time, int __pyx_v_tot, unsigned short __pyx_v_triggered) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 657, 0, __PYX_ERR(0, 657, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":666
 *                   unsigned short int triggered,
 *                   ):
 *         self.channel_id = channel_id             # <<<<<<<<<<<<<<
 *         self.dom_id = dom_id
 *         self.id = id
 */
  __Pyx_TraceLine(666,0,__PYX_ERR(0, 666, __pyx_L1_error))
  __pyx_v_self->channel_id = __pyx_v_channel_id;

  /* "km3pipe/dataclasses.pyx":667
 *                   ):
 *         self.channel_id = channel_id
 *         self.dom_id = dom_id             # <<<<<<<<<<<<<<
 *         self.id = id
 *         self.pmt_id = pmt_id
 */
  __Pyx_TraceLine(667,0,__PYX_ERR(0, 667, __pyx_L1_error))
  __pyx_v_self->dom_id = __pyx_v_dom_id;

  /* "km3pipe/dataclasses.pyx":668
 *         self.channel_id = channel_id
 *         self.dom_id = dom_id
 *         self.id = id             # <<<<<<<<<<<<<<
 *         self.pmt_id = pmt_id
 *         self.time = time
 */
  __Pyx_TraceLine(668,0,__PYX_ERR(0, 668, __pyx_L1_error))
  __pyx_v_self->id = __pyx_v_id;

  /* "km3pipe/dataclasses.pyx":669
 *         self.dom_id = dom_id
 *         self.id = id
 *         self.pmt_id = pmt_id             # <<<<<<<<<<<<<<
 *         self.time = time
 *         self.tot = tot
 */
  __Pyx_TraceLine(669,0,__PYX_ERR(0, 669, __pyx_L1_error))
  __pyx_v_self->pmt_id = __pyx_v_pmt_id;

  /* "km3pipe/dataclasses.pyx":670
 *         self.id = id
 *         self.pmt_id = pmt_id
 *         self.time = time             # <<<<<<<<<<<<<<
 *         self.tot = tot
 *         self.triggered = triggered
 */
  __Pyx_TraceLine(670,0,__PYX_ERR(0, 670, __pyx_L1_error))
  __pyx_v_self->time = __pyx_v_time;

  /* "km3pipe/dataclasses.pyx":671
 *         self.pmt_id = pmt_id
 *         self.time = time
 *         self.tot = tot             # <<<<<<<<<<<<<<
 *         self.triggered = triggered
 * 
 */
  __Pyx_TraceLine(671,0,__PYX_ERR(0, 671, __pyx_L1_error))
  __pyx_v_self->tot = __pyx_v_tot;

  /* "km3pipe/dataclasses.pyx":672
 *         self.time = time
 *         self.tot = tot
 *         self.triggered = triggered             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_TraceLine(672,0,__PYX_ERR(0, 672, __pyx_L1_error))
  __pyx_v_self->triggered = __pyx_v_triggered;

  /* "km3pipe/dataclasses.pyx":657
 *     cdef public np.ndarray dir
 * 
 *     def __cinit__(self,             # <<<<<<<<<<<<<<
 *                   int channel_id,
 *                   int dom_id,
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.MCHit.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":674
 *         self.triggered = triggered
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Hit: channel_id({0}), dom_id({1}), pmt_id({2}), tot({3}), " \
 *                "time({4}), triggered({5})" \
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5MCHit_3__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5MCHit_3__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5MCHit_2__str__(((struct __pyx_obj_7km3pipe_11dataclasses_MCHit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5MCHit_2__str__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  __Pyx_RefNannySetupContext("__str__", 0);
  __Pyx_TraceCall("__str__", __pyx_f[0], 674, 0, __PYX_ERR(0, 674, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":675
 * 
 *     def __str__(self):
 *         return "Hit: channel_id({0}), dom_id({1}), pmt_id({2}), tot({3}), " \             # <<<<<<<<<<<<<<
 *                "time({4}), triggered({5})" \
 *                .format(self.channel_id, self.dom_id, self.pmt_id, self.tot,
 */
  __Pyx_TraceLine(675,0,__PYX_ERR(0, 675, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);

  /* "km3pipe/dataclasses.pyx":677
 *         return "Hit: channel_id({0}), dom_id({1}), pmt_id({2}), tot({3}), " \
 *                "time({4}), triggered({5})" \
 *                .format(self.channel_id, self.dom_id, self.pmt_id, self.tot,             # <<<<<<<<<<<<<<
 *                        self.time, self.triggered)
 * 
 */
  __Pyx_TraceLine(677,0,__PYX_ERR(0, 677, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Hit_channel_id_0_dom_id_1_pmt_id, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->channel_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->dom_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->pmt_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->tot); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":678
 *                "time({4}), triggered({5})" \
 *                .format(self.channel_id, self.dom_id, self.pmt_id, self.tot,
 *                        self.time, self.triggered)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_TraceLine(678,0,__PYX_ERR(0, 678, __pyx_L1_error))
  __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_self->time); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyInt_From_unsigned_short(__pyx_v_self->triggered); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  __pyx_t_10 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_10 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[7] = {__pyx_t_9, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 6+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 677, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __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_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[7] = {__pyx_t_9, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 6+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 677, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __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_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  } else
  #endif
  {
    __pyx_t_11 = PyTuple_New(6+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 677, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    if (__pyx_t_9) {
      __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_10, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_11, 3+__pyx_t_10, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_11, 4+__pyx_t_10, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_11, 5+__pyx_t_10, __pyx_t_8);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_8 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 677, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":674
 *         self.triggered = triggered
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Hit: channel_id({0}), dom_id({1}), pmt_id({2}), tot({3}), " \
 *                "time({4}), triggered({5})" \
 */

  /* 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_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_11);
  __Pyx_AddTraceback("km3pipe.dataclasses.MCHit.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":680
 *                        self.time, self.triggered)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5MCHit_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5MCHit_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5MCHit_4__repr__(((struct __pyx_obj_7km3pipe_11dataclasses_MCHit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5MCHit_4__repr__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 680, 0, __PYX_ERR(0, 680, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":681
 * 
 *     def __repr__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 *     def __insp__(self):
 */
  __Pyx_TraceLine(681,0,__PYX_ERR(0, 681, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 681, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 681, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 681, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":680
 *                        self.time, self.triggered)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.MCHit.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":683
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5MCHit_7__insp__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_5MCHit_6__insp__[] = "MCHit.__insp__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_5MCHit_7__insp__ = {"__insp__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_5MCHit_7__insp__, METH_NOARGS, __pyx_doc_7km3pipe_11dataclasses_5MCHit_6__insp__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5MCHit_7__insp__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__insp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5MCHit_6__insp__(((struct __pyx_obj_7km3pipe_11dataclasses_MCHit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5MCHit_6__insp__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__74)
  __Pyx_RefNannySetupContext("__insp__", 0);
  __Pyx_TraceCall("__insp__", __pyx_f[0], 683, 0, __PYX_ERR(0, 683, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":684
 * 
 *     def __insp__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(684,0,__PYX_ERR(0, 684, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 684, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 684, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":683
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.MCHit.__insp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":652
 * 
 *     """
 *     cdef public int id, dom_id, time, tot, channel_id, pmt_id             # <<<<<<<<<<<<<<
 *     cdef public unsigned short int triggered
 *     cdef public np.ndarray pos
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5MCHit_2id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5MCHit_2id_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5MCHit_2id___get__(((struct __pyx_obj_7km3pipe_11dataclasses_MCHit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5MCHit_2id___get__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 652, 0, __PYX_ERR(0, 652, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.MCHit.id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5MCHit_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5MCHit_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5MCHit_2id_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_MCHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_5MCHit_2id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 652, 0, __PYX_ERR(0, 652, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 652, __pyx_L1_error)
  __pyx_v_self->id = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.MCHit.id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5MCHit_6dom_id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5MCHit_6dom_id_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5MCHit_6dom_id___get__(((struct __pyx_obj_7km3pipe_11dataclasses_MCHit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5MCHit_6dom_id___get__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 652, 0, __PYX_ERR(0, 652, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->dom_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.MCHit.dom_id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5MCHit_6dom_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5MCHit_6dom_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5MCHit_6dom_id_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_MCHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_5MCHit_6dom_id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 652, 0, __PYX_ERR(0, 652, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 652, __pyx_L1_error)
  __pyx_v_self->dom_id = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.MCHit.dom_id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5MCHit_4time_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5MCHit_4time_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5MCHit_4time___get__(((struct __pyx_obj_7km3pipe_11dataclasses_MCHit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5MCHit_4time___get__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 652, 0, __PYX_ERR(0, 652, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.MCHit.time.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5MCHit_4time_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5MCHit_4time_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5MCHit_4time_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_MCHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_5MCHit_4time_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 652, 0, __PYX_ERR(0, 652, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 652, __pyx_L1_error)
  __pyx_v_self->time = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.MCHit.time.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5MCHit_3tot_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5MCHit_3tot_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5MCHit_3tot___get__(((struct __pyx_obj_7km3pipe_11dataclasses_MCHit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5MCHit_3tot___get__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 652, 0, __PYX_ERR(0, 652, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->tot); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.MCHit.tot.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5MCHit_3tot_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5MCHit_3tot_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5MCHit_3tot_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_MCHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_5MCHit_3tot_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 652, 0, __PYX_ERR(0, 652, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 652, __pyx_L1_error)
  __pyx_v_self->tot = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.MCHit.tot.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5MCHit_10channel_id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5MCHit_10channel_id_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5MCHit_10channel_id___get__(((struct __pyx_obj_7km3pipe_11dataclasses_MCHit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5MCHit_10channel_id___get__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 652, 0, __PYX_ERR(0, 652, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->channel_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.MCHit.channel_id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5MCHit_10channel_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5MCHit_10channel_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5MCHit_10channel_id_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_MCHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_5MCHit_10channel_id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 652, 0, __PYX_ERR(0, 652, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 652, __pyx_L1_error)
  __pyx_v_self->channel_id = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.MCHit.channel_id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5MCHit_6pmt_id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5MCHit_6pmt_id_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5MCHit_6pmt_id___get__(((struct __pyx_obj_7km3pipe_11dataclasses_MCHit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5MCHit_6pmt_id___get__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 652, 0, __PYX_ERR(0, 652, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->pmt_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.MCHit.pmt_id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5MCHit_6pmt_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5MCHit_6pmt_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5MCHit_6pmt_id_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_MCHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_5MCHit_6pmt_id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 652, 0, __PYX_ERR(0, 652, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 652, __pyx_L1_error)
  __pyx_v_self->pmt_id = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.MCHit.pmt_id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":653
 *     """
 *     cdef public int id, dom_id, time, tot, channel_id, pmt_id
 *     cdef public unsigned short int triggered             # <<<<<<<<<<<<<<
 *     cdef public np.ndarray pos
 *     cdef public np.ndarray dir
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5MCHit_9triggered_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5MCHit_9triggered_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5MCHit_9triggered___get__(((struct __pyx_obj_7km3pipe_11dataclasses_MCHit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5MCHit_9triggered___get__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 653, 0, __PYX_ERR(0, 653, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_short(__pyx_v_self->triggered); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.MCHit.triggered.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5MCHit_9triggered_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5MCHit_9triggered_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5MCHit_9triggered_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_MCHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_5MCHit_9triggered_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  unsigned short __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 653, 0, __PYX_ERR(0, 653, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_unsigned_short(__pyx_v_value); if (unlikely((__pyx_t_1 == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(0, 653, __pyx_L1_error)
  __pyx_v_self->triggered = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.MCHit.triggered.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":654
 *     cdef public int id, dom_id, time, tot, channel_id, pmt_id
 *     cdef public unsigned short int triggered
 *     cdef public np.ndarray pos             # <<<<<<<<<<<<<<
 *     cdef public np.ndarray dir
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5MCHit_3pos_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5MCHit_3pos_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5MCHit_3pos___get__(((struct __pyx_obj_7km3pipe_11dataclasses_MCHit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5MCHit_3pos___get__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 654, 0, __PYX_ERR(0, 654, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->pos));
  __pyx_r = ((PyObject *)__pyx_v_self->pos);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.MCHit.pos.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5MCHit_3pos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5MCHit_3pos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5MCHit_3pos_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_MCHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_5MCHit_3pos_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 654, 0, __PYX_ERR(0, 654, __pyx_L1_error));
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 654, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->pos);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->pos));
  __pyx_v_self->pos = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.MCHit.pos.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5MCHit_3pos_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5MCHit_3pos_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5MCHit_3pos_4__del__(((struct __pyx_obj_7km3pipe_11dataclasses_MCHit *)__pyx_v_self));

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

static int __pyx_pf_7km3pipe_11dataclasses_5MCHit_3pos_4__del__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[0], 654, 0, __PYX_ERR(0, 654, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->pos);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->pos));
  __pyx_v_self->pos = ((PyArrayObject *)Py_None);

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.MCHit.pos.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":655
 *     cdef public unsigned short int triggered
 *     cdef public np.ndarray pos
 *     cdef public np.ndarray dir             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5MCHit_3dir_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5MCHit_3dir_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5MCHit_3dir___get__(((struct __pyx_obj_7km3pipe_11dataclasses_MCHit *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5MCHit_3dir___get__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 655, 0, __PYX_ERR(0, 655, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->dir));
  __pyx_r = ((PyObject *)__pyx_v_self->dir);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.MCHit.dir.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5MCHit_3dir_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5MCHit_3dir_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5MCHit_3dir_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_MCHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_5MCHit_3dir_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 655, 0, __PYX_ERR(0, 655, __pyx_L1_error));
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 655, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->dir);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->dir));
  __pyx_v_self->dir = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.MCHit.dir.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5MCHit_3dir_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5MCHit_3dir_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5MCHit_3dir_4__del__(((struct __pyx_obj_7km3pipe_11dataclasses_MCHit *)__pyx_v_self));

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

static int __pyx_pf_7km3pipe_11dataclasses_5MCHit_3dir_4__del__(struct __pyx_obj_7km3pipe_11dataclasses_MCHit *__pyx_v_self) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[0], 655, 0, __PYX_ERR(0, 655, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->dir);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->dir));
  __pyx_v_self->dir = ((PyArrayObject *)Py_None);

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.MCHit.dir.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":709
 *     cdef public np.ndarray dir
 * 
 *     def __cinit__(self,             # <<<<<<<<<<<<<<
 *                   float bjorkeny,
 *                   dir,
 */

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5Track_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5Track_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  float __pyx_v_bjorkeny;
  PyObject *__pyx_v_dir = 0;
  float __pyx_v_energy;
  int __pyx_v_id;
  __pyx_t_5numpy_int64_t __pyx_v_interaction_channel;
  unsigned short __pyx_v_is_cc;
  float __pyx_v_length;
  PyObject *__pyx_v_pos = 0;
  int __pyx_v_time;
  int __pyx_v_type;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_bjorkeny,&__pyx_n_s_dir,&__pyx_n_s_energy,&__pyx_n_s_id,&__pyx_n_s_interaction_channel,&__pyx_n_s_is_cc,&__pyx_n_s_length,&__pyx_n_s_pos,&__pyx_n_s_time,&__pyx_n_s_type,0};
    PyObject* values[10] = {0,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 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_bjorkeny)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dir)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 10, 10, 1); __PYX_ERR(0, 709, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_energy)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 10, 10, 2); __PYX_ERR(0, 709, __pyx_L3_error)
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 10, 10, 3); __PYX_ERR(0, 709, __pyx_L3_error)
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_interaction_channel)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 10, 10, 4); __PYX_ERR(0, 709, __pyx_L3_error)
        }
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_is_cc)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 10, 10, 5); __PYX_ERR(0, 709, __pyx_L3_error)
        }
        case  6:
        if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_length)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 10, 10, 6); __PYX_ERR(0, 709, __pyx_L3_error)
        }
        case  7:
        if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 10, 10, 7); __PYX_ERR(0, 709, __pyx_L3_error)
        }
        case  8:
        if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_time)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 10, 10, 8); __PYX_ERR(0, 709, __pyx_L3_error)
        }
        case  9:
        if (likely((values[9] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_type)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 10, 10, 9); __PYX_ERR(0, 709, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 709, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 10) {
      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);
      values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
    }
    __pyx_v_bjorkeny = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_bjorkeny == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 710, __pyx_L3_error)
    __pyx_v_dir = values[1];
    __pyx_v_energy = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_energy == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 712, __pyx_L3_error)
    __pyx_v_id = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 713, __pyx_L3_error)
    __pyx_v_interaction_channel = __Pyx_PyInt_As_npy_int64(values[4]); if (unlikely((__pyx_v_interaction_channel == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 714, __pyx_L3_error)
    __pyx_v_is_cc = __Pyx_PyInt_As_unsigned_short(values[5]); if (unlikely((__pyx_v_is_cc == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(0, 715, __pyx_L3_error)
    __pyx_v_length = __pyx_PyFloat_AsFloat(values[6]); if (unlikely((__pyx_v_length == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 716, __pyx_L3_error)
    __pyx_v_pos = values[7];
    __pyx_v_time = __Pyx_PyInt_As_int(values[8]); if (unlikely((__pyx_v_time == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 718, __pyx_L3_error)
    __pyx_v_type = __Pyx_PyInt_As_int(values[9]); if (unlikely((__pyx_v_type == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 719, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 10, 10, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 709, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track___cinit__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self), __pyx_v_bjorkeny, __pyx_v_dir, __pyx_v_energy, __pyx_v_id, __pyx_v_interaction_channel, __pyx_v_is_cc, __pyx_v_length, __pyx_v_pos, __pyx_v_time, __pyx_v_type);

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

static int __pyx_pf_7km3pipe_11dataclasses_5Track___cinit__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, float __pyx_v_bjorkeny, PyObject *__pyx_v_dir, float __pyx_v_energy, int __pyx_v_id, __pyx_t_5numpy_int64_t __pyx_v_interaction_channel, unsigned short __pyx_v_is_cc, float __pyx_v_length, PyObject *__pyx_v_pos, int __pyx_v_time, int __pyx_v_type) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 709, 0, __PYX_ERR(0, 709, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":721
 *                   int type
 *                   ):
 *         self.bjorkeny = bjorkeny             # <<<<<<<<<<<<<<
 *         self.is_cc = is_cc
 *         self.dir = dir
 */
  __Pyx_TraceLine(721,0,__PYX_ERR(0, 721, __pyx_L1_error))
  __pyx_v_self->bjorkeny = __pyx_v_bjorkeny;

  /* "km3pipe/dataclasses.pyx":722
 *                   ):
 *         self.bjorkeny = bjorkeny
 *         self.is_cc = is_cc             # <<<<<<<<<<<<<<
 *         self.dir = dir
 *         self.energy = energy
 */
  __Pyx_TraceLine(722,0,__PYX_ERR(0, 722, __pyx_L1_error))
  __pyx_v_self->is_cc = __pyx_v_is_cc;

  /* "km3pipe/dataclasses.pyx":723
 *         self.bjorkeny = bjorkeny
 *         self.is_cc = is_cc
 *         self.dir = dir             # <<<<<<<<<<<<<<
 *         self.energy = energy
 *         self.interaction_channel = interaction_channel
 */
  __Pyx_TraceLine(723,0,__PYX_ERR(0, 723, __pyx_L1_error))
  if (!(likely(((__pyx_v_dir) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dir, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 723, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_dir;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->dir);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->dir));
  __pyx_v_self->dir = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":724
 *         self.is_cc = is_cc
 *         self.dir = dir
 *         self.energy = energy             # <<<<<<<<<<<<<<
 *         self.interaction_channel = interaction_channel
 *         self.id = id
 */
  __Pyx_TraceLine(724,0,__PYX_ERR(0, 724, __pyx_L1_error))
  __pyx_v_self->energy = __pyx_v_energy;

  /* "km3pipe/dataclasses.pyx":725
 *         self.dir = dir
 *         self.energy = energy
 *         self.interaction_channel = interaction_channel             # <<<<<<<<<<<<<<
 *         self.id = id
 *         self.length = length
 */
  __Pyx_TraceLine(725,0,__PYX_ERR(0, 725, __pyx_L1_error))
  __pyx_v_self->interaction_channel = __pyx_v_interaction_channel;

  /* "km3pipe/dataclasses.pyx":726
 *         self.energy = energy
 *         self.interaction_channel = interaction_channel
 *         self.id = id             # <<<<<<<<<<<<<<
 *         self.length = length
 *         self.pos = pos
 */
  __Pyx_TraceLine(726,0,__PYX_ERR(0, 726, __pyx_L1_error))
  __pyx_v_self->id = __pyx_v_id;

  /* "km3pipe/dataclasses.pyx":727
 *         self.interaction_channel = interaction_channel
 *         self.id = id
 *         self.length = length             # <<<<<<<<<<<<<<
 *         self.pos = pos
 *         self.time = time
 */
  __Pyx_TraceLine(727,0,__PYX_ERR(0, 727, __pyx_L1_error))
  __pyx_v_self->length = __pyx_v_length;

  /* "km3pipe/dataclasses.pyx":728
 *         self.id = id
 *         self.length = length
 *         self.pos = pos             # <<<<<<<<<<<<<<
 *         self.time = time
 *         self.type = type
 */
  __Pyx_TraceLine(728,0,__PYX_ERR(0, 728, __pyx_L1_error))
  if (!(likely(((__pyx_v_pos) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_pos, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 728, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_pos;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->pos);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->pos));
  __pyx_v_self->pos = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":729
 *         self.length = length
 *         self.pos = pos
 *         self.time = time             # <<<<<<<<<<<<<<
 *         self.type = type
 * 
 */
  __Pyx_TraceLine(729,0,__PYX_ERR(0, 729, __pyx_L1_error))
  __pyx_v_self->time = __pyx_v_time;

  /* "km3pipe/dataclasses.pyx":730
 *         self.pos = pos
 *         self.time = time
 *         self.type = type             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_TraceLine(730,0,__PYX_ERR(0, 730, __pyx_L1_error))
  __pyx_v_self->type = __pyx_v_type;

  /* "km3pipe/dataclasses.pyx":709
 *     cdef public np.ndarray dir
 * 
 *     def __cinit__(self,             # <<<<<<<<<<<<<<
 *                   float bjorkeny,
 *                   dir,
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":732
 *         self.type = type
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Track: pos({0}), dir({1}), t={2}, E={3}, type={4} ({5})" \
 *                .format(self.pos, self.dir, self.time, self.energy,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_3__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_3__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_2__str__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_2__str__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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;
  int __pyx_t_11;
  __Pyx_RefNannySetupContext("__str__", 0);
  __Pyx_TraceCall("__str__", __pyx_f[0], 732, 0, __PYX_ERR(0, 732, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":733
 * 
 *     def __str__(self):
 *         return "Track: pos({0}), dir({1}), t={2}, E={3}, type={4} ({5})" \             # <<<<<<<<<<<<<<
 *                .format(self.pos, self.dir, self.time, self.energy,
 *                        self.type, pdg2name(self.type))
 */
  __Pyx_TraceLine(733,0,__PYX_ERR(0, 733, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);

  /* "km3pipe/dataclasses.pyx":734
 *     def __str__(self):
 *         return "Track: pos({0}), dir({1}), t={2}, E={3}, type={4} ({5})" \
 *                .format(self.pos, self.dir, self.time, self.energy,             # <<<<<<<<<<<<<<
 *                        self.type, pdg2name(self.type))
 * 
 */
  __Pyx_TraceLine(734,0,__PYX_ERR(0, 734, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Track_pos_0_dir_1_t_2_E_3_type_4, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->energy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "km3pipe/dataclasses.pyx":735
 *         return "Track: pos({0}), dir({1}), t={2}, E={3}, type={4} ({5})" \
 *                .format(self.pos, self.dir, self.time, self.energy,
 *                        self.type, pdg2name(self.type))             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_TraceLine(735,0,__PYX_ERR(0, 735, __pyx_L1_error))
  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdg2name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_self->type); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  if (!__pyx_t_9) {
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 735, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_6);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_8};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 735, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_8};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 735, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    {
      __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 735, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 735, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = NULL;
  __pyx_t_11 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_11 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[7] = {__pyx_t_7, ((PyObject *)__pyx_v_self->pos), ((PyObject *)__pyx_v_self->dir), __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_11, 6+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 734, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __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;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[7] = {__pyx_t_7, ((PyObject *)__pyx_v_self->pos), ((PyObject *)__pyx_v_self->dir), __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_11, 6+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 734, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __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;
  } else
  #endif
  {
    __pyx_t_10 = PyTuple_New(6+__pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 734, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_self->pos));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self->pos));
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_11, ((PyObject *)__pyx_v_self->pos));
    __Pyx_INCREF(((PyObject *)__pyx_v_self->dir));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self->dir));
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_11, ((PyObject *)__pyx_v_self->dir));
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_11, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_10, 3+__pyx_t_11, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_10, 4+__pyx_t_11, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_10, 5+__pyx_t_11, __pyx_t_6);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 734, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":732
 *         self.type = type
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Track: pos({0}), dir({1}), t={2}, E={3}, type={4} ({5})" \
 *                .format(self.pos, self.dir, self.time, self.energy,
 */

  /* 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_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_AddTraceback("km3pipe.dataclasses.Track.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":737
 *                        self.type, pdg2name(self.type))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_4__repr__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_4__repr__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 737, 0, __PYX_ERR(0, 737, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":738
 * 
 *     def __repr__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 *     def __insp__(self):
 */
  __Pyx_TraceLine(738,0,__PYX_ERR(0, 738, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 738, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 738, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":737
 *                        self.type, pdg2name(self.type))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":740
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_7__insp__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_5Track_6__insp__[] = "Track.__insp__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_5Track_7__insp__ = {"__insp__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_5Track_7__insp__, METH_NOARGS, __pyx_doc_7km3pipe_11dataclasses_5Track_6__insp__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_7__insp__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__insp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_6__insp__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_6__insp__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__75)
  __Pyx_RefNannySetupContext("__insp__", 0);
  __Pyx_TraceCall("__insp__", __pyx_f[0], 740, 0, __PYX_ERR(0, 740, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":741
 * 
 *     def __insp__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(741,0,__PYX_ERR(0, 741, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 741, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 741, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":740
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.__insp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":703
 *     type : int
 *     """
 *     cdef public int id, time, type, interaction_channel             # <<<<<<<<<<<<<<
 *     cdef public float energy, length, bjorkeny
 *     cdef public unsigned short int is_cc
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_2id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_2id_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_2id___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_2id___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 703, 0, __PYX_ERR(0, 703, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5Track_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5Track_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_2id_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_5Track_2id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 703, 0, __PYX_ERR(0, 703, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 703, __pyx_L1_error)
  __pyx_v_self->id = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_4time_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_4time_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_4time___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_4time___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 703, 0, __PYX_ERR(0, 703, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.time.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5Track_4time_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5Track_4time_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_4time_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_5Track_4time_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 703, 0, __PYX_ERR(0, 703, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 703, __pyx_L1_error)
  __pyx_v_self->time = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.time.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_4type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_4type_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_4type___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_4type___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 703, 0, __PYX_ERR(0, 703, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5Track_4type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5Track_4type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_4type_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_5Track_4type_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 703, 0, __PYX_ERR(0, 703, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 703, __pyx_L1_error)
  __pyx_v_self->type = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.type.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_19interaction_channel_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_19interaction_channel_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_19interaction_channel___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_19interaction_channel___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 703, 0, __PYX_ERR(0, 703, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->interaction_channel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.interaction_channel.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5Track_19interaction_channel_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5Track_19interaction_channel_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_19interaction_channel_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_5Track_19interaction_channel_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 703, 0, __PYX_ERR(0, 703, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 703, __pyx_L1_error)
  __pyx_v_self->interaction_channel = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.interaction_channel.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":704
 *     """
 *     cdef public int id, time, type, interaction_channel
 *     cdef public float energy, length, bjorkeny             # <<<<<<<<<<<<<<
 *     cdef public unsigned short int is_cc
 *     cdef public np.ndarray pos
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_6energy_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_6energy_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_6energy___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_6energy___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 704, 0, __PYX_ERR(0, 704, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->energy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 704, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.energy.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5Track_6energy_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5Track_6energy_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_6energy_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_5Track_6energy_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 704, 0, __PYX_ERR(0, 704, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 704, __pyx_L1_error)
  __pyx_v_self->energy = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.energy.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_6length_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_6length_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_6length___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_6length___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 704, 0, __PYX_ERR(0, 704, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 704, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.length.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5Track_6length_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5Track_6length_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_6length_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_5Track_6length_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 704, 0, __PYX_ERR(0, 704, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 704, __pyx_L1_error)
  __pyx_v_self->length = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.length.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_8bjorkeny_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_8bjorkeny_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_8bjorkeny___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_8bjorkeny___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 704, 0, __PYX_ERR(0, 704, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->bjorkeny); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 704, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.bjorkeny.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5Track_8bjorkeny_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5Track_8bjorkeny_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_8bjorkeny_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_5Track_8bjorkeny_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 704, 0, __PYX_ERR(0, 704, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 704, __pyx_L1_error)
  __pyx_v_self->bjorkeny = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.bjorkeny.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":705
 *     cdef public int id, time, type, interaction_channel
 *     cdef public float energy, length, bjorkeny
 *     cdef public unsigned short int is_cc             # <<<<<<<<<<<<<<
 *     cdef public np.ndarray pos
 *     cdef public np.ndarray dir
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_5is_cc_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_5is_cc_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_5is_cc___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_5is_cc___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 705, 0, __PYX_ERR(0, 705, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_short(__pyx_v_self->is_cc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.is_cc.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5Track_5is_cc_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5Track_5is_cc_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_5is_cc_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_5Track_5is_cc_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  unsigned short __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 705, 0, __PYX_ERR(0, 705, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_unsigned_short(__pyx_v_value); if (unlikely((__pyx_t_1 == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(0, 705, __pyx_L1_error)
  __pyx_v_self->is_cc = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.is_cc.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":706
 *     cdef public float energy, length, bjorkeny
 *     cdef public unsigned short int is_cc
 *     cdef public np.ndarray pos             # <<<<<<<<<<<<<<
 *     cdef public np.ndarray dir
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_3pos_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_3pos_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_3pos___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_3pos___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 706, 0, __PYX_ERR(0, 706, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->pos));
  __pyx_r = ((PyObject *)__pyx_v_self->pos);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.pos.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5Track_3pos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5Track_3pos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_3pos_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_5Track_3pos_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 706, 0, __PYX_ERR(0, 706, __pyx_L1_error));
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 706, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->pos);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->pos));
  __pyx_v_self->pos = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.pos.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5Track_3pos_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5Track_3pos_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_3pos_4__del__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self));

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

static int __pyx_pf_7km3pipe_11dataclasses_5Track_3pos_4__del__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[0], 706, 0, __PYX_ERR(0, 706, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->pos);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->pos));
  __pyx_v_self->pos = ((PyArrayObject *)Py_None);

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.pos.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":707
 *     cdef public unsigned short int is_cc
 *     cdef public np.ndarray pos
 *     cdef public np.ndarray dir             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_3dir_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_3dir_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_3dir___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_3dir___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 707, 0, __PYX_ERR(0, 707, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->dir));
  __pyx_r = ((PyObject *)__pyx_v_self->dir);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.dir.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5Track_3dir_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5Track_3dir_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_3dir_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7km3pipe_11dataclasses_5Track_3dir_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 707, 0, __PYX_ERR(0, 707, __pyx_L1_error));
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 707, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->dir);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->dir));
  __pyx_v_self->dir = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.dir.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5Track_3dir_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5Track_3dir_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_3dir_4__del__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self));

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

static int __pyx_pf_7km3pipe_11dataclasses_5Track_3dir_4__del__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[0], 707, 0, __PYX_ERR(0, 707, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->dir);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->dir));
  __pyx_v_self->dir = ((PyArrayObject *)Py_None);

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.dir.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":766
 *     ])
 * 
 *     def __init__(self, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries___init__[] = "HitSeries.__init__(self, arr, h5loc='/')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_1__init__ = {"__init__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9HitSeries___init__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_arr,&__pyx_n_s_h5loc,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); __PYX_ERR(0, 766, __pyx_L3_error)
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 766, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        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_arr = values[1];
    __pyx_v_h5loc = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 766, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries___init__(__pyx_self, __pyx_v_self, __pyx_v_arr, __pyx_v_h5loc);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_h5loc) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__76)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 766, 0, __PYX_ERR(0, 766, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":767
 * 
 *     def __init__(self, arr, h5loc='/'):
 *         self._arr = arr             # <<<<<<<<<<<<<<
 *         self._index = 0
 *         self._hits = None
 */
  __Pyx_TraceLine(767,0,__PYX_ERR(0, 767, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_arr_2, __pyx_v_arr) < 0) __PYX_ERR(0, 767, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":768
 *     def __init__(self, arr, h5loc='/'):
 *         self._arr = arr
 *         self._index = 0             # <<<<<<<<<<<<<<
 *         self._hits = None
 *         self.h5loc = h5loc
 */
  __Pyx_TraceLine(768,0,__PYX_ERR(0, 768, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index, __pyx_int_0) < 0) __PYX_ERR(0, 768, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":769
 *         self._arr = arr
 *         self._index = 0
 *         self._hits = None             # <<<<<<<<<<<<<<
 *         self.h5loc = h5loc
 * 
 */
  __Pyx_TraceLine(769,0,__PYX_ERR(0, 769, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_hits, Py_None) < 0) __PYX_ERR(0, 769, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":770
 *         self._index = 0
 *         self._hits = None
 *         self.h5loc = h5loc             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(770,0,__PYX_ERR(0, 770, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_h5loc, __pyx_v_h5loc) < 0) __PYX_ERR(0, 770, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":766
 *     ])
 * 
 *     def __init__(self, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":773
 * 
 *     @classmethod
 *     def from_aanet(cls, hits, event_id):             # <<<<<<<<<<<<<<
 *         try:
 *             return cls(np.array([(
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_3from_aanet(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_2from_aanet[] = "HitSeries.from_aanet(cls, hits, event_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_3from_aanet = {"from_aanet", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_3from_aanet, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_2from_aanet};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_3from_aanet(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_hits = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_aanet (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_hits_2,&__pyx_n_s_event_id,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_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_hits_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_aanet", 1, 3, 3, 1); __PYX_ERR(0, 773, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_aanet", 1, 3, 3, 2); __PYX_ERR(0, 773, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_aanet") < 0)) __PYX_ERR(0, 773, __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_cls = values[0];
    __pyx_v_hits = values[1];
    __pyx_v_event_id = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_aanet", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 773, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.from_aanet", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_2from_aanet(__pyx_self, __pyx_v_cls, __pyx_v_hits, __pyx_v_event_id);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_2from_aanet(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_hits, PyObject *__pyx_v_event_id) {
  PyObject *__pyx_v_h = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  int __pyx_t_24;
  long __pyx_t_25;
  PyObject *__pyx_t_26 = NULL;
  PyObject *__pyx_t_27 = NULL;
  PyObject *__pyx_t_28 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__77)
  __Pyx_RefNannySetupContext("from_aanet", 0);
  __Pyx_TraceCall("from_aanet", __pyx_f[0], 773, 0, __PYX_ERR(0, 773, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":774
 *     @classmethod
 *     def from_aanet(cls, hits, event_id):
 *         try:             # <<<<<<<<<<<<<<
 *             return cls(np.array([(
 *                 h.channel_id,
 */
  __Pyx_TraceLine(774,0,__PYX_ERR(0, 774, __pyx_L3_error))
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "km3pipe/dataclasses.pyx":775
 *     def from_aanet(cls, hits, event_id):
 *         try:
 *             return cls(np.array([(             # <<<<<<<<<<<<<<
 *                 h.channel_id,
 *                 np.nan,     # h.dir.x,
 */
      __Pyx_TraceLine(775,0,__PYX_ERR(0, 775, __pyx_L3_error))
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 775, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 775, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 775, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);

      /* "km3pipe/dataclasses.pyx":791
 *                 h.trig,
 *                 event_id,
 *             ) for h in hits], dtype=cls.dtype))             # <<<<<<<<<<<<<<
 *         except ValueError:
 *             # Older aanet format.
 */
      __Pyx_TraceLine(791,0,__PYX_ERR(0, 791, __pyx_L3_error))
      if (likely(PyList_CheckExact(__pyx_v_hits)) || PyTuple_CheckExact(__pyx_v_hits)) {
        __pyx_t_7 = __pyx_v_hits; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
      } else {
        __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_hits); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 791, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 791, __pyx_L3_error)
      }
      for (;;) {
        if (likely(!__pyx_t_9)) {
          if (likely(PyList_CheckExact(__pyx_t_7))) {
            if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_10 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 791, __pyx_L3_error)
            #else
            __pyx_t_10 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 791, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_10);
            #endif
          } else {
            if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 791, __pyx_L3_error)
            #else
            __pyx_t_10 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 791, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_10);
            #endif
          }
        } else {
          __pyx_t_10 = __pyx_t_9(__pyx_t_7);
          if (unlikely(!__pyx_t_10)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 791, __pyx_L3_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_10);
        }
        __Pyx_XDECREF_SET(__pyx_v_h, __pyx_t_10);
        __pyx_t_10 = 0;

        /* "km3pipe/dataclasses.pyx":776
 *         try:
 *             return cls(np.array([(
 *                 h.channel_id,             # <<<<<<<<<<<<<<
 *                 np.nan,     # h.dir.x,
 *                 np.nan,     # h.dir.y,
 */
        __Pyx_TraceLine(776,0,__PYX_ERR(0, 776, __pyx_L3_error))
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_channel_id); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 776, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_10);

        /* "km3pipe/dataclasses.pyx":777
 *             return cls(np.array([(
 *                 h.channel_id,
 *                 np.nan,     # h.dir.x,             # <<<<<<<<<<<<<<
 *                 np.nan,     # h.dir.y,
 *                 np.nan,     # h.dir.z,
 */
        __Pyx_TraceLine(777,0,__PYX_ERR(0, 777, __pyx_L3_error))
        __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 777, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_nan); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 777, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

        /* "km3pipe/dataclasses.pyx":778
 *                 h.channel_id,
 *                 np.nan,     # h.dir.x,
 *                 np.nan,     # h.dir.y,             # <<<<<<<<<<<<<<
 *                 np.nan,     # h.dir.z,
 *                 h.dom_id,
 */
        __Pyx_TraceLine(778,0,__PYX_ERR(0, 778, __pyx_L3_error))
        __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 778, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_nan); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 778, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

        /* "km3pipe/dataclasses.pyx":779
 *                 np.nan,     # h.dir.x,
 *                 np.nan,     # h.dir.y,
 *                 np.nan,     # h.dir.z,             # <<<<<<<<<<<<<<
 *                 h.dom_id,
 *                 h.id,
 */
        __Pyx_TraceLine(779,0,__PYX_ERR(0, 779, __pyx_L3_error))
        __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 779, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_nan); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 779, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

        /* "km3pipe/dataclasses.pyx":780
 *                 np.nan,     # h.dir.y,
 *                 np.nan,     # h.dir.z,
 *                 h.dom_id,             # <<<<<<<<<<<<<<
 *                 h.id,
 *                 h.pmt_id,
 */
        __Pyx_TraceLine(780,0,__PYX_ERR(0, 780, __pyx_L3_error))
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_dom_id); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 780, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_11);

        /* "km3pipe/dataclasses.pyx":781
 *                 np.nan,     # h.dir.z,
 *                 h.dom_id,
 *                 h.id,             # <<<<<<<<<<<<<<
 *                 h.pmt_id,
 *                 np.nan,     # h.pos.x,
 */
        __Pyx_TraceLine(781,0,__PYX_ERR(0, 781, __pyx_L3_error))
        __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_id); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 781, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_15);

        /* "km3pipe/dataclasses.pyx":782
 *                 h.dom_id,
 *                 h.id,
 *                 h.pmt_id,             # <<<<<<<<<<<<<<
 *                 np.nan,     # h.pos.x,
 *                 np.nan,     # h.pos.y,
 */
        __Pyx_TraceLine(782,0,__PYX_ERR(0, 782, __pyx_L3_error))
        __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_pmt_id); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 782, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_16);

        /* "km3pipe/dataclasses.pyx":783
 *                 h.id,
 *                 h.pmt_id,
 *                 np.nan,     # h.pos.x,             # <<<<<<<<<<<<<<
 *                 np.nan,     # h.pos.y,
 *                 np.nan,     # h.pos.z,
 */
        __Pyx_TraceLine(783,0,__PYX_ERR(0, 783, __pyx_L3_error))
        __pyx_t_17 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 783, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_17);
        __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_nan); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 783, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_18);
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;

        /* "km3pipe/dataclasses.pyx":784
 *                 h.pmt_id,
 *                 np.nan,     # h.pos.x,
 *                 np.nan,     # h.pos.y,             # <<<<<<<<<<<<<<
 *                 np.nan,     # h.pos.z,
 *                 0,          # t0
 */
        __Pyx_TraceLine(784,0,__PYX_ERR(0, 784, __pyx_L3_error))
        __pyx_t_17 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 784, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_17);
        __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_nan); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 784, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_19);
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;

        /* "km3pipe/dataclasses.pyx":785
 *                 np.nan,     # h.pos.x,
 *                 np.nan,     # h.pos.y,
 *                 np.nan,     # h.pos.z,             # <<<<<<<<<<<<<<
 *                 0,          # t0
 *                 h.t,
 */
        __Pyx_TraceLine(785,0,__PYX_ERR(0, 785, __pyx_L3_error))
        __pyx_t_17 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 785, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_17);
        __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_nan); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 785, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_20);
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;

        /* "km3pipe/dataclasses.pyx":787
 *                 np.nan,     # h.pos.z,
 *                 0,          # t0
 *                 h.t,             # <<<<<<<<<<<<<<
 *                 h.tot,
 *                 h.trig,
 */
        __Pyx_TraceLine(787,0,__PYX_ERR(0, 787, __pyx_L3_error))
        __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_t); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 787, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_17);

        /* "km3pipe/dataclasses.pyx":788
 *                 0,          # t0
 *                 h.t,
 *                 h.tot,             # <<<<<<<<<<<<<<
 *                 h.trig,
 *                 event_id,
 */
        __Pyx_TraceLine(788,0,__PYX_ERR(0, 788, __pyx_L3_error))
        __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_tot); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 788, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_21);

        /* "km3pipe/dataclasses.pyx":789
 *                 h.t,
 *                 h.tot,
 *                 h.trig,             # <<<<<<<<<<<<<<
 *                 event_id,
 *             ) for h in hits], dtype=cls.dtype))
 */
        __Pyx_TraceLine(789,0,__PYX_ERR(0, 789, __pyx_L3_error))
        __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_trig); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 789, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_22);

        /* "km3pipe/dataclasses.pyx":776
 *         try:
 *             return cls(np.array([(
 *                 h.channel_id,             # <<<<<<<<<<<<<<
 *                 np.nan,     # h.dir.x,
 *                 np.nan,     # h.dir.y,
 */
        __Pyx_TraceLine(776,0,__PYX_ERR(0, 776, __pyx_L3_error))
        __pyx_t_23 = PyTuple_New(15); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 776, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_23);
        __Pyx_GIVEREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_23, 0, __pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_12);
        PyTuple_SET_ITEM(__pyx_t_23, 1, __pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_13);
        PyTuple_SET_ITEM(__pyx_t_23, 2, __pyx_t_13);
        __Pyx_GIVEREF(__pyx_t_14);
        PyTuple_SET_ITEM(__pyx_t_23, 3, __pyx_t_14);
        __Pyx_GIVEREF(__pyx_t_11);
        PyTuple_SET_ITEM(__pyx_t_23, 4, __pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_23, 5, __pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_16);
        PyTuple_SET_ITEM(__pyx_t_23, 6, __pyx_t_16);
        __Pyx_GIVEREF(__pyx_t_18);
        PyTuple_SET_ITEM(__pyx_t_23, 7, __pyx_t_18);
        __Pyx_GIVEREF(__pyx_t_19);
        PyTuple_SET_ITEM(__pyx_t_23, 8, __pyx_t_19);
        __Pyx_GIVEREF(__pyx_t_20);
        PyTuple_SET_ITEM(__pyx_t_23, 9, __pyx_t_20);
        __Pyx_INCREF(__pyx_int_0);
        __Pyx_GIVEREF(__pyx_int_0);
        PyTuple_SET_ITEM(__pyx_t_23, 10, __pyx_int_0);
        __Pyx_GIVEREF(__pyx_t_17);
        PyTuple_SET_ITEM(__pyx_t_23, 11, __pyx_t_17);
        __Pyx_GIVEREF(__pyx_t_21);
        PyTuple_SET_ITEM(__pyx_t_23, 12, __pyx_t_21);
        __Pyx_GIVEREF(__pyx_t_22);
        PyTuple_SET_ITEM(__pyx_t_23, 13, __pyx_t_22);
        __Pyx_INCREF(__pyx_v_event_id);
        __Pyx_GIVEREF(__pyx_v_event_id);
        PyTuple_SET_ITEM(__pyx_t_23, 14, __pyx_v_event_id);
        __pyx_t_10 = 0;
        __pyx_t_12 = 0;
        __pyx_t_13 = 0;
        __pyx_t_14 = 0;
        __pyx_t_11 = 0;
        __pyx_t_15 = 0;
        __pyx_t_16 = 0;
        __pyx_t_18 = 0;
        __pyx_t_19 = 0;
        __pyx_t_20 = 0;
        __pyx_t_17 = 0;
        __pyx_t_21 = 0;
        __pyx_t_22 = 0;
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_23))) __PYX_ERR(0, 775, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;

        /* "km3pipe/dataclasses.pyx":791
 *                 h.trig,
 *                 event_id,
 *             ) for h in hits], dtype=cls.dtype))             # <<<<<<<<<<<<<<
 *         except ValueError:
 *             # Older aanet format.
 */
        __Pyx_TraceLine(791,0,__PYX_ERR(0, 791, __pyx_L3_error))
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "km3pipe/dataclasses.pyx":775
 *     def from_aanet(cls, hits, event_id):
 *         try:
 *             return cls(np.array([(             # <<<<<<<<<<<<<<
 *                 h.channel_id,
 *                 np.nan,     # h.dir.x,
 */
      __Pyx_TraceLine(775,0,__PYX_ERR(0, 775, __pyx_L3_error))
      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 775, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "km3pipe/dataclasses.pyx":791
 *                 h.trig,
 *                 event_id,
 *             ) for h in hits], dtype=cls.dtype))             # <<<<<<<<<<<<<<
 *         except ValueError:
 *             # Older aanet format.
 */
      __Pyx_TraceLine(791,0,__PYX_ERR(0, 791, __pyx_L3_error))
      __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 791, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 791, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_23);
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_23) < 0) __PYX_ERR(0, 791, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;

      /* "km3pipe/dataclasses.pyx":775
 *     def from_aanet(cls, hits, event_id):
 *         try:
 *             return cls(np.array([(             # <<<<<<<<<<<<<<
 *                 h.channel_id,
 *                 np.nan,     # h.dir.x,
 */
      __Pyx_TraceLine(775,0,__PYX_ERR(0, 775, __pyx_L3_error))
      __pyx_t_23 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 775, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_23);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_INCREF(__pyx_v_cls);
      __pyx_t_5 = __pyx_v_cls; __pyx_t_7 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      if (!__pyx_t_7) {
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_23); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 775, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_23};
          __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 775, __pyx_L3_error)
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_23};
          __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 775, __pyx_L3_error)
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 775, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
          __Pyx_GIVEREF(__pyx_t_23);
          PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_23);
          __pyx_t_23 = 0;
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 775, __pyx_L3_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_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;

      /* "km3pipe/dataclasses.pyx":774
 *     @classmethod
 *     def from_aanet(cls, hits, event_id):
 *         try:             # <<<<<<<<<<<<<<
 *             return cls(np.array([(
 *                 h.channel_id,
 */
    }
    __pyx_L3_error:;
    __Pyx_PyThreadState_assign
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
    __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
    __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
    __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
    __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "km3pipe/dataclasses.pyx":792
 *                 event_id,
 *             ) for h in hits], dtype=cls.dtype))
 *         except ValueError:             # <<<<<<<<<<<<<<
 *             # Older aanet format.
 *             return cls(np.array([(
 */
    __Pyx_TraceLine(792,0,__PYX_ERR(0, 792, __pyx_L5_except_error))
    __pyx_t_24 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_24) {
      __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.from_aanet", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 792, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);

      /* "km3pipe/dataclasses.pyx":794
 *         except ValueError:
 *             # Older aanet format.
 *             return cls(np.array([(             # <<<<<<<<<<<<<<
 *                 ord(h.channel_id),
 *                 np.nan,     # h.dir.x,
 */
      __Pyx_TraceLine(794,0,__PYX_ERR(0, 794, __pyx_L5_except_error))
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 794, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 794, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_22);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 794, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);

      /* "km3pipe/dataclasses.pyx":810
 *                 h.trig,
 *                 event_id,
 *             ) for h in hits], dtype=cls.dtype))             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
      __Pyx_TraceLine(810,0,__PYX_ERR(0, 810, __pyx_L5_except_error))
      if (likely(PyList_CheckExact(__pyx_v_hits)) || PyTuple_CheckExact(__pyx_v_hits)) {
        __pyx_t_21 = __pyx_v_hits; __Pyx_INCREF(__pyx_t_21); __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
      } else {
        __pyx_t_8 = -1; __pyx_t_21 = PyObject_GetIter(__pyx_v_hits); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 810, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_21);
        __pyx_t_9 = Py_TYPE(__pyx_t_21)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 810, __pyx_L5_except_error)
      }
      for (;;) {
        if (likely(!__pyx_t_9)) {
          if (likely(PyList_CheckExact(__pyx_t_21))) {
            if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_21)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_17 = PyList_GET_ITEM(__pyx_t_21, __pyx_t_8); __Pyx_INCREF(__pyx_t_17); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 810, __pyx_L5_except_error)
            #else
            __pyx_t_17 = PySequence_ITEM(__pyx_t_21, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 810, __pyx_L5_except_error)
            __Pyx_GOTREF(__pyx_t_17);
            #endif
          } else {
            if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_21)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_17 = PyTuple_GET_ITEM(__pyx_t_21, __pyx_t_8); __Pyx_INCREF(__pyx_t_17); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 810, __pyx_L5_except_error)
            #else
            __pyx_t_17 = PySequence_ITEM(__pyx_t_21, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 810, __pyx_L5_except_error)
            __Pyx_GOTREF(__pyx_t_17);
            #endif
          }
        } else {
          __pyx_t_17 = __pyx_t_9(__pyx_t_21);
          if (unlikely(!__pyx_t_17)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 810, __pyx_L5_except_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_17);
        }
        __Pyx_XDECREF_SET(__pyx_v_h, __pyx_t_17);
        __pyx_t_17 = 0;

        /* "km3pipe/dataclasses.pyx":795
 *             # Older aanet format.
 *             return cls(np.array([(
 *                 ord(h.channel_id),             # <<<<<<<<<<<<<<
 *                 np.nan,     # h.dir.x,
 *                 np.nan,     # h.dir.y,
 */
        __Pyx_TraceLine(795,0,__PYX_ERR(0, 795, __pyx_L5_except_error))
        __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_channel_id); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 795, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_17);
        __pyx_t_25 = __Pyx_PyObject_Ord(__pyx_t_17); if (unlikely(__pyx_t_25 == (long)(Py_UCS4)-1)) __PYX_ERR(0, 795, __pyx_L5_except_error)
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        __pyx_t_17 = __Pyx_PyInt_From_long(__pyx_t_25); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 795, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_17);

        /* "km3pipe/dataclasses.pyx":796
 *             return cls(np.array([(
 *                 ord(h.channel_id),
 *                 np.nan,     # h.dir.x,             # <<<<<<<<<<<<<<
 *                 np.nan,     # h.dir.y,
 *                 np.nan,     # h.dir.z,
 */
        __Pyx_TraceLine(796,0,__PYX_ERR(0, 796, __pyx_L5_except_error))
        __pyx_t_20 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 796, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_20);
        __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_nan); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 796, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_19);
        __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

        /* "km3pipe/dataclasses.pyx":797
 *                 ord(h.channel_id),
 *                 np.nan,     # h.dir.x,
 *                 np.nan,     # h.dir.y,             # <<<<<<<<<<<<<<
 *                 np.nan,     # h.dir.z,
 *                 h.dom_id,
 */
        __Pyx_TraceLine(797,0,__PYX_ERR(0, 797, __pyx_L5_except_error))
        __pyx_t_20 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 797, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_20);
        __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_nan); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 797, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_18);
        __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

        /* "km3pipe/dataclasses.pyx":798
 *                 np.nan,     # h.dir.x,
 *                 np.nan,     # h.dir.y,
 *                 np.nan,     # h.dir.z,             # <<<<<<<<<<<<<<
 *                 h.dom_id,
 *                 h.id,
 */
        __Pyx_TraceLine(798,0,__PYX_ERR(0, 798, __pyx_L5_except_error))
        __pyx_t_20 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 798, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_20);
        __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_nan); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 798, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

        /* "km3pipe/dataclasses.pyx":799
 *                 np.nan,     # h.dir.y,
 *                 np.nan,     # h.dir.z,
 *                 h.dom_id,             # <<<<<<<<<<<<<<
 *                 h.id,
 *                 h.pmt_id,
 */
        __Pyx_TraceLine(799,0,__PYX_ERR(0, 799, __pyx_L5_except_error))
        __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_dom_id); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 799, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_20);

        /* "km3pipe/dataclasses.pyx":800
 *                 np.nan,     # h.dir.z,
 *                 h.dom_id,
 *                 h.id,             # <<<<<<<<<<<<<<
 *                 h.pmt_id,
 *                 np.nan,     # h.pos.x,
 */
        __Pyx_TraceLine(800,0,__PYX_ERR(0, 800, __pyx_L5_except_error))
        __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_id); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 800, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_15);

        /* "km3pipe/dataclasses.pyx":801
 *                 h.dom_id,
 *                 h.id,
 *                 h.pmt_id,             # <<<<<<<<<<<<<<
 *                 np.nan,     # h.pos.x,
 *                 np.nan,     # h.pos.y,
 */
        __Pyx_TraceLine(801,0,__PYX_ERR(0, 801, __pyx_L5_except_error))
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_pmt_id); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 801, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_11);

        /* "km3pipe/dataclasses.pyx":802
 *                 h.id,
 *                 h.pmt_id,
 *                 np.nan,     # h.pos.x,             # <<<<<<<<<<<<<<
 *                 np.nan,     # h.pos.y,
 *                 np.nan,     # h.pos.z,
 */
        __Pyx_TraceLine(802,0,__PYX_ERR(0, 802, __pyx_L5_except_error))
        __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 802, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_nan); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 802, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

        /* "km3pipe/dataclasses.pyx":803
 *                 h.pmt_id,
 *                 np.nan,     # h.pos.x,
 *                 np.nan,     # h.pos.y,             # <<<<<<<<<<<<<<
 *                 np.nan,     # h.pos.z,
 *                 0,          # t0
 */
        __Pyx_TraceLine(803,0,__PYX_ERR(0, 803, __pyx_L5_except_error))
        __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 803, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_nan); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 803, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

        /* "km3pipe/dataclasses.pyx":804
 *                 np.nan,     # h.pos.x,
 *                 np.nan,     # h.pos.y,
 *                 np.nan,     # h.pos.z,             # <<<<<<<<<<<<<<
 *                 0,          # t0
 *                 h.t,
 */
        __Pyx_TraceLine(804,0,__PYX_ERR(0, 804, __pyx_L5_except_error))
        __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 804, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_nan); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 804, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

        /* "km3pipe/dataclasses.pyx":806
 *                 np.nan,     # h.pos.z,
 *                 0,          # t0
 *                 h.t,             # <<<<<<<<<<<<<<
 *                 h.tot,
 *                 h.trig,
 */
        __Pyx_TraceLine(806,0,__PYX_ERR(0, 806, __pyx_L5_except_error))
        __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_t); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 806, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_14);

        /* "km3pipe/dataclasses.pyx":807
 *                 0,          # t0
 *                 h.t,
 *                 h.tot,             # <<<<<<<<<<<<<<
 *                 h.trig,
 *                 event_id,
 */
        __Pyx_TraceLine(807,0,__PYX_ERR(0, 807, __pyx_L5_except_error))
        __pyx_t_26 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_tot); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 807, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_26);

        /* "km3pipe/dataclasses.pyx":808
 *                 h.t,
 *                 h.tot,
 *                 h.trig,             # <<<<<<<<<<<<<<
 *                 event_id,
 *             ) for h in hits], dtype=cls.dtype))
 */
        __Pyx_TraceLine(808,0,__PYX_ERR(0, 808, __pyx_L5_except_error))
        __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_trig); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 808, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_27);

        /* "km3pipe/dataclasses.pyx":795
 *             # Older aanet format.
 *             return cls(np.array([(
 *                 ord(h.channel_id),             # <<<<<<<<<<<<<<
 *                 np.nan,     # h.dir.x,
 *                 np.nan,     # h.dir.y,
 */
        __Pyx_TraceLine(795,0,__PYX_ERR(0, 795, __pyx_L5_except_error))
        __pyx_t_28 = PyTuple_New(15); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 795, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_28);
        __Pyx_GIVEREF(__pyx_t_17);
        PyTuple_SET_ITEM(__pyx_t_28, 0, __pyx_t_17);
        __Pyx_GIVEREF(__pyx_t_19);
        PyTuple_SET_ITEM(__pyx_t_28, 1, __pyx_t_19);
        __Pyx_GIVEREF(__pyx_t_18);
        PyTuple_SET_ITEM(__pyx_t_28, 2, __pyx_t_18);
        __Pyx_GIVEREF(__pyx_t_16);
        PyTuple_SET_ITEM(__pyx_t_28, 3, __pyx_t_16);
        __Pyx_GIVEREF(__pyx_t_20);
        PyTuple_SET_ITEM(__pyx_t_28, 4, __pyx_t_20);
        __Pyx_GIVEREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_28, 5, __pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_11);
        PyTuple_SET_ITEM(__pyx_t_28, 6, __pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_13);
        PyTuple_SET_ITEM(__pyx_t_28, 7, __pyx_t_13);
        __Pyx_GIVEREF(__pyx_t_12);
        PyTuple_SET_ITEM(__pyx_t_28, 8, __pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_28, 9, __pyx_t_10);
        __Pyx_INCREF(__pyx_int_0);
        __Pyx_GIVEREF(__pyx_int_0);
        PyTuple_SET_ITEM(__pyx_t_28, 10, __pyx_int_0);
        __Pyx_GIVEREF(__pyx_t_14);
        PyTuple_SET_ITEM(__pyx_t_28, 11, __pyx_t_14);
        __Pyx_GIVEREF(__pyx_t_26);
        PyTuple_SET_ITEM(__pyx_t_28, 12, __pyx_t_26);
        __Pyx_GIVEREF(__pyx_t_27);
        PyTuple_SET_ITEM(__pyx_t_28, 13, __pyx_t_27);
        __Pyx_INCREF(__pyx_v_event_id);
        __Pyx_GIVEREF(__pyx_v_event_id);
        PyTuple_SET_ITEM(__pyx_t_28, 14, __pyx_v_event_id);
        __pyx_t_17 = 0;
        __pyx_t_19 = 0;
        __pyx_t_18 = 0;
        __pyx_t_16 = 0;
        __pyx_t_20 = 0;
        __pyx_t_15 = 0;
        __pyx_t_11 = 0;
        __pyx_t_13 = 0;
        __pyx_t_12 = 0;
        __pyx_t_10 = 0;
        __pyx_t_14 = 0;
        __pyx_t_26 = 0;
        __pyx_t_27 = 0;
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_28))) __PYX_ERR(0, 794, __pyx_L5_except_error)
        __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

        /* "km3pipe/dataclasses.pyx":810
 *                 h.trig,
 *                 event_id,
 *             ) for h in hits], dtype=cls.dtype))             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
        __Pyx_TraceLine(810,0,__PYX_ERR(0, 810, __pyx_L5_except_error))
      }
      __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

      /* "km3pipe/dataclasses.pyx":794
 *         except ValueError:
 *             # Older aanet format.
 *             return cls(np.array([(             # <<<<<<<<<<<<<<
 *                 ord(h.channel_id),
 *                 np.nan,     # h.dir.x,
 */
      __Pyx_TraceLine(794,0,__PYX_ERR(0, 794, __pyx_L5_except_error))
      __pyx_t_21 = PyTuple_New(1); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 794, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_21);
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "km3pipe/dataclasses.pyx":810
 *                 h.trig,
 *                 event_id,
 *             ) for h in hits], dtype=cls.dtype))             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
      __Pyx_TraceLine(810,0,__PYX_ERR(0, 810, __pyx_L5_except_error))
      __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 810, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 810, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_28);
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dtype, __pyx_t_28) < 0) __PYX_ERR(0, 810, __pyx_L5_except_error)
      __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

      /* "km3pipe/dataclasses.pyx":794
 *         except ValueError:
 *             # Older aanet format.
 *             return cls(np.array([(             # <<<<<<<<<<<<<<
 *                 ord(h.channel_id),
 *                 np.nan,     # h.dir.x,
 */
      __Pyx_TraceLine(794,0,__PYX_ERR(0, 794, __pyx_L5_except_error))
      __pyx_t_28 = __Pyx_PyObject_Call(__pyx_t_22, __pyx_t_21, __pyx_t_7); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 794, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_28);
      __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
      __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_INCREF(__pyx_v_cls);
      __pyx_t_7 = __pyx_v_cls; __pyx_t_21 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_21 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_21)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_21);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      if (!__pyx_t_21) {
        __pyx_t_23 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_28); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 794, __pyx_L5_except_error)
        __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
        __Pyx_GOTREF(__pyx_t_23);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[2] = {__pyx_t_21, __pyx_t_28};
          __pyx_t_23 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 794, __pyx_L5_except_error)
          __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
          __Pyx_GOTREF(__pyx_t_23);
          __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[2] = {__pyx_t_21, __pyx_t_28};
          __pyx_t_23 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 794, __pyx_L5_except_error)
          __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
          __Pyx_GOTREF(__pyx_t_23);
          __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
        } else
        #endif
        {
          __pyx_t_22 = PyTuple_New(1+1); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 794, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_22);
          __Pyx_GIVEREF(__pyx_t_21); PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_21); __pyx_t_21 = NULL;
          __Pyx_GIVEREF(__pyx_t_28);
          PyTuple_SET_ITEM(__pyx_t_22, 0+1, __pyx_t_28);
          __pyx_t_28 = 0;
          __pyx_t_23 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_22, NULL); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 794, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_23);
          __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_r = __pyx_t_23;
      __pyx_t_23 = 0;
      __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;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "km3pipe/dataclasses.pyx":774
 *     @classmethod
 *     def from_aanet(cls, hits, event_id):
 *         try:             # <<<<<<<<<<<<<<
 *             return cls(np.array([(
 *                 h.channel_id,
 */
    __Pyx_PyThreadState_assign
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_PyThreadState_assign
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_PyThreadState_assign
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
  }

  /* "km3pipe/dataclasses.pyx":773
 * 
 *     @classmethod
 *     def from_aanet(cls, hits, event_id):             # <<<<<<<<<<<<<<
 *         try:
 *             return cls(np.array([(
 */

  /* 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_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_20);
  __Pyx_XDECREF(__pyx_t_21);
  __Pyx_XDECREF(__pyx_t_22);
  __Pyx_XDECREF(__pyx_t_23);
  __Pyx_XDECREF(__pyx_t_26);
  __Pyx_XDECREF(__pyx_t_27);
  __Pyx_XDECREF(__pyx_t_28);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.from_aanet", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_h);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":813
 * 
 *     @classmethod
 *     def from_evt(cls, hits, event_id):             # <<<<<<<<<<<<<<
 *         return cls(np.array([(
 *             0,     # channel_id
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_5from_evt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_4from_evt[] = "HitSeries.from_evt(cls, hits, event_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_5from_evt = {"from_evt", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_5from_evt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_4from_evt};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_5from_evt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_hits = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_evt (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_hits_2,&__pyx_n_s_event_id,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_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_hits_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_evt", 1, 3, 3, 1); __PYX_ERR(0, 813, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_evt", 1, 3, 3, 2); __PYX_ERR(0, 813, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_evt") < 0)) __PYX_ERR(0, 813, __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_cls = values[0];
    __pyx_v_hits = values[1];
    __pyx_v_event_id = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_evt", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 813, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.from_evt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_4from_evt(__pyx_self, __pyx_v_cls, __pyx_v_hits, __pyx_v_event_id);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_4from_evt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_hits, PyObject *__pyx_v_event_id) {
  PyObject *__pyx_v_h = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  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 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__78)
  __Pyx_RefNannySetupContext("from_evt", 0);
  __Pyx_TraceCall("from_evt", __pyx_f[0], 813, 0, __PYX_ERR(0, 813, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":814
 *     @classmethod
 *     def from_evt(cls, hits, event_id):
 *         return cls(np.array([(             # <<<<<<<<<<<<<<
 *             0,     # channel_id
 *             np.nan,
 */
  __Pyx_TraceLine(814,0,__PYX_ERR(0, 814, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "km3pipe/dataclasses.pyx":830
 *             0,     # triggered
 *             event_id,
 *         ) for h in hits], dtype=cls.dtype))             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(830,0,__PYX_ERR(0, 830, __pyx_L1_error))
  if (likely(PyList_CheckExact(__pyx_v_hits)) || PyTuple_CheckExact(__pyx_v_hits)) {
    __pyx_t_4 = __pyx_v_hits; __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_hits); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 830, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 830, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 830, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 830, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 830, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 830, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      }
    } else {
      __pyx_t_7 = __pyx_t_6(__pyx_t_4);
      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_ERR(0, 830, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_7);
    }
    __Pyx_XDECREF_SET(__pyx_v_h, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "km3pipe/dataclasses.pyx":816
 *         return cls(np.array([(
 *             0,     # channel_id
 *             np.nan,             # <<<<<<<<<<<<<<
 *             np.nan,
 *             np.nan,
 */
    __Pyx_TraceLine(816,0,__PYX_ERR(0, 816, __pyx_L1_error))
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 816, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_nan); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 816, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "km3pipe/dataclasses.pyx":817
 *             0,     # channel_id
 *             np.nan,
 *             np.nan,             # <<<<<<<<<<<<<<
 *             np.nan,
 *             0,     # dom_id
 */
    __Pyx_TraceLine(817,0,__PYX_ERR(0, 817, __pyx_L1_error))
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 817, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_nan); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 817, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "km3pipe/dataclasses.pyx":818
 *             np.nan,
 *             np.nan,
 *             np.nan,             # <<<<<<<<<<<<<<
 *             0,     # dom_id
 *             h.id,
 */
    __Pyx_TraceLine(818,0,__PYX_ERR(0, 818, __pyx_L1_error))
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 818, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_nan); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 818, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "km3pipe/dataclasses.pyx":820
 *             np.nan,
 *             0,     # dom_id
 *             h.id,             # <<<<<<<<<<<<<<
 *             h.pmt_id,
 *             np.nan,
 */
    __Pyx_TraceLine(820,0,__PYX_ERR(0, 820, __pyx_L1_error))
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_id); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 820, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);

    /* "km3pipe/dataclasses.pyx":821
 *             0,     # dom_id
 *             h.id,
 *             h.pmt_id,             # <<<<<<<<<<<<<<
 *             np.nan,
 *             np.nan,
 */
    __Pyx_TraceLine(821,0,__PYX_ERR(0, 821, __pyx_L1_error))
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_pmt_id); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 821, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);

    /* "km3pipe/dataclasses.pyx":822
 *             h.id,
 *             h.pmt_id,
 *             np.nan,             # <<<<<<<<<<<<<<
 *             np.nan,
 *             np.nan,
 */
    __Pyx_TraceLine(822,0,__PYX_ERR(0, 822, __pyx_L1_error))
    __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 822, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_nan); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 822, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "km3pipe/dataclasses.pyx":823
 *             h.pmt_id,
 *             np.nan,
 *             np.nan,             # <<<<<<<<<<<<<<
 *             np.nan,
 *             0,      # t0
 */
    __Pyx_TraceLine(823,0,__PYX_ERR(0, 823, __pyx_L1_error))
    __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 823, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_nan); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 823, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "km3pipe/dataclasses.pyx":824
 *             np.nan,
 *             np.nan,
 *             np.nan,             # <<<<<<<<<<<<<<
 *             0,      # t0
 *             h.time,
 */
    __Pyx_TraceLine(824,0,__PYX_ERR(0, 824, __pyx_L1_error))
    __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 824, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_nan); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 824, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "km3pipe/dataclasses.pyx":826
 *             np.nan,
 *             0,      # t0
 *             h.time,             # <<<<<<<<<<<<<<
 *             h.tot,
 *             0,     # triggered
 */
    __Pyx_TraceLine(826,0,__PYX_ERR(0, 826, __pyx_L1_error))
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_time); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 826, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);

    /* "km3pipe/dataclasses.pyx":827
 *             0,      # t0
 *             h.time,
 *             h.tot,             # <<<<<<<<<<<<<<
 *             0,     # triggered
 *             event_id,
 */
    __Pyx_TraceLine(827,0,__PYX_ERR(0, 827, __pyx_L1_error))
    __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_tot); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 827, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);

    /* "km3pipe/dataclasses.pyx":815
 *     def from_evt(cls, hits, event_id):
 *         return cls(np.array([(
 *             0,     # channel_id             # <<<<<<<<<<<<<<
 *             np.nan,
 *             np.nan,
 */
    __Pyx_TraceLine(815,0,__PYX_ERR(0, 815, __pyx_L1_error))
    __pyx_t_17 = PyTuple_New(15); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 815, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_int_0);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_17, 2, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_17, 3, __pyx_t_10);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_t_17, 4, __pyx_int_0);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_17, 5, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_17, 6, __pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_17, 7, __pyx_t_13);
    __Pyx_GIVEREF(__pyx_t_14);
    PyTuple_SET_ITEM(__pyx_t_17, 8, __pyx_t_14);
    __Pyx_GIVEREF(__pyx_t_15);
    PyTuple_SET_ITEM(__pyx_t_17, 9, __pyx_t_15);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_t_17, 10, __pyx_int_0);
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_17, 11, __pyx_t_12);
    __Pyx_GIVEREF(__pyx_t_16);
    PyTuple_SET_ITEM(__pyx_t_17, 12, __pyx_t_16);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_t_17, 13, __pyx_int_0);
    __Pyx_INCREF(__pyx_v_event_id);
    __Pyx_GIVEREF(__pyx_v_event_id);
    PyTuple_SET_ITEM(__pyx_t_17, 14, __pyx_v_event_id);
    __pyx_t_8 = 0;
    __pyx_t_9 = 0;
    __pyx_t_10 = 0;
    __pyx_t_7 = 0;
    __pyx_t_11 = 0;
    __pyx_t_13 = 0;
    __pyx_t_14 = 0;
    __pyx_t_15 = 0;
    __pyx_t_12 = 0;
    __pyx_t_16 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_17))) __PYX_ERR(0, 814, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;

    /* "km3pipe/dataclasses.pyx":830
 *             0,     # triggered
 *             event_id,
 *         ) for h in hits], dtype=cls.dtype))             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
    __Pyx_TraceLine(830,0,__PYX_ERR(0, 830, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":814
 *     @classmethod
 *     def from_evt(cls, hits, event_id):
 *         return cls(np.array([(             # <<<<<<<<<<<<<<
 *             0,     # channel_id
 *             np.nan,
 */
  __Pyx_TraceLine(814,0,__PYX_ERR(0, 814, __pyx_L1_error))
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":830
 *             0,     # triggered
 *             event_id,
 *         ) for h in hits], dtype=cls.dtype))             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(830,0,__PYX_ERR(0, 830, __pyx_L1_error))
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_17) < 0) __PYX_ERR(0, 830, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;

  /* "km3pipe/dataclasses.pyx":814
 *     @classmethod
 *     def from_evt(cls, hits, event_id):
 *         return cls(np.array([(             # <<<<<<<<<<<<<<
 *             0,     # channel_id
 *             np.nan,
 */
  __Pyx_TraceLine(814,0,__PYX_ERR(0, 814, __pyx_L1_error))
  __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_INCREF(__pyx_v_cls);
  __pyx_t_2 = __pyx_v_cls; __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_17); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 814, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_17};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 814, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_17};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 814, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    } else
    #endif
    {
      __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 814, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_17);
      PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_17);
      __pyx_t_17 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 814, __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_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":813
 * 
 *     @classmethod
 *     def from_evt(cls, hits, event_id):             # <<<<<<<<<<<<<<
 *         return cls(np.array([(
 *             0,     # channel_id
 */

  /* 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_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_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.from_evt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_h);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":833
 * 
 *     @classmethod
 *     def from_arrays(cls, channel_ids, dir_xs, dir_ys, dir_zs, dom_ids, ids,             # <<<<<<<<<<<<<<
 *                     pmt_ids, pos_xs, pos_ys, pos_zs, t0s, times, tots,
 *                     triggereds, event_id):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_7from_arrays(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_6from_arrays[] = "HitSeries.from_arrays(cls, channel_ids, dir_xs, dir_ys, dir_zs, dom_ids, ids, pmt_ids, pos_xs, pos_ys, pos_zs, t0s, times, tots, triggereds, event_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_7from_arrays = {"from_arrays", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_7from_arrays, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_6from_arrays};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_7from_arrays(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_channel_ids = 0;
  PyObject *__pyx_v_dir_xs = 0;
  PyObject *__pyx_v_dir_ys = 0;
  PyObject *__pyx_v_dir_zs = 0;
  PyObject *__pyx_v_dom_ids = 0;
  PyObject *__pyx_v_ids = 0;
  PyObject *__pyx_v_pmt_ids = 0;
  PyObject *__pyx_v_pos_xs = 0;
  PyObject *__pyx_v_pos_ys = 0;
  PyObject *__pyx_v_pos_zs = 0;
  PyObject *__pyx_v_t0s = 0;
  PyObject *__pyx_v_times = 0;
  PyObject *__pyx_v_tots = 0;
  PyObject *__pyx_v_triggereds = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_arrays (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_channel_ids,&__pyx_n_s_dir_xs,&__pyx_n_s_dir_ys,&__pyx_n_s_dir_zs,&__pyx_n_s_dom_ids,&__pyx_n_s_ids,&__pyx_n_s_pmt_ids,&__pyx_n_s_pos_xs,&__pyx_n_s_pos_ys,&__pyx_n_s_pos_zs,&__pyx_n_s_t0s,&__pyx_n_s_times,&__pyx_n_s_tots,&__pyx_n_s_triggereds,&__pyx_n_s_event_id,0};
    PyObject* values[16] = {0,0,0,0,0,0,0,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 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_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_channel_ids)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 1); __PYX_ERR(0, 833, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dir_xs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 2); __PYX_ERR(0, 833, __pyx_L3_error)
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dir_ys)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 3); __PYX_ERR(0, 833, __pyx_L3_error)
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dir_zs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 4); __PYX_ERR(0, 833, __pyx_L3_error)
        }
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dom_ids)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 5); __PYX_ERR(0, 833, __pyx_L3_error)
        }
        case  6:
        if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ids)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 6); __PYX_ERR(0, 833, __pyx_L3_error)
        }
        case  7:
        if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pmt_ids)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 7); __PYX_ERR(0, 833, __pyx_L3_error)
        }
        case  8:
        if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos_xs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 8); __PYX_ERR(0, 833, __pyx_L3_error)
        }
        case  9:
        if (likely((values[9] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos_ys)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 9); __PYX_ERR(0, 833, __pyx_L3_error)
        }
        case 10:
        if (likely((values[10] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos_zs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 10); __PYX_ERR(0, 833, __pyx_L3_error)
        }
        case 11:
        if (likely((values[11] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_t0s)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 11); __PYX_ERR(0, 833, __pyx_L3_error)
        }
        case 12:
        if (likely((values[12] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_times)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 12); __PYX_ERR(0, 833, __pyx_L3_error)
        }
        case 13:
        if (likely((values[13] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tots)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 13); __PYX_ERR(0, 833, __pyx_L3_error)
        }
        case 14:
        if (likely((values[14] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_triggereds)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 14); __PYX_ERR(0, 833, __pyx_L3_error)
        }
        case 15:
        if (likely((values[15] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 15); __PYX_ERR(0, 833, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_arrays") < 0)) __PYX_ERR(0, 833, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 16) {
      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);
      values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
      values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
      values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
      values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
      values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
      values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
      values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
    }
    __pyx_v_cls = values[0];
    __pyx_v_channel_ids = values[1];
    __pyx_v_dir_xs = values[2];
    __pyx_v_dir_ys = values[3];
    __pyx_v_dir_zs = values[4];
    __pyx_v_dom_ids = values[5];
    __pyx_v_ids = values[6];
    __pyx_v_pmt_ids = values[7];
    __pyx_v_pos_xs = values[8];
    __pyx_v_pos_ys = values[9];
    __pyx_v_pos_zs = values[10];
    __pyx_v_t0s = values[11];
    __pyx_v_times = values[12];
    __pyx_v_tots = values[13];
    __pyx_v_triggereds = values[14];
    __pyx_v_event_id = values[15];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 833, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_6from_arrays(__pyx_self, __pyx_v_cls, __pyx_v_channel_ids, __pyx_v_dir_xs, __pyx_v_dir_ys, __pyx_v_dir_zs, __pyx_v_dom_ids, __pyx_v_ids, __pyx_v_pmt_ids, __pyx_v_pos_xs, __pyx_v_pos_ys, __pyx_v_pos_zs, __pyx_v_t0s, __pyx_v_times, __pyx_v_tots, __pyx_v_triggereds, __pyx_v_event_id);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_6from_arrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_channel_ids, PyObject *__pyx_v_dir_xs, PyObject *__pyx_v_dir_ys, PyObject *__pyx_v_dir_zs, PyObject *__pyx_v_dom_ids, PyObject *__pyx_v_ids, PyObject *__pyx_v_pmt_ids, PyObject *__pyx_v_pos_xs, PyObject *__pyx_v_pos_ys, PyObject *__pyx_v_pos_zs, PyObject *__pyx_v_t0s, PyObject *__pyx_v_times, PyObject *__pyx_v_tots, PyObject *__pyx_v_triggereds, PyObject *__pyx_v_event_id) {
  PyObject *__pyx_v_length = NULL;
  PyObject *__pyx_v_hits = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__79)
  __Pyx_RefNannySetupContext("from_arrays", 0);
  __Pyx_TraceCall("from_arrays", __pyx_f[0], 833, 0, __PYX_ERR(0, 833, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":837
 *                     triggereds, event_id):
 *         # do we need shape[0] or does len() work too?
 *         try:             # <<<<<<<<<<<<<<
 *             length = channel_ids.shape[0]
 *         except AttributeError:
 */
  __Pyx_TraceLine(837,0,__PYX_ERR(0, 837, __pyx_L3_error))
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "km3pipe/dataclasses.pyx":838
 *         # do we need shape[0] or does len() work too?
 *         try:
 *             length = channel_ids.shape[0]             # <<<<<<<<<<<<<<
 *         except AttributeError:
 *             length = len(channel_ids)
 */
      __Pyx_TraceLine(838,0,__PYX_ERR(0, 838, __pyx_L3_error))
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_channel_ids, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 838, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 838, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_length = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "km3pipe/dataclasses.pyx":837
 *                     triggereds, event_id):
 *         # do we need shape[0] or does len() work too?
 *         try:             # <<<<<<<<<<<<<<
 *             length = channel_ids.shape[0]
 *         except AttributeError:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L3_error:;
    __Pyx_PyThreadState_assign
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "km3pipe/dataclasses.pyx":839
 *         try:
 *             length = channel_ids.shape[0]
 *         except AttributeError:             # <<<<<<<<<<<<<<
 *             length = len(channel_ids)
 *         hits = np.empty(length, cls.dtype)
 */
    __Pyx_TraceLine(839,0,__PYX_ERR(0, 839, __pyx_L5_except_error))
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(0, 839, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_7);

      /* "km3pipe/dataclasses.pyx":840
 *             length = channel_ids.shape[0]
 *         except AttributeError:
 *             length = len(channel_ids)             # <<<<<<<<<<<<<<
 *         hits = np.empty(length, cls.dtype)
 *         hits['channel_id'] = channel_ids
 */
      __Pyx_TraceLine(840,0,__PYX_ERR(0, 840, __pyx_L5_except_error))
      __pyx_t_8 = PyObject_Length(__pyx_v_channel_ids); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 840, __pyx_L5_except_error)
      __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 840, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_9);
      __pyx_t_9 = 0;
      __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_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "km3pipe/dataclasses.pyx":837
 *                     triggereds, event_id):
 *         # do we need shape[0] or does len() work too?
 *         try:             # <<<<<<<<<<<<<<
 *             length = channel_ids.shape[0]
 *         except AttributeError:
 */
    __Pyx_PyThreadState_assign
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_PyThreadState_assign
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L10_try_end:;
  }

  /* "km3pipe/dataclasses.pyx":841
 *         except AttributeError:
 *             length = len(channel_ids)
 *         hits = np.empty(length, cls.dtype)             # <<<<<<<<<<<<<<
 *         hits['channel_id'] = channel_ids
 *         hits['dir_x'] = dir_xs
 */
  __Pyx_TraceLine(841,0,__PYX_ERR(0, 841, __pyx_L1_error))
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_length, __pyx_t_4};
    __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 841, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_length, __pyx_t_4};
    __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 841, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_10 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 841, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_9) {
      __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
    }
    __Pyx_INCREF(__pyx_v_length);
    __Pyx_GIVEREF(__pyx_v_length);
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_6, __pyx_v_length);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_6, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 841, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_hits = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":842
 *             length = len(channel_ids)
 *         hits = np.empty(length, cls.dtype)
 *         hits['channel_id'] = channel_ids             # <<<<<<<<<<<<<<
 *         hits['dir_x'] = dir_xs
 *         hits['dir_y'] = dir_ys
 */
  __Pyx_TraceLine(842,0,__PYX_ERR(0, 842, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_channel_id, __pyx_v_channel_ids) < 0)) __PYX_ERR(0, 842, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":843
 *         hits = np.empty(length, cls.dtype)
 *         hits['channel_id'] = channel_ids
 *         hits['dir_x'] = dir_xs             # <<<<<<<<<<<<<<
 *         hits['dir_y'] = dir_ys
 *         hits['dir_z'] = dir_zs
 */
  __Pyx_TraceLine(843,0,__PYX_ERR(0, 843, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_dir_x, __pyx_v_dir_xs) < 0)) __PYX_ERR(0, 843, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":844
 *         hits['channel_id'] = channel_ids
 *         hits['dir_x'] = dir_xs
 *         hits['dir_y'] = dir_ys             # <<<<<<<<<<<<<<
 *         hits['dir_z'] = dir_zs
 *         hits['dom_id'] = dom_ids
 */
  __Pyx_TraceLine(844,0,__PYX_ERR(0, 844, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_dir_y, __pyx_v_dir_ys) < 0)) __PYX_ERR(0, 844, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":845
 *         hits['dir_x'] = dir_xs
 *         hits['dir_y'] = dir_ys
 *         hits['dir_z'] = dir_zs             # <<<<<<<<<<<<<<
 *         hits['dom_id'] = dom_ids
 *         hits['id'] = ids
 */
  __Pyx_TraceLine(845,0,__PYX_ERR(0, 845, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_dir_z, __pyx_v_dir_zs) < 0)) __PYX_ERR(0, 845, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":846
 *         hits['dir_y'] = dir_ys
 *         hits['dir_z'] = dir_zs
 *         hits['dom_id'] = dom_ids             # <<<<<<<<<<<<<<
 *         hits['id'] = ids
 *         hits['pmt_id'] = pmt_ids
 */
  __Pyx_TraceLine(846,0,__PYX_ERR(0, 846, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_dom_id, __pyx_v_dom_ids) < 0)) __PYX_ERR(0, 846, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":847
 *         hits['dir_z'] = dir_zs
 *         hits['dom_id'] = dom_ids
 *         hits['id'] = ids             # <<<<<<<<<<<<<<
 *         hits['pmt_id'] = pmt_ids
 *         hits['pos_x'] = pos_xs
 */
  __Pyx_TraceLine(847,0,__PYX_ERR(0, 847, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_id, __pyx_v_ids) < 0)) __PYX_ERR(0, 847, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":848
 *         hits['dom_id'] = dom_ids
 *         hits['id'] = ids
 *         hits['pmt_id'] = pmt_ids             # <<<<<<<<<<<<<<
 *         hits['pos_x'] = pos_xs
 *         hits['pos_y'] = pos_ys
 */
  __Pyx_TraceLine(848,0,__PYX_ERR(0, 848, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_pmt_id, __pyx_v_pmt_ids) < 0)) __PYX_ERR(0, 848, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":849
 *         hits['id'] = ids
 *         hits['pmt_id'] = pmt_ids
 *         hits['pos_x'] = pos_xs             # <<<<<<<<<<<<<<
 *         hits['pos_y'] = pos_ys
 *         hits['pos_z'] = pos_zs
 */
  __Pyx_TraceLine(849,0,__PYX_ERR(0, 849, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_pos_x, __pyx_v_pos_xs) < 0)) __PYX_ERR(0, 849, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":850
 *         hits['pmt_id'] = pmt_ids
 *         hits['pos_x'] = pos_xs
 *         hits['pos_y'] = pos_ys             # <<<<<<<<<<<<<<
 *         hits['pos_z'] = pos_zs
 *         hits['t0'] = t0s
 */
  __Pyx_TraceLine(850,0,__PYX_ERR(0, 850, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_pos_y, __pyx_v_pos_ys) < 0)) __PYX_ERR(0, 850, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":851
 *         hits['pos_x'] = pos_xs
 *         hits['pos_y'] = pos_ys
 *         hits['pos_z'] = pos_zs             # <<<<<<<<<<<<<<
 *         hits['t0'] = t0s
 *         hits['time'] = times
 */
  __Pyx_TraceLine(851,0,__PYX_ERR(0, 851, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_pos_z, __pyx_v_pos_zs) < 0)) __PYX_ERR(0, 851, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":852
 *         hits['pos_y'] = pos_ys
 *         hits['pos_z'] = pos_zs
 *         hits['t0'] = t0s             # <<<<<<<<<<<<<<
 *         hits['time'] = times
 *         hits['tot'] = tots
 */
  __Pyx_TraceLine(852,0,__PYX_ERR(0, 852, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_t0, __pyx_v_t0s) < 0)) __PYX_ERR(0, 852, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":853
 *         hits['pos_z'] = pos_zs
 *         hits['t0'] = t0s
 *         hits['time'] = times             # <<<<<<<<<<<<<<
 *         hits['tot'] = tots
 *         hits['triggered'] = triggereds
 */
  __Pyx_TraceLine(853,0,__PYX_ERR(0, 853, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_time, __pyx_v_times) < 0)) __PYX_ERR(0, 853, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":854
 *         hits['t0'] = t0s
 *         hits['time'] = times
 *         hits['tot'] = tots             # <<<<<<<<<<<<<<
 *         hits['triggered'] = triggereds
 *         hits['event_id'] = np.full(length, event_id, dtype='<u4')
 */
  __Pyx_TraceLine(854,0,__PYX_ERR(0, 854, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_tot, __pyx_v_tots) < 0)) __PYX_ERR(0, 854, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":855
 *         hits['time'] = times
 *         hits['tot'] = tots
 *         hits['triggered'] = triggereds             # <<<<<<<<<<<<<<
 *         hits['event_id'] = np.full(length, event_id, dtype='<u4')
 *         return cls(hits)
 */
  __Pyx_TraceLine(855,0,__PYX_ERR(0, 855, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_triggered, __pyx_v_triggereds) < 0)) __PYX_ERR(0, 855, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":856
 *         hits['tot'] = tots
 *         hits['triggered'] = triggereds
 *         hits['event_id'] = np.full(length, event_id, dtype='<u4')             # <<<<<<<<<<<<<<
 *         return cls(hits)
 * 
 */
  __Pyx_TraceLine(856,0,__PYX_ERR(0, 856, __pyx_L1_error))
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_full); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_v_length);
  __Pyx_GIVEREF(__pyx_v_length);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_length);
  __Pyx_INCREF(__pyx_v_event_id);
  __Pyx_GIVEREF(__pyx_v_event_id);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_event_id);
  __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_dtype, __pyx_kp_s_u4) < 0) __PYX_ERR(0, 856, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_event_id, __pyx_t_4) < 0)) __PYX_ERR(0, 856, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":857
 *         hits['triggered'] = triggereds
 *         hits['event_id'] = np.full(length, event_id, dtype='<u4')
 *         return cls(hits)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(857,0,__PYX_ERR(0, 857, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_cls);
  __pyx_t_10 = __pyx_v_cls; __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_10);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_10, function);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_hits); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 857, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_10)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_hits};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 857, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_hits};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 857, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 857, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_INCREF(__pyx_v_hits);
      __Pyx_GIVEREF(__pyx_v_hits);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_hits);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 857, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":833
 * 
 *     @classmethod
 *     def from_arrays(cls, channel_ids, dir_xs, dir_ys, dir_zs, dom_ids, ids,             # <<<<<<<<<<<<<<
 *                     pmt_ids, pos_xs, pos_ys, pos_zs, t0s, times, tots,
 *                     triggereds, event_id):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_length);
  __Pyx_XDECREF(__pyx_v_hits);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":860
 * 
 *     @classmethod
 *     def from_dict(cls, map, event_id):             # <<<<<<<<<<<<<<
 *         if event_id is None:
 *             event_id = map['event_id']
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_9from_dict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_8from_dict[] = "HitSeries.from_dict(cls, map, event_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_9from_dict = {"from_dict", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_9from_dict, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_8from_dict};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_9from_dict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_map = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_dict (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_map,&__pyx_n_s_event_id,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_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_map)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_dict", 1, 3, 3, 1); __PYX_ERR(0, 860, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_dict", 1, 3, 3, 2); __PYX_ERR(0, 860, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_dict") < 0)) __PYX_ERR(0, 860, __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_cls = values[0];
    __pyx_v_map = values[1];
    __pyx_v_event_id = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_dict", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 860, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.from_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_8from_dict(__pyx_self, __pyx_v_cls, __pyx_v_map, __pyx_v_event_id);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_8from_dict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_map, PyObject *__pyx_v_event_id) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  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 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  int __pyx_t_20;
  PyObject *__pyx_t_21 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__80)
  __Pyx_RefNannySetupContext("from_dict", 0);
  __Pyx_TraceCall("from_dict", __pyx_f[0], 860, 0, __PYX_ERR(0, 860, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_event_id);

  /* "km3pipe/dataclasses.pyx":861
 *     @classmethod
 *     def from_dict(cls, map, event_id):
 *         if event_id is None:             # <<<<<<<<<<<<<<
 *             event_id = map['event_id']
 *         return cls.from_arrays(
 */
  __Pyx_TraceLine(861,0,__PYX_ERR(0, 861, __pyx_L1_error))
  __pyx_t_1 = (__pyx_v_event_id == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "km3pipe/dataclasses.pyx":862
 *     def from_dict(cls, map, event_id):
 *         if event_id is None:
 *             event_id = map['event_id']             # <<<<<<<<<<<<<<
 *         return cls.from_arrays(
 *             map['channel_id'],
 */
    __Pyx_TraceLine(862,0,__PYX_ERR(0, 862, __pyx_L1_error))
    __pyx_t_3 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_event_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 862, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_event_id, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "km3pipe/dataclasses.pyx":861
 *     @classmethod
 *     def from_dict(cls, map, event_id):
 *         if event_id is None:             # <<<<<<<<<<<<<<
 *             event_id = map['event_id']
 *         return cls.from_arrays(
 */
  }

  /* "km3pipe/dataclasses.pyx":863
 *         if event_id is None:
 *             event_id = map['event_id']
 *         return cls.from_arrays(             # <<<<<<<<<<<<<<
 *             map['channel_id'],
 *             map['dir_x'],
 */
  __Pyx_TraceLine(863,0,__PYX_ERR(0, 863, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_from_arrays); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "km3pipe/dataclasses.pyx":864
 *             event_id = map['event_id']
 *         return cls.from_arrays(
 *             map['channel_id'],             # <<<<<<<<<<<<<<
 *             map['dir_x'],
 *             map['dir_y'],
 */
  __Pyx_TraceLine(864,0,__PYX_ERR(0, 864, __pyx_L1_error))
  __pyx_t_5 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_channel_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":865
 *         return cls.from_arrays(
 *             map['channel_id'],
 *             map['dir_x'],             # <<<<<<<<<<<<<<
 *             map['dir_y'],
 *             map['dir_z'],
 */
  __Pyx_TraceLine(865,0,__PYX_ERR(0, 865, __pyx_L1_error))
  __pyx_t_6 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_dir_x); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":866
 *             map['channel_id'],
 *             map['dir_x'],
 *             map['dir_y'],             # <<<<<<<<<<<<<<
 *             map['dir_z'],
 *             map['dom_id'],
 */
  __Pyx_TraceLine(866,0,__PYX_ERR(0, 866, __pyx_L1_error))
  __pyx_t_7 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_dir_y); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":867
 *             map['dir_x'],
 *             map['dir_y'],
 *             map['dir_z'],             # <<<<<<<<<<<<<<
 *             map['dom_id'],
 *             map['id'],
 */
  __Pyx_TraceLine(867,0,__PYX_ERR(0, 867, __pyx_L1_error))
  __pyx_t_8 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_dir_z); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "km3pipe/dataclasses.pyx":868
 *             map['dir_y'],
 *             map['dir_z'],
 *             map['dom_id'],             # <<<<<<<<<<<<<<
 *             map['id'],
 *             map['pmt_id'],
 */
  __Pyx_TraceLine(868,0,__PYX_ERR(0, 868, __pyx_L1_error))
  __pyx_t_9 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_dom_id); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);

  /* "km3pipe/dataclasses.pyx":869
 *             map['dir_z'],
 *             map['dom_id'],
 *             map['id'],             # <<<<<<<<<<<<<<
 *             map['pmt_id'],
 *             map['pos_x'],
 */
  __Pyx_TraceLine(869,0,__PYX_ERR(0, 869, __pyx_L1_error))
  __pyx_t_10 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_id); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);

  /* "km3pipe/dataclasses.pyx":870
 *             map['dom_id'],
 *             map['id'],
 *             map['pmt_id'],             # <<<<<<<<<<<<<<
 *             map['pos_x'],
 *             map['pos_y'],
 */
  __Pyx_TraceLine(870,0,__PYX_ERR(0, 870, __pyx_L1_error))
  __pyx_t_11 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_pmt_id); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 870, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);

  /* "km3pipe/dataclasses.pyx":871
 *             map['id'],
 *             map['pmt_id'],
 *             map['pos_x'],             # <<<<<<<<<<<<<<
 *             map['pos_y'],
 *             map['pos_z'],
 */
  __Pyx_TraceLine(871,0,__PYX_ERR(0, 871, __pyx_L1_error))
  __pyx_t_12 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_pos_x); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);

  /* "km3pipe/dataclasses.pyx":872
 *             map['pmt_id'],
 *             map['pos_x'],
 *             map['pos_y'],             # <<<<<<<<<<<<<<
 *             map['pos_z'],
 *             map['t0'],
 */
  __Pyx_TraceLine(872,0,__PYX_ERR(0, 872, __pyx_L1_error))
  __pyx_t_13 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_pos_y); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 872, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);

  /* "km3pipe/dataclasses.pyx":873
 *             map['pos_x'],
 *             map['pos_y'],
 *             map['pos_z'],             # <<<<<<<<<<<<<<
 *             map['t0'],
 *             map['time'],
 */
  __Pyx_TraceLine(873,0,__PYX_ERR(0, 873, __pyx_L1_error))
  __pyx_t_14 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_pos_z); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);

  /* "km3pipe/dataclasses.pyx":874
 *             map['pos_y'],
 *             map['pos_z'],
 *             map['t0'],             # <<<<<<<<<<<<<<
 *             map['time'],
 *             map['tot'],
 */
  __Pyx_TraceLine(874,0,__PYX_ERR(0, 874, __pyx_L1_error))
  __pyx_t_15 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_t0); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);

  /* "km3pipe/dataclasses.pyx":875
 *             map['pos_z'],
 *             map['t0'],
 *             map['time'],             # <<<<<<<<<<<<<<
 *             map['tot'],
 *             map['triggered'],
 */
  __Pyx_TraceLine(875,0,__PYX_ERR(0, 875, __pyx_L1_error))
  __pyx_t_16 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_time); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);

  /* "km3pipe/dataclasses.pyx":876
 *             map['t0'],
 *             map['time'],
 *             map['tot'],             # <<<<<<<<<<<<<<
 *             map['triggered'],
 *             event_id,
 */
  __Pyx_TraceLine(876,0,__PYX_ERR(0, 876, __pyx_L1_error))
  __pyx_t_17 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_tot); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);

  /* "km3pipe/dataclasses.pyx":877
 *             map['time'],
 *             map['tot'],
 *             map['triggered'],             # <<<<<<<<<<<<<<
 *             event_id,
 *         )
 */
  __Pyx_TraceLine(877,0,__PYX_ERR(0, 877, __pyx_L1_error))
  __pyx_t_18 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_triggered); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);

  /* "km3pipe/dataclasses.pyx":878
 *             map['tot'],
 *             map['triggered'],
 *             event_id,             # <<<<<<<<<<<<<<
 *         )
 * 
 */
  __Pyx_TraceLine(878,0,__PYX_ERR(0, 878, __pyx_L1_error))
  __pyx_t_19 = NULL;
  __pyx_t_20 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_19)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_19);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_20 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[16] = {__pyx_t_19, __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, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_v_event_id};
    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_20, 15+__pyx_t_20); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 863, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[16] = {__pyx_t_19, __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, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_v_event_id};
    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_20, 15+__pyx_t_20); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 863, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  } else
  #endif
  {
    __pyx_t_21 = PyTuple_New(15+__pyx_t_20); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 863, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_21);
    if (__pyx_t_19) {
      __Pyx_GIVEREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_19); __pyx_t_19 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_21, 0+__pyx_t_20, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_21, 1+__pyx_t_20, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_21, 2+__pyx_t_20, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_21, 3+__pyx_t_20, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_21, 4+__pyx_t_20, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_21, 5+__pyx_t_20, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_21, 6+__pyx_t_20, __pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_21, 7+__pyx_t_20, __pyx_t_12);
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_21, 8+__pyx_t_20, __pyx_t_13);
    __Pyx_GIVEREF(__pyx_t_14);
    PyTuple_SET_ITEM(__pyx_t_21, 9+__pyx_t_20, __pyx_t_14);
    __Pyx_GIVEREF(__pyx_t_15);
    PyTuple_SET_ITEM(__pyx_t_21, 10+__pyx_t_20, __pyx_t_15);
    __Pyx_GIVEREF(__pyx_t_16);
    PyTuple_SET_ITEM(__pyx_t_21, 11+__pyx_t_20, __pyx_t_16);
    __Pyx_GIVEREF(__pyx_t_17);
    PyTuple_SET_ITEM(__pyx_t_21, 12+__pyx_t_20, __pyx_t_17);
    __Pyx_GIVEREF(__pyx_t_18);
    PyTuple_SET_ITEM(__pyx_t_21, 13+__pyx_t_20, __pyx_t_18);
    __Pyx_INCREF(__pyx_v_event_id);
    __Pyx_GIVEREF(__pyx_v_event_id);
    PyTuple_SET_ITEM(__pyx_t_21, 14+__pyx_t_20, __pyx_v_event_id);
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_8 = 0;
    __pyx_t_9 = 0;
    __pyx_t_10 = 0;
    __pyx_t_11 = 0;
    __pyx_t_12 = 0;
    __pyx_t_13 = 0;
    __pyx_t_14 = 0;
    __pyx_t_15 = 0;
    __pyx_t_16 = 0;
    __pyx_t_17 = 0;
    __pyx_t_18 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_21, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 863, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":860
 * 
 *     @classmethod
 *     def from_dict(cls, map, event_id):             # <<<<<<<<<<<<<<
 *         if event_id is None:
 *             event_id = map['event_id']
 */

  /* function exit code */
  __pyx_L1_error:;
  __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_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_21);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.from_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_event_id);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":882
 * 
 *     @classmethod
 *     def from_table(cls, table, event_id):             # <<<<<<<<<<<<<<
 *         if event_id is None:
 *             event_id = table[0]['event_id']
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_11from_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_10from_table[] = "HitSeries.from_table(cls, table, event_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_11from_table = {"from_table", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_11from_table, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_10from_table};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_11from_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_table = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_table (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_table,&__pyx_n_s_event_id,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_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_table)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_table", 1, 3, 3, 1); __PYX_ERR(0, 882, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_table", 1, 3, 3, 2); __PYX_ERR(0, 882, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_table") < 0)) __PYX_ERR(0, 882, __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_cls = values[0];
    __pyx_v_table = values[1];
    __pyx_v_event_id = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_table", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 882, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_10from_table(__pyx_self, __pyx_v_cls, __pyx_v_table, __pyx_v_event_id);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_10from_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_table, PyObject *__pyx_v_event_id) {
  PyObject *__pyx_v_row = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  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 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  int __pyx_t_24;
  __Pyx_TraceFrameInit(__pyx_codeobj__81)
  __Pyx_RefNannySetupContext("from_table", 0);
  __Pyx_TraceCall("from_table", __pyx_f[0], 882, 0, __PYX_ERR(0, 882, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_event_id);

  /* "km3pipe/dataclasses.pyx":883
 *     @classmethod
 *     def from_table(cls, table, event_id):
 *         if event_id is None:             # <<<<<<<<<<<<<<
 *             event_id = table[0]['event_id']
 *         return cls(np.array([(
 */
  __Pyx_TraceLine(883,0,__PYX_ERR(0, 883, __pyx_L1_error))
  __pyx_t_1 = (__pyx_v_event_id == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "km3pipe/dataclasses.pyx":884
 *     def from_table(cls, table, event_id):
 *         if event_id is None:
 *             event_id = table[0]['event_id']             # <<<<<<<<<<<<<<
 *         return cls(np.array([(
 *             row['channel_id'],
 */
    __Pyx_TraceLine(884,0,__PYX_ERR(0, 884, __pyx_L1_error))
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_table, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 884, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_event_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 884, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_event_id, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "km3pipe/dataclasses.pyx":883
 *     @classmethod
 *     def from_table(cls, table, event_id):
 *         if event_id is None:             # <<<<<<<<<<<<<<
 *             event_id = table[0]['event_id']
 *         return cls(np.array([(
 */
  }

  /* "km3pipe/dataclasses.pyx":885
 *         if event_id is None:
 *             event_id = table[0]['event_id']
 *         return cls(np.array([(             # <<<<<<<<<<<<<<
 *             row['channel_id'],
 *             row['dir_x'],
 */
  __Pyx_TraceLine(885,0,__PYX_ERR(0, 885, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "km3pipe/dataclasses.pyx":900
 *             row['tot'],
 *             row['triggered'],
 *         ) for row in table], dtype=cls.dtype), event_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(900,0,__PYX_ERR(0, 900, __pyx_L1_error))
  if (likely(PyList_CheckExact(__pyx_v_table)) || PyTuple_CheckExact(__pyx_v_table)) {
    __pyx_t_6 = __pyx_v_table; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_table); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 900, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 900, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_6))) {
        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_6)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 900, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 900, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      } else {
        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 900, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 900, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      }
    } else {
      __pyx_t_9 = __pyx_t_8(__pyx_t_6);
      if (unlikely(!__pyx_t_9)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 900, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_9);
    }
    __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "km3pipe/dataclasses.pyx":886
 *             event_id = table[0]['event_id']
 *         return cls(np.array([(
 *             row['channel_id'],             # <<<<<<<<<<<<<<
 *             row['dir_x'],
 *             row['dir_y'],
 */
    __Pyx_TraceLine(886,0,__PYX_ERR(0, 886, __pyx_L1_error))
    __pyx_t_9 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_channel_id); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 886, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);

    /* "km3pipe/dataclasses.pyx":887
 *         return cls(np.array([(
 *             row['channel_id'],
 *             row['dir_x'],             # <<<<<<<<<<<<<<
 *             row['dir_y'],
 *             row['dir_z'],
 */
    __Pyx_TraceLine(887,0,__PYX_ERR(0, 887, __pyx_L1_error))
    __pyx_t_10 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_dir_x); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 887, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);

    /* "km3pipe/dataclasses.pyx":888
 *             row['channel_id'],
 *             row['dir_x'],
 *             row['dir_y'],             # <<<<<<<<<<<<<<
 *             row['dir_z'],
 *             row['dom_id'],
 */
    __Pyx_TraceLine(888,0,__PYX_ERR(0, 888, __pyx_L1_error))
    __pyx_t_11 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_dir_y); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 888, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);

    /* "km3pipe/dataclasses.pyx":889
 *             row['dir_x'],
 *             row['dir_y'],
 *             row['dir_z'],             # <<<<<<<<<<<<<<
 *             row['dom_id'],
 *             row['id'],
 */
    __Pyx_TraceLine(889,0,__PYX_ERR(0, 889, __pyx_L1_error))
    __pyx_t_12 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_dir_z); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 889, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);

    /* "km3pipe/dataclasses.pyx":890
 *             row['dir_y'],
 *             row['dir_z'],
 *             row['dom_id'],             # <<<<<<<<<<<<<<
 *             row['id'],
 *             row['pmt_id'],
 */
    __Pyx_TraceLine(890,0,__PYX_ERR(0, 890, __pyx_L1_error))
    __pyx_t_13 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_dom_id); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 890, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);

    /* "km3pipe/dataclasses.pyx":891
 *             row['dir_z'],
 *             row['dom_id'],
 *             row['id'],             # <<<<<<<<<<<<<<
 *             row['pmt_id'],
 *             row['pos_x'],
 */
    __Pyx_TraceLine(891,0,__PYX_ERR(0, 891, __pyx_L1_error))
    __pyx_t_14 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_id); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);

    /* "km3pipe/dataclasses.pyx":892
 *             row['dom_id'],
 *             row['id'],
 *             row['pmt_id'],             # <<<<<<<<<<<<<<
 *             row['pos_x'],
 *             row['pos_y'],
 */
    __Pyx_TraceLine(892,0,__PYX_ERR(0, 892, __pyx_L1_error))
    __pyx_t_15 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_pmt_id); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 892, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);

    /* "km3pipe/dataclasses.pyx":893
 *             row['id'],
 *             row['pmt_id'],
 *             row['pos_x'],             # <<<<<<<<<<<<<<
 *             row['pos_y'],
 *             row['pos_z'],
 */
    __Pyx_TraceLine(893,0,__PYX_ERR(0, 893, __pyx_L1_error))
    __pyx_t_16 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_pos_x); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 893, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);

    /* "km3pipe/dataclasses.pyx":894
 *             row['pmt_id'],
 *             row['pos_x'],
 *             row['pos_y'],             # <<<<<<<<<<<<<<
 *             row['pos_z'],
 *             row['t0'],
 */
    __Pyx_TraceLine(894,0,__PYX_ERR(0, 894, __pyx_L1_error))
    __pyx_t_17 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_pos_y); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 894, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);

    /* "km3pipe/dataclasses.pyx":895
 *             row['pos_x'],
 *             row['pos_y'],
 *             row['pos_z'],             # <<<<<<<<<<<<<<
 *             row['t0'],
 *             row['time'],
 */
    __Pyx_TraceLine(895,0,__PYX_ERR(0, 895, __pyx_L1_error))
    __pyx_t_18 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_pos_z); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 895, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);

    /* "km3pipe/dataclasses.pyx":896
 *             row['pos_y'],
 *             row['pos_z'],
 *             row['t0'],             # <<<<<<<<<<<<<<
 *             row['time'],
 *             row['tot'],
 */
    __Pyx_TraceLine(896,0,__PYX_ERR(0, 896, __pyx_L1_error))
    __pyx_t_19 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_t0); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 896, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);

    /* "km3pipe/dataclasses.pyx":897
 *             row['pos_z'],
 *             row['t0'],
 *             row['time'],             # <<<<<<<<<<<<<<
 *             row['tot'],
 *             row['triggered'],
 */
    __Pyx_TraceLine(897,0,__PYX_ERR(0, 897, __pyx_L1_error))
    __pyx_t_20 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_time); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 897, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_20);

    /* "km3pipe/dataclasses.pyx":898
 *             row['t0'],
 *             row['time'],
 *             row['tot'],             # <<<<<<<<<<<<<<
 *             row['triggered'],
 *         ) for row in table], dtype=cls.dtype), event_id)
 */
    __Pyx_TraceLine(898,0,__PYX_ERR(0, 898, __pyx_L1_error))
    __pyx_t_21 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_tot); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 898, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_21);

    /* "km3pipe/dataclasses.pyx":899
 *             row['time'],
 *             row['tot'],
 *             row['triggered'],             # <<<<<<<<<<<<<<
 *         ) for row in table], dtype=cls.dtype), event_id)
 * 
 */
    __Pyx_TraceLine(899,0,__PYX_ERR(0, 899, __pyx_L1_error))
    __pyx_t_22 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_triggered); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 899, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_22);

    /* "km3pipe/dataclasses.pyx":886
 *             event_id = table[0]['event_id']
 *         return cls(np.array([(
 *             row['channel_id'],             # <<<<<<<<<<<<<<
 *             row['dir_x'],
 *             row['dir_y'],
 */
    __Pyx_TraceLine(886,0,__PYX_ERR(0, 886, __pyx_L1_error))
    __pyx_t_23 = PyTuple_New(14); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 886, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_23);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_23, 0, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_23, 1, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_23, 2, __pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_23, 3, __pyx_t_12);
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_23, 4, __pyx_t_13);
    __Pyx_GIVEREF(__pyx_t_14);
    PyTuple_SET_ITEM(__pyx_t_23, 5, __pyx_t_14);
    __Pyx_GIVEREF(__pyx_t_15);
    PyTuple_SET_ITEM(__pyx_t_23, 6, __pyx_t_15);
    __Pyx_GIVEREF(__pyx_t_16);
    PyTuple_SET_ITEM(__pyx_t_23, 7, __pyx_t_16);
    __Pyx_GIVEREF(__pyx_t_17);
    PyTuple_SET_ITEM(__pyx_t_23, 8, __pyx_t_17);
    __Pyx_GIVEREF(__pyx_t_18);
    PyTuple_SET_ITEM(__pyx_t_23, 9, __pyx_t_18);
    __Pyx_GIVEREF(__pyx_t_19);
    PyTuple_SET_ITEM(__pyx_t_23, 10, __pyx_t_19);
    __Pyx_GIVEREF(__pyx_t_20);
    PyTuple_SET_ITEM(__pyx_t_23, 11, __pyx_t_20);
    __Pyx_GIVEREF(__pyx_t_21);
    PyTuple_SET_ITEM(__pyx_t_23, 12, __pyx_t_21);
    __Pyx_GIVEREF(__pyx_t_22);
    PyTuple_SET_ITEM(__pyx_t_23, 13, __pyx_t_22);
    __pyx_t_9 = 0;
    __pyx_t_10 = 0;
    __pyx_t_11 = 0;
    __pyx_t_12 = 0;
    __pyx_t_13 = 0;
    __pyx_t_14 = 0;
    __pyx_t_15 = 0;
    __pyx_t_16 = 0;
    __pyx_t_17 = 0;
    __pyx_t_18 = 0;
    __pyx_t_19 = 0;
    __pyx_t_20 = 0;
    __pyx_t_21 = 0;
    __pyx_t_22 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_23))) __PYX_ERR(0, 885, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;

    /* "km3pipe/dataclasses.pyx":900
 *             row['tot'],
 *             row['triggered'],
 *         ) for row in table], dtype=cls.dtype), event_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
    __Pyx_TraceLine(900,0,__PYX_ERR(0, 900, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":885
 *         if event_id is None:
 *             event_id = table[0]['event_id']
 *         return cls(np.array([(             # <<<<<<<<<<<<<<
 *             row['channel_id'],
 *             row['dir_x'],
 */
  __Pyx_TraceLine(885,0,__PYX_ERR(0, 885, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":900
 *             row['tot'],
 *             row['triggered'],
 *         ) for row in table], dtype=cls.dtype), event_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(900,0,__PYX_ERR(0, 900, __pyx_L1_error))
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_23);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_23) < 0) __PYX_ERR(0, 900, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;

  /* "km3pipe/dataclasses.pyx":885
 *         if event_id is None:
 *             event_id = table[0]['event_id']
 *         return cls(np.array([(             # <<<<<<<<<<<<<<
 *             row['channel_id'],
 *             row['dir_x'],
 */
  __Pyx_TraceLine(885,0,__PYX_ERR(0, 885, __pyx_L1_error))
  __pyx_t_23 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_23);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":900
 *             row['tot'],
 *             row['triggered'],
 *         ) for row in table], dtype=cls.dtype), event_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(900,0,__PYX_ERR(0, 900, __pyx_L1_error))
  __Pyx_INCREF(__pyx_v_cls);
  __pyx_t_3 = __pyx_v_cls; __pyx_t_6 = NULL;
  __pyx_t_24 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_24 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_23, __pyx_v_event_id};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_24, 2+__pyx_t_24); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 885, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_23, __pyx_v_event_id};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_24, 2+__pyx_t_24); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 885, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_24); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 885, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_23);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_24, __pyx_t_23);
    __Pyx_INCREF(__pyx_v_event_id);
    __Pyx_GIVEREF(__pyx_v_event_id);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_24, __pyx_v_event_id);
    __pyx_t_23 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 885, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":882
 * 
 *     @classmethod
 *     def from_table(cls, table, event_id):             # <<<<<<<<<<<<<<
 *         if event_id is None:
 *             event_id = table[0]['event_id']
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_20);
  __Pyx_XDECREF(__pyx_t_21);
  __Pyx_XDECREF(__pyx_t_22);
  __Pyx_XDECREF(__pyx_t_23);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XDECREF(__pyx_v_event_id);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":903
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_13deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_12deserialise[] = "HitSeries.deserialise(cls, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_13deserialise = {"deserialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_13deserialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_12deserialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_13deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("deserialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,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_cls)) != 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, __pyx_v_kwargs, values, used_pos_args, "deserialise") < 0)) __PYX_ERR(0, 903, __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_cls = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("deserialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 903, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_12deserialise(__pyx_self, __pyx_v_cls, __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_7km3pipe_11dataclasses_9HitSeries_12deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__82)
  __Pyx_RefNannySetupContext("deserialise", 0);
  __Pyx_TraceCall("deserialise", __pyx_f[0], 903, 0, __PYX_ERR(0, 903, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":904
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def serialise(self, *args, **kwargs):
 */
  __Pyx_TraceLine(904,0,__PYX_ERR(0, 904, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_conv_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":903
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":906
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_15serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_14serialise[] = "HitSeries.serialise(self, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_15serialise = {"serialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_15serialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_14serialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_15serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,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_self)) != 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, __pyx_v_kwargs, values, used_pos_args, "serialise") < 0)) __PYX_ERR(0, 906, __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_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 906, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_14serialise(__pyx_self, __pyx_v_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_7km3pipe_11dataclasses_9HitSeries_14serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__83)
  __Pyx_RefNannySetupContext("serialise", 0);
  __Pyx_TraceCall("serialise", __pyx_f[0], 906, 0, __PYX_ERR(0, 906, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":907
 * 
 *     def serialise(self, *args, **kwargs):
 *         return self.conv_to(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(907,0,__PYX_ERR(0, 907, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":906
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":910
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         # what is event_id doing here?
 *         if fmt == 'numpy':
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_17conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_16conv_from[] = "HitSeries.conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_17conv_from = {"conv_from", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_17conv_from, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_16conv_from};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_17conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_data = 0;
  CYTHON_UNUSED PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_v_fmt = 0;
  CYTHON_UNUSED PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_from (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_data,&__pyx_n_s_event_id,&__pyx_n_s_fmt,&__pyx_n_s_h5loc,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    values[4] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    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_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 2, 5, 1); __PYX_ERR(0, 910, __pyx_L3_error)
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fmt);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_from") < 0)) __PYX_ERR(0, 910, __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);
        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_cls = values[0];
    __pyx_v_data = values[1];
    __pyx_v_event_id = values[2];
    __pyx_v_fmt = values[3];
    __pyx_v_h5loc = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_from", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 910, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_16conv_from(__pyx_self, __pyx_v_cls, __pyx_v_data, __pyx_v_event_id, __pyx_v_fmt, __pyx_v_h5loc);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_16conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_event_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  __Pyx_TraceFrameInit(__pyx_codeobj__84)
  __Pyx_RefNannySetupContext("conv_from", 0);
  __Pyx_TraceCall("conv_from", __pyx_f[0], 910, 0, __PYX_ERR(0, 910, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":912
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):
 *         # what is event_id doing here?
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls(data)
 *         if fmt == 'pandas':
 */
  __Pyx_TraceLine(912,0,__PYX_ERR(0, 912, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_fmt, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 912, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":913
 *         # what is event_id doing here?
 *         if fmt == 'numpy':
 *             return cls(data)             # <<<<<<<<<<<<<<
 *         if fmt == 'pandas':
 *             return cls(data.to_records(index=False))
 */
    __Pyx_TraceLine(913,0,__PYX_ERR(0, 913, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_cls);
    __pyx_t_3 = __pyx_v_cls; __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_4) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 913, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_data};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 913, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_data};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 913, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 913, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_data);
        __Pyx_GIVEREF(__pyx_v_data);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_data);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 913, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":912
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):
 *         # what is event_id doing here?
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls(data)
 *         if fmt == 'pandas':
 */
  }

  /* "km3pipe/dataclasses.pyx":914
 *         if fmt == 'numpy':
 *             return cls(data)
 *         if fmt == 'pandas':             # <<<<<<<<<<<<<<
 *             return cls(data.to_records(index=False))
 * 
 */
  __Pyx_TraceLine(914,0,__PYX_ERR(0, 914, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_fmt, __pyx_n_s_pandas, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 914, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":915
 *             return cls(data)
 *         if fmt == 'pandas':
 *             return cls(data.to_records(index=False))             # <<<<<<<<<<<<<<
 * 
 *     def conv_to(self, to='numpy'):
 */
    __Pyx_TraceLine(915,0,__PYX_ERR(0, 915, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_to_records); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 915, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 915, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_index_2, Py_False) < 0) __PYX_ERR(0, 915, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 915, __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_INCREF(__pyx_v_cls);
    __pyx_t_5 = __pyx_v_cls; __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_3) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 915, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 915, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 915, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 915, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 915, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":914
 *         if fmt == 'numpy':
 *             return cls(data)
 *         if fmt == 'pandas':             # <<<<<<<<<<<<<<
 *             return cls(data.to_records(index=False))
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":910
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         # what is event_id doing here?
 *         if fmt == 'numpy':
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":917
 *             return cls(data.to_records(index=False))
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_19conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_18conv_to[] = "HitSeries.conv_to(self, to='numpy')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_19conv_to = {"conv_to", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_19conv_to, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_18conv_to};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_19conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_to = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_to (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_to,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_to);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_to") < 0)) __PYX_ERR(0, 917, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        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_self = values[0];
    __pyx_v_to = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_to", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 917, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_18conv_to(__pyx_self, __pyx_v_self, __pyx_v_to);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_18conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  __Pyx_TraceFrameInit(__pyx_codeobj__85)
  __Pyx_RefNannySetupContext("conv_to", 0);
  __Pyx_TraceCall("conv_to", __pyx_f[0], 917, 0, __PYX_ERR(0, 917, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":918
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)
 */
  __Pyx_TraceLine(918,0,__PYX_ERR(0, 918, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 918, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":919
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),             # <<<<<<<<<<<<<<
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':
 */
    __Pyx_TraceLine(919,0,__PYX_ERR(0, 919, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3Array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 919, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 919, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 919, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_array_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 919, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (__pyx_t_6) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 919, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 919, __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_ERR(0, 919, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 919, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 919, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 919, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 919, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 919, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "km3pipe/dataclasses.pyx":920
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)             # <<<<<<<<<<<<<<
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 */
    __Pyx_TraceLine(920,0,__PYX_ERR(0, 920, __pyx_L1_error))
    __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 920, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_h5loc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 920, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_h5loc, __pyx_t_5) < 0) __PYX_ERR(0, 920, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "km3pipe/dataclasses.pyx":919
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),             # <<<<<<<<<<<<<<
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':
 */
    __Pyx_TraceLine(919,0,__PYX_ERR(0, 919, __pyx_L1_error))
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 919, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":918
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)
 */
  }

  /* "km3pipe/dataclasses.pyx":921
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  __Pyx_TraceLine(921,0,__PYX_ERR(0, 921, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_pandas, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 921, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":922
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)             # <<<<<<<<<<<<<<
 * 
 *     def __array__(self):
 */
    __Pyx_TraceLine(922,0,__PYX_ERR(0, 922, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3DataFrame); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 922, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 922, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 922, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_to, __pyx_n_s_numpy) < 0) __PYX_ERR(0, 922, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 922, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 922, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 922, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_h5loc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 922, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_h5loc, __pyx_t_6) < 0) __PYX_ERR(0, 922, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 922, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":921
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":917
 *             return cls(data.to_records(index=False))
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":924
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_21__array__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_20__array__[] = "HitSeries.__array__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_21__array__ = {"__array__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_21__array__, METH_O, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_20__array__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_21__array__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__array__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_20__array__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_20__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__86)
  __Pyx_RefNannySetupContext("__array__", 0);
  __Pyx_TraceCall("__array__", __pyx_f[0], 924, 0, __PYX_ERR(0, 924, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":925
 * 
 *     def __array__(self):
 *         return self._arr             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __Pyx_TraceLine(925,0,__PYX_ERR(0, 925, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":924
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.__array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":927
 *         return self._arr
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_23__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_22__iter__[] = "HitSeries.__iter__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_23__iter__ = {"__iter__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_23__iter__, METH_O, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_22__iter__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_23__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_22__iter__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_22__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__87)
  __Pyx_RefNannySetupContext("__iter__", 0);
  __Pyx_TraceCall("__iter__", __pyx_f[0], 927, 0, __PYX_ERR(0, 927, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":928
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(928,0,__PYX_ERR(0, 928, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self);
  __pyx_r = __pyx_v_self;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":927
 *         return self._arr
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":931
 * 
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         return self._arr['id']
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_25id(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_24id[] = "HitSeries.id(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_25id = {"id", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_25id, METH_O, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_24id};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_25id(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("id (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_24id(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_24id(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__88)
  __Pyx_RefNannySetupContext("id", 0);
  __Pyx_TraceCall("id", __pyx_f[0], 931, 0, __PYX_ERR(0, 931, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":932
 *     @property
 *     def id(self):
 *         return self._arr['id']             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(932,0,__PYX_ERR(0, 932, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_n_s_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":931
 * 
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         return self._arr['id']
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":935
 * 
 *     @property
 *     def time(self):             # <<<<<<<<<<<<<<
 *         return self._arr['time']
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_27time(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_26time[] = "HitSeries.time(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_27time = {"time", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_27time, METH_O, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_26time};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_27time(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("time (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_26time(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_26time(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__89)
  __Pyx_RefNannySetupContext("time", 0);
  __Pyx_TraceCall("time", __pyx_f[0], 935, 0, __PYX_ERR(0, 935, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":936
 *     @property
 *     def time(self):
 *         return self._arr['time']             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(936,0,__PYX_ERR(0, 936, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":935
 * 
 *     @property
 *     def time(self):             # <<<<<<<<<<<<<<
 *         return self._arr['time']
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":939
 * 
 *     @property
 *     def triggered_hits(self):             # <<<<<<<<<<<<<<
 *         return HitSeries(self._arr[self._arr['triggered'] == True])     # noqa
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_29triggered_hits(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_28triggered_hits[] = "HitSeries.triggered_hits(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_29triggered_hits = {"triggered_hits", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_29triggered_hits, METH_O, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_28triggered_hits};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_29triggered_hits(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("triggered_hits (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_28triggered_hits(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_28triggered_hits(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__90)
  __Pyx_RefNannySetupContext("triggered_hits", 0);
  __Pyx_TraceCall("triggered_hits", __pyx_f[0], 939, 0, __PYX_ERR(0, 939, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":940
 *     @property
 *     def triggered_hits(self):
 *         return HitSeries(self._arr[self._arr['triggered'] == True])     # noqa             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(940,0,__PYX_ERR(0, 940, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_HitSeries); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_GetItem(__pyx_t_4, __pyx_n_s_triggered); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, Py_True, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 940, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_GetItem(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 940, __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_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 940, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 940, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 940, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 940, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 940, __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_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":939
 * 
 *     @property
 *     def triggered_hits(self):             # <<<<<<<<<<<<<<
 *         return HitSeries(self._arr[self._arr['triggered'] == True])     # noqa
 * 
 */

  /* 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_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.triggered_hits", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":943
 * 
 *     @property
 *     def first_hits(self):             # <<<<<<<<<<<<<<
 *         h = self.conv_to(to='pandas')
 *         h.sort_values('time', inplace=True)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_31first_hits(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_30first_hits[] = "HitSeries.first_hits(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_31first_hits = {"first_hits", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_31first_hits, METH_O, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_30first_hits};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_31first_hits(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("first_hits (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_30first_hits(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_30first_hits(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_h = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__91)
  __Pyx_RefNannySetupContext("first_hits", 0);
  __Pyx_TraceCall("first_hits", __pyx_f[0], 943, 0, __PYX_ERR(0, 943, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":944
 *     @property
 *     def first_hits(self):
 *         h = self.conv_to(to='pandas')             # <<<<<<<<<<<<<<
 *         h.sort_values('time', inplace=True)
 *         h = h.drop_duplicates(subset='dom_id')
 */
  __Pyx_TraceLine(944,0,__PYX_ERR(0, 944, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_to, __pyx_n_s_pandas) < 0) __PYX_ERR(0, 944, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 944, __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_h = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":945
 *     def first_hits(self):
 *         h = self.conv_to(to='pandas')
 *         h.sort_values('time', inplace=True)             # <<<<<<<<<<<<<<
 *         h = h.drop_duplicates(subset='dom_id')
 *         return HitSeries(h.to_records(index=False))
 */
  __Pyx_TraceLine(945,0,__PYX_ERR(0, 945, __pyx_L1_error))
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_sort_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 945, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__92, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 945, __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;

  /* "km3pipe/dataclasses.pyx":946
 *         h = self.conv_to(to='pandas')
 *         h.sort_values('time', inplace=True)
 *         h = h.drop_duplicates(subset='dom_id')             # <<<<<<<<<<<<<<
 *         return HitSeries(h.to_records(index=False))
 * 
 */
  __Pyx_TraceLine(946,0,__PYX_ERR(0, 946, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_drop_duplicates); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_subset, __pyx_n_s_dom_id) < 0) __PYX_ERR(0, 946, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 946, __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_SET(__pyx_v_h, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":947
 *         h.sort_values('time', inplace=True)
 *         h = h.drop_duplicates(subset='dom_id')
 *         return HitSeries(h.to_records(index=False))             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(947,0,__PYX_ERR(0, 947, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_HitSeries); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_to_records); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_index_2, Py_False) < 0) __PYX_ERR(0, 947, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 947, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 947, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 947, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 947, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 947, __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_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":943
 * 
 *     @property
 *     def first_hits(self):             # <<<<<<<<<<<<<<
 *         h = self.conv_to(to='pandas')
 *         h.sort_values('time', inplace=True)
 */

  /* 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_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.first_hits", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_h);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":950
 * 
 *     @property
 *     def triggered(self):             # <<<<<<<<<<<<<<
 *         return self._arr['triggered']
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_33triggered(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_32triggered[] = "HitSeries.triggered(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_33triggered = {"triggered", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_33triggered, METH_O, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_32triggered};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_33triggered(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("triggered (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_32triggered(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_32triggered(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__93)
  __Pyx_RefNannySetupContext("triggered", 0);
  __Pyx_TraceCall("triggered", __pyx_f[0], 950, 0, __PYX_ERR(0, 950, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":951
 *     @property
 *     def triggered(self):
 *         return self._arr['triggered']             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(951,0,__PYX_ERR(0, 951, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_n_s_triggered); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":950
 * 
 *     @property
 *     def triggered(self):             # <<<<<<<<<<<<<<
 *         return self._arr['triggered']
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.triggered", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":954
 * 
 *     @property
 *     def tot(self):             # <<<<<<<<<<<<<<
 *         return self._arr['tot']
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_35tot(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_34tot[] = "HitSeries.tot(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_35tot = {"tot", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_35tot, METH_O, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_34tot};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_35tot(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tot (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_34tot(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_34tot(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__94)
  __Pyx_RefNannySetupContext("tot", 0);
  __Pyx_TraceCall("tot", __pyx_f[0], 954, 0, __PYX_ERR(0, 954, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":955
 *     @property
 *     def tot(self):
 *         return self._arr['tot']             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(955,0,__PYX_ERR(0, 955, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_n_s_tot); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":954
 * 
 *     @property
 *     def tot(self):             # <<<<<<<<<<<<<<
 *         return self._arr['tot']
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.tot", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":958
 * 
 *     @property
 *     def dom_id(self):             # <<<<<<<<<<<<<<
 *         return self._arr['dom_id']
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_37dom_id(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_36dom_id[] = "HitSeries.dom_id(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_37dom_id = {"dom_id", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_37dom_id, METH_O, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_36dom_id};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_37dom_id(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dom_id (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_36dom_id(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_36dom_id(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__95)
  __Pyx_RefNannySetupContext("dom_id", 0);
  __Pyx_TraceCall("dom_id", __pyx_f[0], 958, 0, __PYX_ERR(0, 958, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":959
 *     @property
 *     def dom_id(self):
 *         return self._arr['dom_id']             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(959,0,__PYX_ERR(0, 959, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_n_s_dom_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":958
 * 
 *     @property
 *     def dom_id(self):             # <<<<<<<<<<<<<<
 *         return self._arr['dom_id']
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.dom_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":962
 * 
 *     @property
 *     def pmt_id(self):             # <<<<<<<<<<<<<<
 *         return self._arr['pmt_id']
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_39pmt_id(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_38pmt_id[] = "HitSeries.pmt_id(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_39pmt_id = {"pmt_id", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_39pmt_id, METH_O, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_38pmt_id};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_39pmt_id(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pmt_id (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_38pmt_id(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_38pmt_id(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__96)
  __Pyx_RefNannySetupContext("pmt_id", 0);
  __Pyx_TraceCall("pmt_id", __pyx_f[0], 962, 0, __PYX_ERR(0, 962, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":963
 *     @property
 *     def pmt_id(self):
 *         return self._arr['pmt_id']             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(963,0,__PYX_ERR(0, 963, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_n_s_pmt_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":962
 * 
 *     @property
 *     def pmt_id(self):             # <<<<<<<<<<<<<<
 *         return self._arr['pmt_id']
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.pmt_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":966
 * 
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         return self._arr['id']
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_41id(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_40id[] = "HitSeries.id(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_41id = {"id", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_41id, METH_O, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_40id};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_41id(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("id (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_40id(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_40id(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__97)
  __Pyx_RefNannySetupContext("id", 0);
  __Pyx_TraceCall("id", __pyx_f[0], 966, 0, __PYX_ERR(0, 966, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":967
 *     @property
 *     def id(self):
 *         return self._arr['id']             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(967,0,__PYX_ERR(0, 967, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_n_s_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":966
 * 
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         return self._arr['id']
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":970
 * 
 *     @property
 *     def channel_id(self):             # <<<<<<<<<<<<<<
 *         return self._arr['channel_id']
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_43channel_id(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_42channel_id[] = "HitSeries.channel_id(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_43channel_id = {"channel_id", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_43channel_id, METH_O, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_42channel_id};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_43channel_id(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("channel_id (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_42channel_id(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_42channel_id(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__98)
  __Pyx_RefNannySetupContext("channel_id", 0);
  __Pyx_TraceCall("channel_id", __pyx_f[0], 970, 0, __PYX_ERR(0, 970, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":971
 *     @property
 *     def channel_id(self):
 *         return self._arr['channel_id']             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(971,0,__PYX_ERR(0, 971, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_n_s_channel_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":970
 * 
 *     @property
 *     def channel_id(self):             # <<<<<<<<<<<<<<
 *         return self._arr['channel_id']
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.channel_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":974
 * 
 *     @property
 *     def pos_x(self):             # <<<<<<<<<<<<<<
 *         return self._arr['pos_x']
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_45pos_x(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_44pos_x[] = "HitSeries.pos_x(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_45pos_x = {"pos_x", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_45pos_x, METH_O, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_44pos_x};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_45pos_x(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pos_x (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_44pos_x(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_44pos_x(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__99)
  __Pyx_RefNannySetupContext("pos_x", 0);
  __Pyx_TraceCall("pos_x", __pyx_f[0], 974, 0, __PYX_ERR(0, 974, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":975
 *     @property
 *     def pos_x(self):
 *         return self._arr['pos_x']             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(975,0,__PYX_ERR(0, 975, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 975, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_n_s_pos_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 975, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":974
 * 
 *     @property
 *     def pos_x(self):             # <<<<<<<<<<<<<<
 *         return self._arr['pos_x']
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.pos_x", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":978
 * 
 *     @property
 *     def pos_y(self):             # <<<<<<<<<<<<<<
 *         return self._arr['pos_y']
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_47pos_y(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_46pos_y[] = "HitSeries.pos_y(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_47pos_y = {"pos_y", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_47pos_y, METH_O, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_46pos_y};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_47pos_y(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pos_y (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_46pos_y(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_46pos_y(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__100)
  __Pyx_RefNannySetupContext("pos_y", 0);
  __Pyx_TraceCall("pos_y", __pyx_f[0], 978, 0, __PYX_ERR(0, 978, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":979
 *     @property
 *     def pos_y(self):
 *         return self._arr['pos_y']             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(979,0,__PYX_ERR(0, 979, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 979, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_n_s_pos_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 979, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":978
 * 
 *     @property
 *     def pos_y(self):             # <<<<<<<<<<<<<<
 *         return self._arr['pos_y']
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.pos_y", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":982
 * 
 *     @property
 *     def pos_z(self):             # <<<<<<<<<<<<<<
 *         return self._arr['pos_z']
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_49pos_z(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_48pos_z[] = "HitSeries.pos_z(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_49pos_z = {"pos_z", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_49pos_z, METH_O, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_48pos_z};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_49pos_z(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pos_z (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_48pos_z(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_48pos_z(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__101)
  __Pyx_RefNannySetupContext("pos_z", 0);
  __Pyx_TraceCall("pos_z", __pyx_f[0], 982, 0, __PYX_ERR(0, 982, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":983
 *     @property
 *     def pos_z(self):
 *         return self._arr['pos_z']             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(983,0,__PYX_ERR(0, 983, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_n_s_pos_z); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":982
 * 
 *     @property
 *     def pos_z(self):             # <<<<<<<<<<<<<<
 *         return self._arr['pos_z']
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.pos_z", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":986
 * 
 *     @property
 *     def dir_x(self):             # <<<<<<<<<<<<<<
 *         return self._arr['dir_x']
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_51dir_x(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_50dir_x[] = "HitSeries.dir_x(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_51dir_x = {"dir_x", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_51dir_x, METH_O, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_50dir_x};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_51dir_x(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dir_x (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_50dir_x(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_50dir_x(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__102)
  __Pyx_RefNannySetupContext("dir_x", 0);
  __Pyx_TraceCall("dir_x", __pyx_f[0], 986, 0, __PYX_ERR(0, 986, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":987
 *     @property
 *     def dir_x(self):
 *         return self._arr['dir_x']             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(987,0,__PYX_ERR(0, 987, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_n_s_dir_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":986
 * 
 *     @property
 *     def dir_x(self):             # <<<<<<<<<<<<<<
 *         return self._arr['dir_x']
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.dir_x", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":990
 * 
 *     @property
 *     def dir_y(self):             # <<<<<<<<<<<<<<
 *         return self._arr['dir_y']
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_53dir_y(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_52dir_y[] = "HitSeries.dir_y(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_53dir_y = {"dir_y", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_53dir_y, METH_O, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_52dir_y};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_53dir_y(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dir_y (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_52dir_y(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_52dir_y(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__103)
  __Pyx_RefNannySetupContext("dir_y", 0);
  __Pyx_TraceCall("dir_y", __pyx_f[0], 990, 0, __PYX_ERR(0, 990, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":991
 *     @property
 *     def dir_y(self):
 *         return self._arr['dir_y']             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(991,0,__PYX_ERR(0, 991, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_n_s_dir_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":990
 * 
 *     @property
 *     def dir_y(self):             # <<<<<<<<<<<<<<
 *         return self._arr['dir_y']
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.dir_y", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":994
 * 
 *     @property
 *     def dir_z(self):             # <<<<<<<<<<<<<<
 *         return self._arr['dir_z']
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_55dir_z(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_54dir_z[] = "HitSeries.dir_z(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_55dir_z = {"dir_z", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_55dir_z, METH_O, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_54dir_z};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_55dir_z(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dir_z (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_54dir_z(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_54dir_z(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__104)
  __Pyx_RefNannySetupContext("dir_z", 0);
  __Pyx_TraceCall("dir_z", __pyx_f[0], 994, 0, __PYX_ERR(0, 994, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":995
 *     @property
 *     def dir_z(self):
 *         return self._arr['dir_z']             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(995,0,__PYX_ERR(0, 995, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_n_s_dir_z); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":994
 * 
 *     @property
 *     def dir_z(self):             # <<<<<<<<<<<<<<
 *         return self._arr['dir_z']
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.dir_z", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":998
 * 
 *     @property
 *     def t0(self):             # <<<<<<<<<<<<<<
 *         return self._arr['t0']
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_57t0(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_56t0[] = "HitSeries.t0(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_57t0 = {"t0", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_57t0, METH_O, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_56t0};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_57t0(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("t0 (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_56t0(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_56t0(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__105)
  __Pyx_RefNannySetupContext("t0", 0);
  __Pyx_TraceCall("t0", __pyx_f[0], 998, 0, __PYX_ERR(0, 998, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":999
 *     @property
 *     def t0(self):
 *         return self._arr['t0']             # <<<<<<<<<<<<<<
 * 
 *     def next(self):
 */
  __Pyx_TraceLine(999,0,__PYX_ERR(0, 999, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_n_s_t0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 999, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":998
 * 
 *     @property
 *     def t0(self):             # <<<<<<<<<<<<<<
 *         return self._arr['t0']
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.t0", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1001
 *         return self._arr['t0']
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_59next(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_58next[] = "HitSeries.next(self)\nPython 2/3 compatibility for iterators";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_59next = {"next", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_59next, METH_O, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_58next};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_59next(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("next (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_58next(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_58next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__106)
  __Pyx_RefNannySetupContext("next", 0);
  __Pyx_TraceCall("next", __pyx_f[0], 1001, 0, __PYX_ERR(0, 1001, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1003
 *     def next(self):
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  __Pyx_TraceLine(1003,0,__PYX_ERR(0, 1003, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_next); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1003, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1003, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1003, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1001
 *         return self._arr['t0']
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1005
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_61__next__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_60__next__[] = "HitSeries.__next__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_61__next__ = {"__next__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_61__next__, METH_O, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_60__next__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_61__next__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_60__next__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_60__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_hit = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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_t_5;
  __Pyx_TraceFrameInit(__pyx_codeobj__107)
  __Pyx_RefNannySetupContext("__next__", 0);
  __Pyx_TraceCall("__next__", __pyx_f[0], 1005, 0, __PYX_ERR(0, 1005, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1006
 * 
 *     def __next__(self):
 *         if self._index >= len(self):             # <<<<<<<<<<<<<<
 *             self._index = 0
 *             raise StopIteration
 */
  __Pyx_TraceLine(1006,0,__PYX_ERR(0, 1006, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 1006, __pyx_L1_error)
  __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1006, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1006, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "km3pipe/dataclasses.pyx":1007
 *     def __next__(self):
 *         if self._index >= len(self):
 *             self._index = 0             # <<<<<<<<<<<<<<
 *             raise StopIteration
 *         hit = self[self._index]
 */
    __Pyx_TraceLine(1007,0,__PYX_ERR(0, 1007, __pyx_L1_error))
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index, __pyx_int_0) < 0) __PYX_ERR(0, 1007, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":1008
 *         if self._index >= len(self):
 *             self._index = 0
 *             raise StopIteration             # <<<<<<<<<<<<<<
 *         hit = self[self._index]
 *         self._index += 1
 */
    __Pyx_TraceLine(1008,0,__PYX_ERR(0, 1008, __pyx_L1_error))
    __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
    __PYX_ERR(0, 1008, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":1006
 * 
 *     def __next__(self):
 *         if self._index >= len(self):             # <<<<<<<<<<<<<<
 *             self._index = 0
 *             raise StopIteration
 */
  }

  /* "km3pipe/dataclasses.pyx":1009
 *             self._index = 0
 *             raise StopIteration
 *         hit = self[self._index]             # <<<<<<<<<<<<<<
 *         self._index += 1
 *         return hit
 */
  __Pyx_TraceLine(1009,0,__PYX_ERR(0, 1009, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyObject_GetItem(__pyx_v_self, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_hit = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":1010
 *             raise StopIteration
 *         hit = self[self._index]
 *         self._index += 1             # <<<<<<<<<<<<<<
 *         return hit
 * 
 */
  __Pyx_TraceLine(1010,0,__PYX_ERR(0, 1010, __pyx_L1_error))
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index, __pyx_t_4) < 0) __PYX_ERR(0, 1010, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":1011
 *         hit = self[self._index]
 *         self._index += 1
 *         return hit             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_TraceLine(1011,0,__PYX_ERR(0, 1011, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_hit);
  __pyx_r = __pyx_v_hit;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1005
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_hit);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1013
 *         return hit
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_63__len__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_62__len__[] = "HitSeries.__len__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_63__len__ = {"__len__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_63__len__, METH_O, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_62__len__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_63__len__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_62__len__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_62__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__108)
  __Pyx_RefNannySetupContext("__len__", 0);
  __Pyx_TraceCall("__len__", __pyx_f[0], 1013, 0, __PYX_ERR(0, 1013, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1014
 * 
 *     def __len__(self):
 *         return self._arr.shape[0]             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, index):
 */
  __Pyx_TraceLine(1014,0,__PYX_ERR(0, 1014, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1013
 *         return hit
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1016
 *         return self._arr.shape[0]
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             hit = Hit(*self._arr[index])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_65__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_64__getitem__[] = "HitSeries.__getitem__(self, index)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_65__getitem__ = {"__getitem__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_65__getitem__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_64__getitem__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_65__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_index_2,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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); __PYX_ERR(0, 1016, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getitem__") < 0)) __PYX_ERR(0, 1016, __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_self = values[0];
    __pyx_v_index = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1016, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_64__getitem__(__pyx_self, __pyx_v_self, __pyx_v_index);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_64__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_hit = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__109)
  __Pyx_RefNannySetupContext("__getitem__", 0);
  __Pyx_TraceCall("__getitem__", __pyx_f[0], 1016, 0, __PYX_ERR(0, 1016, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1017
 * 
 *     def __getitem__(self, index):
 *         if isinstance(index, int):             # <<<<<<<<<<<<<<
 *             hit = Hit(*self._arr[index])
 *             return hit
 */
  __Pyx_TraceLine(1017,0,__PYX_ERR(0, 1017, __pyx_L1_error))
  __pyx_t_1 = PyInt_Check(__pyx_v_index); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "km3pipe/dataclasses.pyx":1018
 *     def __getitem__(self, index):
 *         if isinstance(index, int):
 *             hit = Hit(*self._arr[index])             # <<<<<<<<<<<<<<
 *             return hit
 *         elif isinstance(index, slice):
 */
    __Pyx_TraceLine(1018,0,__PYX_ERR(0, 1018, __pyx_L1_error))
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1018, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1018, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1018, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7km3pipe_11dataclasses_Hit), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1018, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_hit = ((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "km3pipe/dataclasses.pyx":1019
 *         if isinstance(index, int):
 *             hit = Hit(*self._arr[index])
 *             return hit             # <<<<<<<<<<<<<<
 *         elif isinstance(index, slice):
 *             return self._slice_generator(index)
 */
    __Pyx_TraceLine(1019,0,__PYX_ERR(0, 1019, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_hit));
    __pyx_r = ((PyObject *)__pyx_v_hit);
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1017
 * 
 *     def __getitem__(self, index):
 *         if isinstance(index, int):             # <<<<<<<<<<<<<<
 *             hit = Hit(*self._arr[index])
 *             return hit
 */
  }

  /* "km3pipe/dataclasses.pyx":1020
 *             hit = Hit(*self._arr[index])
 *             return hit
 *         elif isinstance(index, slice):             # <<<<<<<<<<<<<<
 *             return self._slice_generator(index)
 *         else:
 */
  __Pyx_TraceLine(1020,0,__PYX_ERR(0, 1020, __pyx_L1_error))
  __pyx_t_2 = PySlice_Check(__pyx_v_index); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1021
 *             return hit
 *         elif isinstance(index, slice):
 *             return self._slice_generator(index)             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError("index must be int or slice")
 */
    __Pyx_TraceLine(1021,0,__PYX_ERR(0, 1021, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_slice_generator); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1021, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1021, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_index};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1021, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_index};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1021, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1021, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_INCREF(__pyx_v_index);
        __Pyx_GIVEREF(__pyx_v_index);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_index);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1021, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1020
 *             hit = Hit(*self._arr[index])
 *             return hit
 *         elif isinstance(index, slice):             # <<<<<<<<<<<<<<
 *             return self._slice_generator(index)
 *         else:
 */
  }

  /* "km3pipe/dataclasses.pyx":1023
 *             return self._slice_generator(index)
 *         else:
 *             raise TypeError("index must be int or slice")             # <<<<<<<<<<<<<<
 * 
 *     def _slice_generator(self, index):
 */
  __Pyx_TraceLine(1023,0,__PYX_ERR(0, 1023, __pyx_L1_error))
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__110, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1023, __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_ERR(0, 1023, __pyx_L1_error)
  }

  /* "km3pipe/dataclasses.pyx":1016
 *         return self._arr.shape[0]
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             hit = Hit(*self._arr[index])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_hit);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_7km3pipe_11dataclasses_9HitSeries_68generator(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "km3pipe/dataclasses.pyx":1025
 *             raise TypeError("index must be int or slice")
 * 
 *     def _slice_generator(self, index):             # <<<<<<<<<<<<<<
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_67_slice_generator(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_66_slice_generator[] = "HitSeries._slice_generator(self, index)\nA simple slice generator for iterations";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_67_slice_generator = {"_slice_generator", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_67_slice_generator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_66_slice_generator};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_67_slice_generator(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_slice_generator (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_index_2,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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_slice_generator", 1, 2, 2, 1); __PYX_ERR(0, 1025, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_slice_generator") < 0)) __PYX_ERR(0, 1025, __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_self = values[0];
    __pyx_v_index = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_slice_generator", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1025, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries._slice_generator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_66_slice_generator(__pyx_self, __pyx_v_self, __pyx_v_index);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_66_slice_generator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__111)
  __Pyx_RefNannySetupContext("_slice_generator", 0);
  __pyx_cur_scope = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator *)__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator(__pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1025, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("_slice_generator", __pyx_f[0], 1025, 0, __PYX_ERR(0, 1025, __pyx_L1_error));
  __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);
  __pyx_cur_scope->__pyx_v_index = __pyx_v_index;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_index);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_index);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7km3pipe_11dataclasses_9HitSeries_68generator, (PyObject *) __pyx_cur_scope, __pyx_n_s_slice_generator, __pyx_n_s_HitSeries__slice_generator, __pyx_n_s_km3pipe_dataclasses); if (unlikely(!gen)) __PYX_ERR(0, 1025, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries._slice_generator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_7km3pipe_11dataclasses_9HitSeries_68generator(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator *__pyx_cur_scope = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  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)(PyObject *);
  PyObject *(*__pyx_t_8)(PyObject *);
  __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_ERR(0, 1025, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1027
 *     def _slice_generator(self, index):
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))             # <<<<<<<<<<<<<<
 *         for i in range(start, stop, step):
 *             yield Hit(*self._arr[i])
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_index, __pyx_n_s_indices); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_Length(__pyx_cur_scope->__pyx_v_self); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 1027, __pyx_L1_error)
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1027, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1027, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1027, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1027, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1027, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    #if !CYTHON_COMPILING_IN_PYPY
    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_ERR(0, 1027, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_4);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1027, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1027, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1027, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1027, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_6 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_6);
    index = 2; __pyx_t_4 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_5), 3) < 0) __PYX_ERR(0, 1027, __pyx_L1_error)
    __pyx_t_7 = NULL;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L5_unpacking_done;
    __pyx_L4_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 1027, __pyx_L1_error)
    __pyx_L5_unpacking_done:;
  }
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_cur_scope->__pyx_v_start = __pyx_t_2;
  __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_cur_scope->__pyx_v_stop = __pyx_t_6;
  __pyx_t_6 = 0;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_cur_scope->__pyx_v_step = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":1028
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 *         for i in range(start, stop, step):             # <<<<<<<<<<<<<<
 *             yield Hit(*self._arr[i])
 * 
 */
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_start);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_start);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_v_start);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_stop);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_stop);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_cur_scope->__pyx_v_stop);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_step);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_step);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_cur_scope->__pyx_v_step);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1028, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1028, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1028, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1028, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 1028, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1028, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_8(__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_ERR(0, 1028, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_i);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_i, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;

    /* "km3pipe/dataclasses.pyx":1029
 *         start, stop, step = index.indices(len(self))
 *         for i in range(start, stop, step):
 *             yield Hit(*self._arr[i])             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1029, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = PyObject_GetItem(__pyx_t_4, __pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1029, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PySequence_Tuple(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1029, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7km3pipe_11dataclasses_Hit), __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1029, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __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_3;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_8;
    __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_t_8 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1029, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":1028
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 *         for i in range(start, stop, step):             # <<<<<<<<<<<<<<
 *             yield Hit(*self._arr[i])
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "km3pipe/dataclasses.pyx":1025
 *             raise TypeError("index must be int or slice")
 * 
 *     def _slice_generator(self, index):             # <<<<<<<<<<<<<<
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 */

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("_slice_generator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1031
 *             yield Hit(*self._arr[i])
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_70__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_69__str__[] = "HitSeries.__str__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_70__str__ = {"__str__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_70__str__, METH_O, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_69__str__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_70__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_69__str__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_69__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_v_n_hits;
  PyObject *__pyx_v_plural = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__112)
  __Pyx_RefNannySetupContext("__str__", 0);
  __Pyx_TraceCall("__str__", __pyx_f[0], 1031, 0, __PYX_ERR(0, 1031, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1032
 * 
 *     def __str__(self):
 *         n_hits = len(self)             # <<<<<<<<<<<<<<
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 *         return("HitSeries with {0} hit{1}.".format(len(self), plural))
 */
  __Pyx_TraceLine(1032,0,__PYX_ERR(0, 1032, __pyx_L1_error))
  __pyx_t_1 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 1032, __pyx_L1_error)
  __pyx_v_n_hits = __pyx_t_1;

  /* "km3pipe/dataclasses.pyx":1033
 *     def __str__(self):
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''             # <<<<<<<<<<<<<<
 *         return("HitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 */
  __Pyx_TraceLine(1033,0,__PYX_ERR(0, 1033, __pyx_L1_error))
  __pyx_t_4 = ((__pyx_v_n_hits > 1) != 0);
  if (!__pyx_t_4) {
  } else {
    __pyx_t_3 = __pyx_t_4;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_4 = ((__pyx_v_n_hits == 0) != 0);
  __pyx_t_3 = __pyx_t_4;
  __pyx_L3_bool_binop_done:;
  if (__pyx_t_3) {
    __Pyx_INCREF(__pyx_n_s_s);
    __pyx_t_2 = __pyx_n_s_s;
  } else {
    __Pyx_INCREF(__pyx_kp_s__113);
    __pyx_t_2 = __pyx_kp_s__113;
  }
  __pyx_v_plural = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":1034
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 *         return("HitSeries with {0} hit{1}.".format(len(self), plural))             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_TraceLine(1034,0,__PYX_ERR(0, 1034, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_HitSeries_with_0_hit_1, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 1034, __pyx_L1_error)
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_plural};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1034, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_plural};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1034, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1034, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6);
    __Pyx_INCREF(__pyx_v_plural);
    __Pyx_GIVEREF(__pyx_v_plural);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_plural);
    __pyx_t_6 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1034, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1031
 *             yield Hit(*self._arr[i])
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_plural);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1036
 *         return("HitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_72__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_71__repr__[] = "HitSeries.__repr__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_72__repr__ = {"__repr__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_72__repr__, METH_O, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_71__repr__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_72__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_71__repr__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_71__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__114)
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 1036, 0, __PYX_ERR(0, 1036, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1037
 * 
 *     def __repr__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 *     def __insp__(self):
 */
  __Pyx_TraceLine(1037,0,__PYX_ERR(0, 1037, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1037, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1037, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1036
 *         return("HitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1039
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return '\n'.join([str(hit) for hit in self._hits])
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_74__insp__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_73__insp__[] = "HitSeries.__insp__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_74__insp__ = {"__insp__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_74__insp__, METH_O, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_73__insp__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_74__insp__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__insp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_73__insp__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_73__insp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_hit = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__115)
  __Pyx_RefNannySetupContext("__insp__", 0);
  __Pyx_TraceCall("__insp__", __pyx_f[0], 1039, 0, __PYX_ERR(0, 1039, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1040
 * 
 *     def __insp__(self):
 *         return '\n'.join([str(hit) for hit in self._hits])             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(1040,0,__PYX_ERR(0, 1040, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_hits); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(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_ERR(0, 1040, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1040, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 1040, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1040, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 1040, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1040, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #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_ERR(0, 1040, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_hit, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1040, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_hit);
    __Pyx_GIVEREF(__pyx_v_hit);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_hit);
    __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1040, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1040, __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__116, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1039
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return '\n'.join([str(hit) for hit in self._hits])
 * 
 */

  /* 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_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.__insp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_hit);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1053
 *     ])
 * 
 *     def __init__(self, arr, slice_id, frame_id):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries___init__[] = "TimesliceHitSeries.__init__(self, arr, slice_id, frame_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_1__init__ = {"__init__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries___init__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_slice_id = 0;
  PyObject *__pyx_v_frame_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_arr,&__pyx_n_s_slice_id,&__pyx_n_s_frame_id,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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 1); __PYX_ERR(0, 1053, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_slice_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 2); __PYX_ERR(0, 1053, __pyx_L3_error)
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_frame_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 3); __PYX_ERR(0, 1053, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1053, __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_self = values[0];
    __pyx_v_arr = values[1];
    __pyx_v_slice_id = values[2];
    __pyx_v_frame_id = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1053, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries___init__(__pyx_self, __pyx_v_self, __pyx_v_arr, __pyx_v_slice_id, __pyx_v_frame_id);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_slice_id, PyObject *__pyx_v_frame_id) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__117)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 1053, 0, __PYX_ERR(0, 1053, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1054
 * 
 *     def __init__(self, arr, slice_id, frame_id):
 *         self._arr = arr             # <<<<<<<<<<<<<<
 *         self._index = 0
 *         self._hits = None
 */
  __Pyx_TraceLine(1054,0,__PYX_ERR(0, 1054, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_arr_2, __pyx_v_arr) < 0) __PYX_ERR(0, 1054, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1055
 *     def __init__(self, arr, slice_id, frame_id):
 *         self._arr = arr
 *         self._index = 0             # <<<<<<<<<<<<<<
 *         self._hits = None
 *         self.slice_id = slice_id
 */
  __Pyx_TraceLine(1055,0,__PYX_ERR(0, 1055, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index, __pyx_int_0) < 0) __PYX_ERR(0, 1055, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1056
 *         self._arr = arr
 *         self._index = 0
 *         self._hits = None             # <<<<<<<<<<<<<<
 *         self.slice_id = slice_id
 *         self.frame_id = frame_id
 */
  __Pyx_TraceLine(1056,0,__PYX_ERR(0, 1056, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_hits, Py_None) < 0) __PYX_ERR(0, 1056, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1057
 *         self._index = 0
 *         self._hits = None
 *         self.slice_id = slice_id             # <<<<<<<<<<<<<<
 *         self.frame_id = frame_id
 * 
 */
  __Pyx_TraceLine(1057,0,__PYX_ERR(0, 1057, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_slice_id, __pyx_v_slice_id) < 0) __PYX_ERR(0, 1057, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1058
 *         self._hits = None
 *         self.slice_id = slice_id
 *         self.frame_id = frame_id             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(1058,0,__PYX_ERR(0, 1058, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_frame_id, __pyx_v_frame_id) < 0) __PYX_ERR(0, 1058, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1053
 *     ])
 * 
 *     def __init__(self, arr, slice_id, frame_id):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1061
 * 
 *     @property
 *     def h5loc(self):             # <<<<<<<<<<<<<<
 *         return "/timeslices/slice_{0}".format(self.slice_id)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_3h5loc(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_2h5loc[] = "TimesliceHitSeries.h5loc(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_3h5loc = {"h5loc", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_3h5loc, METH_O, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_2h5loc};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_3h5loc(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("h5loc (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_2h5loc(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_2h5loc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__118)
  __Pyx_RefNannySetupContext("h5loc", 0);
  __Pyx_TraceCall("h5loc", __pyx_f[0], 1061, 0, __PYX_ERR(0, 1061, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1062
 *     @property
 *     def h5loc(self):
 *         return "/timeslices/slice_{0}".format(self.slice_id)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(1062,0,__PYX_ERR(0, 1062, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_timeslices_slice__0, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_slice_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1062, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1062, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1062, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1062, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1062, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1061
 * 
 *     @property
 *     def h5loc(self):             # <<<<<<<<<<<<<<
 *         return "/timeslices/slice_{0}".format(self.slice_id)
 * 
 */

  /* 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_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.h5loc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1065
 * 
 *     @property
 *     def tabname(self):             # <<<<<<<<<<<<<<
 *         return "frame_{0}".format(self.frame_id)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_5tabname(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_4tabname[] = "TimesliceHitSeries.tabname(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_5tabname = {"tabname", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_5tabname, METH_O, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_4tabname};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_5tabname(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tabname (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_4tabname(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_4tabname(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__119)
  __Pyx_RefNannySetupContext("tabname", 0);
  __Pyx_TraceCall("tabname", __pyx_f[0], 1065, 0, __PYX_ERR(0, 1065, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1066
 *     @property
 *     def tabname(self):
 *         return "frame_{0}".format(self.frame_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1066,0,__PYX_ERR(0, 1066, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_frame__0, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1066, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_frame_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1066, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1066, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1066, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1066, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1066, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1066, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1065
 * 
 *     @property
 *     def tabname(self):             # <<<<<<<<<<<<<<
 *         return "frame_{0}".format(self.frame_id)
 * 
 */

  /* 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_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.tabname", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1069
 * 
 *     @classmethod
 *     def from_arrays(cls, channel_ids, dom_ids, times, tots, slice_id,             # <<<<<<<<<<<<<<
 *                     frame_id):
 *         len = channel_ids.shape[0]
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_7from_arrays(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_6from_arrays[] = "TimesliceHitSeries.from_arrays(cls, channel_ids, dom_ids, times, tots, slice_id, frame_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_7from_arrays = {"from_arrays", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_7from_arrays, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_6from_arrays};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_7from_arrays(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_channel_ids = 0;
  PyObject *__pyx_v_dom_ids = 0;
  PyObject *__pyx_v_times = 0;
  PyObject *__pyx_v_tots = 0;
  PyObject *__pyx_v_slice_id = 0;
  PyObject *__pyx_v_frame_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_arrays (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_channel_ids,&__pyx_n_s_dom_ids,&__pyx_n_s_times,&__pyx_n_s_tots,&__pyx_n_s_slice_id,&__pyx_n_s_frame_id,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_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_channel_ids)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 7, 7, 1); __PYX_ERR(0, 1069, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dom_ids)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 7, 7, 2); __PYX_ERR(0, 1069, __pyx_L3_error)
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_times)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 7, 7, 3); __PYX_ERR(0, 1069, __pyx_L3_error)
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tots)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 7, 7, 4); __PYX_ERR(0, 1069, __pyx_L3_error)
        }
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_slice_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 7, 7, 5); __PYX_ERR(0, 1069, __pyx_L3_error)
        }
        case  6:
        if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_frame_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 7, 7, 6); __PYX_ERR(0, 1069, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_arrays") < 0)) __PYX_ERR(0, 1069, __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_cls = values[0];
    __pyx_v_channel_ids = values[1];
    __pyx_v_dom_ids = values[2];
    __pyx_v_times = values[3];
    __pyx_v_tots = values[4];
    __pyx_v_slice_id = values[5];
    __pyx_v_frame_id = values[6];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1069, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_6from_arrays(__pyx_self, __pyx_v_cls, __pyx_v_channel_ids, __pyx_v_dom_ids, __pyx_v_times, __pyx_v_tots, __pyx_v_slice_id, __pyx_v_frame_id);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_6from_arrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_channel_ids, PyObject *__pyx_v_dom_ids, PyObject *__pyx_v_times, PyObject *__pyx_v_tots, PyObject *__pyx_v_slice_id, PyObject *__pyx_v_frame_id) {
  PyObject *__pyx_v_len = NULL;
  PyObject *__pyx_v_hits = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__120)
  __Pyx_RefNannySetupContext("from_arrays", 0);
  __Pyx_TraceCall("from_arrays", __pyx_f[0], 1069, 0, __PYX_ERR(0, 1069, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1071
 *     def from_arrays(cls, channel_ids, dom_ids, times, tots, slice_id,
 *                     frame_id):
 *         len = channel_ids.shape[0]             # <<<<<<<<<<<<<<
 *         hits = np.empty(len, cls.dtype)
 *         hits['channel_id'] = channel_ids
 */
  __Pyx_TraceLine(1071,0,__PYX_ERR(0, 1071, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_channel_ids, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1071, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1071, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_len = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":1072
 *                     frame_id):
 *         len = channel_ids.shape[0]
 *         hits = np.empty(len, cls.dtype)             # <<<<<<<<<<<<<<
 *         hits['channel_id'] = channel_ids
 *         hits['dom_id'] = dom_ids
 */
  __Pyx_TraceLine(1072,0,__PYX_ERR(0, 1072, __pyx_L1_error))
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1072, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1072, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1072, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_len, __pyx_t_1};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1072, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_len, __pyx_t_1};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1072, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1072, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(__pyx_v_len);
    __Pyx_GIVEREF(__pyx_v_len);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_len);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1072, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_hits = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":1073
 *         len = channel_ids.shape[0]
 *         hits = np.empty(len, cls.dtype)
 *         hits['channel_id'] = channel_ids             # <<<<<<<<<<<<<<
 *         hits['dom_id'] = dom_ids
 *         hits['time'] = times
 */
  __Pyx_TraceLine(1073,0,__PYX_ERR(0, 1073, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_channel_id, __pyx_v_channel_ids) < 0)) __PYX_ERR(0, 1073, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1074
 *         hits = np.empty(len, cls.dtype)
 *         hits['channel_id'] = channel_ids
 *         hits['dom_id'] = dom_ids             # <<<<<<<<<<<<<<
 *         hits['time'] = times
 *         hits['tot'] = tots
 */
  __Pyx_TraceLine(1074,0,__PYX_ERR(0, 1074, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_dom_id, __pyx_v_dom_ids) < 0)) __PYX_ERR(0, 1074, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1075
 *         hits['channel_id'] = channel_ids
 *         hits['dom_id'] = dom_ids
 *         hits['time'] = times             # <<<<<<<<<<<<<<
 *         hits['tot'] = tots
 *         return cls(hits, slice_id, frame_id)
 */
  __Pyx_TraceLine(1075,0,__PYX_ERR(0, 1075, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_time, __pyx_v_times) < 0)) __PYX_ERR(0, 1075, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1076
 *         hits['dom_id'] = dom_ids
 *         hits['time'] = times
 *         hits['tot'] = tots             # <<<<<<<<<<<<<<
 *         return cls(hits, slice_id, frame_id)
 * 
 */
  __Pyx_TraceLine(1076,0,__PYX_ERR(0, 1076, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_tot, __pyx_v_tots) < 0)) __PYX_ERR(0, 1076, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1077
 *         hits['time'] = times
 *         hits['tot'] = tots
 *         return cls(hits, slice_id, frame_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1077,0,__PYX_ERR(0, 1077, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_cls);
  __pyx_t_3 = __pyx_v_cls; __pyx_t_6 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_hits, __pyx_v_slice_id, __pyx_v_frame_id};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1077, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_hits, __pyx_v_slice_id, __pyx_v_frame_id};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1077, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  {
    __pyx_t_1 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1077, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_INCREF(__pyx_v_hits);
    __Pyx_GIVEREF(__pyx_v_hits);
    PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_5, __pyx_v_hits);
    __Pyx_INCREF(__pyx_v_slice_id);
    __Pyx_GIVEREF(__pyx_v_slice_id);
    PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_5, __pyx_v_slice_id);
    __Pyx_INCREF(__pyx_v_frame_id);
    __Pyx_GIVEREF(__pyx_v_frame_id);
    PyTuple_SET_ITEM(__pyx_t_1, 2+__pyx_t_5, __pyx_v_frame_id);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1077, __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_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1069
 * 
 *     @classmethod
 *     def from_arrays(cls, channel_ids, dom_ids, times, tots, slice_id,             # <<<<<<<<<<<<<<
 *                     frame_id):
 *         len = channel_ids.shape[0]
 */

  /* 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_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_len);
  __Pyx_XDECREF(__pyx_v_hits);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1080
 * 
 *     @classmethod
 *     def from_dict(cls, map, slice_id, frame_id):             # <<<<<<<<<<<<<<
 *         return cls.from_arrays(
 *             map['channel_id'],
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_9from_dict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_8from_dict[] = "TimesliceHitSeries.from_dict(cls, map, slice_id, frame_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_9from_dict = {"from_dict", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_9from_dict, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_8from_dict};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_9from_dict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_map = 0;
  PyObject *__pyx_v_slice_id = 0;
  PyObject *__pyx_v_frame_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_dict (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_map,&__pyx_n_s_slice_id,&__pyx_n_s_frame_id,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_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_map)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_dict", 1, 4, 4, 1); __PYX_ERR(0, 1080, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_slice_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_dict", 1, 4, 4, 2); __PYX_ERR(0, 1080, __pyx_L3_error)
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_frame_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_dict", 1, 4, 4, 3); __PYX_ERR(0, 1080, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_dict") < 0)) __PYX_ERR(0, 1080, __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_cls = values[0];
    __pyx_v_map = values[1];
    __pyx_v_slice_id = values[2];
    __pyx_v_frame_id = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_dict", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1080, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.from_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_8from_dict(__pyx_self, __pyx_v_cls, __pyx_v_map, __pyx_v_slice_id, __pyx_v_frame_id);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_8from_dict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_map, PyObject *__pyx_v_slice_id, PyObject *__pyx_v_frame_id) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__121)
  __Pyx_RefNannySetupContext("from_dict", 0);
  __Pyx_TraceCall("from_dict", __pyx_f[0], 1080, 0, __PYX_ERR(0, 1080, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1081
 *     @classmethod
 *     def from_dict(cls, map, slice_id, frame_id):
 *         return cls.from_arrays(             # <<<<<<<<<<<<<<
 *             map['channel_id'],
 *             map['dom_id'],
 */
  __Pyx_TraceLine(1081,0,__PYX_ERR(0, 1081, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_from_arrays); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1081, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "km3pipe/dataclasses.pyx":1082
 *     def from_dict(cls, map, slice_id, frame_id):
 *         return cls.from_arrays(
 *             map['channel_id'],             # <<<<<<<<<<<<<<
 *             map['dom_id'],
 *             map['time'],
 */
  __Pyx_TraceLine(1082,0,__PYX_ERR(0, 1082, __pyx_L1_error))
  __pyx_t_3 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_channel_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "km3pipe/dataclasses.pyx":1083
 *         return cls.from_arrays(
 *             map['channel_id'],
 *             map['dom_id'],             # <<<<<<<<<<<<<<
 *             map['time'],
 *             map['tot'],
 */
  __Pyx_TraceLine(1083,0,__PYX_ERR(0, 1083, __pyx_L1_error))
  __pyx_t_4 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_dom_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "km3pipe/dataclasses.pyx":1084
 *             map['channel_id'],
 *             map['dom_id'],
 *             map['time'],             # <<<<<<<<<<<<<<
 *             map['tot'],
 *             slice_id,
 */
  __Pyx_TraceLine(1084,0,__PYX_ERR(0, 1084, __pyx_L1_error))
  __pyx_t_5 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_time); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":1085
 *             map['dom_id'],
 *             map['time'],
 *             map['tot'],             # <<<<<<<<<<<<<<
 *             slice_id,
 *             frame_id,
 */
  __Pyx_TraceLine(1085,0,__PYX_ERR(0, 1085, __pyx_L1_error))
  __pyx_t_6 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_tot); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1085, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1087
 *             map['tot'],
 *             slice_id,
 *             frame_id,             # <<<<<<<<<<<<<<
 *         )
 * 
 */
  __Pyx_TraceLine(1087,0,__PYX_ERR(0, 1087, __pyx_L1_error))
  __pyx_t_7 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[7] = {__pyx_t_7, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_v_slice_id, __pyx_v_frame_id};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 6+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1081, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __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;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[7] = {__pyx_t_7, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_v_slice_id, __pyx_v_frame_id};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 6+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1081, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __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;
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(6+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1081, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_8, __pyx_t_6);
    __Pyx_INCREF(__pyx_v_slice_id);
    __Pyx_GIVEREF(__pyx_v_slice_id);
    PyTuple_SET_ITEM(__pyx_t_9, 4+__pyx_t_8, __pyx_v_slice_id);
    __Pyx_INCREF(__pyx_v_frame_id);
    __Pyx_GIVEREF(__pyx_v_frame_id);
    PyTuple_SET_ITEM(__pyx_t_9, 5+__pyx_t_8, __pyx_v_frame_id);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1081, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1080
 * 
 *     @classmethod
 *     def from_dict(cls, map, slice_id, frame_id):             # <<<<<<<<<<<<<<
 *         return cls.from_arrays(
 *             map['channel_id'],
 */

  /* 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.from_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1090
 *         )
 * 
 *     def from_table(cls, table, slice_id, frame_id):             # <<<<<<<<<<<<<<
 *         return cls(np.array([(
 *             row['channel_id'],
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_11from_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_10from_table[] = "TimesliceHitSeries.from_table(cls, table, slice_id, frame_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_11from_table = {"from_table", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_11from_table, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_10from_table};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_11from_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_table = 0;
  PyObject *__pyx_v_slice_id = 0;
  PyObject *__pyx_v_frame_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_table (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_table,&__pyx_n_s_slice_id,&__pyx_n_s_frame_id,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_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_table)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_table", 1, 4, 4, 1); __PYX_ERR(0, 1090, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_slice_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_table", 1, 4, 4, 2); __PYX_ERR(0, 1090, __pyx_L3_error)
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_frame_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_table", 1, 4, 4, 3); __PYX_ERR(0, 1090, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_table") < 0)) __PYX_ERR(0, 1090, __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_cls = values[0];
    __pyx_v_table = values[1];
    __pyx_v_slice_id = values[2];
    __pyx_v_frame_id = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_table", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1090, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_10from_table(__pyx_self, __pyx_v_cls, __pyx_v_table, __pyx_v_slice_id, __pyx_v_frame_id);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_10from_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_table, PyObject *__pyx_v_slice_id, PyObject *__pyx_v_frame_id) {
  PyObject *__pyx_v_row = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  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 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  __Pyx_TraceFrameInit(__pyx_codeobj__122)
  __Pyx_RefNannySetupContext("from_table", 0);
  __Pyx_TraceCall("from_table", __pyx_f[0], 1090, 0, __PYX_ERR(0, 1090, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1091
 * 
 *     def from_table(cls, table, slice_id, frame_id):
 *         return cls(np.array([(             # <<<<<<<<<<<<<<
 *             row['channel_id'],
 *             row['dom_id'],
 */
  __Pyx_TraceLine(1091,0,__PYX_ERR(0, 1091, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1091, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1091, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1091, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "km3pipe/dataclasses.pyx":1096
 *             row['time'],
 *             row['tot'],
 *         ) for row in table], dtype=cls.dtype), slice_id, frame_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1096,0,__PYX_ERR(0, 1096, __pyx_L1_error))
  if (likely(PyList_CheckExact(__pyx_v_table)) || PyTuple_CheckExact(__pyx_v_table)) {
    __pyx_t_4 = __pyx_v_table; __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_table); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1096, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1096, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1096, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1096, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1096, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1096, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      }
    } else {
      __pyx_t_7 = __pyx_t_6(__pyx_t_4);
      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_ERR(0, 1096, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_7);
    }
    __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "km3pipe/dataclasses.pyx":1092
 *     def from_table(cls, table, slice_id, frame_id):
 *         return cls(np.array([(
 *             row['channel_id'],             # <<<<<<<<<<<<<<
 *             row['dom_id'],
 *             row['time'],
 */
    __Pyx_TraceLine(1092,0,__PYX_ERR(0, 1092, __pyx_L1_error))
    __pyx_t_7 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_channel_id); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1092, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);

    /* "km3pipe/dataclasses.pyx":1093
 *         return cls(np.array([(
 *             row['channel_id'],
 *             row['dom_id'],             # <<<<<<<<<<<<<<
 *             row['time'],
 *             row['tot'],
 */
    __Pyx_TraceLine(1093,0,__PYX_ERR(0, 1093, __pyx_L1_error))
    __pyx_t_8 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_dom_id); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1093, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);

    /* "km3pipe/dataclasses.pyx":1094
 *             row['channel_id'],
 *             row['dom_id'],
 *             row['time'],             # <<<<<<<<<<<<<<
 *             row['tot'],
 *         ) for row in table], dtype=cls.dtype), slice_id, frame_id)
 */
    __Pyx_TraceLine(1094,0,__PYX_ERR(0, 1094, __pyx_L1_error))
    __pyx_t_9 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_time); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1094, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);

    /* "km3pipe/dataclasses.pyx":1095
 *             row['dom_id'],
 *             row['time'],
 *             row['tot'],             # <<<<<<<<<<<<<<
 *         ) for row in table], dtype=cls.dtype), slice_id, frame_id)
 * 
 */
    __Pyx_TraceLine(1095,0,__PYX_ERR(0, 1095, __pyx_L1_error))
    __pyx_t_10 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_tot); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1095, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);

    /* "km3pipe/dataclasses.pyx":1092
 *     def from_table(cls, table, slice_id, frame_id):
 *         return cls(np.array([(
 *             row['channel_id'],             # <<<<<<<<<<<<<<
 *             row['dom_id'],
 *             row['time'],
 */
    __Pyx_TraceLine(1092,0,__PYX_ERR(0, 1092, __pyx_L1_error))
    __pyx_t_11 = PyTuple_New(4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1092, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_t_10);
    __pyx_t_7 = 0;
    __pyx_t_8 = 0;
    __pyx_t_9 = 0;
    __pyx_t_10 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 1091, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "km3pipe/dataclasses.pyx":1096
 *             row['time'],
 *             row['tot'],
 *         ) for row in table], dtype=cls.dtype), slice_id, frame_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
    __Pyx_TraceLine(1096,0,__PYX_ERR(0, 1096, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":1091
 * 
 *     def from_table(cls, table, slice_id, frame_id):
 *         return cls(np.array([(             # <<<<<<<<<<<<<<
 *             row['channel_id'],
 *             row['dom_id'],
 */
  __Pyx_TraceLine(1091,0,__PYX_ERR(0, 1091, __pyx_L1_error))
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1091, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":1096
 *             row['time'],
 *             row['tot'],
 *         ) for row in table], dtype=cls.dtype), slice_id, frame_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1096,0,__PYX_ERR(0, 1096, __pyx_L1_error))
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_11) < 0) __PYX_ERR(0, 1096, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "km3pipe/dataclasses.pyx":1091
 * 
 *     def from_table(cls, table, slice_id, frame_id):
 *         return cls(np.array([(             # <<<<<<<<<<<<<<
 *             row['channel_id'],
 *             row['dom_id'],
 */
  __Pyx_TraceLine(1091,0,__PYX_ERR(0, 1091, __pyx_L1_error))
  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1091, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":1096
 *             row['time'],
 *             row['tot'],
 *         ) for row in table], dtype=cls.dtype), slice_id, frame_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1096,0,__PYX_ERR(0, 1096, __pyx_L1_error))
  __Pyx_INCREF(__pyx_v_cls);
  __pyx_t_2 = __pyx_v_cls; __pyx_t_4 = NULL;
  __pyx_t_12 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_12 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_11, __pyx_v_slice_id, __pyx_v_frame_id};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1091, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_11, __pyx_v_slice_id, __pyx_v_frame_id};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1091, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  } else
  #endif
  {
    __pyx_t_3 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1091, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_12, __pyx_t_11);
    __Pyx_INCREF(__pyx_v_slice_id);
    __Pyx_GIVEREF(__pyx_v_slice_id);
    PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_12, __pyx_v_slice_id);
    __Pyx_INCREF(__pyx_v_frame_id);
    __Pyx_GIVEREF(__pyx_v_frame_id);
    PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_12, __pyx_v_frame_id);
    __pyx_t_11 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1091, __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_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1090
 *         )
 * 
 *     def from_table(cls, table, slice_id, frame_id):             # <<<<<<<<<<<<<<
 *         return cls(np.array([(
 *             row['channel_id'],
 */

  /* 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_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_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1099
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_13deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_12deserialise[] = "TimesliceHitSeries.deserialise(cls, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_13deserialise = {"deserialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_13deserialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_12deserialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_13deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("deserialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,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_cls)) != 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, __pyx_v_kwargs, values, used_pos_args, "deserialise") < 0)) __PYX_ERR(0, 1099, __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_cls = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("deserialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1099, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_12deserialise(__pyx_self, __pyx_v_cls, __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_7km3pipe_11dataclasses_18TimesliceHitSeries_12deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__123)
  __Pyx_RefNannySetupContext("deserialise", 0);
  __Pyx_TraceCall("deserialise", __pyx_f[0], 1099, 0, __PYX_ERR(0, 1099, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1100
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def serialise(self, *args, **kwargs):
 */
  __Pyx_TraceLine(1100,0,__PYX_ERR(0, 1100, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_conv_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1099
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1102
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_15serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_14serialise[] = "TimesliceHitSeries.serialise(self, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_15serialise = {"serialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_15serialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_14serialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_15serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,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_self)) != 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, __pyx_v_kwargs, values, used_pos_args, "serialise") < 0)) __PYX_ERR(0, 1102, __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_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1102, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_14serialise(__pyx_self, __pyx_v_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_7km3pipe_11dataclasses_18TimesliceHitSeries_14serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__124)
  __Pyx_RefNannySetupContext("serialise", 0);
  __Pyx_TraceCall("serialise", __pyx_f[0], 1102, 0, __PYX_ERR(0, 1102, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1103
 * 
 *     def serialise(self, *args, **kwargs):
 *         return self.conv_to(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1103,0,__PYX_ERR(0, 1103, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1102
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1106
 * 
 *     @classmethod
 *     def conv_from(cls, data, slice_id, frame_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             # return cls.from_table(data, frame_id)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_17conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_16conv_from[] = "TimesliceHitSeries.conv_from(cls, data, slice_id, frame_id, fmt='numpy', h5loc='/')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_17conv_from = {"conv_from", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_17conv_from, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_16conv_from};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_17conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_slice_id = 0;
  PyObject *__pyx_v_frame_id = 0;
  PyObject *__pyx_v_fmt = 0;
  CYTHON_UNUSED PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_from (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_data,&__pyx_n_s_slice_id,&__pyx_n_s_frame_id,&__pyx_n_s_fmt,&__pyx_n_s_h5loc,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    values[4] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    values[5] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    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_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 4, 6, 1); __PYX_ERR(0, 1106, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_slice_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 4, 6, 2); __PYX_ERR(0, 1106, __pyx_L3_error)
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_frame_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 4, 6, 3); __PYX_ERR(0, 1106, __pyx_L3_error)
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fmt);
          if (value) { values[4] = value; kw_args--; }
        }
        case  5:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[5] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_from") < 0)) __PYX_ERR(0, 1106, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_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);
        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_cls = values[0];
    __pyx_v_data = values[1];
    __pyx_v_slice_id = values[2];
    __pyx_v_frame_id = values[3];
    __pyx_v_fmt = values[4];
    __pyx_v_h5loc = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_from", 0, 4, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1106, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_16conv_from(__pyx_self, __pyx_v_cls, __pyx_v_data, __pyx_v_slice_id, __pyx_v_frame_id, __pyx_v_fmt, __pyx_v_h5loc);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_16conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, PyObject *__pyx_v_slice_id, PyObject *__pyx_v_frame_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  __Pyx_TraceFrameInit(__pyx_codeobj__125)
  __Pyx_RefNannySetupContext("conv_from", 0);
  __Pyx_TraceCall("conv_from", __pyx_f[0], 1106, 0, __PYX_ERR(0, 1106, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1107
 *     @classmethod
 *     def conv_from(cls, data, slice_id, frame_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             # return cls.from_table(data, frame_id)
 *             return cls(data, slice_id, frame_id)
 */
  __Pyx_TraceLine(1107,0,__PYX_ERR(0, 1107, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_fmt, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1107, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1109
 *         if fmt == 'numpy':
 *             # return cls.from_table(data, frame_id)
 *             return cls(data, slice_id, frame_id)             # <<<<<<<<<<<<<<
 * 
 *     def conv_to(self, to='numpy'):
 */
    __Pyx_TraceLine(1109,0,__PYX_ERR(0, 1109, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_cls);
    __pyx_t_3 = __pyx_v_cls; __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_data, __pyx_v_slice_id, __pyx_v_frame_id};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1109, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_data, __pyx_v_slice_id, __pyx_v_frame_id};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1109, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1109, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_data);
      __Pyx_GIVEREF(__pyx_v_data);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_data);
      __Pyx_INCREF(__pyx_v_slice_id);
      __Pyx_GIVEREF(__pyx_v_slice_id);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_slice_id);
      __Pyx_INCREF(__pyx_v_frame_id);
      __Pyx_GIVEREF(__pyx_v_frame_id);
      PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_frame_id);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1109, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1107
 *     @classmethod
 *     def conv_from(cls, data, slice_id, frame_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             # return cls.from_table(data, frame_id)
 *             return cls(data, slice_id, frame_id)
 */
  }

  /* "km3pipe/dataclasses.pyx":1106
 * 
 *     @classmethod
 *     def conv_from(cls, data, slice_id, frame_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             # return cls.from_table(data, frame_id)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1111
 *             return cls(data, slice_id, frame_id)
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_19conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_18conv_to[] = "TimesliceHitSeries.conv_to(self, to='numpy')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_19conv_to = {"conv_to", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_19conv_to, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_18conv_to};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_19conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_to = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_to (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_to,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_to);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_to") < 0)) __PYX_ERR(0, 1111, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        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_self = values[0];
    __pyx_v_to = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_to", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1111, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_18conv_to(__pyx_self, __pyx_v_self, __pyx_v_to);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_18conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  __Pyx_TraceFrameInit(__pyx_codeobj__126)
  __Pyx_RefNannySetupContext("conv_to", 0);
  __Pyx_TraceCall("conv_to", __pyx_f[0], 1111, 0, __PYX_ERR(0, 1111, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1112
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)
 */
  __Pyx_TraceLine(1112,0,__PYX_ERR(0, 1112, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1112, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1113
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),             # <<<<<<<<<<<<<<
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':
 */
    __Pyx_TraceLine(1113,0,__PYX_ERR(0, 1113, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3Array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_array_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (__pyx_t_6) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1113, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1113, __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_ERR(0, 1113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 1113, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "km3pipe/dataclasses.pyx":1114
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)             # <<<<<<<<<<<<<<
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 */
    __Pyx_TraceLine(1114,0,__PYX_ERR(0, 1114, __pyx_L1_error))
    __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_h5loc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_h5loc, __pyx_t_5) < 0) __PYX_ERR(0, 1114, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "km3pipe/dataclasses.pyx":1113
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),             # <<<<<<<<<<<<<<
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':
 */
    __Pyx_TraceLine(1113,0,__PYX_ERR(0, 1113, __pyx_L1_error))
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1112
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)
 */
  }

  /* "km3pipe/dataclasses.pyx":1115
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  __Pyx_TraceLine(1115,0,__PYX_ERR(0, 1115, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_pandas, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1115, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1116
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)             # <<<<<<<<<<<<<<
 * 
 *     def __array__(self):
 */
    __Pyx_TraceLine(1116,0,__PYX_ERR(0, 1116, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3DataFrame); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_to, __pyx_n_s_numpy) < 0) __PYX_ERR(0, 1116, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_h5loc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_h5loc, __pyx_t_6) < 0) __PYX_ERR(0, 1116, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1115
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":1111
 *             return cls(data, slice_id, frame_id)
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1118
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_21__array__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_20__array__[] = "TimesliceHitSeries.__array__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_21__array__ = {"__array__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_21__array__, METH_O, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_20__array__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_21__array__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__array__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_20__array__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_20__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__127)
  __Pyx_RefNannySetupContext("__array__", 0);
  __Pyx_TraceCall("__array__", __pyx_f[0], 1118, 0, __PYX_ERR(0, 1118, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1119
 * 
 *     def __array__(self):
 *         return self._arr             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __Pyx_TraceLine(1119,0,__PYX_ERR(0, 1119, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1118
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.__array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1121
 *         return self._arr
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_23__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_22__iter__[] = "TimesliceHitSeries.__iter__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_23__iter__ = {"__iter__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_23__iter__, METH_O, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_22__iter__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_23__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_22__iter__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_22__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__128)
  __Pyx_RefNannySetupContext("__iter__", 0);
  __Pyx_TraceCall("__iter__", __pyx_f[0], 1121, 0, __PYX_ERR(0, 1121, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1122
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(1122,0,__PYX_ERR(0, 1122, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self);
  __pyx_r = __pyx_v_self;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1121
 *         return self._arr
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1125
 * 
 *     @property
 *     def time(self):             # <<<<<<<<<<<<<<
 *         return self._arr['time']
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_25time(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_24time[] = "TimesliceHitSeries.time(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_25time = {"time", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_25time, METH_O, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_24time};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_25time(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("time (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_24time(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_24time(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__129)
  __Pyx_RefNannySetupContext("time", 0);
  __Pyx_TraceCall("time", __pyx_f[0], 1125, 0, __PYX_ERR(0, 1125, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1126
 *     @property
 *     def time(self):
 *         return self._arr['time']             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(1126,0,__PYX_ERR(0, 1126, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1125
 * 
 *     @property
 *     def time(self):             # <<<<<<<<<<<<<<
 *         return self._arr['time']
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1129
 * 
 *     @property
 *     def tot(self):             # <<<<<<<<<<<<<<
 *         return self._arr['tot']
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_27tot(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_26tot[] = "TimesliceHitSeries.tot(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_27tot = {"tot", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_27tot, METH_O, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_26tot};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_27tot(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tot (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_26tot(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_26tot(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__130)
  __Pyx_RefNannySetupContext("tot", 0);
  __Pyx_TraceCall("tot", __pyx_f[0], 1129, 0, __PYX_ERR(0, 1129, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1130
 *     @property
 *     def tot(self):
 *         return self._arr['tot']             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(1130,0,__PYX_ERR(0, 1130, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_n_s_tot); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1129
 * 
 *     @property
 *     def tot(self):             # <<<<<<<<<<<<<<
 *         return self._arr['tot']
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.tot", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1133
 * 
 *     @property
 *     def dom_id(self):             # <<<<<<<<<<<<<<
 *         return self._arr['dom_id']
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_29dom_id(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_28dom_id[] = "TimesliceHitSeries.dom_id(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_29dom_id = {"dom_id", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_29dom_id, METH_O, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_28dom_id};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_29dom_id(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dom_id (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_28dom_id(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_28dom_id(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__131)
  __Pyx_RefNannySetupContext("dom_id", 0);
  __Pyx_TraceCall("dom_id", __pyx_f[0], 1133, 0, __PYX_ERR(0, 1133, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1134
 *     @property
 *     def dom_id(self):
 *         return self._arr['dom_id']             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(1134,0,__PYX_ERR(0, 1134, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_n_s_dom_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1133
 * 
 *     @property
 *     def dom_id(self):             # <<<<<<<<<<<<<<
 *         return self._arr['dom_id']
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.dom_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1137
 * 
 *     @property
 *     def channel_id(self):             # <<<<<<<<<<<<<<
 *         return self._arr['channel_id']
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_31channel_id(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_30channel_id[] = "TimesliceHitSeries.channel_id(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_31channel_id = {"channel_id", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_31channel_id, METH_O, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_30channel_id};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_31channel_id(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("channel_id (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_30channel_id(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_30channel_id(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__132)
  __Pyx_RefNannySetupContext("channel_id", 0);
  __Pyx_TraceCall("channel_id", __pyx_f[0], 1137, 0, __PYX_ERR(0, 1137, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1138
 *     @property
 *     def channel_id(self):
 *         return self._arr['channel_id']             # <<<<<<<<<<<<<<
 * 
 *     def next(self):
 */
  __Pyx_TraceLine(1138,0,__PYX_ERR(0, 1138, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_n_s_channel_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1137
 * 
 *     @property
 *     def channel_id(self):             # <<<<<<<<<<<<<<
 *         return self._arr['channel_id']
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.channel_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1140
 *         return self._arr['channel_id']
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_33next(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_32next[] = "TimesliceHitSeries.next(self)\nPython 2/3 compatibility for iterators";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_33next = {"next", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_33next, METH_O, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_32next};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_33next(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("next (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_32next(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_32next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__133)
  __Pyx_RefNannySetupContext("next", 0);
  __Pyx_TraceCall("next", __pyx_f[0], 1140, 0, __PYX_ERR(0, 1140, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1142
 *     def next(self):
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  __Pyx_TraceLine(1142,0,__PYX_ERR(0, 1142, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_next); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1142, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1142, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1140
 *         return self._arr['channel_id']
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1144
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_35__next__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_34__next__[] = "TimesliceHitSeries.__next__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_35__next__ = {"__next__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_35__next__, METH_O, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_34__next__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_35__next__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_34__next__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_34__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_hits = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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_t_5;
  __Pyx_TraceFrameInit(__pyx_codeobj__134)
  __Pyx_RefNannySetupContext("__next__", 0);
  __Pyx_TraceCall("__next__", __pyx_f[0], 1144, 0, __PYX_ERR(0, 1144, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1145
 * 
 *     def __next__(self):
 *         if self._index >= len(self):             # <<<<<<<<<<<<<<
 *             self._index = 0
 *             raise StopIteration
 */
  __Pyx_TraceLine(1145,0,__PYX_ERR(0, 1145, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 1145, __pyx_L1_error)
  __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1145, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1145, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "km3pipe/dataclasses.pyx":1146
 *     def __next__(self):
 *         if self._index >= len(self):
 *             self._index = 0             # <<<<<<<<<<<<<<
 *             raise StopIteration
 *         hits = TimesliceHit(*self._arr[self._index])
 */
    __Pyx_TraceLine(1146,0,__PYX_ERR(0, 1146, __pyx_L1_error))
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index, __pyx_int_0) < 0) __PYX_ERR(0, 1146, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":1147
 *         if self._index >= len(self):
 *             self._index = 0
 *             raise StopIteration             # <<<<<<<<<<<<<<
 *         hits = TimesliceHit(*self._arr[self._index])
 *         self._index += 1
 */
    __Pyx_TraceLine(1147,0,__PYX_ERR(0, 1147, __pyx_L1_error))
    __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
    __PYX_ERR(0, 1147, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":1145
 * 
 *     def __next__(self):
 *         if self._index >= len(self):             # <<<<<<<<<<<<<<
 *             self._index = 0
 *             raise StopIteration
 */
  }

  /* "km3pipe/dataclasses.pyx":1148
 *             self._index = 0
 *             raise StopIteration
 *         hits = TimesliceHit(*self._arr[self._index])             # <<<<<<<<<<<<<<
 *         self._index += 1
 *         return hits
 */
  __Pyx_TraceLine(1148,0,__PYX_ERR(0, 1148, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyObject_GetItem(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7km3pipe_11dataclasses_TimesliceHit), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_hits = ((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":1149
 *             raise StopIteration
 *         hits = TimesliceHit(*self._arr[self._index])
 *         self._index += 1             # <<<<<<<<<<<<<<
 *         return hits
 * 
 */
  __Pyx_TraceLine(1149,0,__PYX_ERR(0, 1149, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index, __pyx_t_3) < 0) __PYX_ERR(0, 1149, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":1150
 *         hits = TimesliceHit(*self._arr[self._index])
 *         self._index += 1
 *         return hits             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_TraceLine(1150,0,__PYX_ERR(0, 1150, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_hits));
  __pyx_r = ((PyObject *)__pyx_v_hits);
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1144
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_hits);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1152
 *         return hits
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_37__len__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_36__len__[] = "TimesliceHitSeries.__len__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_37__len__ = {"__len__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_37__len__, METH_O, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_36__len__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_37__len__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_36__len__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_36__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__135)
  __Pyx_RefNannySetupContext("__len__", 0);
  __Pyx_TraceCall("__len__", __pyx_f[0], 1152, 0, __PYX_ERR(0, 1152, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1153
 * 
 *     def __len__(self):
 *         return self._arr.shape[0]             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, index):
 */
  __Pyx_TraceLine(1153,0,__PYX_ERR(0, 1153, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1152
 *         return hits
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1155
 *         return self._arr.shape[0]
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             return TimesliceHit(*self._arr[index])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_39__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_38__getitem__[] = "TimesliceHitSeries.__getitem__(self, index)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_39__getitem__ = {"__getitem__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_39__getitem__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_38__getitem__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_39__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_index_2,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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); __PYX_ERR(0, 1155, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getitem__") < 0)) __PYX_ERR(0, 1155, __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_self = values[0];
    __pyx_v_index = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1155, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_38__getitem__(__pyx_self, __pyx_v_self, __pyx_v_index);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_38__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__136)
  __Pyx_RefNannySetupContext("__getitem__", 0);
  __Pyx_TraceCall("__getitem__", __pyx_f[0], 1155, 0, __PYX_ERR(0, 1155, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1156
 * 
 *     def __getitem__(self, index):
 *         if isinstance(index, int):             # <<<<<<<<<<<<<<
 *             return TimesliceHit(*self._arr[index])
 *         elif isinstance(index, slice):
 */
  __Pyx_TraceLine(1156,0,__PYX_ERR(0, 1156, __pyx_L1_error))
  __pyx_t_1 = PyInt_Check(__pyx_v_index); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "km3pipe/dataclasses.pyx":1157
 *     def __getitem__(self, index):
 *         if isinstance(index, int):
 *             return TimesliceHit(*self._arr[index])             # <<<<<<<<<<<<<<
 *         elif isinstance(index, slice):
 *             return self._slice_generator(index)
 */
    __Pyx_TraceLine(1157,0,__PYX_ERR(0, 1157, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1157, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1157, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1157, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7km3pipe_11dataclasses_TimesliceHit), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1157, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1156
 * 
 *     def __getitem__(self, index):
 *         if isinstance(index, int):             # <<<<<<<<<<<<<<
 *             return TimesliceHit(*self._arr[index])
 *         elif isinstance(index, slice):
 */
  }

  /* "km3pipe/dataclasses.pyx":1158
 *         if isinstance(index, int):
 *             return TimesliceHit(*self._arr[index])
 *         elif isinstance(index, slice):             # <<<<<<<<<<<<<<
 *             return self._slice_generator(index)
 *         else:
 */
  __Pyx_TraceLine(1158,0,__PYX_ERR(0, 1158, __pyx_L1_error))
  __pyx_t_2 = PySlice_Check(__pyx_v_index); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1159
 *             return TimesliceHit(*self._arr[index])
 *         elif isinstance(index, slice):
 *             return self._slice_generator(index)             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError("index must be int or slice")
 */
    __Pyx_TraceLine(1159,0,__PYX_ERR(0, 1159, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_slice_generator); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1159, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_index};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1159, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_index};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1159, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1159, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_INCREF(__pyx_v_index);
        __Pyx_GIVEREF(__pyx_v_index);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_index);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1159, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1158
 *         if isinstance(index, int):
 *             return TimesliceHit(*self._arr[index])
 *         elif isinstance(index, slice):             # <<<<<<<<<<<<<<
 *             return self._slice_generator(index)
 *         else:
 */
  }

  /* "km3pipe/dataclasses.pyx":1161
 *             return self._slice_generator(index)
 *         else:
 *             raise TypeError("index must be int or slice")             # <<<<<<<<<<<<<<
 * 
 *     def _slice_generator(self, index):
 */
  __Pyx_TraceLine(1161,0,__PYX_ERR(0, 1161, __pyx_L1_error))
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__137, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1161, __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_ERR(0, 1161, __pyx_L1_error)
  }

  /* "km3pipe/dataclasses.pyx":1155
 *         return self._arr.shape[0]
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             return TimesliceHit(*self._arr[index])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_7km3pipe_11dataclasses_18TimesliceHitSeries_42generator1(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "km3pipe/dataclasses.pyx":1163
 *             raise TypeError("index must be int or slice")
 * 
 *     def _slice_generator(self, index):             # <<<<<<<<<<<<<<
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_41_slice_generator(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_40_slice_generator[] = "TimesliceHitSeries._slice_generator(self, index)\nA simple slice generator for iterations";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_41_slice_generator = {"_slice_generator", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_41_slice_generator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_40_slice_generator};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_41_slice_generator(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_slice_generator (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_index_2,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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_slice_generator", 1, 2, 2, 1); __PYX_ERR(0, 1163, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_slice_generator") < 0)) __PYX_ERR(0, 1163, __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_self = values[0];
    __pyx_v_index = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_slice_generator", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1163, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries._slice_generator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_40_slice_generator(__pyx_self, __pyx_v_self, __pyx_v_index);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_40_slice_generator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__138)
  __Pyx_RefNannySetupContext("_slice_generator", 0);
  __pyx_cur_scope = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator *)__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator(__pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1163, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("_slice_generator", __pyx_f[0], 1163, 0, __PYX_ERR(0, 1163, __pyx_L1_error));
  __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);
  __pyx_cur_scope->__pyx_v_index = __pyx_v_index;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_index);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_index);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7km3pipe_11dataclasses_18TimesliceHitSeries_42generator1, (PyObject *) __pyx_cur_scope, __pyx_n_s_slice_generator, __pyx_n_s_TimesliceHitSeries__slice_genera, __pyx_n_s_km3pipe_dataclasses); if (unlikely(!gen)) __PYX_ERR(0, 1163, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries._slice_generator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_7km3pipe_11dataclasses_18TimesliceHitSeries_42generator1(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator *__pyx_cur_scope = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  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)(PyObject *);
  PyObject *(*__pyx_t_8)(PyObject *);
  __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_ERR(0, 1163, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1165
 *     def _slice_generator(self, index):
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))             # <<<<<<<<<<<<<<
 *         for i in range(start, stop, step):
 *             yield TimesliceHit(*self._arr[i])
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_index, __pyx_n_s_indices); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_Length(__pyx_cur_scope->__pyx_v_self); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 1165, __pyx_L1_error)
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1165, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1165, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1165, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1165, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1165, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    #if !CYTHON_COMPILING_IN_PYPY
    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_ERR(0, 1165, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_4);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1165, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1165, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1165, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1165, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_6 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_6);
    index = 2; __pyx_t_4 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_5), 3) < 0) __PYX_ERR(0, 1165, __pyx_L1_error)
    __pyx_t_7 = NULL;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L5_unpacking_done;
    __pyx_L4_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 1165, __pyx_L1_error)
    __pyx_L5_unpacking_done:;
  }
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_cur_scope->__pyx_v_start = __pyx_t_2;
  __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_cur_scope->__pyx_v_stop = __pyx_t_6;
  __pyx_t_6 = 0;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_cur_scope->__pyx_v_step = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":1166
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 *         for i in range(start, stop, step):             # <<<<<<<<<<<<<<
 *             yield TimesliceHit(*self._arr[i])
 * 
 */
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_start);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_start);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_v_start);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_stop);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_stop);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_cur_scope->__pyx_v_stop);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_step);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_step);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_cur_scope->__pyx_v_step);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1166, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1166, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1166, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1166, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 1166, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1166, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_8(__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_ERR(0, 1166, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_i);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_i, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;

    /* "km3pipe/dataclasses.pyx":1167
 *         start, stop, step = index.indices(len(self))
 *         for i in range(start, stop, step):
 *             yield TimesliceHit(*self._arr[i])             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = PyObject_GetItem(__pyx_t_4, __pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PySequence_Tuple(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7km3pipe_11dataclasses_TimesliceHit), __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __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_3;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_8;
    __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_t_8 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1167, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":1166
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 *         for i in range(start, stop, step):             # <<<<<<<<<<<<<<
 *             yield TimesliceHit(*self._arr[i])
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "km3pipe/dataclasses.pyx":1163
 *             raise TypeError("index must be int or slice")
 * 
 *     def _slice_generator(self, index):             # <<<<<<<<<<<<<<
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 */

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("_slice_generator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1169
 *             yield TimesliceHit(*self._arr[i])
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_44__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_43__str__[] = "TimesliceHitSeries.__str__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_44__str__ = {"__str__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_44__str__, METH_O, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_43__str__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_44__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_43__str__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_43__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_v_n_hits;
  PyObject *__pyx_v_plural = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__139)
  __Pyx_RefNannySetupContext("__str__", 0);
  __Pyx_TraceCall("__str__", __pyx_f[0], 1169, 0, __PYX_ERR(0, 1169, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1170
 * 
 *     def __str__(self):
 *         n_hits = len(self)             # <<<<<<<<<<<<<<
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 *         return("TimesliceHitSeries with {0} hit{1}.".format(len(self), plural))
 */
  __Pyx_TraceLine(1170,0,__PYX_ERR(0, 1170, __pyx_L1_error))
  __pyx_t_1 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 1170, __pyx_L1_error)
  __pyx_v_n_hits = __pyx_t_1;

  /* "km3pipe/dataclasses.pyx":1171
 *     def __str__(self):
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''             # <<<<<<<<<<<<<<
 *         return("TimesliceHitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 */
  __Pyx_TraceLine(1171,0,__PYX_ERR(0, 1171, __pyx_L1_error))
  __pyx_t_4 = ((__pyx_v_n_hits > 1) != 0);
  if (!__pyx_t_4) {
  } else {
    __pyx_t_3 = __pyx_t_4;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_4 = ((__pyx_v_n_hits == 0) != 0);
  __pyx_t_3 = __pyx_t_4;
  __pyx_L3_bool_binop_done:;
  if (__pyx_t_3) {
    __Pyx_INCREF(__pyx_n_s_s);
    __pyx_t_2 = __pyx_n_s_s;
  } else {
    __Pyx_INCREF(__pyx_kp_s__113);
    __pyx_t_2 = __pyx_kp_s__113;
  }
  __pyx_v_plural = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":1172
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 *         return("TimesliceHitSeries with {0} hit{1}.".format(len(self), plural))             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_TraceLine(1172,0,__PYX_ERR(0, 1172, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_TimesliceHitSeries_with_0_hit_1, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 1172, __pyx_L1_error)
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_plural};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1172, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_plural};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1172, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6);
    __Pyx_INCREF(__pyx_v_plural);
    __Pyx_GIVEREF(__pyx_v_plural);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_plural);
    __pyx_t_6 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1169
 *             yield TimesliceHit(*self._arr[i])
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_plural);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1174
 *         return("TimesliceHitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_46__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_45__repr__[] = "TimesliceHitSeries.__repr__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_46__repr__ = {"__repr__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_46__repr__, METH_O, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_45__repr__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_46__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_45__repr__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_45__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__140)
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 1174, 0, __PYX_ERR(0, 1174, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1175
 * 
 *     def __repr__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 *     def __insp__(self):
 */
  __Pyx_TraceLine(1175,0,__PYX_ERR(0, 1175, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1175, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1175, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1174
 *         return("TimesliceHitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1177
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return '\n'.join([str(hit) for hit in self._hits])
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_48__insp__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_47__insp__[] = "TimesliceHitSeries.__insp__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_48__insp__ = {"__insp__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_48__insp__, METH_O, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_47__insp__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_48__insp__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__insp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_47__insp__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_47__insp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_hit = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__141)
  __Pyx_RefNannySetupContext("__insp__", 0);
  __Pyx_TraceCall("__insp__", __pyx_f[0], 1177, 0, __PYX_ERR(0, 1177, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1178
 * 
 *     def __insp__(self):
 *         return '\n'.join([str(hit) for hit in self._hits])             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(1178,0,__PYX_ERR(0, 1178, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_hits); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(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_ERR(0, 1178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1178, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 1178, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1178, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 1178, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1178, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #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_ERR(0, 1178, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_hit, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_hit);
    __Pyx_GIVEREF(__pyx_v_hit);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_hit);
    __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1178, __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__116, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1177
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return '\n'.join([str(hit) for hit in self._hits])
 * 
 */

  /* 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_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.__insp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_hit);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1207
 *     ])
 * 
 *     def __init__(self, tracks, event_id, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._bjorkeny = None
 *         self._dir = None
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries___init__[] = "TrackSeries.__init__(self, tracks, event_id, h5loc='/')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_1__init__ = {"__init__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries___init__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_tracks = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_tracks,&__pyx_n_s_event_id,&__pyx_n_s_h5loc,0};
    PyObject* values[4] = {0,0,0,0};
    values[3] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tracks)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 1); __PYX_ERR(0, 1207, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 2); __PYX_ERR(0, 1207, __pyx_L3_error)
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1207, __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);
        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_tracks = values[1];
    __pyx_v_event_id = values[2];
    __pyx_v_h5loc = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1207, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries___init__(__pyx_self, __pyx_v_self, __pyx_v_tracks, __pyx_v_event_id, __pyx_v_h5loc);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tracks, PyObject *__pyx_v_event_id, PyObject *__pyx_v_h5loc) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__142)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 1207, 0, __PYX_ERR(0, 1207, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1208
 * 
 *     def __init__(self, tracks, event_id, h5loc='/'):
 *         self._bjorkeny = None             # <<<<<<<<<<<<<<
 *         self._dir = None
 *         self._energy = None
 */
  __Pyx_TraceLine(1208,0,__PYX_ERR(0, 1208, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_bjorkeny_2, Py_None) < 0) __PYX_ERR(0, 1208, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1209
 *     def __init__(self, tracks, event_id, h5loc='/'):
 *         self._bjorkeny = None
 *         self._dir = None             # <<<<<<<<<<<<<<
 *         self._energy = None
 *         self._highest_energetic_muon = None
 */
  __Pyx_TraceLine(1209,0,__PYX_ERR(0, 1209, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dir_2, Py_None) < 0) __PYX_ERR(0, 1209, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1210
 *         self._bjorkeny = None
 *         self._dir = None
 *         self._energy = None             # <<<<<<<<<<<<<<
 *         self._highest_energetic_muon = None
 *         self._id = None
 */
  __Pyx_TraceLine(1210,0,__PYX_ERR(0, 1210, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_energy_2, Py_None) < 0) __PYX_ERR(0, 1210, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1211
 *         self._dir = None
 *         self._energy = None
 *         self._highest_energetic_muon = None             # <<<<<<<<<<<<<<
 *         self._id = None
 *         self._index = 0
 */
  __Pyx_TraceLine(1211,0,__PYX_ERR(0, 1211, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_highest_energetic_muon, Py_None) < 0) __PYX_ERR(0, 1211, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1212
 *         self._energy = None
 *         self._highest_energetic_muon = None
 *         self._id = None             # <<<<<<<<<<<<<<
 *         self._index = 0
 *         self._interaction_channel = None
 */
  __Pyx_TraceLine(1212,0,__PYX_ERR(0, 1212, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_id_2, Py_None) < 0) __PYX_ERR(0, 1212, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1213
 *         self._highest_energetic_muon = None
 *         self._id = None
 *         self._index = 0             # <<<<<<<<<<<<<<
 *         self._interaction_channel = None
 *         self._is_cc = None
 */
  __Pyx_TraceLine(1213,0,__PYX_ERR(0, 1213, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index, __pyx_int_0) < 0) __PYX_ERR(0, 1213, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1214
 *         self._id = None
 *         self._index = 0
 *         self._interaction_channel = None             # <<<<<<<<<<<<<<
 *         self._is_cc = None
 *         self._length = None
 */
  __Pyx_TraceLine(1214,0,__PYX_ERR(0, 1214, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_interaction_channel_2, Py_None) < 0) __PYX_ERR(0, 1214, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1215
 *         self._index = 0
 *         self._interaction_channel = None
 *         self._is_cc = None             # <<<<<<<<<<<<<<
 *         self._length = None
 *         self._pos = None
 */
  __Pyx_TraceLine(1215,0,__PYX_ERR(0, 1215, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_is_cc_2, Py_None) < 0) __PYX_ERR(0, 1215, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1216
 *         self._interaction_channel = None
 *         self._is_cc = None
 *         self._length = None             # <<<<<<<<<<<<<<
 *         self._pos = None
 *         self._time = None
 */
  __Pyx_TraceLine(1216,0,__PYX_ERR(0, 1216, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_length_2, Py_None) < 0) __PYX_ERR(0, 1216, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1217
 *         self._is_cc = None
 *         self._length = None
 *         self._pos = None             # <<<<<<<<<<<<<<
 *         self._time = None
 *         self._tracks = tracks
 */
  __Pyx_TraceLine(1217,0,__PYX_ERR(0, 1217, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_pos_2, Py_None) < 0) __PYX_ERR(0, 1217, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1218
 *         self._length = None
 *         self._pos = None
 *         self._time = None             # <<<<<<<<<<<<<<
 *         self._tracks = tracks
 *         self._type = None
 */
  __Pyx_TraceLine(1218,0,__PYX_ERR(0, 1218, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_time_2, Py_None) < 0) __PYX_ERR(0, 1218, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1219
 *         self._pos = None
 *         self._time = None
 *         self._tracks = tracks             # <<<<<<<<<<<<<<
 *         self._type = None
 *         self.event_id = event_id
 */
  __Pyx_TraceLine(1219,0,__PYX_ERR(0, 1219, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2, __pyx_v_tracks) < 0) __PYX_ERR(0, 1219, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1220
 *         self._time = None
 *         self._tracks = tracks
 *         self._type = None             # <<<<<<<<<<<<<<
 *         self.event_id = event_id
 *         self.h5loc = h5loc
 */
  __Pyx_TraceLine(1220,0,__PYX_ERR(0, 1220, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_type_2, Py_None) < 0) __PYX_ERR(0, 1220, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1221
 *         self._tracks = tracks
 *         self._type = None
 *         self.event_id = event_id             # <<<<<<<<<<<<<<
 *         self.h5loc = h5loc
 * 
 */
  __Pyx_TraceLine(1221,0,__PYX_ERR(0, 1221, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_event_id, __pyx_v_event_id) < 0) __PYX_ERR(0, 1221, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1222
 *         self._type = None
 *         self.event_id = event_id
 *         self.h5loc = h5loc             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1222,0,__PYX_ERR(0, 1222, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_h5loc, __pyx_v_h5loc) < 0) __PYX_ERR(0, 1222, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1207
 *     ])
 * 
 *     def __init__(self, tracks, event_id, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._bjorkeny = None
 *         self._dir = None
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1225
 * 
 *     @classmethod
 *     def from_aanet(cls, tracks, event_id):             # <<<<<<<<<<<<<<
 *         return cls([Track(cls.get_usr_item(t, 1),               # bjorkeny
 *                           Direction((t.dir.x, t.dir.y, t.dir.z)),
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_3from_aanet(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_2from_aanet[] = "TrackSeries.from_aanet(cls, tracks, event_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_3from_aanet = {"from_aanet", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_3from_aanet, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_2from_aanet};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_3from_aanet(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_tracks = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_aanet (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_tracks,&__pyx_n_s_event_id,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_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tracks)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_aanet", 1, 3, 3, 1); __PYX_ERR(0, 1225, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_aanet", 1, 3, 3, 2); __PYX_ERR(0, 1225, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_aanet") < 0)) __PYX_ERR(0, 1225, __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_cls = values[0];
    __pyx_v_tracks = values[1];
    __pyx_v_event_id = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_aanet", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1225, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.from_aanet", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_2from_aanet(__pyx_self, __pyx_v_cls, __pyx_v_tracks, __pyx_v_event_id);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_2from_aanet(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_tracks, PyObject *__pyx_v_event_id) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__143)
  __Pyx_RefNannySetupContext("from_aanet", 0);
  __Pyx_TraceCall("from_aanet", __pyx_f[0], 1225, 0, __PYX_ERR(0, 1225, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1226
 *     @classmethod
 *     def from_aanet(cls, tracks, event_id):
 *         return cls([Track(cls.get_usr_item(t, 1),               # bjorkeny             # <<<<<<<<<<<<<<
 *                           Direction((t.dir.x, t.dir.y, t.dir.z)),
 *                           t.E,
 */
  __Pyx_TraceLine(1226,0,__PYX_ERR(0, 1226, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "km3pipe/dataclasses.pyx":1245
 *                           t.type,
 *                           )
 *                     for t in tracks], event_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1245,0,__PYX_ERR(0, 1245, __pyx_L1_error))
  if (likely(PyList_CheckExact(__pyx_v_tracks)) || PyTuple_CheckExact(__pyx_v_tracks)) {
    __pyx_t_3 = __pyx_v_tracks; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_tracks); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1245, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 1245, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1245, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 1245, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1245, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #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_ERR(0, 1245, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "km3pipe/dataclasses.pyx":1226
 *     @classmethod
 *     def from_aanet(cls, tracks, event_id):
 *         return cls([Track(cls.get_usr_item(t, 1),               # bjorkeny             # <<<<<<<<<<<<<<
 *                           Direction((t.dir.x, t.dir.y, t.dir.z)),
 *                           t.E,
 */
    __Pyx_TraceLine(1226,0,__PYX_ERR(0, 1226, __pyx_L1_error))
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_get_usr_item); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1226, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_t, __pyx_int_1};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1226, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_6);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_t, __pyx_int_1};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1226, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_6);
    } else
    #endif
    {
      __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1226, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      if (__pyx_t_8) {
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
      }
      __Pyx_INCREF(__pyx_v_t);
      __Pyx_GIVEREF(__pyx_v_t);
      PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_t);
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_int_1);
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1226, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "km3pipe/dataclasses.pyx":1227
 *     def from_aanet(cls, tracks, event_id):
 *         return cls([Track(cls.get_usr_item(t, 1),               # bjorkeny
 *                           Direction((t.dir.x, t.dir.y, t.dir.z)),             # <<<<<<<<<<<<<<
 *                           t.E,
 *                           t.id,
 */
    __Pyx_TraceLine(1227,0,__PYX_ERR(0, 1227, __pyx_L1_error))
    __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_Direction); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_dir); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_x); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_dir); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_y); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_dir); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_z); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_12);
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_13);
    __pyx_t_11 = 0;
    __pyx_t_12 = 0;
    __pyx_t_13 = 0;
    __pyx_t_13 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
      __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_10);
      if (likely(__pyx_t_13)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_13);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_10, function);
      }
    }
    if (!__pyx_t_13) {
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1227, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_7);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_10)) {
        PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_8};
        __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1227, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
        PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_8};
        __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1227, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else
      #endif
      {
        __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1227, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_13); __pyx_t_13 = NULL;
        __Pyx_GIVEREF(__pyx_t_8);
        PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_8);
        __pyx_t_8 = 0;
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_12, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1227, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "km3pipe/dataclasses.pyx":1228
 *         return cls([Track(cls.get_usr_item(t, 1),               # bjorkeny
 *                           Direction((t.dir.x, t.dir.y, t.dir.z)),
 *                           t.E,             # <<<<<<<<<<<<<<
 *                           t.id,
 *                           cls.get_usr_item(t, 2),               # ichan
 */
    __Pyx_TraceLine(1228,0,__PYX_ERR(0, 1228, __pyx_L1_error))
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_E); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1228, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);

    /* "km3pipe/dataclasses.pyx":1229
 *                           Direction((t.dir.x, t.dir.y, t.dir.z)),
 *                           t.E,
 *                           t.id,             # <<<<<<<<<<<<<<
 *                           cls.get_usr_item(t, 2),               # ichan
 *                           IS_CC[cls.get_usr_item(t, 0)],        # is_cc
 */
    __Pyx_TraceLine(1229,0,__PYX_ERR(0, 1229, __pyx_L1_error))
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_id); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);

    /* "km3pipe/dataclasses.pyx":1230
 *                           t.E,
 *                           t.id,
 *                           cls.get_usr_item(t, 2),               # ichan             # <<<<<<<<<<<<<<
 *                           IS_CC[cls.get_usr_item(t, 0)],        # is_cc
 *                           cls.get_len(t),
 */
    __Pyx_TraceLine(1230,0,__PYX_ERR(0, 1230, __pyx_L1_error))
    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_get_usr_item); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_11 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) {
      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_13);
      if (likely(__pyx_t_11)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_13, function);
        __pyx_t_9 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_13)) {
      PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_v_t, __pyx_int_2};
      __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1230, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_GOTREF(__pyx_t_8);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) {
      PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_v_t, __pyx_int_2};
      __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1230, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_GOTREF(__pyx_t_8);
    } else
    #endif
    {
      __pyx_t_14 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1230, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      if (__pyx_t_11) {
        __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_11); __pyx_t_11 = NULL;
      }
      __Pyx_INCREF(__pyx_v_t);
      __Pyx_GIVEREF(__pyx_v_t);
      PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_9, __pyx_v_t);
      __Pyx_INCREF(__pyx_int_2);
      __Pyx_GIVEREF(__pyx_int_2);
      PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_9, __pyx_int_2);
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_14, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1230, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    }
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

    /* "km3pipe/dataclasses.pyx":1231
 *                           t.id,
 *                           cls.get_usr_item(t, 2),               # ichan
 *                           IS_CC[cls.get_usr_item(t, 0)],        # is_cc             # <<<<<<<<<<<<<<
 *                           cls.get_len(t),
 *                           Position((t.pos.x, t.pos.y, t.pos.z)),
 */
    __Pyx_TraceLine(1231,0,__PYX_ERR(0, 1231, __pyx_L1_error))
    __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_IS_CC); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_get_usr_item); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_15 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
      __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_11);
      if (likely(__pyx_t_15)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
        __Pyx_INCREF(__pyx_t_15);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_11, function);
        __pyx_t_9 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_11)) {
      PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_v_t, __pyx_int_0};
      __pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1231, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_GOTREF(__pyx_t_14);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
      PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_v_t, __pyx_int_0};
      __pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1231, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_GOTREF(__pyx_t_14);
    } else
    #endif
    {
      __pyx_t_16 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1231, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      if (__pyx_t_15) {
        __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_15); __pyx_t_15 = NULL;
      }
      __Pyx_INCREF(__pyx_v_t);
      __Pyx_GIVEREF(__pyx_v_t);
      PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_9, __pyx_v_t);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_9, __pyx_int_0);
      __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_16, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1231, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    }
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = PyObject_GetItem(__pyx_t_13, __pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

    /* "km3pipe/dataclasses.pyx":1232
 *                           cls.get_usr_item(t, 2),               # ichan
 *                           IS_CC[cls.get_usr_item(t, 0)],        # is_cc
 *                           cls.get_len(t),             # <<<<<<<<<<<<<<
 *                           Position((t.pos.x, t.pos.y, t.pos.z)),
 *                           t.t,
 */
    __Pyx_TraceLine(1232,0,__PYX_ERR(0, 1232, __pyx_L1_error))
    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_get_len); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1232, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_16 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) {
      __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_13);
      if (likely(__pyx_t_16)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
        __Pyx_INCREF(__pyx_t_16);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_13, function);
      }
    }
    if (!__pyx_t_16) {
      __pyx_t_14 = __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_v_t); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1232, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_13)) {
        PyObject *__pyx_temp[2] = {__pyx_t_16, __pyx_v_t};
        __pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1232, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_GOTREF(__pyx_t_14);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) {
        PyObject *__pyx_temp[2] = {__pyx_t_16, __pyx_v_t};
        __pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1232, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_GOTREF(__pyx_t_14);
      } else
      #endif
      {
        __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1232, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_16); __pyx_t_16 = NULL;
        __Pyx_INCREF(__pyx_v_t);
        __Pyx_GIVEREF(__pyx_v_t);
        PyTuple_SET_ITEM(__pyx_t_15, 0+1, __pyx_v_t);
        __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_15, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1232, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

    /* "km3pipe/dataclasses.pyx":1233
 *                           IS_CC[cls.get_usr_item(t, 0)],        # is_cc
 *                           cls.get_len(t),
 *                           Position((t.pos.x, t.pos.y, t.pos.z)),             # <<<<<<<<<<<<<<
 *                           t.t,
 *                           # This is a nasty bug. It is not completely clear
 */
    __Pyx_TraceLine(1233,0,__PYX_ERR(0, 1233, __pyx_L1_error))
    __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_Position); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_pos); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_x); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_pos); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_y); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_pos); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_z); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __pyx_t_16 = PyTuple_New(3); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_GIVEREF(__pyx_t_17);
    PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_17);
    __Pyx_GIVEREF(__pyx_t_18);
    PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_18);
    __Pyx_GIVEREF(__pyx_t_19);
    PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_t_19);
    __pyx_t_17 = 0;
    __pyx_t_18 = 0;
    __pyx_t_19 = 0;
    __pyx_t_19 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
      __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_15);
      if (likely(__pyx_t_19)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
        __Pyx_INCREF(__pyx_t_19);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_15, function);
      }
    }
    if (!__pyx_t_19) {
      __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_16); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1233, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_GOTREF(__pyx_t_13);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_15)) {
        PyObject *__pyx_temp[2] = {__pyx_t_19, __pyx_t_16};
        __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1233, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
        PyObject *__pyx_temp[2] = {__pyx_t_19, __pyx_t_16};
        __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1233, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      } else
      #endif
      {
        __pyx_t_18 = PyTuple_New(1+1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1233, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_18);
        __Pyx_GIVEREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_19); __pyx_t_19 = NULL;
        __Pyx_GIVEREF(__pyx_t_16);
        PyTuple_SET_ITEM(__pyx_t_18, 0+1, __pyx_t_16);
        __pyx_t_16 = 0;
        __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_18, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1233, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

    /* "km3pipe/dataclasses.pyx":1234
 *                           cls.get_len(t),
 *                           Position((t.pos.x, t.pos.y, t.pos.z)),
 *                           t.t,             # <<<<<<<<<<<<<<
 *                           # This is a nasty bug. It is not completely clear
 *                           # if this is supposed to be PDG or Geant convention.
 */
    __Pyx_TraceLine(1234,0,__PYX_ERR(0, 1234, __pyx_L1_error))
    __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_t); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1234, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);

    /* "km3pipe/dataclasses.pyx":1243
 *                           #
 *                           # geant2pdg(t.type))
 *                           t.type,             # <<<<<<<<<<<<<<
 *                           )
 *                     for t in tracks], event_id)
 */
    __Pyx_TraceLine(1243,0,__PYX_ERR(0, 1243, __pyx_L1_error))
    __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_type); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1243, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);

    /* "km3pipe/dataclasses.pyx":1226
 *     @classmethod
 *     def from_aanet(cls, tracks, event_id):
 *         return cls([Track(cls.get_usr_item(t, 1),               # bjorkeny             # <<<<<<<<<<<<<<
 *                           Direction((t.dir.x, t.dir.y, t.dir.z)),
 *                           t.E,
 */
    __Pyx_TraceLine(1226,0,__PYX_ERR(0, 1226, __pyx_L1_error))
    __pyx_t_16 = PyTuple_New(10); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1226, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_16, 3, __pyx_t_12);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_16, 4, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_16, 5, __pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_14);
    PyTuple_SET_ITEM(__pyx_t_16, 6, __pyx_t_14);
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_16, 7, __pyx_t_13);
    __Pyx_GIVEREF(__pyx_t_15);
    PyTuple_SET_ITEM(__pyx_t_16, 8, __pyx_t_15);
    __Pyx_GIVEREF(__pyx_t_18);
    PyTuple_SET_ITEM(__pyx_t_16, 9, __pyx_t_18);
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_10 = 0;
    __pyx_t_12 = 0;
    __pyx_t_8 = 0;
    __pyx_t_11 = 0;
    __pyx_t_14 = 0;
    __pyx_t_13 = 0;
    __pyx_t_15 = 0;
    __pyx_t_18 = 0;
    __pyx_t_18 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7km3pipe_11dataclasses_Track), __pyx_t_16, NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1226, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_18))) __PYX_ERR(0, 1226, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;

    /* "km3pipe/dataclasses.pyx":1245
 *                           t.type,
 *                           )
 *                     for t in tracks], event_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
    __Pyx_TraceLine(1245,0,__PYX_ERR(0, 1245, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_INCREF(__pyx_v_cls);
  __pyx_t_3 = __pyx_v_cls; __pyx_t_18 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_18)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_18);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_18, __pyx_t_2, __pyx_v_event_id};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1226, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_18, __pyx_t_2, __pyx_v_event_id};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1226, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  #endif
  {
    __pyx_t_16 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1226, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    if (__pyx_t_18) {
      __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_18); __pyx_t_18 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_9, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_event_id);
    __Pyx_GIVEREF(__pyx_v_event_id);
    PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_9, __pyx_v_event_id);
    __pyx_t_2 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1226, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1225
 * 
 *     @classmethod
 *     def from_aanet(cls, tracks, event_id):             # <<<<<<<<<<<<<<
 *         return cls([Track(cls.get_usr_item(t, 1),               # bjorkeny
 *                           Direction((t.dir.x, t.dir.y, t.dir.z)),
 */

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.from_aanet", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1248
 * 
 *     @classmethod
 *     def from_arrays(cls,             # <<<<<<<<<<<<<<
 *                     bjorkenys,
 *                     directions_x,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_5from_arrays(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_4from_arrays[] = "TrackSeries.from_arrays(cls, bjorkenys, directions_x, directions_y, directions_z, energies, ids, interaction_channels, is_ccs, lengths, positions_x, positions_y, positions_z, times, types, event_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_5from_arrays = {"from_arrays", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_5from_arrays, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_4from_arrays};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_5from_arrays(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_bjorkenys = 0;
  PyObject *__pyx_v_directions_x = 0;
  PyObject *__pyx_v_directions_y = 0;
  PyObject *__pyx_v_directions_z = 0;
  PyObject *__pyx_v_energies = 0;
  PyObject *__pyx_v_ids = 0;
  PyObject *__pyx_v_interaction_channels = 0;
  PyObject *__pyx_v_is_ccs = 0;
  PyObject *__pyx_v_lengths = 0;
  PyObject *__pyx_v_positions_x = 0;
  PyObject *__pyx_v_positions_y = 0;
  PyObject *__pyx_v_positions_z = 0;
  PyObject *__pyx_v_times = 0;
  PyObject *__pyx_v_types = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_arrays (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_bjorkenys,&__pyx_n_s_directions_x,&__pyx_n_s_directions_y,&__pyx_n_s_directions_z,&__pyx_n_s_energies,&__pyx_n_s_ids,&__pyx_n_s_interaction_channels,&__pyx_n_s_is_ccs,&__pyx_n_s_lengths,&__pyx_n_s_positions_x,&__pyx_n_s_positions_y,&__pyx_n_s_positions_z,&__pyx_n_s_times,&__pyx_n_s_types,&__pyx_n_s_event_id,0};
    PyObject* values[16] = {0,0,0,0,0,0,0,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 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_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bjorkenys)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 1); __PYX_ERR(0, 1248, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_directions_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 2); __PYX_ERR(0, 1248, __pyx_L3_error)
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_directions_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 3); __PYX_ERR(0, 1248, __pyx_L3_error)
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_directions_z)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 4); __PYX_ERR(0, 1248, __pyx_L3_error)
        }
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_energies)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 5); __PYX_ERR(0, 1248, __pyx_L3_error)
        }
        case  6:
        if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ids)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 6); __PYX_ERR(0, 1248, __pyx_L3_error)
        }
        case  7:
        if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_interaction_channels)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 7); __PYX_ERR(0, 1248, __pyx_L3_error)
        }
        case  8:
        if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_is_ccs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 8); __PYX_ERR(0, 1248, __pyx_L3_error)
        }
        case  9:
        if (likely((values[9] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lengths)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 9); __PYX_ERR(0, 1248, __pyx_L3_error)
        }
        case 10:
        if (likely((values[10] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_positions_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 10); __PYX_ERR(0, 1248, __pyx_L3_error)
        }
        case 11:
        if (likely((values[11] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_positions_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 11); __PYX_ERR(0, 1248, __pyx_L3_error)
        }
        case 12:
        if (likely((values[12] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_positions_z)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 12); __PYX_ERR(0, 1248, __pyx_L3_error)
        }
        case 13:
        if (likely((values[13] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_times)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 13); __PYX_ERR(0, 1248, __pyx_L3_error)
        }
        case 14:
        if (likely((values[14] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_types)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 14); __PYX_ERR(0, 1248, __pyx_L3_error)
        }
        case 15:
        if (likely((values[15] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 15); __PYX_ERR(0, 1248, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_arrays") < 0)) __PYX_ERR(0, 1248, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 16) {
      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);
      values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
      values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
      values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
      values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
      values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
      values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
      values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
    }
    __pyx_v_cls = values[0];
    __pyx_v_bjorkenys = values[1];
    __pyx_v_directions_x = values[2];
    __pyx_v_directions_y = values[3];
    __pyx_v_directions_z = values[4];
    __pyx_v_energies = values[5];
    __pyx_v_ids = values[6];
    __pyx_v_interaction_channels = values[7];
    __pyx_v_is_ccs = values[8];
    __pyx_v_lengths = values[9];
    __pyx_v_positions_x = values[10];
    __pyx_v_positions_y = values[11];
    __pyx_v_positions_z = values[12];
    __pyx_v_times = values[13];
    __pyx_v_types = values[14];
    __pyx_v_event_id = values[15];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1248, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_4from_arrays(__pyx_self, __pyx_v_cls, __pyx_v_bjorkenys, __pyx_v_directions_x, __pyx_v_directions_y, __pyx_v_directions_z, __pyx_v_energies, __pyx_v_ids, __pyx_v_interaction_channels, __pyx_v_is_ccs, __pyx_v_lengths, __pyx_v_positions_x, __pyx_v_positions_y, __pyx_v_positions_z, __pyx_v_times, __pyx_v_types, __pyx_v_event_id);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_4from_arrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_bjorkenys, PyObject *__pyx_v_directions_x, PyObject *__pyx_v_directions_y, PyObject *__pyx_v_directions_z, PyObject *__pyx_v_energies, PyObject *__pyx_v_ids, PyObject *__pyx_v_interaction_channels, PyObject *__pyx_v_is_ccs, PyObject *__pyx_v_lengths, PyObject *__pyx_v_positions_x, PyObject *__pyx_v_positions_y, PyObject *__pyx_v_positions_z, PyObject *__pyx_v_times, PyObject *__pyx_v_types, PyObject *__pyx_v_event_id) {
  PyObject *__pyx_v_directions = NULL;
  PyObject *__pyx_v_positions = NULL;
  PyObject *__pyx_v_args = NULL;
  PyObject *__pyx_v_tracks = NULL;
  PyObject *__pyx_v_track_args = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  int __pyx_t_8;
  __Pyx_TraceFrameInit(__pyx_codeobj__144)
  __Pyx_RefNannySetupContext("from_arrays", 0);
  __Pyx_TraceCall("from_arrays", __pyx_f[0], 1248, 0, __PYX_ERR(0, 1248, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1265
 *                     event_id,
 *                     ):
 *         directions = np.column_stack((directions_x, directions_y,             # <<<<<<<<<<<<<<
 *                                       directions_z))
 *         positions = np.column_stack((positions_x, positions_y,
 */
  __Pyx_TraceLine(1265,0,__PYX_ERR(0, 1265, __pyx_L1_error))
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_column_stack); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":1266
 *                     ):
 *         directions = np.column_stack((directions_x, directions_y,
 *                                       directions_z))             # <<<<<<<<<<<<<<
 *         positions = np.column_stack((positions_x, positions_y,
 *                                      positions_z))
 */
  __Pyx_TraceLine(1266,0,__PYX_ERR(0, 1266, __pyx_L1_error))
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_directions_x);
  __Pyx_GIVEREF(__pyx_v_directions_x);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_directions_x);
  __Pyx_INCREF(__pyx_v_directions_y);
  __Pyx_GIVEREF(__pyx_v_directions_y);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_directions_y);
  __Pyx_INCREF(__pyx_v_directions_z);
  __Pyx_GIVEREF(__pyx_v_directions_z);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_directions_z);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1265, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1265, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1265, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1265, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1265, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_directions = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":1267
 *         directions = np.column_stack((directions_x, directions_y,
 *                                       directions_z))
 *         positions = np.column_stack((positions_x, positions_y,             # <<<<<<<<<<<<<<
 *                                      positions_z))
 *         args = bjorkenys, directions, energies, \
 */
  __Pyx_TraceLine(1267,0,__PYX_ERR(0, 1267, __pyx_L1_error))
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_column_stack); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":1268
 *                                       directions_z))
 *         positions = np.column_stack((positions_x, positions_y,
 *                                      positions_z))             # <<<<<<<<<<<<<<
 *         args = bjorkenys, directions, energies, \
 *             ids, interaction_channels, is_ccs, lengths, positions, \
 */
  __Pyx_TraceLine(1268,0,__PYX_ERR(0, 1268, __pyx_L1_error))
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_positions_x);
  __Pyx_GIVEREF(__pyx_v_positions_x);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_positions_x);
  __Pyx_INCREF(__pyx_v_positions_y);
  __Pyx_GIVEREF(__pyx_v_positions_y);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_positions_y);
  __Pyx_INCREF(__pyx_v_positions_z);
  __Pyx_GIVEREF(__pyx_v_positions_z);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_positions_z);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1267, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1267, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1267, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1267, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1267, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_positions = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":1269
 *         positions = np.column_stack((positions_x, positions_y,
 *                                      positions_z))
 *         args = bjorkenys, directions, energies, \             # <<<<<<<<<<<<<<
 *             ids, interaction_channels, is_ccs, lengths, positions, \
 *             times, types
 */
  __Pyx_TraceLine(1269,0,__PYX_ERR(0, 1269, __pyx_L1_error))
  __pyx_t_1 = PyTuple_New(10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_bjorkenys);
  __Pyx_GIVEREF(__pyx_v_bjorkenys);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_bjorkenys);
  __Pyx_INCREF(__pyx_v_directions);
  __Pyx_GIVEREF(__pyx_v_directions);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_directions);
  __Pyx_INCREF(__pyx_v_energies);
  __Pyx_GIVEREF(__pyx_v_energies);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_energies);
  __Pyx_INCREF(__pyx_v_ids);
  __Pyx_GIVEREF(__pyx_v_ids);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_ids);
  __Pyx_INCREF(__pyx_v_interaction_channels);
  __Pyx_GIVEREF(__pyx_v_interaction_channels);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_v_interaction_channels);
  __Pyx_INCREF(__pyx_v_is_ccs);
  __Pyx_GIVEREF(__pyx_v_is_ccs);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_v_is_ccs);
  __Pyx_INCREF(__pyx_v_lengths);
  __Pyx_GIVEREF(__pyx_v_lengths);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_v_lengths);
  __Pyx_INCREF(__pyx_v_positions);
  __Pyx_GIVEREF(__pyx_v_positions);
  PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_v_positions);
  __Pyx_INCREF(__pyx_v_times);
  __Pyx_GIVEREF(__pyx_v_times);
  PyTuple_SET_ITEM(__pyx_t_1, 8, __pyx_v_times);
  __Pyx_INCREF(__pyx_v_types);
  __Pyx_GIVEREF(__pyx_v_types);
  PyTuple_SET_ITEM(__pyx_t_1, 9, __pyx_v_types);
  __pyx_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":1272
 *             ids, interaction_channels, is_ccs, lengths, positions, \
 *             times, types
 *         tracks = cls([Track(*track_args) for track_args in zip(*args)],             # <<<<<<<<<<<<<<
 *                      event_id)
 *         tracks._bjorkeny = bjorkenys
 */
  __Pyx_TraceLine(1272,0,__PYX_ERR(0, 1272, __pyx_L1_error))
  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1272, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1272, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (likely(!__pyx_t_7)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 1272, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1272, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 1272, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1272, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #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_ERR(0, 1272, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_track_args, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = PySequence_Tuple(__pyx_v_track_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1272, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7km3pipe_11dataclasses_Track), __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1272, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 1272, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":1273
 *             times, types
 *         tracks = cls([Track(*track_args) for track_args in zip(*args)],
 *                      event_id)             # <<<<<<<<<<<<<<
 *         tracks._bjorkeny = bjorkenys
 *         tracks._dir = zip(directions_x, directions_y, directions_z)
 */
  __Pyx_TraceLine(1273,0,__PYX_ERR(0, 1273, __pyx_L1_error))
  __Pyx_INCREF(__pyx_v_cls);
  __pyx_t_3 = __pyx_v_cls; __pyx_t_2 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_5, __pyx_v_event_id};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1272, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_5, __pyx_v_event_id};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1272, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_4 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1272, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_8, __pyx_t_5);
    __Pyx_INCREF(__pyx_v_event_id);
    __Pyx_GIVEREF(__pyx_v_event_id);
    PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_8, __pyx_v_event_id);
    __pyx_t_5 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1272, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_tracks = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":1274
 *         tracks = cls([Track(*track_args) for track_args in zip(*args)],
 *                      event_id)
 *         tracks._bjorkeny = bjorkenys             # <<<<<<<<<<<<<<
 *         tracks._dir = zip(directions_x, directions_y, directions_z)
 *         tracks._energy = energies
 */
  __Pyx_TraceLine(1274,0,__PYX_ERR(0, 1274, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_tracks, __pyx_n_s_bjorkeny_2, __pyx_v_bjorkenys) < 0) __PYX_ERR(0, 1274, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1275
 *                      event_id)
 *         tracks._bjorkeny = bjorkenys
 *         tracks._dir = zip(directions_x, directions_y, directions_z)             # <<<<<<<<<<<<<<
 *         tracks._energy = energies
 *         tracks._id = ids
 */
  __Pyx_TraceLine(1275,0,__PYX_ERR(0, 1275, __pyx_L1_error))
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_directions_x);
  __Pyx_GIVEREF(__pyx_v_directions_x);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_directions_x);
  __Pyx_INCREF(__pyx_v_directions_y);
  __Pyx_GIVEREF(__pyx_v_directions_y);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_directions_y);
  __Pyx_INCREF(__pyx_v_directions_z);
  __Pyx_GIVEREF(__pyx_v_directions_z);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_directions_z);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_tracks, __pyx_n_s_dir_2, __pyx_t_3) < 0) __PYX_ERR(0, 1275, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":1276
 *         tracks._bjorkeny = bjorkenys
 *         tracks._dir = zip(directions_x, directions_y, directions_z)
 *         tracks._energy = energies             # <<<<<<<<<<<<<<
 *         tracks._id = ids
 *         tracks._interaction_channel = interaction_channels
 */
  __Pyx_TraceLine(1276,0,__PYX_ERR(0, 1276, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_tracks, __pyx_n_s_energy_2, __pyx_v_energies) < 0) __PYX_ERR(0, 1276, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1277
 *         tracks._dir = zip(directions_x, directions_y, directions_z)
 *         tracks._energy = energies
 *         tracks._id = ids             # <<<<<<<<<<<<<<
 *         tracks._interaction_channel = interaction_channels
 *         tracks._is_cc = is_ccs
 */
  __Pyx_TraceLine(1277,0,__PYX_ERR(0, 1277, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_tracks, __pyx_n_s_id_2, __pyx_v_ids) < 0) __PYX_ERR(0, 1277, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1278
 *         tracks._energy = energies
 *         tracks._id = ids
 *         tracks._interaction_channel = interaction_channels             # <<<<<<<<<<<<<<
 *         tracks._is_cc = is_ccs
 *         tracks._length = lengths
 */
  __Pyx_TraceLine(1278,0,__PYX_ERR(0, 1278, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_tracks, __pyx_n_s_interaction_channel_2, __pyx_v_interaction_channels) < 0) __PYX_ERR(0, 1278, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1279
 *         tracks._id = ids
 *         tracks._interaction_channel = interaction_channels
 *         tracks._is_cc = is_ccs             # <<<<<<<<<<<<<<
 *         tracks._length = lengths
 *         tracks._pos = zip(positions_x, positions_y, positions_z)
 */
  __Pyx_TraceLine(1279,0,__PYX_ERR(0, 1279, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_tracks, __pyx_n_s_is_cc_2, __pyx_v_is_ccs) < 0) __PYX_ERR(0, 1279, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1280
 *         tracks._interaction_channel = interaction_channels
 *         tracks._is_cc = is_ccs
 *         tracks._length = lengths             # <<<<<<<<<<<<<<
 *         tracks._pos = zip(positions_x, positions_y, positions_z)
 *         tracks._time = times
 */
  __Pyx_TraceLine(1280,0,__PYX_ERR(0, 1280, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_tracks, __pyx_n_s_length_2, __pyx_v_lengths) < 0) __PYX_ERR(0, 1280, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1281
 *         tracks._is_cc = is_ccs
 *         tracks._length = lengths
 *         tracks._pos = zip(positions_x, positions_y, positions_z)             # <<<<<<<<<<<<<<
 *         tracks._time = times
 *         tracks._type = types
 */
  __Pyx_TraceLine(1281,0,__PYX_ERR(0, 1281, __pyx_L1_error))
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_positions_x);
  __Pyx_GIVEREF(__pyx_v_positions_x);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_positions_x);
  __Pyx_INCREF(__pyx_v_positions_y);
  __Pyx_GIVEREF(__pyx_v_positions_y);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_positions_y);
  __Pyx_INCREF(__pyx_v_positions_z);
  __Pyx_GIVEREF(__pyx_v_positions_z);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_positions_z);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_tracks, __pyx_n_s_pos_2, __pyx_t_1) < 0) __PYX_ERR(0, 1281, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":1282
 *         tracks._length = lengths
 *         tracks._pos = zip(positions_x, positions_y, positions_z)
 *         tracks._time = times             # <<<<<<<<<<<<<<
 *         tracks._type = types
 *         return tracks
 */
  __Pyx_TraceLine(1282,0,__PYX_ERR(0, 1282, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_tracks, __pyx_n_s_time_2, __pyx_v_times) < 0) __PYX_ERR(0, 1282, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1283
 *         tracks._pos = zip(positions_x, positions_y, positions_z)
 *         tracks._time = times
 *         tracks._type = types             # <<<<<<<<<<<<<<
 *         return tracks
 * 
 */
  __Pyx_TraceLine(1283,0,__PYX_ERR(0, 1283, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_tracks, __pyx_n_s_type_2, __pyx_v_types) < 0) __PYX_ERR(0, 1283, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1284
 *         tracks._time = times
 *         tracks._type = types
 *         return tracks             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1284,0,__PYX_ERR(0, 1284, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_tracks);
  __pyx_r = __pyx_v_tracks;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1248
 * 
 *     @classmethod
 *     def from_arrays(cls,             # <<<<<<<<<<<<<<
 *                     bjorkenys,
 *                     directions_x,
 */

  /* 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_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_directions);
  __Pyx_XDECREF(__pyx_v_positions);
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_tracks);
  __Pyx_XDECREF(__pyx_v_track_args);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1287
 * 
 *     @classmethod
 *     def from_km3df(cls, km3df):             # <<<<<<<<<<<<<<
 *         return cls.from_table(km3df.conv_to(to='numpy'),
 *                               event_id=int(km3df['event_id']))
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_7from_km3df(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_6from_km3df[] = "TrackSeries.from_km3df(cls, km3df)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_7from_km3df = {"from_km3df", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_7from_km3df, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_6from_km3df};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_7from_km3df(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_km3df = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_km3df (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_km3df,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_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_km3df)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_km3df", 1, 2, 2, 1); __PYX_ERR(0, 1287, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_km3df") < 0)) __PYX_ERR(0, 1287, __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_cls = values[0];
    __pyx_v_km3df = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_km3df", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1287, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.from_km3df", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_6from_km3df(__pyx_self, __pyx_v_cls, __pyx_v_km3df);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_6from_km3df(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_km3df) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__145)
  __Pyx_RefNannySetupContext("from_km3df", 0);
  __Pyx_TraceCall("from_km3df", __pyx_f[0], 1287, 0, __PYX_ERR(0, 1287, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1288
 *     @classmethod
 *     def from_km3df(cls, km3df):
 *         return cls.from_table(km3df.conv_to(to='numpy'),             # <<<<<<<<<<<<<<
 *                               event_id=int(km3df['event_id']))
 * 
 */
  __Pyx_TraceLine(1288,0,__PYX_ERR(0, 1288, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_from_table); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_km3df, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_to, __pyx_n_s_numpy) < 0) __PYX_ERR(0, 1288, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1288, __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_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":1289
 *     def from_km3df(cls, km3df):
 *         return cls.from_table(km3df.conv_to(to='numpy'),
 *                               event_id=int(km3df['event_id']))             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1289,0,__PYX_ERR(0, 1289, __pyx_L1_error))
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyObject_GetItem(__pyx_v_km3df, __pyx_n_s_event_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_event_id, __pyx_t_5) < 0) __PYX_ERR(0, 1289, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":1288
 *     @classmethod
 *     def from_km3df(cls, km3df):
 *         return cls.from_table(km3df.conv_to(to='numpy'),             # <<<<<<<<<<<<<<
 *                               event_id=int(km3df['event_id']))
 * 
 */
  __Pyx_TraceLine(1288,0,__PYX_ERR(0, 1288, __pyx_L1_error))
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1287
 * 
 *     @classmethod
 *     def from_km3df(cls, km3df):             # <<<<<<<<<<<<<<
 *         return cls.from_table(km3df.conv_to(to='numpy'),
 *                               event_id=int(km3df['event_id']))
 */

  /* 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_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.from_km3df", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1292
 * 
 *     @classmethod
 *     def from_table(cls, table, event_id):             # <<<<<<<<<<<<<<
 *         return cls([Track(
 *             row['bjorkeny'],
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_9from_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_8from_table[] = "TrackSeries.from_table(cls, table, event_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_9from_table = {"from_table", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_9from_table, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_8from_table};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_9from_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_table = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_table (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_table,&__pyx_n_s_event_id,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_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_table)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_table", 1, 3, 3, 1); __PYX_ERR(0, 1292, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_table", 1, 3, 3, 2); __PYX_ERR(0, 1292, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_table") < 0)) __PYX_ERR(0, 1292, __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_cls = values[0];
    __pyx_v_table = values[1];
    __pyx_v_event_id = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_table", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1292, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_8from_table(__pyx_self, __pyx_v_cls, __pyx_v_table, __pyx_v_event_id);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_8from_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_table, PyObject *__pyx_v_event_id) {
  PyObject *__pyx_v_row = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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)(PyObject *);
  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 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_t_19;
  __Pyx_TraceFrameInit(__pyx_codeobj__146)
  __Pyx_RefNannySetupContext("from_table", 0);
  __Pyx_TraceCall("from_table", __pyx_f[0], 1292, 0, __PYX_ERR(0, 1292, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1293
 *     @classmethod
 *     def from_table(cls, table, event_id):
 *         return cls([Track(             # <<<<<<<<<<<<<<
 *             row['bjorkeny'],
 *             np.array((row['dir_x'], row['dir_y'], row['dir_z'],)),
 */
  __Pyx_TraceLine(1293,0,__PYX_ERR(0, 1293, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "km3pipe/dataclasses.pyx":1304
 *             row['time'],
 *             row['type']
 *         ) for row in table], event_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1304,0,__PYX_ERR(0, 1304, __pyx_L1_error))
  if (likely(PyList_CheckExact(__pyx_v_table)) || PyTuple_CheckExact(__pyx_v_table)) {
    __pyx_t_3 = __pyx_v_table; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_table); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1304, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1304, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 1304, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1304, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 1304, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1304, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #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_ERR(0, 1304, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "km3pipe/dataclasses.pyx":1294
 *     def from_table(cls, table, event_id):
 *         return cls([Track(
 *             row['bjorkeny'],             # <<<<<<<<<<<<<<
 *             np.array((row['dir_x'], row['dir_y'], row['dir_z'],)),
 *             row['energy'],
 */
    __Pyx_TraceLine(1294,0,__PYX_ERR(0, 1294, __pyx_L1_error))
    __pyx_t_6 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_bjorkeny); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1294, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);

    /* "km3pipe/dataclasses.pyx":1295
 *         return cls([Track(
 *             row['bjorkeny'],
 *             np.array((row['dir_x'], row['dir_y'], row['dir_z'],)),             # <<<<<<<<<<<<<<
 *             row['energy'],
 *             row['id'],
 */
    __Pyx_TraceLine(1295,0,__PYX_ERR(0, 1295, __pyx_L1_error))
    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1295, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1295, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_dir_x); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1295, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_dir_y); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1295, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_dir_z); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1295, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_12 = PyTuple_New(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1295, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_t_11);
    __pyx_t_8 = 0;
    __pyx_t_10 = 0;
    __pyx_t_11 = 0;
    __pyx_t_11 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_11)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
      }
    }
    if (!__pyx_t_11) {
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1295, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_GOTREF(__pyx_t_7);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_12};
        __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1295, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_12};
        __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1295, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      } else
      #endif
      {
        __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1295, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11); __pyx_t_11 = NULL;
        __Pyx_GIVEREF(__pyx_t_12);
        PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_12);
        __pyx_t_12 = 0;
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1295, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "km3pipe/dataclasses.pyx":1296
 *             row['bjorkeny'],
 *             np.array((row['dir_x'], row['dir_y'], row['dir_z'],)),
 *             row['energy'],             # <<<<<<<<<<<<<<
 *             row['id'],
 *             row['interaction_channel'],
 */
    __Pyx_TraceLine(1296,0,__PYX_ERR(0, 1296, __pyx_L1_error))
    __pyx_t_9 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_energy); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1296, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);

    /* "km3pipe/dataclasses.pyx":1297
 *             np.array((row['dir_x'], row['dir_y'], row['dir_z'],)),
 *             row['energy'],
 *             row['id'],             # <<<<<<<<<<<<<<
 *             row['interaction_channel'],
 *             row['is_cc'],
 */
    __Pyx_TraceLine(1297,0,__PYX_ERR(0, 1297, __pyx_L1_error))
    __pyx_t_10 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_id); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);

    /* "km3pipe/dataclasses.pyx":1298
 *             row['energy'],
 *             row['id'],
 *             row['interaction_channel'],             # <<<<<<<<<<<<<<
 *             row['is_cc'],
 *             row['length'],
 */
    __Pyx_TraceLine(1298,0,__PYX_ERR(0, 1298, __pyx_L1_error))
    __pyx_t_12 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_interaction_channel); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1298, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);

    /* "km3pipe/dataclasses.pyx":1299
 *             row['id'],
 *             row['interaction_channel'],
 *             row['is_cc'],             # <<<<<<<<<<<<<<
 *             row['length'],
 *             np.array((row['pos_x'], row['pos_y'], row['pos_z'],)),
 */
    __Pyx_TraceLine(1299,0,__PYX_ERR(0, 1299, __pyx_L1_error))
    __pyx_t_11 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_is_cc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1299, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);

    /* "km3pipe/dataclasses.pyx":1300
 *             row['interaction_channel'],
 *             row['is_cc'],
 *             row['length'],             # <<<<<<<<<<<<<<
 *             np.array((row['pos_x'], row['pos_y'], row['pos_z'],)),
 *             row['time'],
 */
    __Pyx_TraceLine(1300,0,__PYX_ERR(0, 1300, __pyx_L1_error))
    __pyx_t_8 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_length); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1300, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);

    /* "km3pipe/dataclasses.pyx":1301
 *             row['is_cc'],
 *             row['length'],
 *             np.array((row['pos_x'], row['pos_y'], row['pos_z'],)),             # <<<<<<<<<<<<<<
 *             row['time'],
 *             row['type']
 */
    __Pyx_TraceLine(1301,0,__PYX_ERR(0, 1301, __pyx_L1_error))
    __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1301, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_array); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1301, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __pyx_t_14 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_pos_x); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1301, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_16 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_pos_y); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1301, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_17 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_pos_z); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1301, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_t_18 = PyTuple_New(3); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1301, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);
    __Pyx_GIVEREF(__pyx_t_14);
    PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_14);
    __Pyx_GIVEREF(__pyx_t_16);
    PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_16);
    __Pyx_GIVEREF(__pyx_t_17);
    PyTuple_SET_ITEM(__pyx_t_18, 2, __pyx_t_17);
    __pyx_t_14 = 0;
    __pyx_t_16 = 0;
    __pyx_t_17 = 0;
    __pyx_t_17 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
      __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_15);
      if (likely(__pyx_t_17)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
        __Pyx_INCREF(__pyx_t_17);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_15, function);
      }
    }
    if (!__pyx_t_17) {
      __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_18); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1301, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      __Pyx_GOTREF(__pyx_t_13);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_15)) {
        PyObject *__pyx_temp[2] = {__pyx_t_17, __pyx_t_18};
        __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1301, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
        PyObject *__pyx_temp[2] = {__pyx_t_17, __pyx_t_18};
        __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1301, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      } else
      #endif
      {
        __pyx_t_16 = PyTuple_New(1+1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1301, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_17); __pyx_t_17 = NULL;
        __Pyx_GIVEREF(__pyx_t_18);
        PyTuple_SET_ITEM(__pyx_t_16, 0+1, __pyx_t_18);
        __pyx_t_18 = 0;
        __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_16, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1301, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

    /* "km3pipe/dataclasses.pyx":1302
 *             row['length'],
 *             np.array((row['pos_x'], row['pos_y'], row['pos_z'],)),
 *             row['time'],             # <<<<<<<<<<<<<<
 *             row['type']
 *         ) for row in table], event_id)
 */
    __Pyx_TraceLine(1302,0,__PYX_ERR(0, 1302, __pyx_L1_error))
    __pyx_t_15 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_time); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1302, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);

    /* "km3pipe/dataclasses.pyx":1303
 *             np.array((row['pos_x'], row['pos_y'], row['pos_z'],)),
 *             row['time'],
 *             row['type']             # <<<<<<<<<<<<<<
 *         ) for row in table], event_id)
 * 
 */
    __Pyx_TraceLine(1303,0,__PYX_ERR(0, 1303, __pyx_L1_error))
    __pyx_t_16 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_type); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1303, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);

    /* "km3pipe/dataclasses.pyx":1293
 *     @classmethod
 *     def from_table(cls, table, event_id):
 *         return cls([Track(             # <<<<<<<<<<<<<<
 *             row['bjorkeny'],
 *             np.array((row['dir_x'], row['dir_y'], row['dir_z'],)),
 */
    __Pyx_TraceLine(1293,0,__PYX_ERR(0, 1293, __pyx_L1_error))
    __pyx_t_18 = PyTuple_New(10); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_18, 2, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_18, 3, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_18, 4, __pyx_t_12);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_18, 5, __pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_18, 6, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_18, 7, __pyx_t_13);
    __Pyx_GIVEREF(__pyx_t_15);
    PyTuple_SET_ITEM(__pyx_t_18, 8, __pyx_t_15);
    __Pyx_GIVEREF(__pyx_t_16);
    PyTuple_SET_ITEM(__pyx_t_18, 9, __pyx_t_16);
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_9 = 0;
    __pyx_t_10 = 0;
    __pyx_t_12 = 0;
    __pyx_t_11 = 0;
    __pyx_t_8 = 0;
    __pyx_t_13 = 0;
    __pyx_t_15 = 0;
    __pyx_t_16 = 0;
    __pyx_t_16 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7km3pipe_11dataclasses_Track), __pyx_t_18, NULL); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_16))) __PYX_ERR(0, 1293, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

    /* "km3pipe/dataclasses.pyx":1304
 *             row['time'],
 *             row['type']
 *         ) for row in table], event_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
    __Pyx_TraceLine(1304,0,__PYX_ERR(0, 1304, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_INCREF(__pyx_v_cls);
  __pyx_t_3 = __pyx_v_cls; __pyx_t_16 = NULL;
  __pyx_t_19 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_16)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_16);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_19 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_t_2, __pyx_v_event_id};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_19, 2+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1293, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_t_2, __pyx_v_event_id};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_19, 2+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1293, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  #endif
  {
    __pyx_t_18 = PyTuple_New(2+__pyx_t_19); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);
    if (__pyx_t_16) {
      __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_16); __pyx_t_16 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_18, 0+__pyx_t_19, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_event_id);
    __Pyx_GIVEREF(__pyx_v_event_id);
    PyTuple_SET_ITEM(__pyx_t_18, 1+__pyx_t_19, __pyx_v_event_id);
    __pyx_t_2 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_18, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1292
 * 
 *     @classmethod
 *     def from_table(cls, table, event_id):             # <<<<<<<<<<<<<<
 *         return cls([Track(
 *             row['bjorkeny'],
 */

  /* 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_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_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1307
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_11deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_10deserialise[] = "TrackSeries.deserialise(cls, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_11deserialise = {"deserialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_11deserialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_10deserialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_11deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("deserialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,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_cls)) != 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, __pyx_v_kwargs, values, used_pos_args, "deserialise") < 0)) __PYX_ERR(0, 1307, __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_cls = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("deserialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1307, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_10deserialise(__pyx_self, __pyx_v_cls, __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_7km3pipe_11dataclasses_11TrackSeries_10deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__147)
  __Pyx_RefNannySetupContext("deserialise", 0);
  __Pyx_TraceCall("deserialise", __pyx_f[0], 1307, 0, __PYX_ERR(0, 1307, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1308
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def serialise(self, *args, **kwargs):
 */
  __Pyx_TraceLine(1308,0,__PYX_ERR(0, 1308, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_conv_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1307
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1310
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_13serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_12serialise[] = "TrackSeries.serialise(self, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_13serialise = {"serialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_13serialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_12serialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_13serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,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_self)) != 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, __pyx_v_kwargs, values, used_pos_args, "serialise") < 0)) __PYX_ERR(0, 1310, __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_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1310, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_12serialise(__pyx_self, __pyx_v_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_7km3pipe_11dataclasses_11TrackSeries_12serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__148)
  __Pyx_RefNannySetupContext("serialise", 0);
  __Pyx_TraceCall("serialise", __pyx_f[0], 1310, 0, __PYX_ERR(0, 1310, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1311
 * 
 *     def serialise(self, *args, **kwargs):
 *         return self.conv_to(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1311,0,__PYX_ERR(0, 1311, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1310
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1314
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data, event_id)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_15conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_14conv_from[] = "TrackSeries.conv_from(cls, data, event_id, fmt='numpy', h5loc='/')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_15conv_from = {"conv_from", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_15conv_from, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_14conv_from};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_15conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_v_fmt = 0;
  CYTHON_UNUSED PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_from (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_data,&__pyx_n_s_event_id,&__pyx_n_s_fmt,&__pyx_n_s_h5loc,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[3] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    values[4] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    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_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, 1); __PYX_ERR(0, 1314, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, 2); __PYX_ERR(0, 1314, __pyx_L3_error)
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fmt);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_from") < 0)) __PYX_ERR(0, 1314, __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_cls = values[0];
    __pyx_v_data = values[1];
    __pyx_v_event_id = values[2];
    __pyx_v_fmt = values[3];
    __pyx_v_h5loc = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1314, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_14conv_from(__pyx_self, __pyx_v_cls, __pyx_v_data, __pyx_v_event_id, __pyx_v_fmt, __pyx_v_h5loc);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_14conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, PyObject *__pyx_v_event_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  __Pyx_TraceFrameInit(__pyx_codeobj__149)
  __Pyx_RefNannySetupContext("conv_from", 0);
  __Pyx_TraceCall("conv_from", __pyx_f[0], 1314, 0, __PYX_ERR(0, 1314, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1315
 *     @classmethod
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls.from_table(data, event_id)
 * 
 */
  __Pyx_TraceLine(1315,0,__PYX_ERR(0, 1315, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_fmt, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1315, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1316
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':
 *             return cls.from_table(data, event_id)             # <<<<<<<<<<<<<<
 * 
 *     def conv_to(self, to='numpy'):
 */
    __Pyx_TraceLine(1316,0,__PYX_ERR(0, 1316, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_from_table); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1316, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_event_id};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1316, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_event_id};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1316, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1316, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_data);
      __Pyx_GIVEREF(__pyx_v_data);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_data);
      __Pyx_INCREF(__pyx_v_event_id);
      __Pyx_GIVEREF(__pyx_v_event_id);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_event_id);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1316, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1315
 *     @classmethod
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls.from_table(data, event_id)
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":1314
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data, event_id)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1318
 *             return cls.from_table(data, event_id)
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_17conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_16conv_to[] = "TrackSeries.conv_to(self, to='numpy')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_17conv_to = {"conv_to", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_17conv_to, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_16conv_to};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_17conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_to = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_to (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_to,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_to);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_to") < 0)) __PYX_ERR(0, 1318, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        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_self = values[0];
    __pyx_v_to = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_to", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1318, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_16conv_to(__pyx_self, __pyx_v_self, __pyx_v_to);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_16conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  __Pyx_TraceFrameInit(__pyx_codeobj__150)
  __Pyx_RefNannySetupContext("conv_to", 0);
  __Pyx_TraceCall("conv_to", __pyx_f[0], 1318, 0, __PYX_ERR(0, 1318, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1319
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)
 */
  __Pyx_TraceLine(1319,0,__PYX_ERR(0, 1319, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1319, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1320
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),             # <<<<<<<<<<<<<<
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':
 */
    __Pyx_TraceLine(1320,0,__PYX_ERR(0, 1320, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3Array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_array_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (__pyx_t_6) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1320, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1320, __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_ERR(0, 1320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 1320, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "km3pipe/dataclasses.pyx":1321
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)             # <<<<<<<<<<<<<<
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 */
    __Pyx_TraceLine(1321,0,__PYX_ERR(0, 1321, __pyx_L1_error))
    __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1321, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_h5loc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1321, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_h5loc, __pyx_t_5) < 0) __PYX_ERR(0, 1321, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "km3pipe/dataclasses.pyx":1320
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),             # <<<<<<<<<<<<<<
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':
 */
    __Pyx_TraceLine(1320,0,__PYX_ERR(0, 1320, __pyx_L1_error))
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1319
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)
 */
  }

  /* "km3pipe/dataclasses.pyx":1322
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  __Pyx_TraceLine(1322,0,__PYX_ERR(0, 1322, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_pandas, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1322, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1323
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)             # <<<<<<<<<<<<<<
 * 
 *     def __array__(self):
 */
    __Pyx_TraceLine(1323,0,__PYX_ERR(0, 1323, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3DataFrame); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_to, __pyx_n_s_numpy) < 0) __PYX_ERR(0, 1323, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_h5loc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_h5loc, __pyx_t_6) < 0) __PYX_ERR(0, 1323, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1322
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":1318
 *             return cls.from_table(data, event_id)
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1325
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return [(
 *             t.bjorkeny, t.dir[0], t.dir[1], t.dir[2], t.energy,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_19__array__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_18__array__[] = "TrackSeries.__array__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_19__array__ = {"__array__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_19__array__, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_18__array__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_19__array__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__array__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_18__array__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_18__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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)(PyObject *);
  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 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__151)
  __Pyx_RefNannySetupContext("__array__", 0);
  __Pyx_TraceCall("__array__", __pyx_f[0], 1325, 0, __PYX_ERR(0, 1325, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1326
 * 
 *     def __array__(self):
 *         return [(             # <<<<<<<<<<<<<<
 *             t.bjorkeny, t.dir[0], t.dir[1], t.dir[2], t.energy,
 *             t.id, t.interaction_channel, t.is_cc,
 */
  __Pyx_TraceLine(1326,0,__PYX_ERR(0, 1326, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "km3pipe/dataclasses.pyx":1331
 *             t.length, t.pos[0], t.pos[1], t.pos[2], t.time, t.type,
 *             self.event_id,
 *         ) for t in self._tracks]             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1331,0,__PYX_ERR(0, 1331, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(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_ERR(0, 1331, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1331, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 1331, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1331, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 1331, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1331, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #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_ERR(0, 1331, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "km3pipe/dataclasses.pyx":1327
 *     def __array__(self):
 *         return [(
 *             t.bjorkeny, t.dir[0], t.dir[1], t.dir[2], t.energy,             # <<<<<<<<<<<<<<
 *             t.id, t.interaction_channel, t.is_cc,
 *             t.length, t.pos[0], t.pos[1], t.pos[2], t.time, t.type,
 */
    __Pyx_TraceLine(1327,0,__PYX_ERR(0, 1327, __pyx_L1_error))
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_bjorkeny); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1327, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_dir); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1327, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1327, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_dir); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1327, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_6, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1327, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_dir); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1327, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_6, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1327, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_energy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1327, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);

    /* "km3pipe/dataclasses.pyx":1328
 *         return [(
 *             t.bjorkeny, t.dir[0], t.dir[1], t.dir[2], t.energy,
 *             t.id, t.interaction_channel, t.is_cc,             # <<<<<<<<<<<<<<
 *             t.length, t.pos[0], t.pos[1], t.pos[2], t.time, t.type,
 *             self.event_id,
 */
    __Pyx_TraceLine(1328,0,__PYX_ERR(0, 1328, __pyx_L1_error))
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_id); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1328, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_interaction_channel); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1328, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_is_cc); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1328, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);

    /* "km3pipe/dataclasses.pyx":1329
 *             t.bjorkeny, t.dir[0], t.dir[1], t.dir[2], t.energy,
 *             t.id, t.interaction_channel, t.is_cc,
 *             t.length, t.pos[0], t.pos[1], t.pos[2], t.time, t.type,             # <<<<<<<<<<<<<<
 *             self.event_id,
 *         ) for t in self._tracks]
 */
    __Pyx_TraceLine(1329,0,__PYX_ERR(0, 1329, __pyx_L1_error))
    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_length); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1329, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_pos); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1329, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_15 = __Pyx_GetItemInt(__pyx_t_14, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1329, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_pos); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1329, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_14, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1329, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_pos); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1329, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_17 = __Pyx_GetItemInt(__pyx_t_14, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1329, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_time); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1329, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_type); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1329, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);

    /* "km3pipe/dataclasses.pyx":1330
 *             t.id, t.interaction_channel, t.is_cc,
 *             t.length, t.pos[0], t.pos[1], t.pos[2], t.time, t.type,
 *             self.event_id,             # <<<<<<<<<<<<<<
 *         ) for t in self._tracks]
 * 
 */
    __Pyx_TraceLine(1330,0,__PYX_ERR(0, 1330, __pyx_L1_error))
    __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_event_id); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1330, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);

    /* "km3pipe/dataclasses.pyx":1327
 *     def __array__(self):
 *         return [(
 *             t.bjorkeny, t.dir[0], t.dir[1], t.dir[2], t.energy,             # <<<<<<<<<<<<<<
 *             t.id, t.interaction_channel, t.is_cc,
 *             t.length, t.pos[0], t.pos[1], t.pos[2], t.time, t.type,
 */
    __Pyx_TraceLine(1327,0,__PYX_ERR(0, 1327, __pyx_L1_error))
    __pyx_t_20 = PyTuple_New(15); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1327, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_20);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_20, 2, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_20, 3, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_20, 4, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_20, 5, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_20, 6, __pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_20, 7, __pyx_t_12);
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_20, 8, __pyx_t_13);
    __Pyx_GIVEREF(__pyx_t_15);
    PyTuple_SET_ITEM(__pyx_t_20, 9, __pyx_t_15);
    __Pyx_GIVEREF(__pyx_t_16);
    PyTuple_SET_ITEM(__pyx_t_20, 10, __pyx_t_16);
    __Pyx_GIVEREF(__pyx_t_17);
    PyTuple_SET_ITEM(__pyx_t_20, 11, __pyx_t_17);
    __Pyx_GIVEREF(__pyx_t_14);
    PyTuple_SET_ITEM(__pyx_t_20, 12, __pyx_t_14);
    __Pyx_GIVEREF(__pyx_t_18);
    PyTuple_SET_ITEM(__pyx_t_20, 13, __pyx_t_18);
    __Pyx_GIVEREF(__pyx_t_19);
    PyTuple_SET_ITEM(__pyx_t_20, 14, __pyx_t_19);
    __pyx_t_2 = 0;
    __pyx_t_7 = 0;
    __pyx_t_8 = 0;
    __pyx_t_9 = 0;
    __pyx_t_6 = 0;
    __pyx_t_10 = 0;
    __pyx_t_11 = 0;
    __pyx_t_12 = 0;
    __pyx_t_13 = 0;
    __pyx_t_15 = 0;
    __pyx_t_16 = 0;
    __pyx_t_17 = 0;
    __pyx_t_14 = 0;
    __pyx_t_18 = 0;
    __pyx_t_19 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_20))) __PYX_ERR(0, 1326, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

    /* "km3pipe/dataclasses.pyx":1331
 *             t.length, t.pos[0], t.pos[1], t.pos[2], t.time, t.type,
 *             self.event_id,
 *         ) for t in self._tracks]             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
    __Pyx_TraceLine(1331,0,__PYX_ERR(0, 1331, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1325
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return [(
 *             t.bjorkeny, t.dir[0], t.dir[1], t.dir[2], t.energy,
 */

  /* 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_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_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_20);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.__array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1334
 * 
 *     @classmethod
 *     def get_len(cls, track):             # <<<<<<<<<<<<<<
 *         try:
 *             return track.len
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_21get_len(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_20get_len[] = "TrackSeries.get_len(cls, track)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_21get_len = {"get_len", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_21get_len, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_20get_len};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_21get_len(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_track = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_len (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_track,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_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_track)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_len", 1, 2, 2, 1); __PYX_ERR(0, 1334, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_len") < 0)) __PYX_ERR(0, 1334, __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_cls = values[0];
    __pyx_v_track = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_len", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1334, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.get_len", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_20get_len(__pyx_self, __pyx_v_cls, __pyx_v_track);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_20get_len(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_track) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__152)
  __Pyx_RefNannySetupContext("get_len", 0);
  __Pyx_TraceCall("get_len", __pyx_f[0], 1334, 0, __PYX_ERR(0, 1334, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1335
 *     @classmethod
 *     def get_len(cls, track):
 *         try:             # <<<<<<<<<<<<<<
 *             return track.len
 *         except AttributeError:
 */
  __Pyx_TraceLine(1335,0,__PYX_ERR(0, 1335, __pyx_L3_error))
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "km3pipe/dataclasses.pyx":1336
 *     def get_len(cls, track):
 *         try:
 *             return track.len             # <<<<<<<<<<<<<<
 *         except AttributeError:
 *             return 0
 */
      __Pyx_TraceLine(1336,0,__PYX_ERR(0, 1336, __pyx_L3_error))
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_track, __pyx_n_s_len); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1336, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;

      /* "km3pipe/dataclasses.pyx":1335
 *     @classmethod
 *     def get_len(cls, track):
 *         try:             # <<<<<<<<<<<<<<
 *             return track.len
 *         except AttributeError:
 */
    }
    __pyx_L3_error:;
    __Pyx_PyThreadState_assign
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "km3pipe/dataclasses.pyx":1337
 *         try:
 *             return track.len
 *         except AttributeError:             # <<<<<<<<<<<<<<
 *             return 0
 * 
 */
    __Pyx_TraceLine(1337,0,__PYX_ERR(0, 1337, __pyx_L5_except_error))
    __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
    if (__pyx_t_5) {
      __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.get_len", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1337, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);

      /* "km3pipe/dataclasses.pyx":1338
 *             return track.len
 *         except AttributeError:
 *             return 0             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
      __Pyx_TraceLine(1338,0,__PYX_ERR(0, 1338, __pyx_L5_except_error))
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_int_0);
      __pyx_r = __pyx_int_0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "km3pipe/dataclasses.pyx":1335
 *     @classmethod
 *     def get_len(cls, track):
 *         try:             # <<<<<<<<<<<<<<
 *             return track.len
 *         except AttributeError:
 */
    __Pyx_PyThreadState_assign
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_PyThreadState_assign
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_PyThreadState_assign
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
  }

  /* "km3pipe/dataclasses.pyx":1334
 * 
 *     @classmethod
 *     def get_len(cls, track):             # <<<<<<<<<<<<<<
 *         try:
 *             return track.len
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.get_len", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1341
 * 
 *     @classmethod
 *     def get_usr_item(cls, track, index):             # <<<<<<<<<<<<<<
 *         try:
 *             item = track.usr[index]
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_23get_usr_item(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_22get_usr_item[] = "TrackSeries.get_usr_item(cls, track, index)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_23get_usr_item = {"get_usr_item", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_23get_usr_item, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_22get_usr_item};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_23get_usr_item(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_track = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_usr_item (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_track,&__pyx_n_s_index_2,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_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_track)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_usr_item", 1, 3, 3, 1); __PYX_ERR(0, 1341, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_usr_item", 1, 3, 3, 2); __PYX_ERR(0, 1341, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_usr_item") < 0)) __PYX_ERR(0, 1341, __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_cls = values[0];
    __pyx_v_track = values[1];
    __pyx_v_index = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_usr_item", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1341, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.get_usr_item", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_22get_usr_item(__pyx_self, __pyx_v_cls, __pyx_v_track, __pyx_v_index);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_22get_usr_item(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_track, PyObject *__pyx_v_index) {
  PyObject *__pyx_v_item = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__153)
  __Pyx_RefNannySetupContext("get_usr_item", 0);
  __Pyx_TraceCall("get_usr_item", __pyx_f[0], 1341, 0, __PYX_ERR(0, 1341, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1342
 *     @classmethod
 *     def get_usr_item(cls, track, index):
 *         try:             # <<<<<<<<<<<<<<
 *             item = track.usr[index]
 *         except IndexError:
 */
  __Pyx_TraceLine(1342,0,__PYX_ERR(0, 1342, __pyx_L3_error))
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "km3pipe/dataclasses.pyx":1343
 *     def get_usr_item(cls, track, index):
 *         try:
 *             item = track.usr[index]             # <<<<<<<<<<<<<<
 *         except IndexError:
 *             item = 0.
 */
      __Pyx_TraceLine(1343,0,__PYX_ERR(0, 1343, __pyx_L3_error))
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_track, __pyx_n_s_usr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1343, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyObject_GetItem(__pyx_t_4, __pyx_v_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1343, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_item = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "km3pipe/dataclasses.pyx":1342
 *     @classmethod
 *     def get_usr_item(cls, track, index):
 *         try:             # <<<<<<<<<<<<<<
 *             item = track.usr[index]
 *         except IndexError:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L3_error:;
    __Pyx_PyThreadState_assign
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "km3pipe/dataclasses.pyx":1344
 *         try:
 *             item = track.usr[index]
 *         except IndexError:             # <<<<<<<<<<<<<<
 *             item = 0.
 *         return item
 */
    __Pyx_TraceLine(1344,0,__PYX_ERR(0, 1344, __pyx_L5_except_error))
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_IndexError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.get_usr_item", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(0, 1344, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_7);

      /* "km3pipe/dataclasses.pyx":1345
 *             item = track.usr[index]
 *         except IndexError:
 *             item = 0.             # <<<<<<<<<<<<<<
 *         return item
 * 
 */
      __Pyx_TraceLine(1345,0,__PYX_ERR(0, 1345, __pyx_L5_except_error))
      __Pyx_INCREF(__pyx_float_0_);
      __Pyx_XDECREF_SET(__pyx_v_item, __pyx_float_0_);
      __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_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "km3pipe/dataclasses.pyx":1342
 *     @classmethod
 *     def get_usr_item(cls, track, index):
 *         try:             # <<<<<<<<<<<<<<
 *             item = track.usr[index]
 *         except IndexError:
 */
    __Pyx_PyThreadState_assign
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_PyThreadState_assign
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L10_try_end:;
  }

  /* "km3pipe/dataclasses.pyx":1346
 *         except IndexError:
 *             item = 0.
 *         return item             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(1346,0,__PYX_ERR(0, 1346, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_item);
  __pyx_r = __pyx_v_item;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1341
 * 
 *     @classmethod
 *     def get_usr_item(cls, track, index):             # <<<<<<<<<<<<<<
 *         try:
 *             item = track.usr[index]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.get_usr_item", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1349
 * 
 *     @property
 *     def highest_energetic_muon(self):             # <<<<<<<<<<<<<<
 *         if self._highest_energetic_muon is None:
 *             muons = [track for track in self if abs(track.type) == 13]
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_25highest_energetic_muon(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_24highest_energetic_muon[] = "TrackSeries.highest_energetic_muon(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_25highest_energetic_muon = {"highest_energetic_muon", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_25highest_energetic_muon, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_24highest_energetic_muon};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_25highest_energetic_muon(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("highest_energetic_muon (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_24highest_energetic_muon(__pyx_self, ((PyObject *)__pyx_v_self));

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

/* "km3pipe/dataclasses.pyx":1354
 *             if len(muons) == 0:
 *                 raise AttributeError("No muon found")
 *             self._highest_energetic_muon = max(muons, key=lambda m: m.energy)             # <<<<<<<<<<<<<<
 *         return self._highest_energetic_muon
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_22highest_energetic_muon_lambda1(PyObject *__pyx_self, PyObject *__pyx_v_m); /*proto*/
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_22highest_energetic_muon_lambda1 = {"lambda1", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_22highest_energetic_muon_lambda1, METH_O, 0};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_22highest_energetic_muon_lambda1(PyObject *__pyx_self, PyObject *__pyx_v_m) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda1(__pyx_self, ((PyObject *)__pyx_v_m));

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

static PyObject *__pyx_lambda_funcdef_lambda1(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_m) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("lambda1", 0);
  __Pyx_TraceCall("lambda1", __pyx_f[0], 1354, 0, __PYX_ERR(0, 1354, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_energy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.highest_energetic_muon.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1349
 * 
 *     @property
 *     def highest_energetic_muon(self):             # <<<<<<<<<<<<<<
 *         if self._highest_energetic_muon is None:
 *             muons = [track for track in self if abs(track.type) == 13]
 */

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_24highest_energetic_muon(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_muons = NULL;
  PyObject *__pyx_v_track = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  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;
  __Pyx_TraceFrameInit(__pyx_codeobj__154)
  __Pyx_RefNannySetupContext("highest_energetic_muon", 0);
  __Pyx_TraceCall("highest_energetic_muon", __pyx_f[0], 1349, 0, __PYX_ERR(0, 1349, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1350
 *     @property
 *     def highest_energetic_muon(self):
 *         if self._highest_energetic_muon is None:             # <<<<<<<<<<<<<<
 *             muons = [track for track in self if abs(track.type) == 13]
 *             if len(muons) == 0:
 */
  __Pyx_TraceLine(1350,0,__PYX_ERR(0, 1350, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_highest_energetic_muon); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "km3pipe/dataclasses.pyx":1351
 *     def highest_energetic_muon(self):
 *         if self._highest_energetic_muon is None:
 *             muons = [track for track in self if abs(track.type) == 13]             # <<<<<<<<<<<<<<
 *             if len(muons) == 0:
 *                 raise AttributeError("No muon found")
 */
    __Pyx_TraceLine(1351,0,__PYX_ERR(0, 1351, __pyx_L1_error))
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1351, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(__pyx_v_self)) || PyTuple_CheckExact(__pyx_v_self)) {
      __pyx_t_4 = __pyx_v_self; __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_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1351, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1351, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_6)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1351, __pyx_L1_error)
          #else
          __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1351, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
        } else {
          if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1351, __pyx_L1_error)
          #else
          __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1351, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
        }
      } else {
        __pyx_t_7 = __pyx_t_6(__pyx_t_4);
        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_ERR(0, 1351, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_7);
      }
      __Pyx_XDECREF_SET(__pyx_v_track, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_track, __pyx_n_s_type); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1351, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = PyNumber_Absolute(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1351, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyInt_EqObjC(__pyx_t_8, __pyx_int_13, 13, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1351, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1351, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__pyx_t_3) {
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_v_track))) __PYX_ERR(0, 1351, __pyx_L1_error)
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_muons = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "km3pipe/dataclasses.pyx":1352
 *         if self._highest_energetic_muon is None:
 *             muons = [track for track in self if abs(track.type) == 13]
 *             if len(muons) == 0:             # <<<<<<<<<<<<<<
 *                 raise AttributeError("No muon found")
 *             self._highest_energetic_muon = max(muons, key=lambda m: m.energy)
 */
    __Pyx_TraceLine(1352,0,__PYX_ERR(0, 1352, __pyx_L1_error))
    __pyx_t_5 = PyList_GET_SIZE(__pyx_v_muons); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(0, 1352, __pyx_L1_error)
    __pyx_t_3 = ((__pyx_t_5 == 0) != 0);
    if (__pyx_t_3) {

      /* "km3pipe/dataclasses.pyx":1353
 *             muons = [track for track in self if abs(track.type) == 13]
 *             if len(muons) == 0:
 *                 raise AttributeError("No muon found")             # <<<<<<<<<<<<<<
 *             self._highest_energetic_muon = max(muons, key=lambda m: m.energy)
 *         return self._highest_energetic_muon
 */
      __Pyx_TraceLine(1353,0,__PYX_ERR(0, 1353, __pyx_L1_error))
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__155, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 1353, __pyx_L1_error)

      /* "km3pipe/dataclasses.pyx":1352
 *         if self._highest_energetic_muon is None:
 *             muons = [track for track in self if abs(track.type) == 13]
 *             if len(muons) == 0:             # <<<<<<<<<<<<<<
 *                 raise AttributeError("No muon found")
 *             self._highest_energetic_muon = max(muons, key=lambda m: m.energy)
 */
    }

    /* "km3pipe/dataclasses.pyx":1354
 *             if len(muons) == 0:
 *                 raise AttributeError("No muon found")
 *             self._highest_energetic_muon = max(muons, key=lambda m: m.energy)             # <<<<<<<<<<<<<<
 *         return self._highest_energetic_muon
 * 
 */
    __Pyx_TraceLine(1354,0,__PYX_ERR(0, 1354, __pyx_L1_error))
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1354, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_muons);
    __Pyx_GIVEREF(__pyx_v_muons);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_muons);
    __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1354, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_22highest_energetic_muon_lambda1, 0, __pyx_n_s_TrackSeries_highest_energetic_mu, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1354, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_key, __pyx_t_7) < 0) __PYX_ERR(0, 1354, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_max, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1354, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_highest_energetic_muon, __pyx_t_7) < 0) __PYX_ERR(0, 1354, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "km3pipe/dataclasses.pyx":1350
 *     @property
 *     def highest_energetic_muon(self):
 *         if self._highest_energetic_muon is None:             # <<<<<<<<<<<<<<
 *             muons = [track for track in self if abs(track.type) == 13]
 *             if len(muons) == 0:
 */
  }

  /* "km3pipe/dataclasses.pyx":1355
 *                 raise AttributeError("No muon found")
 *             self._highest_energetic_muon = max(muons, key=lambda m: m.energy)
 *         return self._highest_energetic_muon             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __Pyx_TraceLine(1355,0,__PYX_ERR(0, 1355, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_highest_energetic_muon); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1349
 * 
 *     @property
 *     def highest_energetic_muon(self):             # <<<<<<<<<<<<<<
 *         if self._highest_energetic_muon is None:
 *             muons = [track for track in self if abs(track.type) == 13]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.highest_energetic_muon", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_muons);
  __Pyx_XDECREF(__pyx_v_track);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1357
 *         return self._highest_energetic_muon
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_27__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_26__iter__[] = "TrackSeries.__iter__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_27__iter__ = {"__iter__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_27__iter__, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_26__iter__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_27__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_26__iter__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_26__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__156)
  __Pyx_RefNannySetupContext("__iter__", 0);
  __Pyx_TraceCall("__iter__", __pyx_f[0], 1357, 0, __PYX_ERR(0, 1357, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1358
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __Pyx_TraceLine(1358,0,__PYX_ERR(0, 1358, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self);
  __pyx_r = __pyx_v_self;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1357
 *         return self._highest_energetic_muon
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1360
 *         return self
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_29__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_28__iter__[] = "TrackSeries.__iter__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_29__iter__ = {"__iter__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_29__iter__, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_28__iter__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_29__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_28__iter__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_28__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__157)
  __Pyx_RefNannySetupContext("__iter__", 0);
  __Pyx_TraceCall("__iter__", __pyx_f[0], 1360, 0, __PYX_ERR(0, 1360, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1361
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(1361,0,__PYX_ERR(0, 1361, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self);
  __pyx_r = __pyx_v_self;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1360
 *         return self
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1364
 * 
 *     @property
 *     def bjorkeny(self):             # <<<<<<<<<<<<<<
 *         if self._bjorkeny is None:
 *             self._bjorkeny = np.array([t.bjorkeny for t in self._tracks])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_31bjorkeny(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_30bjorkeny[] = "TrackSeries.bjorkeny(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_31bjorkeny = {"bjorkeny", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_31bjorkeny, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_30bjorkeny};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_31bjorkeny(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("bjorkeny (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_30bjorkeny(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_30bjorkeny(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  __Pyx_TraceFrameInit(__pyx_codeobj__158)
  __Pyx_RefNannySetupContext("bjorkeny", 0);
  __Pyx_TraceCall("bjorkeny", __pyx_f[0], 1364, 0, __PYX_ERR(0, 1364, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1365
 *     @property
 *     def bjorkeny(self):
 *         if self._bjorkeny is None:             # <<<<<<<<<<<<<<
 *             self._bjorkeny = np.array([t.bjorkeny for t in self._tracks])
 *         return self._bjorkeny
 */
  __Pyx_TraceLine(1365,0,__PYX_ERR(0, 1365, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_bjorkeny_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "km3pipe/dataclasses.pyx":1366
 *     def bjorkeny(self):
 *         if self._bjorkeny is None:
 *             self._bjorkeny = np.array([t.bjorkeny for t in self._tracks])             # <<<<<<<<<<<<<<
 *         return self._bjorkeny
 * 
 */
    __Pyx_TraceLine(1366,0,__PYX_ERR(0, 1366, __pyx_L1_error))
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1366, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1366, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1366, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1366, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1366, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1366, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1366, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1366, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1366, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1366, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_9(__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_ERR(0, 1366, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_bjorkeny); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1366, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1366, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1366, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1366, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1366, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1366, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1366, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_bjorkeny_2, __pyx_t_1) < 0) __PYX_ERR(0, 1366, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "km3pipe/dataclasses.pyx":1365
 *     @property
 *     def bjorkeny(self):
 *         if self._bjorkeny is None:             # <<<<<<<<<<<<<<
 *             self._bjorkeny = np.array([t.bjorkeny for t in self._tracks])
 *         return self._bjorkeny
 */
  }

  /* "km3pipe/dataclasses.pyx":1367
 *         if self._bjorkeny is None:
 *             self._bjorkeny = np.array([t.bjorkeny for t in self._tracks])
 *         return self._bjorkeny             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(1367,0,__PYX_ERR(0, 1367, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_bjorkeny_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1364
 * 
 *     @property
 *     def bjorkeny(self):             # <<<<<<<<<<<<<<
 *         if self._bjorkeny is None:
 *             self._bjorkeny = np.array([t.bjorkeny for t in self._tracks])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.bjorkeny", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1370
 * 
 *     @property
 *     def is_cc(self):             # <<<<<<<<<<<<<<
 *         if self._is_cc is None:
 *             self._is_cc = np.array([t.is_cc for t in self._tracks])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_33is_cc(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_32is_cc[] = "TrackSeries.is_cc(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_33is_cc = {"is_cc", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_33is_cc, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_32is_cc};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_33is_cc(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_cc (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_32is_cc(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_32is_cc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  __Pyx_TraceFrameInit(__pyx_codeobj__159)
  __Pyx_RefNannySetupContext("is_cc", 0);
  __Pyx_TraceCall("is_cc", __pyx_f[0], 1370, 0, __PYX_ERR(0, 1370, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1371
 *     @property
 *     def is_cc(self):
 *         if self._is_cc is None:             # <<<<<<<<<<<<<<
 *             self._is_cc = np.array([t.is_cc for t in self._tracks])
 *         return self._is_cc
 */
  __Pyx_TraceLine(1371,0,__PYX_ERR(0, 1371, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_is_cc_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "km3pipe/dataclasses.pyx":1372
 *     def is_cc(self):
 *         if self._is_cc is None:
 *             self._is_cc = np.array([t.is_cc for t in self._tracks])             # <<<<<<<<<<<<<<
 *         return self._is_cc
 * 
 */
    __Pyx_TraceLine(1372,0,__PYX_ERR(0, 1372, __pyx_L1_error))
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1372, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1372, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1372, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1372, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1372, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1372, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_9(__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_ERR(0, 1372, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_is_cc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1372, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1372, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1372, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1372, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1372, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1372, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1372, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_is_cc_2, __pyx_t_1) < 0) __PYX_ERR(0, 1372, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "km3pipe/dataclasses.pyx":1371
 *     @property
 *     def is_cc(self):
 *         if self._is_cc is None:             # <<<<<<<<<<<<<<
 *             self._is_cc = np.array([t.is_cc for t in self._tracks])
 *         return self._is_cc
 */
  }

  /* "km3pipe/dataclasses.pyx":1373
 *         if self._is_cc is None:
 *             self._is_cc = np.array([t.is_cc for t in self._tracks])
 *         return self._is_cc             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(1373,0,__PYX_ERR(0, 1373, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_is_cc_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1370
 * 
 *     @property
 *     def is_cc(self):             # <<<<<<<<<<<<<<
 *         if self._is_cc is None:
 *             self._is_cc = np.array([t.is_cc for t in self._tracks])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.is_cc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1376
 * 
 *     @property
 *     def interaction_channel(self):             # <<<<<<<<<<<<<<
 *         if self._interaction_channel is None:
 *             self._interaction_channel = np.array([t.interaction_channel for
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_35interaction_channel(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_34interaction_channel[] = "TrackSeries.interaction_channel(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_35interaction_channel = {"interaction_channel", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_35interaction_channel, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_34interaction_channel};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_35interaction_channel(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("interaction_channel (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_34interaction_channel(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_34interaction_channel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  __Pyx_TraceFrameInit(__pyx_codeobj__160)
  __Pyx_RefNannySetupContext("interaction_channel", 0);
  __Pyx_TraceCall("interaction_channel", __pyx_f[0], 1376, 0, __PYX_ERR(0, 1376, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1377
 *     @property
 *     def interaction_channel(self):
 *         if self._interaction_channel is None:             # <<<<<<<<<<<<<<
 *             self._interaction_channel = np.array([t.interaction_channel for
 *                                                   t in self._tracks])
 */
  __Pyx_TraceLine(1377,0,__PYX_ERR(0, 1377, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_interaction_channel_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "km3pipe/dataclasses.pyx":1378
 *     def interaction_channel(self):
 *         if self._interaction_channel is None:
 *             self._interaction_channel = np.array([t.interaction_channel for             # <<<<<<<<<<<<<<
 *                                                   t in self._tracks])
 *         return self._interaction_channel
 */
    __Pyx_TraceLine(1378,0,__PYX_ERR(0, 1378, __pyx_L1_error))
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);

    /* "km3pipe/dataclasses.pyx":1379
 *         if self._interaction_channel is None:
 *             self._interaction_channel = np.array([t.interaction_channel for
 *                                                   t in self._tracks])             # <<<<<<<<<<<<<<
 *         return self._interaction_channel
 * 
 */
    __Pyx_TraceLine(1379,0,__PYX_ERR(0, 1379, __pyx_L1_error))
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1379, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1379, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1379, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1379, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1379, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1379, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1379, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_9(__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_ERR(0, 1379, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "km3pipe/dataclasses.pyx":1378
 *     def interaction_channel(self):
 *         if self._interaction_channel is None:
 *             self._interaction_channel = np.array([t.interaction_channel for             # <<<<<<<<<<<<<<
 *                                                   t in self._tracks])
 *         return self._interaction_channel
 */
      __Pyx_TraceLine(1378,0,__PYX_ERR(0, 1378, __pyx_L1_error))
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_interaction_channel); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1378, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1378, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1378, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1378, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1378, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1378, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1378, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_interaction_channel_2, __pyx_t_1) < 0) __PYX_ERR(0, 1378, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "km3pipe/dataclasses.pyx":1377
 *     @property
 *     def interaction_channel(self):
 *         if self._interaction_channel is None:             # <<<<<<<<<<<<<<
 *             self._interaction_channel = np.array([t.interaction_channel for
 *                                                   t in self._tracks])
 */
  }

  /* "km3pipe/dataclasses.pyx":1380
 *             self._interaction_channel = np.array([t.interaction_channel for
 *                                                   t in self._tracks])
 *         return self._interaction_channel             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(1380,0,__PYX_ERR(0, 1380, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_interaction_channel_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1376
 * 
 *     @property
 *     def interaction_channel(self):             # <<<<<<<<<<<<<<
 *         if self._interaction_channel is None:
 *             self._interaction_channel = np.array([t.interaction_channel for
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.interaction_channel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1383
 * 
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         if self._id is None:
 *             self._id = np.array([t.id for t in self._tracks])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_37id(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_36id[] = "TrackSeries.id(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_37id = {"id", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_37id, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_36id};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_37id(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("id (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_36id(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_36id(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  __Pyx_TraceFrameInit(__pyx_codeobj__161)
  __Pyx_RefNannySetupContext("id", 0);
  __Pyx_TraceCall("id", __pyx_f[0], 1383, 0, __PYX_ERR(0, 1383, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1384
 *     @property
 *     def id(self):
 *         if self._id is None:             # <<<<<<<<<<<<<<
 *             self._id = np.array([t.id for t in self._tracks])
 *         return self._id
 */
  __Pyx_TraceLine(1384,0,__PYX_ERR(0, 1384, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_id_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "km3pipe/dataclasses.pyx":1385
 *     def id(self):
 *         if self._id is None:
 *             self._id = np.array([t.id for t in self._tracks])             # <<<<<<<<<<<<<<
 *         return self._id
 * 
 */
    __Pyx_TraceLine(1385,0,__PYX_ERR(0, 1385, __pyx_L1_error))
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1385, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1385, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1385, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1385, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1385, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1385, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1385, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1385, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1385, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1385, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_9(__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_ERR(0, 1385, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_id); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1385, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1385, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1385, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1385, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1385, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1385, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1385, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_id_2, __pyx_t_1) < 0) __PYX_ERR(0, 1385, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "km3pipe/dataclasses.pyx":1384
 *     @property
 *     def id(self):
 *         if self._id is None:             # <<<<<<<<<<<<<<
 *             self._id = np.array([t.id for t in self._tracks])
 *         return self._id
 */
  }

  /* "km3pipe/dataclasses.pyx":1386
 *         if self._id is None:
 *             self._id = np.array([t.id for t in self._tracks])
 *         return self._id             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(1386,0,__PYX_ERR(0, 1386, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_id_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1383
 * 
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         if self._id is None:
 *             self._id = np.array([t.id for t in self._tracks])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1389
 * 
 *     @property
 *     def time(self):             # <<<<<<<<<<<<<<
 *         if self._time is None:
 *             self._time = np.array([t.time for t in self._tracks])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_39time(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_38time[] = "TrackSeries.time(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_39time = {"time", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_39time, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_38time};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_39time(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("time (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_38time(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_38time(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  __Pyx_TraceFrameInit(__pyx_codeobj__162)
  __Pyx_RefNannySetupContext("time", 0);
  __Pyx_TraceCall("time", __pyx_f[0], 1389, 0, __PYX_ERR(0, 1389, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1390
 *     @property
 *     def time(self):
 *         if self._time is None:             # <<<<<<<<<<<<<<
 *             self._time = np.array([t.time for t in self._tracks])
 *         return self._time
 */
  __Pyx_TraceLine(1390,0,__PYX_ERR(0, 1390, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_time_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "km3pipe/dataclasses.pyx":1391
 *     def time(self):
 *         if self._time is None:
 *             self._time = np.array([t.time for t in self._tracks])             # <<<<<<<<<<<<<<
 *         return self._time
 * 
 */
    __Pyx_TraceLine(1391,0,__PYX_ERR(0, 1391, __pyx_L1_error))
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1391, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1391, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1391, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1391, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1391, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1391, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1391, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1391, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1391, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1391, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_9(__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_ERR(0, 1391, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_time); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1391, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1391, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1391, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1391, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1391, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1391, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1391, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_time_2, __pyx_t_1) < 0) __PYX_ERR(0, 1391, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "km3pipe/dataclasses.pyx":1390
 *     @property
 *     def time(self):
 *         if self._time is None:             # <<<<<<<<<<<<<<
 *             self._time = np.array([t.time for t in self._tracks])
 *         return self._time
 */
  }

  /* "km3pipe/dataclasses.pyx":1392
 *         if self._time is None:
 *             self._time = np.array([t.time for t in self._tracks])
 *         return self._time             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(1392,0,__PYX_ERR(0, 1392, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_time_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1389
 * 
 *     @property
 *     def time(self):             # <<<<<<<<<<<<<<
 *         if self._time is None:
 *             self._time = np.array([t.time for t in self._tracks])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1395
 * 
 *     @property
 *     def energy(self):             # <<<<<<<<<<<<<<
 *         if self._energy is None:
 *             self._energy = np.array([t.energy for t in self._tracks])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_41energy(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_40energy[] = "TrackSeries.energy(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_41energy = {"energy", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_41energy, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_40energy};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_41energy(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("energy (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_40energy(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_40energy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  __Pyx_TraceFrameInit(__pyx_codeobj__163)
  __Pyx_RefNannySetupContext("energy", 0);
  __Pyx_TraceCall("energy", __pyx_f[0], 1395, 0, __PYX_ERR(0, 1395, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1396
 *     @property
 *     def energy(self):
 *         if self._energy is None:             # <<<<<<<<<<<<<<
 *             self._energy = np.array([t.energy for t in self._tracks])
 *         return self._energy
 */
  __Pyx_TraceLine(1396,0,__PYX_ERR(0, 1396, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_energy_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "km3pipe/dataclasses.pyx":1397
 *     def energy(self):
 *         if self._energy is None:
 *             self._energy = np.array([t.energy for t in self._tracks])             # <<<<<<<<<<<<<<
 *         return self._energy
 * 
 */
    __Pyx_TraceLine(1397,0,__PYX_ERR(0, 1397, __pyx_L1_error))
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1397, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1397, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1397, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1397, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1397, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1397, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_9(__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_ERR(0, 1397, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_energy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1397, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1397, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1397, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1397, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1397, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1397, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1397, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_energy_2, __pyx_t_1) < 0) __PYX_ERR(0, 1397, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "km3pipe/dataclasses.pyx":1396
 *     @property
 *     def energy(self):
 *         if self._energy is None:             # <<<<<<<<<<<<<<
 *             self._energy = np.array([t.energy for t in self._tracks])
 *         return self._energy
 */
  }

  /* "km3pipe/dataclasses.pyx":1398
 *         if self._energy is None:
 *             self._energy = np.array([t.energy for t in self._tracks])
 *         return self._energy             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(1398,0,__PYX_ERR(0, 1398, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_energy_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1395
 * 
 *     @property
 *     def energy(self):             # <<<<<<<<<<<<<<
 *         if self._energy is None:
 *             self._energy = np.array([t.energy for t in self._tracks])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.energy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1401
 * 
 *     @property
 *     def length(self):             # <<<<<<<<<<<<<<
 *         if self._length is None:
 *             self._length = np.array([t.length for t in self._tracks])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_43length(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_42length[] = "TrackSeries.length(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_43length = {"length", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_43length, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_42length};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_43length(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("length (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_42length(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_42length(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  __Pyx_TraceFrameInit(__pyx_codeobj__164)
  __Pyx_RefNannySetupContext("length", 0);
  __Pyx_TraceCall("length", __pyx_f[0], 1401, 0, __PYX_ERR(0, 1401, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1402
 *     @property
 *     def length(self):
 *         if self._length is None:             # <<<<<<<<<<<<<<
 *             self._length = np.array([t.length for t in self._tracks])
 *         return self._length
 */
  __Pyx_TraceLine(1402,0,__PYX_ERR(0, 1402, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_length_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "km3pipe/dataclasses.pyx":1403
 *     def length(self):
 *         if self._length is None:
 *             self._length = np.array([t.length for t in self._tracks])             # <<<<<<<<<<<<<<
 *         return self._length
 * 
 */
    __Pyx_TraceLine(1403,0,__PYX_ERR(0, 1403, __pyx_L1_error))
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1403, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1403, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1403, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1403, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1403, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1403, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1403, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1403, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1403, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1403, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_9(__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_ERR(0, 1403, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1403, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1403, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1403, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1403, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1403, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1403, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1403, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_length_2, __pyx_t_1) < 0) __PYX_ERR(0, 1403, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "km3pipe/dataclasses.pyx":1402
 *     @property
 *     def length(self):
 *         if self._length is None:             # <<<<<<<<<<<<<<
 *             self._length = np.array([t.length for t in self._tracks])
 *         return self._length
 */
  }

  /* "km3pipe/dataclasses.pyx":1404
 *         if self._length is None:
 *             self._length = np.array([t.length for t in self._tracks])
 *         return self._length             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(1404,0,__PYX_ERR(0, 1404, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_length_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1401
 * 
 *     @property
 *     def length(self):             # <<<<<<<<<<<<<<
 *         if self._length is None:
 *             self._length = np.array([t.length for t in self._tracks])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.length", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1407
 * 
 *     @property
 *     def type(self):             # <<<<<<<<<<<<<<
 *         if self._type is None:
 *             self._type = np.array([t.type for t in self._tracks])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_45type(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_44type[] = "TrackSeries.type(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_45type = {"type", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_45type, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_44type};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_45type(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("type (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_44type(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_44type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  __Pyx_TraceFrameInit(__pyx_codeobj__165)
  __Pyx_RefNannySetupContext("type", 0);
  __Pyx_TraceCall("type", __pyx_f[0], 1407, 0, __PYX_ERR(0, 1407, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1408
 *     @property
 *     def type(self):
 *         if self._type is None:             # <<<<<<<<<<<<<<
 *             self._type = np.array([t.type for t in self._tracks])
 *         return self._type
 */
  __Pyx_TraceLine(1408,0,__PYX_ERR(0, 1408, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_type_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "km3pipe/dataclasses.pyx":1409
 *     def type(self):
 *         if self._type is None:
 *             self._type = np.array([t.type for t in self._tracks])             # <<<<<<<<<<<<<<
 *         return self._type
 * 
 */
    __Pyx_TraceLine(1409,0,__PYX_ERR(0, 1409, __pyx_L1_error))
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1409, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1409, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1409, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1409, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1409, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1409, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1409, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1409, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1409, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1409, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_9(__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_ERR(0, 1409, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1409, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1409, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1409, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1409, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1409, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1409, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1409, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_type_2, __pyx_t_1) < 0) __PYX_ERR(0, 1409, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "km3pipe/dataclasses.pyx":1408
 *     @property
 *     def type(self):
 *         if self._type is None:             # <<<<<<<<<<<<<<
 *             self._type = np.array([t.type for t in self._tracks])
 *         return self._type
 */
  }

  /* "km3pipe/dataclasses.pyx":1410
 *         if self._type is None:
 *             self._type = np.array([t.type for t in self._tracks])
 *         return self._type             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(1410,0,__PYX_ERR(0, 1410, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_type_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1407
 * 
 *     @property
 *     def type(self):             # <<<<<<<<<<<<<<
 *         if self._type is None:
 *             self._type = np.array([t.type for t in self._tracks])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1413
 * 
 *     @property
 *     def pos(self):             # <<<<<<<<<<<<<<
 *         if self._pos is None:
 *             self._pos = np.array([t.pos for t in self._tracks])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_47pos(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_46pos[] = "TrackSeries.pos(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_47pos = {"pos", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_47pos, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_46pos};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_47pos(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pos (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_46pos(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_46pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  __Pyx_TraceFrameInit(__pyx_codeobj__166)
  __Pyx_RefNannySetupContext("pos", 0);
  __Pyx_TraceCall("pos", __pyx_f[0], 1413, 0, __PYX_ERR(0, 1413, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1414
 *     @property
 *     def pos(self):
 *         if self._pos is None:             # <<<<<<<<<<<<<<
 *             self._pos = np.array([t.pos for t in self._tracks])
 *         return self._pos
 */
  __Pyx_TraceLine(1414,0,__PYX_ERR(0, 1414, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pos_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "km3pipe/dataclasses.pyx":1415
 *     def pos(self):
 *         if self._pos is None:
 *             self._pos = np.array([t.pos for t in self._tracks])             # <<<<<<<<<<<<<<
 *         return self._pos
 * 
 */
    __Pyx_TraceLine(1415,0,__PYX_ERR(0, 1415, __pyx_L1_error))
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1415, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1415, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1415, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1415, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1415, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1415, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_9(__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_ERR(0, 1415, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_pos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1415, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1415, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1415, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1415, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1415, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1415, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1415, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_pos_2, __pyx_t_1) < 0) __PYX_ERR(0, 1415, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "km3pipe/dataclasses.pyx":1414
 *     @property
 *     def pos(self):
 *         if self._pos is None:             # <<<<<<<<<<<<<<
 *             self._pos = np.array([t.pos for t in self._tracks])
 *         return self._pos
 */
  }

  /* "km3pipe/dataclasses.pyx":1416
 *         if self._pos is None:
 *             self._pos = np.array([t.pos for t in self._tracks])
 *         return self._pos             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(1416,0,__PYX_ERR(0, 1416, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pos_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1413
 * 
 *     @property
 *     def pos(self):             # <<<<<<<<<<<<<<
 *         if self._pos is None:
 *             self._pos = np.array([t.pos for t in self._tracks])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1419
 * 
 *     @property
 *     def dir(self):             # <<<<<<<<<<<<<<
 *         if self._dir is None:
 *             self._dir = np.array([t.dir for t in self._tracks])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_49dir(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_48dir[] = "TrackSeries.dir(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_49dir = {"dir", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_49dir, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_48dir};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_49dir(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dir (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_48dir(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_48dir(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  __Pyx_TraceFrameInit(__pyx_codeobj__167)
  __Pyx_RefNannySetupContext("dir", 0);
  __Pyx_TraceCall("dir", __pyx_f[0], 1419, 0, __PYX_ERR(0, 1419, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1420
 *     @property
 *     def dir(self):
 *         if self._dir is None:             # <<<<<<<<<<<<<<
 *             self._dir = np.array([t.dir for t in self._tracks])
 *         return self._dir
 */
  __Pyx_TraceLine(1420,0,__PYX_ERR(0, 1420, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dir_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "km3pipe/dataclasses.pyx":1421
 *     def dir(self):
 *         if self._dir is None:
 *             self._dir = np.array([t.dir for t in self._tracks])             # <<<<<<<<<<<<<<
 *         return self._dir
 * 
 */
    __Pyx_TraceLine(1421,0,__PYX_ERR(0, 1421, __pyx_L1_error))
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1421, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1421, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1421, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1421, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1421, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1421, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_9(__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_ERR(0, 1421, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_dir); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1421, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1421, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1421, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1421, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1421, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1421, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1421, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dir_2, __pyx_t_1) < 0) __PYX_ERR(0, 1421, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "km3pipe/dataclasses.pyx":1420
 *     @property
 *     def dir(self):
 *         if self._dir is None:             # <<<<<<<<<<<<<<
 *             self._dir = np.array([t.dir for t in self._tracks])
 *         return self._dir
 */
  }

  /* "km3pipe/dataclasses.pyx":1422
 *         if self._dir is None:
 *             self._dir = np.array([t.dir for t in self._tracks])
 *         return self._dir             # <<<<<<<<<<<<<<
 * 
 *     def next(self):
 */
  __Pyx_TraceLine(1422,0,__PYX_ERR(0, 1422, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dir_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1419
 * 
 *     @property
 *     def dir(self):             # <<<<<<<<<<<<<<
 *         if self._dir is None:
 *             self._dir = np.array([t.dir for t in self._tracks])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.dir", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1424
 *         return self._dir
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_51next(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_50next[] = "TrackSeries.next(self)\nPython 2/3 compatibility for iterators";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_51next = {"next", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_51next, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_50next};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_51next(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("next (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_50next(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_50next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__168)
  __Pyx_RefNannySetupContext("next", 0);
  __Pyx_TraceCall("next", __pyx_f[0], 1424, 0, __PYX_ERR(0, 1424, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1426
 *     def next(self):
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  __Pyx_TraceLine(1426,0,__PYX_ERR(0, 1426, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_next); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1426, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1426, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1424
 *         return self._dir
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1428
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_53__next__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_52__next__[] = "TrackSeries.__next__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_53__next__ = {"__next__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_53__next__, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_52__next__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_53__next__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_52__next__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_52__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_item = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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_t_5;
  __Pyx_TraceFrameInit(__pyx_codeobj__169)
  __Pyx_RefNannySetupContext("__next__", 0);
  __Pyx_TraceCall("__next__", __pyx_f[0], 1428, 0, __PYX_ERR(0, 1428, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1429
 * 
 *     def __next__(self):
 *         if self._index >= len(self):             # <<<<<<<<<<<<<<
 *             self._index = 0
 *             raise StopIteration
 */
  __Pyx_TraceLine(1429,0,__PYX_ERR(0, 1429, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 1429, __pyx_L1_error)
  __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1429, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1429, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "km3pipe/dataclasses.pyx":1430
 *     def __next__(self):
 *         if self._index >= len(self):
 *             self._index = 0             # <<<<<<<<<<<<<<
 *             raise StopIteration
 *         item = self._tracks[self._index]
 */
    __Pyx_TraceLine(1430,0,__PYX_ERR(0, 1430, __pyx_L1_error))
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index, __pyx_int_0) < 0) __PYX_ERR(0, 1430, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":1431
 *         if self._index >= len(self):
 *             self._index = 0
 *             raise StopIteration             # <<<<<<<<<<<<<<
 *         item = self._tracks[self._index]
 *         self._index += 1
 */
    __Pyx_TraceLine(1431,0,__PYX_ERR(0, 1431, __pyx_L1_error))
    __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
    __PYX_ERR(0, 1431, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":1429
 * 
 *     def __next__(self):
 *         if self._index >= len(self):             # <<<<<<<<<<<<<<
 *             self._index = 0
 *             raise StopIteration
 */
  }

  /* "km3pipe/dataclasses.pyx":1432
 *             self._index = 0
 *             raise StopIteration
 *         item = self._tracks[self._index]             # <<<<<<<<<<<<<<
 *         self._index += 1
 *         return item
 */
  __Pyx_TraceLine(1432,0,__PYX_ERR(0, 1432, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyObject_GetItem(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_item = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":1433
 *             raise StopIteration
 *         item = self._tracks[self._index]
 *         self._index += 1             # <<<<<<<<<<<<<<
 *         return item
 * 
 */
  __Pyx_TraceLine(1433,0,__PYX_ERR(0, 1433, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index, __pyx_t_3) < 0) __PYX_ERR(0, 1433, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":1434
 *         item = self._tracks[self._index]
 *         self._index += 1
 *         return item             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_TraceLine(1434,0,__PYX_ERR(0, 1434, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_item);
  __pyx_r = __pyx_v_item;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1428
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1436
 *         return item
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return len(self._tracks)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_55__len__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_54__len__[] = "TrackSeries.__len__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_55__len__ = {"__len__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_55__len__, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_54__len__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_55__len__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_54__len__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_54__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  __Pyx_TraceFrameInit(__pyx_codeobj__170)
  __Pyx_RefNannySetupContext("__len__", 0);
  __Pyx_TraceCall("__len__", __pyx_f[0], 1436, 0, __PYX_ERR(0, 1436, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1437
 * 
 *     def __len__(self):
 *         return len(self._tracks)             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, index):
 */
  __Pyx_TraceLine(1437,0,__PYX_ERR(0, 1437, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 1437, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1436
 *         return item
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return len(self._tracks)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1439
 *         return len(self._tracks)
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             return self._tracks[index]
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_57__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_56__getitem__[] = "TrackSeries.__getitem__(self, index)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_57__getitem__ = {"__getitem__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_57__getitem__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_56__getitem__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_57__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_index_2,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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); __PYX_ERR(0, 1439, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getitem__") < 0)) __PYX_ERR(0, 1439, __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_self = values[0];
    __pyx_v_index = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1439, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_56__getitem__(__pyx_self, __pyx_v_self, __pyx_v_index);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_56__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__171)
  __Pyx_RefNannySetupContext("__getitem__", 0);
  __Pyx_TraceCall("__getitem__", __pyx_f[0], 1439, 0, __PYX_ERR(0, 1439, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1440
 * 
 *     def __getitem__(self, index):
 *         if isinstance(index, int):             # <<<<<<<<<<<<<<
 *             return self._tracks[index]
 *         elif isinstance(index, slice):
 */
  __Pyx_TraceLine(1440,0,__PYX_ERR(0, 1440, __pyx_L1_error))
  __pyx_t_1 = PyInt_Check(__pyx_v_index); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "km3pipe/dataclasses.pyx":1441
 *     def __getitem__(self, index):
 *         if isinstance(index, int):
 *             return self._tracks[index]             # <<<<<<<<<<<<<<
 *         elif isinstance(index, slice):
 *             return self._slice_generator(index)
 */
    __Pyx_TraceLine(1441,0,__PYX_ERR(0, 1441, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1440
 * 
 *     def __getitem__(self, index):
 *         if isinstance(index, int):             # <<<<<<<<<<<<<<
 *             return self._tracks[index]
 *         elif isinstance(index, slice):
 */
  }

  /* "km3pipe/dataclasses.pyx":1442
 *         if isinstance(index, int):
 *             return self._tracks[index]
 *         elif isinstance(index, slice):             # <<<<<<<<<<<<<<
 *             return self._slice_generator(index)
 *         else:
 */
  __Pyx_TraceLine(1442,0,__PYX_ERR(0, 1442, __pyx_L1_error))
  __pyx_t_2 = PySlice_Check(__pyx_v_index); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1443
 *             return self._tracks[index]
 *         elif isinstance(index, slice):
 *             return self._slice_generator(index)             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError("index must be int or slice")
 */
    __Pyx_TraceLine(1443,0,__PYX_ERR(0, 1443, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_slice_generator); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1443, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_index};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1443, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_index};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1443, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1443, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_INCREF(__pyx_v_index);
        __Pyx_GIVEREF(__pyx_v_index);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_index);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1443, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1442
 *         if isinstance(index, int):
 *             return self._tracks[index]
 *         elif isinstance(index, slice):             # <<<<<<<<<<<<<<
 *             return self._slice_generator(index)
 *         else:
 */
  }

  /* "km3pipe/dataclasses.pyx":1445
 *             return self._slice_generator(index)
 *         else:
 *             raise TypeError("index must be int or slice")             # <<<<<<<<<<<<<<
 * 
 *     def _slice_generator(self, index):
 */
  __Pyx_TraceLine(1445,0,__PYX_ERR(0, 1445, __pyx_L1_error))
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__172, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1445, __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_ERR(0, 1445, __pyx_L1_error)
  }

  /* "km3pipe/dataclasses.pyx":1439
 *         return len(self._tracks)
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             return self._tracks[index]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_7km3pipe_11dataclasses_11TrackSeries_60generator2(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "km3pipe/dataclasses.pyx":1447
 *             raise TypeError("index must be int or slice")
 * 
 *     def _slice_generator(self, index):             # <<<<<<<<<<<<<<
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_59_slice_generator(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_58_slice_generator[] = "TrackSeries._slice_generator(self, index)\nA simple slice generator for iterations";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_59_slice_generator = {"_slice_generator", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_59_slice_generator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_58_slice_generator};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_59_slice_generator(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_slice_generator (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_index_2,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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_slice_generator", 1, 2, 2, 1); __PYX_ERR(0, 1447, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_slice_generator") < 0)) __PYX_ERR(0, 1447, __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_self = values[0];
    __pyx_v_index = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_slice_generator", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1447, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries._slice_generator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_58_slice_generator(__pyx_self, __pyx_v_self, __pyx_v_index);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_58_slice_generator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__173)
  __Pyx_RefNannySetupContext("_slice_generator", 0);
  __pyx_cur_scope = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator *)__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator(__pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1447, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("_slice_generator", __pyx_f[0], 1447, 0, __PYX_ERR(0, 1447, __pyx_L1_error));
  __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);
  __pyx_cur_scope->__pyx_v_index = __pyx_v_index;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_index);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_index);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7km3pipe_11dataclasses_11TrackSeries_60generator2, (PyObject *) __pyx_cur_scope, __pyx_n_s_slice_generator, __pyx_n_s_TrackSeries__slice_generator, __pyx_n_s_km3pipe_dataclasses); if (unlikely(!gen)) __PYX_ERR(0, 1447, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries._slice_generator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_7km3pipe_11dataclasses_11TrackSeries_60generator2(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator *__pyx_cur_scope = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  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)(PyObject *);
  PyObject *(*__pyx_t_8)(PyObject *);
  __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_ERR(0, 1447, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1449
 *     def _slice_generator(self, index):
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))             # <<<<<<<<<<<<<<
 *         for i in range(start, stop, step):
 *             yield self._tracks[i]
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_index, __pyx_n_s_indices); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_Length(__pyx_cur_scope->__pyx_v_self); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 1449, __pyx_L1_error)
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1449, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1449, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1449, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1449, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1449, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    #if !CYTHON_COMPILING_IN_PYPY
    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_ERR(0, 1449, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_4);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1449, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1449, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1449, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1449, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_6 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_6);
    index = 2; __pyx_t_4 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_5), 3) < 0) __PYX_ERR(0, 1449, __pyx_L1_error)
    __pyx_t_7 = NULL;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L5_unpacking_done;
    __pyx_L4_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 1449, __pyx_L1_error)
    __pyx_L5_unpacking_done:;
  }
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_cur_scope->__pyx_v_start = __pyx_t_2;
  __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_cur_scope->__pyx_v_stop = __pyx_t_6;
  __pyx_t_6 = 0;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_cur_scope->__pyx_v_step = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":1450
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 *         for i in range(start, stop, step):             # <<<<<<<<<<<<<<
 *             yield self._tracks[i]
 * 
 */
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_start);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_start);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_v_start);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_stop);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_stop);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_cur_scope->__pyx_v_stop);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_step);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_step);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_cur_scope->__pyx_v_step);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1450, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1450, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1450, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1450, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 1450, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1450, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_8(__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_ERR(0, 1450, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_i);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_i, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;

    /* "km3pipe/dataclasses.pyx":1451
 *         start, stop, step = index.indices(len(self))
 *         for i in range(start, stop, step):
 *             yield self._tracks[i]             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1451, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = PyObject_GetItem(__pyx_t_4, __pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1451, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __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_3;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_8;
    __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_t_8 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1451, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":1450
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 *         for i in range(start, stop, step):             # <<<<<<<<<<<<<<
 *             yield self._tracks[i]
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "km3pipe/dataclasses.pyx":1447
 *             raise TypeError("index must be int or slice")
 * 
 *     def _slice_generator(self, index):             # <<<<<<<<<<<<<<
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 */

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("_slice_generator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1453
 *             yield self._tracks[i]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_tracks = len(self)
 *         plural = 's' if n_tracks > 1 or n_tracks == 0 else ''
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_62__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_61__str__[] = "TrackSeries.__str__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_62__str__ = {"__str__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_62__str__, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_61__str__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_62__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_61__str__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_61__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_v_n_tracks;
  PyObject *__pyx_v_plural = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__174)
  __Pyx_RefNannySetupContext("__str__", 0);
  __Pyx_TraceCall("__str__", __pyx_f[0], 1453, 0, __PYX_ERR(0, 1453, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1454
 * 
 *     def __str__(self):
 *         n_tracks = len(self)             # <<<<<<<<<<<<<<
 *         plural = 's' if n_tracks > 1 or n_tracks == 0 else ''
 *         return("TrackSeries with {0} track{1}.".format(len(self), plural))
 */
  __Pyx_TraceLine(1454,0,__PYX_ERR(0, 1454, __pyx_L1_error))
  __pyx_t_1 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 1454, __pyx_L1_error)
  __pyx_v_n_tracks = __pyx_t_1;

  /* "km3pipe/dataclasses.pyx":1455
 *     def __str__(self):
 *         n_tracks = len(self)
 *         plural = 's' if n_tracks > 1 or n_tracks == 0 else ''             # <<<<<<<<<<<<<<
 *         return("TrackSeries with {0} track{1}.".format(len(self), plural))
 * 
 */
  __Pyx_TraceLine(1455,0,__PYX_ERR(0, 1455, __pyx_L1_error))
  __pyx_t_4 = ((__pyx_v_n_tracks > 1) != 0);
  if (!__pyx_t_4) {
  } else {
    __pyx_t_3 = __pyx_t_4;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_4 = ((__pyx_v_n_tracks == 0) != 0);
  __pyx_t_3 = __pyx_t_4;
  __pyx_L3_bool_binop_done:;
  if (__pyx_t_3) {
    __Pyx_INCREF(__pyx_n_s_s);
    __pyx_t_2 = __pyx_n_s_s;
  } else {
    __Pyx_INCREF(__pyx_kp_s__113);
    __pyx_t_2 = __pyx_kp_s__113;
  }
  __pyx_v_plural = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":1456
 *         n_tracks = len(self)
 *         plural = 's' if n_tracks > 1 or n_tracks == 0 else ''
 *         return("TrackSeries with {0} track{1}.".format(len(self), plural))             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_TraceLine(1456,0,__PYX_ERR(0, 1456, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_TrackSeries_with_0_track_1, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 1456, __pyx_L1_error)
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_plural};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1456, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_plural};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1456, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6);
    __Pyx_INCREF(__pyx_v_plural);
    __Pyx_GIVEREF(__pyx_v_plural);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_plural);
    __pyx_t_6 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1453
 *             yield self._tracks[i]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_tracks = len(self)
 *         plural = 's' if n_tracks > 1 or n_tracks == 0 else ''
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_plural);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1458
 *         return("TrackSeries with {0} track{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_64__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_63__repr__[] = "TrackSeries.__repr__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_64__repr__ = {"__repr__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_64__repr__, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_63__repr__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_64__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_63__repr__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_63__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__175)
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 1458, 0, __PYX_ERR(0, 1458, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1459
 * 
 *     def __repr__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 *     def __insp__(self):
 */
  __Pyx_TraceLine(1459,0,__PYX_ERR(0, 1459, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1459, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1459, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1458
 *         return("TrackSeries with {0} track{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1461
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return '\n'.join([str(track) for track in self._tracks])
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_66__insp__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_65__insp__[] = "TrackSeries.__insp__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_66__insp__ = {"__insp__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_66__insp__, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_65__insp__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_66__insp__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__insp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_65__insp__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_65__insp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_track = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__176)
  __Pyx_RefNannySetupContext("__insp__", 0);
  __Pyx_TraceCall("__insp__", __pyx_f[0], 1461, 0, __PYX_ERR(0, 1461, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1462
 * 
 *     def __insp__(self):
 *         return '\n'.join([str(track) for track in self._tracks])             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(1462,0,__PYX_ERR(0, 1462, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(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_ERR(0, 1462, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1462, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 1462, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1462, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 1462, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1462, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #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_ERR(0, 1462, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_track, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1462, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_track);
    __Pyx_GIVEREF(__pyx_v_track);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_track);
    __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1462, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1462, __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__116, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1461
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return '\n'.join([str(track) for track in self._tracks])
 * 
 */

  /* 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_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.__insp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_track);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1476
 *     h5loc = '/'
 * 
 *     def __init__(self, arr):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries___init__[] = "SummaryframeSeries.__init__(self, arr)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_1__init__ = {"__init__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries___init__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_arr = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_arr,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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 1476, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1476, __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_self = values[0];
    __pyx_v_arr = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1476, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries___init__(__pyx_self, __pyx_v_self, __pyx_v_arr);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_arr) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__177)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 1476, 0, __PYX_ERR(0, 1476, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1477
 * 
 *     def __init__(self, arr):
 *         self._arr = arr             # <<<<<<<<<<<<<<
 *         self._index = 0
 *         self._frames = None
 */
  __Pyx_TraceLine(1477,0,__PYX_ERR(0, 1477, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_arr_2, __pyx_v_arr) < 0) __PYX_ERR(0, 1477, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1478
 *     def __init__(self, arr):
 *         self._arr = arr
 *         self._index = 0             # <<<<<<<<<<<<<<
 *         self._frames = None
 * 
 */
  __Pyx_TraceLine(1478,0,__PYX_ERR(0, 1478, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index, __pyx_int_0) < 0) __PYX_ERR(0, 1478, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1479
 *         self._arr = arr
 *         self._index = 0
 *         self._frames = None             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1479,0,__PYX_ERR(0, 1479, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_frames, Py_None) < 0) __PYX_ERR(0, 1479, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1476
 *     h5loc = '/'
 * 
 *     def __init__(self, arr):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1482
 * 
 *     @classmethod
 *     def from_arrays(cls, dom_ids, max_sequence_numbers, n_received_packets,             # <<<<<<<<<<<<<<
 *                     slice_id):
 *         length = dom_ids.shape[0]
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_3from_arrays(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_2from_arrays[] = "SummaryframeSeries.from_arrays(cls, dom_ids, max_sequence_numbers, n_received_packets, slice_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_3from_arrays = {"from_arrays", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_3from_arrays, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_2from_arrays};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_3from_arrays(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_dom_ids = 0;
  PyObject *__pyx_v_max_sequence_numbers = 0;
  PyObject *__pyx_v_n_received_packets = 0;
  PyObject *__pyx_v_slice_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_arrays (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_dom_ids,&__pyx_n_s_max_sequence_numbers,&__pyx_n_s_n_received_packets,&__pyx_n_s_slice_id,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_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dom_ids)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 5, 5, 1); __PYX_ERR(0, 1482, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_max_sequence_numbers)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 5, 5, 2); __PYX_ERR(0, 1482, __pyx_L3_error)
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_n_received_packets)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 5, 5, 3); __PYX_ERR(0, 1482, __pyx_L3_error)
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_slice_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 5, 5, 4); __PYX_ERR(0, 1482, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_arrays") < 0)) __PYX_ERR(0, 1482, __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_cls = values[0];
    __pyx_v_dom_ids = values[1];
    __pyx_v_max_sequence_numbers = values[2];
    __pyx_v_n_received_packets = values[3];
    __pyx_v_slice_id = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1482, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_2from_arrays(__pyx_self, __pyx_v_cls, __pyx_v_dom_ids, __pyx_v_max_sequence_numbers, __pyx_v_n_received_packets, __pyx_v_slice_id);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_2from_arrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_dom_ids, PyObject *__pyx_v_max_sequence_numbers, PyObject *__pyx_v_n_received_packets, PyObject *__pyx_v_slice_id) {
  PyObject *__pyx_v_length = NULL;
  PyObject *__pyx_v_frames = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__178)
  __Pyx_RefNannySetupContext("from_arrays", 0);
  __Pyx_TraceCall("from_arrays", __pyx_f[0], 1482, 0, __PYX_ERR(0, 1482, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1484
 *     def from_arrays(cls, dom_ids, max_sequence_numbers, n_received_packets,
 *                     slice_id):
 *         length = dom_ids.shape[0]             # <<<<<<<<<<<<<<
 *         frames = np.empty(length, cls.dtype)
 *         frames['dom_id'] = dom_ids
 */
  __Pyx_TraceLine(1484,0,__PYX_ERR(0, 1484, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dom_ids, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_length = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":1485
 *                     slice_id):
 *         length = dom_ids.shape[0]
 *         frames = np.empty(length, cls.dtype)             # <<<<<<<<<<<<<<
 *         frames['dom_id'] = dom_ids
 *         frames['max_sequence_number'] = max_sequence_numbers
 */
  __Pyx_TraceLine(1485,0,__PYX_ERR(0, 1485, __pyx_L1_error))
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_length, __pyx_t_1};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1485, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_length, __pyx_t_1};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1485, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1485, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(__pyx_v_length);
    __Pyx_GIVEREF(__pyx_v_length);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_length);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1485, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_frames = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":1486
 *         length = dom_ids.shape[0]
 *         frames = np.empty(length, cls.dtype)
 *         frames['dom_id'] = dom_ids             # <<<<<<<<<<<<<<
 *         frames['max_sequence_number'] = max_sequence_numbers
 *         frames['n_received_packets'] = n_received_packets
 */
  __Pyx_TraceLine(1486,0,__PYX_ERR(0, 1486, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_frames, __pyx_n_s_dom_id, __pyx_v_dom_ids) < 0)) __PYX_ERR(0, 1486, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1487
 *         frames = np.empty(length, cls.dtype)
 *         frames['dom_id'] = dom_ids
 *         frames['max_sequence_number'] = max_sequence_numbers             # <<<<<<<<<<<<<<
 *         frames['n_received_packets'] = n_received_packets
 *         frames['slice_id'] = np.full(length, slice_id, dtype='<u4')
 */
  __Pyx_TraceLine(1487,0,__PYX_ERR(0, 1487, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_frames, __pyx_n_s_max_sequence_number, __pyx_v_max_sequence_numbers) < 0)) __PYX_ERR(0, 1487, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1488
 *         frames['dom_id'] = dom_ids
 *         frames['max_sequence_number'] = max_sequence_numbers
 *         frames['n_received_packets'] = n_received_packets             # <<<<<<<<<<<<<<
 *         frames['slice_id'] = np.full(length, slice_id, dtype='<u4')
 *         return cls(frames)
 */
  __Pyx_TraceLine(1488,0,__PYX_ERR(0, 1488, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_frames, __pyx_n_s_n_received_packets, __pyx_v_n_received_packets) < 0)) __PYX_ERR(0, 1488, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1489
 *         frames['max_sequence_number'] = max_sequence_numbers
 *         frames['n_received_packets'] = n_received_packets
 *         frames['slice_id'] = np.full(length, slice_id, dtype='<u4')             # <<<<<<<<<<<<<<
 *         return cls(frames)
 * 
 */
  __Pyx_TraceLine(1489,0,__PYX_ERR(0, 1489, __pyx_L1_error))
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_full); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_length);
  __Pyx_GIVEREF(__pyx_v_length);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_length);
  __Pyx_INCREF(__pyx_v_slice_id);
  __Pyx_GIVEREF(__pyx_v_slice_id);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_slice_id);
  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_kp_s_u4) < 0) __PYX_ERR(0, 1489, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1489, __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_6); __pyx_t_6 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_frames, __pyx_n_s_slice_id, __pyx_t_1) < 0)) __PYX_ERR(0, 1489, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":1490
 *         frames['n_received_packets'] = n_received_packets
 *         frames['slice_id'] = np.full(length, slice_id, dtype='<u4')
 *         return cls(frames)             # <<<<<<<<<<<<<<
 * 
 *     def from_table(cls, table, slice_id):
 */
  __Pyx_TraceLine(1490,0,__PYX_ERR(0, 1490, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_cls);
  __pyx_t_6 = __pyx_v_cls; __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_frames); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1490, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_frames};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1490, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_frames};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1490, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1490, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_INCREF(__pyx_v_frames);
      __Pyx_GIVEREF(__pyx_v_frames);
      PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_frames);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1490, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1482
 * 
 *     @classmethod
 *     def from_arrays(cls, dom_ids, max_sequence_numbers, n_received_packets,             # <<<<<<<<<<<<<<
 *                     slice_id):
 *         length = dom_ids.shape[0]
 */

  /* 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_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_length);
  __Pyx_XDECREF(__pyx_v_frames);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1492
 *         return cls(frames)
 * 
 *     def from_table(cls, table, slice_id):             # <<<<<<<<<<<<<<
 *         if slice_id is None:
 *             slice_id = table[0]['slice_id']
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_5from_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_4from_table[] = "SummaryframeSeries.from_table(cls, table, slice_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_5from_table = {"from_table", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_5from_table, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_4from_table};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_5from_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_table = 0;
  PyObject *__pyx_v_slice_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_table (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_table,&__pyx_n_s_slice_id,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_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_table)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_table", 1, 3, 3, 1); __PYX_ERR(0, 1492, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_slice_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_table", 1, 3, 3, 2); __PYX_ERR(0, 1492, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_table") < 0)) __PYX_ERR(0, 1492, __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_cls = values[0];
    __pyx_v_table = values[1];
    __pyx_v_slice_id = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_table", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1492, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_4from_table(__pyx_self, __pyx_v_cls, __pyx_v_table, __pyx_v_slice_id);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_4from_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_table, PyObject *__pyx_v_slice_id) {
  PyObject *__pyx_v_row = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  __Pyx_TraceFrameInit(__pyx_codeobj__179)
  __Pyx_RefNannySetupContext("from_table", 0);
  __Pyx_TraceCall("from_table", __pyx_f[0], 1492, 0, __PYX_ERR(0, 1492, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_slice_id);

  /* "km3pipe/dataclasses.pyx":1493
 * 
 *     def from_table(cls, table, slice_id):
 *         if slice_id is None:             # <<<<<<<<<<<<<<
 *             slice_id = table[0]['slice_id']
 *         return cls(np.array([(
 */
  __Pyx_TraceLine(1493,0,__PYX_ERR(0, 1493, __pyx_L1_error))
  __pyx_t_1 = (__pyx_v_slice_id == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "km3pipe/dataclasses.pyx":1494
 *     def from_table(cls, table, slice_id):
 *         if slice_id is None:
 *             slice_id = table[0]['slice_id']             # <<<<<<<<<<<<<<
 *         return cls(np.array([(
 *             row['dom_id'],
 */
    __Pyx_TraceLine(1494,0,__PYX_ERR(0, 1494, __pyx_L1_error))
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_table, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_slice_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_slice_id, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "km3pipe/dataclasses.pyx":1493
 * 
 *     def from_table(cls, table, slice_id):
 *         if slice_id is None:             # <<<<<<<<<<<<<<
 *             slice_id = table[0]['slice_id']
 *         return cls(np.array([(
 */
  }

  /* "km3pipe/dataclasses.pyx":1495
 *         if slice_id is None:
 *             slice_id = table[0]['slice_id']
 *         return cls(np.array([(             # <<<<<<<<<<<<<<
 *             row['dom_id'],
 *             row['max_sequence_number'],
 */
  __Pyx_TraceLine(1495,0,__PYX_ERR(0, 1495, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "km3pipe/dataclasses.pyx":1499
 *             row['max_sequence_number'],
 *             row['n_received_packets'],
 *         ) for row in table], dtype=cls.dtype), slice_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1499,0,__PYX_ERR(0, 1499, __pyx_L1_error))
  if (likely(PyList_CheckExact(__pyx_v_table)) || PyTuple_CheckExact(__pyx_v_table)) {
    __pyx_t_6 = __pyx_v_table; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_table); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1499, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1499, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_6))) {
        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_6)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1499, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1499, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      } else {
        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1499, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1499, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      }
    } else {
      __pyx_t_9 = __pyx_t_8(__pyx_t_6);
      if (unlikely(!__pyx_t_9)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1499, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_9);
    }
    __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "km3pipe/dataclasses.pyx":1496
 *             slice_id = table[0]['slice_id']
 *         return cls(np.array([(
 *             row['dom_id'],             # <<<<<<<<<<<<<<
 *             row['max_sequence_number'],
 *             row['n_received_packets'],
 */
    __Pyx_TraceLine(1496,0,__PYX_ERR(0, 1496, __pyx_L1_error))
    __pyx_t_9 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_dom_id); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1496, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);

    /* "km3pipe/dataclasses.pyx":1497
 *         return cls(np.array([(
 *             row['dom_id'],
 *             row['max_sequence_number'],             # <<<<<<<<<<<<<<
 *             row['n_received_packets'],
 *         ) for row in table], dtype=cls.dtype), slice_id)
 */
    __Pyx_TraceLine(1497,0,__PYX_ERR(0, 1497, __pyx_L1_error))
    __pyx_t_10 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_max_sequence_number); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);

    /* "km3pipe/dataclasses.pyx":1498
 *             row['dom_id'],
 *             row['max_sequence_number'],
 *             row['n_received_packets'],             # <<<<<<<<<<<<<<
 *         ) for row in table], dtype=cls.dtype), slice_id)
 * 
 */
    __Pyx_TraceLine(1498,0,__PYX_ERR(0, 1498, __pyx_L1_error))
    __pyx_t_11 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_n_received_packets); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1498, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);

    /* "km3pipe/dataclasses.pyx":1496
 *             slice_id = table[0]['slice_id']
 *         return cls(np.array([(
 *             row['dom_id'],             # <<<<<<<<<<<<<<
 *             row['max_sequence_number'],
 *             row['n_received_packets'],
 */
    __Pyx_TraceLine(1496,0,__PYX_ERR(0, 1496, __pyx_L1_error))
    __pyx_t_12 = PyTuple_New(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1496, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_t_11);
    __pyx_t_9 = 0;
    __pyx_t_10 = 0;
    __pyx_t_11 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_12))) __PYX_ERR(0, 1495, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "km3pipe/dataclasses.pyx":1499
 *             row['max_sequence_number'],
 *             row['n_received_packets'],
 *         ) for row in table], dtype=cls.dtype), slice_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
    __Pyx_TraceLine(1499,0,__PYX_ERR(0, 1499, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1495
 *         if slice_id is None:
 *             slice_id = table[0]['slice_id']
 *         return cls(np.array([(             # <<<<<<<<<<<<<<
 *             row['dom_id'],
 *             row['max_sequence_number'],
 */
  __Pyx_TraceLine(1495,0,__PYX_ERR(0, 1495, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":1499
 *             row['max_sequence_number'],
 *             row['n_received_packets'],
 *         ) for row in table], dtype=cls.dtype), slice_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1499,0,__PYX_ERR(0, 1499, __pyx_L1_error))
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_12) < 0) __PYX_ERR(0, 1499, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "km3pipe/dataclasses.pyx":1495
 *         if slice_id is None:
 *             slice_id = table[0]['slice_id']
 *         return cls(np.array([(             # <<<<<<<<<<<<<<
 *             row['dom_id'],
 *             row['max_sequence_number'],
 */
  __Pyx_TraceLine(1495,0,__PYX_ERR(0, 1495, __pyx_L1_error))
  __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":1499
 *             row['max_sequence_number'],
 *             row['n_received_packets'],
 *         ) for row in table], dtype=cls.dtype), slice_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1499,0,__PYX_ERR(0, 1499, __pyx_L1_error))
  __Pyx_INCREF(__pyx_v_cls);
  __pyx_t_3 = __pyx_v_cls; __pyx_t_6 = NULL;
  __pyx_t_13 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_13 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_12, __pyx_v_slice_id};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1495, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_12, __pyx_v_slice_id};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1495, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1495, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_13, __pyx_t_12);
    __Pyx_INCREF(__pyx_v_slice_id);
    __Pyx_GIVEREF(__pyx_v_slice_id);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_13, __pyx_v_slice_id);
    __pyx_t_12 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1495, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1492
 *         return cls(frames)
 * 
 *     def from_table(cls, table, slice_id):             # <<<<<<<<<<<<<<
 *         if slice_id is None:
 *             slice_id = table[0]['slice_id']
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XDECREF(__pyx_v_slice_id);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1502
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_7deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_6deserialise[] = "SummaryframeSeries.deserialise(cls, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_7deserialise = {"deserialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_7deserialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_6deserialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_7deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("deserialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,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_cls)) != 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, __pyx_v_kwargs, values, used_pos_args, "deserialise") < 0)) __PYX_ERR(0, 1502, __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_cls = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("deserialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1502, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_6deserialise(__pyx_self, __pyx_v_cls, __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_7km3pipe_11dataclasses_18SummaryframeSeries_6deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__180)
  __Pyx_RefNannySetupContext("deserialise", 0);
  __Pyx_TraceCall("deserialise", __pyx_f[0], 1502, 0, __PYX_ERR(0, 1502, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1503
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def serialise(self, *args, **kwargs):
 */
  __Pyx_TraceLine(1503,0,__PYX_ERR(0, 1503, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_conv_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1502
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1505
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_9serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_8serialise[] = "SummaryframeSeries.serialise(self, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_9serialise = {"serialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_9serialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_8serialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_9serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,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_self)) != 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, __pyx_v_kwargs, values, used_pos_args, "serialise") < 0)) __PYX_ERR(0, 1505, __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_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1505, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_8serialise(__pyx_self, __pyx_v_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_7km3pipe_11dataclasses_18SummaryframeSeries_8serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__181)
  __Pyx_RefNannySetupContext("serialise", 0);
  __Pyx_TraceCall("serialise", __pyx_f[0], 1505, 0, __PYX_ERR(0, 1505, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1506
 * 
 *     def serialise(self, *args, **kwargs):
 *         return self.conv_to(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1506,0,__PYX_ERR(0, 1506, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1505
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1509
 * 
 *     @classmethod
 *     def conv_from(cls, data, slice_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             # return cls.from_table(data, event_id)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_11conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_10conv_from[] = "SummaryframeSeries.conv_from(cls, data, slice_id, fmt='numpy', h5loc='/')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_11conv_from = {"conv_from", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_11conv_from, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_10conv_from};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_11conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_data = 0;
  CYTHON_UNUSED PyObject *__pyx_v_slice_id = 0;
  PyObject *__pyx_v_fmt = 0;
  CYTHON_UNUSED PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_from (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_data,&__pyx_n_s_slice_id,&__pyx_n_s_fmt,&__pyx_n_s_h5loc,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[3] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    values[4] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    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_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, 1); __PYX_ERR(0, 1509, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_slice_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, 2); __PYX_ERR(0, 1509, __pyx_L3_error)
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fmt);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_from") < 0)) __PYX_ERR(0, 1509, __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_cls = values[0];
    __pyx_v_data = values[1];
    __pyx_v_slice_id = values[2];
    __pyx_v_fmt = values[3];
    __pyx_v_h5loc = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1509, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_10conv_from(__pyx_self, __pyx_v_cls, __pyx_v_data, __pyx_v_slice_id, __pyx_v_fmt, __pyx_v_h5loc);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_10conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_slice_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  __Pyx_TraceFrameInit(__pyx_codeobj__182)
  __Pyx_RefNannySetupContext("conv_from", 0);
  __Pyx_TraceCall("conv_from", __pyx_f[0], 1509, 0, __PYX_ERR(0, 1509, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1510
 *     @classmethod
 *     def conv_from(cls, data, slice_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             # return cls.from_table(data, event_id)
 *             return cls(data)
 */
  __Pyx_TraceLine(1510,0,__PYX_ERR(0, 1510, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_fmt, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1510, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1512
 *         if fmt == 'numpy':
 *             # return cls.from_table(data, event_id)
 *             return cls(data)             # <<<<<<<<<<<<<<
 * 
 *     def conv_to(self, to='numpy'):
 */
    __Pyx_TraceLine(1512,0,__PYX_ERR(0, 1512, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_cls);
    __pyx_t_3 = __pyx_v_cls; __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_4) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1512, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_data};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1512, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_data};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1512, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1512, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_data);
        __Pyx_GIVEREF(__pyx_v_data);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_data);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1512, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1510
 *     @classmethod
 *     def conv_from(cls, data, slice_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             # return cls.from_table(data, event_id)
 *             return cls(data)
 */
  }

  /* "km3pipe/dataclasses.pyx":1509
 * 
 *     @classmethod
 *     def conv_from(cls, data, slice_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             # return cls.from_table(data, event_id)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1514
 *             return cls(data)
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_13conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_12conv_to[] = "SummaryframeSeries.conv_to(self, to='numpy')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_13conv_to = {"conv_to", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_13conv_to, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_12conv_to};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_13conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_to = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_to (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_to,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_to);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_to") < 0)) __PYX_ERR(0, 1514, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        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_self = values[0];
    __pyx_v_to = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_to", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1514, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_12conv_to(__pyx_self, __pyx_v_self, __pyx_v_to);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_12conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  __Pyx_TraceFrameInit(__pyx_codeobj__183)
  __Pyx_RefNannySetupContext("conv_to", 0);
  __Pyx_TraceCall("conv_to", __pyx_f[0], 1514, 0, __PYX_ERR(0, 1514, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1515
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)
 */
  __Pyx_TraceLine(1515,0,__PYX_ERR(0, 1515, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1515, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1516
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),             # <<<<<<<<<<<<<<
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':
 */
    __Pyx_TraceLine(1516,0,__PYX_ERR(0, 1516, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3Array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1516, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1516, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1516, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_array_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1516, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (__pyx_t_6) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1516, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1516, __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_ERR(0, 1516, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1516, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1516, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 1516, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1516, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1516, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "km3pipe/dataclasses.pyx":1517
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)             # <<<<<<<<<<<<<<
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 */
    __Pyx_TraceLine(1517,0,__PYX_ERR(0, 1517, __pyx_L1_error))
    __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1517, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_h5loc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1517, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_h5loc, __pyx_t_5) < 0) __PYX_ERR(0, 1517, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "km3pipe/dataclasses.pyx":1516
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),             # <<<<<<<<<<<<<<
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':
 */
    __Pyx_TraceLine(1516,0,__PYX_ERR(0, 1516, __pyx_L1_error))
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1516, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1515
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)
 */
  }

  /* "km3pipe/dataclasses.pyx":1518
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  __Pyx_TraceLine(1518,0,__PYX_ERR(0, 1518, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_pandas, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1518, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1519
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
    __Pyx_TraceLine(1519,0,__PYX_ERR(0, 1519, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3DataFrame); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_to, __pyx_n_s_numpy) < 0) __PYX_ERR(0, 1519, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_h5loc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_h5loc, __pyx_t_6) < 0) __PYX_ERR(0, 1519, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1518
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 *                             h5loc=self.h5loc)
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":1514
 *             return cls(data)
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1522
 * 
 *     @property
 *     def n_received_packets(self):             # <<<<<<<<<<<<<<
 *         return self._arr['n_received_packets']
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_15n_received_packets(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_14n_received_packets[] = "SummaryframeSeries.n_received_packets(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_15n_received_packets = {"n_received_packets", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_15n_received_packets, METH_O, __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_14n_received_packets};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_15n_received_packets(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("n_received_packets (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_14n_received_packets(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_14n_received_packets(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__184)
  __Pyx_RefNannySetupContext("n_received_packets", 0);
  __Pyx_TraceCall("n_received_packets", __pyx_f[0], 1522, 0, __PYX_ERR(0, 1522, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1523
 *     @property
 *     def n_received_packets(self):
 *         return self._arr['n_received_packets']             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(1523,0,__PYX_ERR(0, 1523, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_n_s_n_received_packets); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1522
 * 
 *     @property
 *     def n_received_packets(self):             # <<<<<<<<<<<<<<
 *         return self._arr['n_received_packets']
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.n_received_packets", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1526
 * 
 *     @property
 *     def dom_ids(self):             # <<<<<<<<<<<<<<
 *         return self._arr['dom_ids']
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_17dom_ids(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_16dom_ids[] = "SummaryframeSeries.dom_ids(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_17dom_ids = {"dom_ids", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_17dom_ids, METH_O, __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_16dom_ids};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_17dom_ids(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dom_ids (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_16dom_ids(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_16dom_ids(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__185)
  __Pyx_RefNannySetupContext("dom_ids", 0);
  __Pyx_TraceCall("dom_ids", __pyx_f[0], 1526, 0, __PYX_ERR(0, 1526, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1527
 *     @property
 *     def dom_ids(self):
 *         return self._arr['dom_ids']             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(1527,0,__PYX_ERR(0, 1527, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_n_s_dom_ids); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1526
 * 
 *     @property
 *     def dom_ids(self):             # <<<<<<<<<<<<<<
 *         return self._arr['dom_ids']
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.dom_ids", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1530
 * 
 *     @property
 *     def max_sequence_numbers(self):             # <<<<<<<<<<<<<<
 *         return self._arr['max_sequence_numbers']
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_19max_sequence_numbers(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_18max_sequence_numbers[] = "SummaryframeSeries.max_sequence_numbers(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_19max_sequence_numbers = {"max_sequence_numbers", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_19max_sequence_numbers, METH_O, __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_18max_sequence_numbers};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_19max_sequence_numbers(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("max_sequence_numbers (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_18max_sequence_numbers(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_18max_sequence_numbers(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__186)
  __Pyx_RefNannySetupContext("max_sequence_numbers", 0);
  __Pyx_TraceCall("max_sequence_numbers", __pyx_f[0], 1530, 0, __PYX_ERR(0, 1530, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1531
 *     @property
 *     def max_sequence_numbers(self):
 *         return self._arr['max_sequence_numbers']             # <<<<<<<<<<<<<<
 * 
 *     def __array__(self):
 */
  __Pyx_TraceLine(1531,0,__PYX_ERR(0, 1531, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_n_s_max_sequence_numbers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1530
 * 
 *     @property
 *     def max_sequence_numbers(self):             # <<<<<<<<<<<<<<
 *         return self._arr['max_sequence_numbers']
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.max_sequence_numbers", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1533
 *         return self._arr['max_sequence_numbers']
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_21__array__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_20__array__[] = "SummaryframeSeries.__array__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_21__array__ = {"__array__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_21__array__, METH_O, __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_20__array__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_21__array__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__array__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_20__array__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_20__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__187)
  __Pyx_RefNannySetupContext("__array__", 0);
  __Pyx_TraceCall("__array__", __pyx_f[0], 1533, 0, __PYX_ERR(0, 1533, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1534
 * 
 *     def __array__(self):
 *         return self._arr             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __Pyx_TraceLine(1534,0,__PYX_ERR(0, 1534, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1533
 *         return self._arr['max_sequence_numbers']
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.__array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1536
 *         return self._arr
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_23__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_22__iter__[] = "SummaryframeSeries.__iter__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_23__iter__ = {"__iter__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_23__iter__, METH_O, __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_22__iter__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_23__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_22__iter__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_22__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__188)
  __Pyx_RefNannySetupContext("__iter__", 0);
  __Pyx_TraceCall("__iter__", __pyx_f[0], 1536, 0, __PYX_ERR(0, 1536, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1537
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def next(self):
 */
  __Pyx_TraceLine(1537,0,__PYX_ERR(0, 1537, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self);
  __pyx_r = __pyx_v_self;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1536
 *         return self._arr
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1539
 *         return self
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_25next(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_24next[] = "SummaryframeSeries.next(self)\nPython 2/3 compatibility for iterators";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_25next = {"next", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_25next, METH_O, __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_24next};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_25next(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("next (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_24next(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_24next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__189)
  __Pyx_RefNannySetupContext("next", 0);
  __Pyx_TraceCall("next", __pyx_f[0], 1539, 0, __PYX_ERR(0, 1539, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1541
 *     def next(self):
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  __Pyx_TraceLine(1541,0,__PYX_ERR(0, 1541, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_next); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1541, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1541, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1539
 *         return self
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1543
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_27__next__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_26__next__[] = "SummaryframeSeries.__next__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_27__next__ = {"__next__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_27__next__, METH_O, __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_26__next__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_27__next__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_26__next__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_26__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_data = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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_t_5;
  __Pyx_TraceFrameInit(__pyx_codeobj__190)
  __Pyx_RefNannySetupContext("__next__", 0);
  __Pyx_TraceCall("__next__", __pyx_f[0], 1543, 0, __PYX_ERR(0, 1543, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1544
 * 
 *     def __next__(self):
 *         if self._index >= len(self):             # <<<<<<<<<<<<<<
 *             self._index = 0
 *             raise StopIteration
 */
  __Pyx_TraceLine(1544,0,__PYX_ERR(0, 1544, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 1544, __pyx_L1_error)
  __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1544, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1544, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "km3pipe/dataclasses.pyx":1545
 *     def __next__(self):
 *         if self._index >= len(self):
 *             self._index = 0             # <<<<<<<<<<<<<<
 *             raise StopIteration
 *         data = self._arr[self._index]
 */
    __Pyx_TraceLine(1545,0,__PYX_ERR(0, 1545, __pyx_L1_error))
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index, __pyx_int_0) < 0) __PYX_ERR(0, 1545, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":1546
 *         if self._index >= len(self):
 *             self._index = 0
 *             raise StopIteration             # <<<<<<<<<<<<<<
 *         data = self._arr[self._index]
 *         self._index += 1
 */
    __Pyx_TraceLine(1546,0,__PYX_ERR(0, 1546, __pyx_L1_error))
    __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
    __PYX_ERR(0, 1546, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":1544
 * 
 *     def __next__(self):
 *         if self._index >= len(self):             # <<<<<<<<<<<<<<
 *             self._index = 0
 *             raise StopIteration
 */
  }

  /* "km3pipe/dataclasses.pyx":1547
 *             self._index = 0
 *             raise StopIteration
 *         data = self._arr[self._index]             # <<<<<<<<<<<<<<
 *         self._index += 1
 *         return data
 */
  __Pyx_TraceLine(1547,0,__PYX_ERR(0, 1547, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyObject_GetItem(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_data = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":1548
 *             raise StopIteration
 *         data = self._arr[self._index]
 *         self._index += 1             # <<<<<<<<<<<<<<
 *         return data
 * 
 */
  __Pyx_TraceLine(1548,0,__PYX_ERR(0, 1548, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index, __pyx_t_3) < 0) __PYX_ERR(0, 1548, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":1549
 *         data = self._arr[self._index]
 *         self._index += 1
 *         return data             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_TraceLine(1549,0,__PYX_ERR(0, 1549, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_data);
  __pyx_r = __pyx_v_data;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1543
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_data);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1551
 *         return data
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_29__len__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_28__len__[] = "SummaryframeSeries.__len__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_29__len__ = {"__len__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_29__len__, METH_O, __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_28__len__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_29__len__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_28__len__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_28__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__191)
  __Pyx_RefNannySetupContext("__len__", 0);
  __Pyx_TraceCall("__len__", __pyx_f[0], 1551, 0, __PYX_ERR(0, 1551, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1552
 * 
 *     def __len__(self):
 *         return self._arr.shape[0]             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, index):
 */
  __Pyx_TraceLine(1552,0,__PYX_ERR(0, 1552, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1551
 *         return data
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1554
 *         return self._arr.shape[0]
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             return self._arr[index]
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_31__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_30__getitem__[] = "SummaryframeSeries.__getitem__(self, index)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_31__getitem__ = {"__getitem__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_31__getitem__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_30__getitem__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_31__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_index_2,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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); __PYX_ERR(0, 1554, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getitem__") < 0)) __PYX_ERR(0, 1554, __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_self = values[0];
    __pyx_v_index = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1554, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_30__getitem__(__pyx_self, __pyx_v_self, __pyx_v_index);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_30__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__192)
  __Pyx_RefNannySetupContext("__getitem__", 0);
  __Pyx_TraceCall("__getitem__", __pyx_f[0], 1554, 0, __PYX_ERR(0, 1554, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1555
 * 
 *     def __getitem__(self, index):
 *         if isinstance(index, int):             # <<<<<<<<<<<<<<
 *             return self._arr[index]
 *         elif isinstance(index, slice):
 */
  __Pyx_TraceLine(1555,0,__PYX_ERR(0, 1555, __pyx_L1_error))
  __pyx_t_1 = PyInt_Check(__pyx_v_index); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "km3pipe/dataclasses.pyx":1556
 *     def __getitem__(self, index):
 *         if isinstance(index, int):
 *             return self._arr[index]             # <<<<<<<<<<<<<<
 *         elif isinstance(index, slice):
 *             return self._slice_generator(index)
 */
    __Pyx_TraceLine(1556,0,__PYX_ERR(0, 1556, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1556, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1556, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1555
 * 
 *     def __getitem__(self, index):
 *         if isinstance(index, int):             # <<<<<<<<<<<<<<
 *             return self._arr[index]
 *         elif isinstance(index, slice):
 */
  }

  /* "km3pipe/dataclasses.pyx":1557
 *         if isinstance(index, int):
 *             return self._arr[index]
 *         elif isinstance(index, slice):             # <<<<<<<<<<<<<<
 *             return self._slice_generator(index)
 *         else:
 */
  __Pyx_TraceLine(1557,0,__PYX_ERR(0, 1557, __pyx_L1_error))
  __pyx_t_2 = PySlice_Check(__pyx_v_index); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1558
 *             return self._arr[index]
 *         elif isinstance(index, slice):
 *             return self._slice_generator(index)             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError("index must be int or slice")
 */
    __Pyx_TraceLine(1558,0,__PYX_ERR(0, 1558, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_slice_generator); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1558, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1558, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_index};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1558, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_index};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1558, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1558, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_INCREF(__pyx_v_index);
        __Pyx_GIVEREF(__pyx_v_index);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_index);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1558, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1557
 *         if isinstance(index, int):
 *             return self._arr[index]
 *         elif isinstance(index, slice):             # <<<<<<<<<<<<<<
 *             return self._slice_generator(index)
 *         else:
 */
  }

  /* "km3pipe/dataclasses.pyx":1560
 *             return self._slice_generator(index)
 *         else:
 *             raise TypeError("index must be int or slice")             # <<<<<<<<<<<<<<
 * 
 *     def _slice_generator(self, index):
 */
  __Pyx_TraceLine(1560,0,__PYX_ERR(0, 1560, __pyx_L1_error))
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__193, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1560, __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_ERR(0, 1560, __pyx_L1_error)
  }

  /* "km3pipe/dataclasses.pyx":1554
 *         return self._arr.shape[0]
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             return self._arr[index]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_7km3pipe_11dataclasses_18SummaryframeSeries_34generator3(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "km3pipe/dataclasses.pyx":1562
 *             raise TypeError("index must be int or slice")
 * 
 *     def _slice_generator(self, index):             # <<<<<<<<<<<<<<
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_33_slice_generator(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_32_slice_generator[] = "SummaryframeSeries._slice_generator(self, index)\nA simple slice generator for iterations";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_33_slice_generator = {"_slice_generator", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_33_slice_generator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_32_slice_generator};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_33_slice_generator(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_slice_generator (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_index_2,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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_slice_generator", 1, 2, 2, 1); __PYX_ERR(0, 1562, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_slice_generator") < 0)) __PYX_ERR(0, 1562, __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_self = values[0];
    __pyx_v_index = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_slice_generator", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1562, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries._slice_generator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_32_slice_generator(__pyx_self, __pyx_v_self, __pyx_v_index);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_32_slice_generator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__194)
  __Pyx_RefNannySetupContext("_slice_generator", 0);
  __pyx_cur_scope = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator *)__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator(__pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1562, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("_slice_generator", __pyx_f[0], 1562, 0, __PYX_ERR(0, 1562, __pyx_L1_error));
  __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);
  __pyx_cur_scope->__pyx_v_index = __pyx_v_index;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_index);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_index);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7km3pipe_11dataclasses_18SummaryframeSeries_34generator3, (PyObject *) __pyx_cur_scope, __pyx_n_s_slice_generator, __pyx_n_s_SummaryframeSeries__slice_genera, __pyx_n_s_km3pipe_dataclasses); if (unlikely(!gen)) __PYX_ERR(0, 1562, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries._slice_generator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_7km3pipe_11dataclasses_18SummaryframeSeries_34generator3(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator *__pyx_cur_scope = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  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)(PyObject *);
  PyObject *(*__pyx_t_8)(PyObject *);
  __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_ERR(0, 1562, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1564
 *     def _slice_generator(self, index):
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))             # <<<<<<<<<<<<<<
 *         for i in range(start, stop, step):
 *             yield self._arr[i]
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_index, __pyx_n_s_indices); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_Length(__pyx_cur_scope->__pyx_v_self); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 1564, __pyx_L1_error)
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1564, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1564, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1564, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1564, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1564, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    #if !CYTHON_COMPILING_IN_PYPY
    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_ERR(0, 1564, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_4);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_6 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_6);
    index = 2; __pyx_t_4 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_5), 3) < 0) __PYX_ERR(0, 1564, __pyx_L1_error)
    __pyx_t_7 = NULL;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L5_unpacking_done;
    __pyx_L4_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 1564, __pyx_L1_error)
    __pyx_L5_unpacking_done:;
  }
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_cur_scope->__pyx_v_start = __pyx_t_2;
  __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_cur_scope->__pyx_v_stop = __pyx_t_6;
  __pyx_t_6 = 0;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_cur_scope->__pyx_v_step = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":1565
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 *         for i in range(start, stop, step):             # <<<<<<<<<<<<<<
 *             yield self._arr[i]
 * 
 */
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_start);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_start);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_v_start);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_stop);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_stop);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_cur_scope->__pyx_v_stop);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_step);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_step);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_cur_scope->__pyx_v_step);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1565, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1565, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1565, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1565, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 1565, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1565, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_8(__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_ERR(0, 1565, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_i);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_i, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;

    /* "km3pipe/dataclasses.pyx":1566
 *         start, stop, step = index.indices(len(self))
 *         for i in range(start, stop, step):
 *             yield self._arr[i]             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1566, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = PyObject_GetItem(__pyx_t_4, __pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1566, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __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_3;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_8;
    __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_t_8 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1566, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":1565
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 *         for i in range(start, stop, step):             # <<<<<<<<<<<<<<
 *             yield self._arr[i]
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "km3pipe/dataclasses.pyx":1562
 *             raise TypeError("index must be int or slice")
 * 
 *     def _slice_generator(self, index):             # <<<<<<<<<<<<<<
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 */

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("_slice_generator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1586
 *         Convert for storage.
 *     """
 *     def __new__(cls, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         obj = np.asarray(arr).view(cls)
 *         obj.h5loc = h5loc
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_8KM3Array_1__new__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_8KM3Array___new__[] = "KM3Array.__new__(cls, arr, h5loc='/')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_8KM3Array_1__new__ = {"__new__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_8KM3Array_1__new__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_8KM3Array___new__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_8KM3Array_1__new__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_arr,&__pyx_n_s_h5loc,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    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_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 3, 1); __PYX_ERR(0, 1586, __pyx_L3_error)
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__new__") < 0)) __PYX_ERR(0, 1586, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        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_cls = values[0];
    __pyx_v_arr = values[1];
    __pyx_v_h5loc = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1586, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3Array.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_8KM3Array___new__(__pyx_self, __pyx_v_cls, __pyx_v_arr, __pyx_v_h5loc);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_8KM3Array___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_arr, PyObject *__pyx_v_h5loc) {
  PyObject *__pyx_v_obj = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__195)
  __Pyx_RefNannySetupContext("__new__", 0);
  __Pyx_TraceCall("__new__", __pyx_f[0], 1586, 0, __PYX_ERR(0, 1586, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1587
 *     """
 *     def __new__(cls, arr, h5loc='/'):
 *         obj = np.asarray(arr).view(cls)             # <<<<<<<<<<<<<<
 *         obj.h5loc = h5loc
 *         return obj
 */
  __Pyx_TraceLine(1587,0,__PYX_ERR(0, 1587, __pyx_L1_error))
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_arr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1587, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_arr};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1587, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_arr};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1587, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1587, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_INCREF(__pyx_v_arr);
      __Pyx_GIVEREF(__pyx_v_arr);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_arr);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1587, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_view); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_cls); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1587, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_cls};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1587, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_cls};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1587, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1587, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_INCREF(__pyx_v_cls);
      __Pyx_GIVEREF(__pyx_v_cls);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_cls);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1587, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_obj = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":1588
 *     def __new__(cls, arr, h5loc='/'):
 *         obj = np.asarray(arr).view(cls)
 *         obj.h5loc = h5loc             # <<<<<<<<<<<<<<
 *         return obj
 * 
 */
  __Pyx_TraceLine(1588,0,__PYX_ERR(0, 1588, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_obj, __pyx_n_s_h5loc, __pyx_v_h5loc) < 0) __PYX_ERR(0, 1588, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1589
 *         obj = np.asarray(arr).view(cls)
 *         obj.h5loc = h5loc
 *         return obj             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, arr, h5loc='/'):
 */
  __Pyx_TraceLine(1589,0,__PYX_ERR(0, 1589, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_obj);
  __pyx_r = __pyx_v_obj;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1586
 *         Convert for storage.
 *     """
 *     def __new__(cls, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         obj = np.asarray(arr).view(cls)
 *         obj.h5loc = h5loc
 */

  /* 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_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3Array.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_obj);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1591
 *         return obj
 * 
 *     def __init__(self, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self.array = arr
 *         self.h5loc = h5loc
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_8KM3Array_3__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_8KM3Array_2__init__[] = "KM3Array.__init__(self, arr, h5loc='/')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_8KM3Array_3__init__ = {"__init__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_8KM3Array_3__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_8KM3Array_2__init__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_8KM3Array_3__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_arr,&__pyx_n_s_h5loc,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); __PYX_ERR(0, 1591, __pyx_L3_error)
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1591, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        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_arr = values[1];
    __pyx_v_h5loc = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1591, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3Array.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_8KM3Array_2__init__(__pyx_self, __pyx_v_self, __pyx_v_arr, __pyx_v_h5loc);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_8KM3Array_2__init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_h5loc) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__196)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 1591, 0, __PYX_ERR(0, 1591, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1592
 * 
 *     def __init__(self, arr, h5loc='/'):
 *         self.array = arr             # <<<<<<<<<<<<<<
 *         self.h5loc = h5loc
 * 
 */
  __Pyx_TraceLine(1592,0,__PYX_ERR(0, 1592, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_array, __pyx_v_arr) < 0) __PYX_ERR(0, 1592, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1593
 *     def __init__(self, arr, h5loc='/'):
 *         self.array = arr
 *         self.h5loc = h5loc             # <<<<<<<<<<<<<<
 * 
 *     def __array_finalize__(self, obj):
 */
  __Pyx_TraceLine(1593,0,__PYX_ERR(0, 1593, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_h5loc, __pyx_v_h5loc) < 0) __PYX_ERR(0, 1593, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1591
 *         return obj
 * 
 *     def __init__(self, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self.array = arr
 *         self.h5loc = h5loc
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3Array.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1595
 *         self.h5loc = h5loc
 * 
 *     def __array_finalize__(self, obj):             # <<<<<<<<<<<<<<
 *         if obj is None:
 *             return
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_8KM3Array_5__array_finalize__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_8KM3Array_4__array_finalize__[] = "KM3Array.__array_finalize__(self, obj)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_8KM3Array_5__array_finalize__ = {"__array_finalize__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_8KM3Array_5__array_finalize__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_8KM3Array_4__array_finalize__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_8KM3Array_5__array_finalize__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__array_finalize__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_obj,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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__array_finalize__", 1, 2, 2, 1); __PYX_ERR(0, 1595, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__array_finalize__") < 0)) __PYX_ERR(0, 1595, __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_self = values[0];
    __pyx_v_obj = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__array_finalize__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1595, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3Array.__array_finalize__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_8KM3Array_4__array_finalize__(__pyx_self, __pyx_v_self, __pyx_v_obj);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_8KM3Array_4__array_finalize__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__197)
  __Pyx_RefNannySetupContext("__array_finalize__", 0);
  __Pyx_TraceCall("__array_finalize__", __pyx_f[0], 1595, 0, __PYX_ERR(0, 1595, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1596
 * 
 *     def __array_finalize__(self, obj):
 *         if obj is None:             # <<<<<<<<<<<<<<
 *             return
 *         self.h5loc = getattr(obj, 'h5loc', None)
 */
  __Pyx_TraceLine(1596,0,__PYX_ERR(0, 1596, __pyx_L1_error))
  __pyx_t_1 = (__pyx_v_obj == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "km3pipe/dataclasses.pyx":1597
 *     def __array_finalize__(self, obj):
 *         if obj is None:
 *             return             # <<<<<<<<<<<<<<
 *         self.h5loc = getattr(obj, 'h5loc', None)
 * 
 */
    __Pyx_TraceLine(1597,0,__PYX_ERR(0, 1597, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1596
 * 
 *     def __array_finalize__(self, obj):
 *         if obj is None:             # <<<<<<<<<<<<<<
 *             return
 *         self.h5loc = getattr(obj, 'h5loc', None)
 */
  }

  /* "km3pipe/dataclasses.pyx":1598
 *         if obj is None:
 *             return
 *         self.h5loc = getattr(obj, 'h5loc', None)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1598,0,__PYX_ERR(0, 1598, __pyx_L1_error))
  __pyx_t_3 = __Pyx_GetAttr3(__pyx_v_obj, __pyx_n_s_h5loc, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_h5loc, __pyx_t_3) < 0) __PYX_ERR(0, 1598, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":1595
 *         self.h5loc = h5loc
 * 
 *     def __array_finalize__(self, obj):             # <<<<<<<<<<<<<<
 *         if obj is None:
 *             return
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3Array.__array_finalize__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1601
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_8KM3Array_7deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_8KM3Array_6deserialise[] = "KM3Array.deserialise(cls, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_8KM3Array_7deserialise = {"deserialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_8KM3Array_7deserialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_8KM3Array_6deserialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_8KM3Array_7deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("deserialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,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_cls)) != 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, __pyx_v_kwargs, values, used_pos_args, "deserialise") < 0)) __PYX_ERR(0, 1601, __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_cls = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("deserialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1601, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3Array.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_8KM3Array_6deserialise(__pyx_self, __pyx_v_cls, __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_7km3pipe_11dataclasses_8KM3Array_6deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__198)
  __Pyx_RefNannySetupContext("deserialise", 0);
  __Pyx_TraceCall("deserialise", __pyx_f[0], 1601, 0, __PYX_ERR(0, 1601, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1602
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def serialise(self, *args, **kwargs):
 */
  __Pyx_TraceLine(1602,0,__PYX_ERR(0, 1602, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_conv_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1601
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3Array.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1604
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_8KM3Array_9serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_8KM3Array_8serialise[] = "KM3Array.serialise(self, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_8KM3Array_9serialise = {"serialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_8KM3Array_9serialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_8KM3Array_8serialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_8KM3Array_9serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,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_self)) != 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, __pyx_v_kwargs, values, used_pos_args, "serialise") < 0)) __PYX_ERR(0, 1604, __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_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1604, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3Array.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_8KM3Array_8serialise(__pyx_self, __pyx_v_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_7km3pipe_11dataclasses_8KM3Array_8serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__199)
  __Pyx_RefNannySetupContext("serialise", 0);
  __Pyx_TraceCall("serialise", __pyx_f[0], 1604, 0, __PYX_ERR(0, 1604, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1605
 * 
 *     def serialise(self, *args, **kwargs):
 *         return self.conv_to(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1605,0,__PYX_ERR(0, 1605, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1604
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3Array.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1608
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, h5loc='/', fmt='numpy', **kwargs):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             arr = cls(data, h5loc, **kwargs)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_8KM3Array_11conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_8KM3Array_10conv_from[] = "KM3Array.conv_from(cls, data, event_id=None, h5loc='/', fmt='numpy', **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_8KM3Array_11conv_from = {"conv_from", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_8KM3Array_11conv_from, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_8KM3Array_10conv_from};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_8KM3Array_11conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_data = 0;
  CYTHON_UNUSED PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_v_fmt = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_from (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_data,&__pyx_n_s_event_id,&__pyx_n_s_h5loc,&__pyx_n_s_fmt,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    values[4] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    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_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 2, 5, 1); __PYX_ERR(0, 1608, __pyx_L3_error)
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fmt);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "conv_from") < 0)) __PYX_ERR(0, 1608, __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);
        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_cls = values[0];
    __pyx_v_data = values[1];
    __pyx_v_event_id = values[2];
    __pyx_v_h5loc = values[3];
    __pyx_v_fmt = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_from", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1608, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3Array.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_8KM3Array_10conv_from(__pyx_self, __pyx_v_cls, __pyx_v_data, __pyx_v_event_id, __pyx_v_h5loc, __pyx_v_fmt, __pyx_v_kwargs);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_8KM3Array_10conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_event_id, PyObject *__pyx_v_h5loc, PyObject *__pyx_v_fmt, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_arr = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__200)
  __Pyx_RefNannySetupContext("conv_from", 0);
  __Pyx_TraceCall("conv_from", __pyx_f[0], 1608, 0, __PYX_ERR(0, 1608, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1609
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, h5loc='/', fmt='numpy', **kwargs):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             arr = cls(data, h5loc, **kwargs)
 *             return arr
 */
  __Pyx_TraceLine(1609,0,__PYX_ERR(0, 1609, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_fmt, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1609, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1610
 *     def conv_from(cls, data, event_id=None, h5loc='/', fmt='numpy', **kwargs):
 *         if fmt == 'numpy':
 *             arr = cls(data, h5loc, **kwargs)             # <<<<<<<<<<<<<<
 *             return arr
 * 
 */
    __Pyx_TraceLine(1610,0,__PYX_ERR(0, 1610, __pyx_L1_error))
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_data);
    __Pyx_GIVEREF(__pyx_v_data);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_data);
    __Pyx_INCREF(__pyx_v_h5loc);
    __Pyx_GIVEREF(__pyx_v_h5loc);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_h5loc);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_cls, __pyx_t_2, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_arr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "km3pipe/dataclasses.pyx":1611
 *         if fmt == 'numpy':
 *             arr = cls(data, h5loc, **kwargs)
 *             return arr             # <<<<<<<<<<<<<<
 * 
 *     def conv_to(self, to='numpy', **kwargs):
 */
    __Pyx_TraceLine(1611,0,__PYX_ERR(0, 1611, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_arr);
    __pyx_r = __pyx_v_arr;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1609
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, h5loc='/', fmt='numpy', **kwargs):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             arr = cls(data, h5loc, **kwargs)
 *             return arr
 */
  }

  /* "km3pipe/dataclasses.pyx":1608
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, h5loc='/', fmt='numpy', **kwargs):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             arr = cls(data, h5loc, **kwargs)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3Array.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1613
 *             return arr
 * 
 *     def conv_to(self, to='numpy', **kwargs):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_8KM3Array_13conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_8KM3Array_12conv_to[] = "KM3Array.conv_to(self, to='numpy', **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_8KM3Array_13conv_to = {"conv_to", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_8KM3Array_13conv_to, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_8KM3Array_12conv_to};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_8KM3Array_13conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_to = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_to (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_to,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_to);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "conv_to") < 0)) __PYX_ERR(0, 1613, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        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_self = values[0];
    __pyx_v_to = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_to", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1613, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3Array.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_8KM3Array_12conv_to(__pyx_self, __pyx_v_self, __pyx_v_to, __pyx_v_kwargs);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_8KM3Array_12conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  __Pyx_TraceFrameInit(__pyx_codeobj__201)
  __Pyx_RefNannySetupContext("conv_to", 0);
  __Pyx_TraceCall("conv_to", __pyx_f[0], 1613, 0, __PYX_ERR(0, 1613, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1614
 * 
 *     def conv_to(self, to='numpy', **kwargs):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return self
 *         if to == 'pandas':
 */
  __Pyx_TraceLine(1614,0,__PYX_ERR(0, 1614, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1614, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1615
 *     def conv_to(self, to='numpy', **kwargs):
 *         if to == 'numpy':
 *             return self             # <<<<<<<<<<<<<<
 *         if to == 'pandas':
 *             return KM3DataFrame.conv_from(self, fmt='numpy', **kwargs)
 */
    __Pyx_TraceLine(1615,0,__PYX_ERR(0, 1615, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1614
 * 
 *     def conv_to(self, to='numpy', **kwargs):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return self
 *         if to == 'pandas':
 */
  }

  /* "km3pipe/dataclasses.pyx":1616
 *         if to == 'numpy':
 *             return self
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame.conv_from(self, fmt='numpy', **kwargs)
 * 
 */
  __Pyx_TraceLine(1616,0,__PYX_ERR(0, 1616, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_pandas, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1616, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1617
 *             return self
 *         if to == 'pandas':
 *             return KM3DataFrame.conv_from(self, fmt='numpy', **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
    __Pyx_TraceLine(1617,0,__PYX_ERR(0, 1617, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3DataFrame); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1617, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_conv_from); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1617, __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_ERR(0, 1617, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
    __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1617, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_fmt, __pyx_n_s_numpy) < 0) __PYX_ERR(0, 1617, __pyx_L1_error)
    __pyx_t_4 = __pyx_t_5;
    __pyx_t_5 = 0;
    if (__Pyx_MergeKeywords(__pyx_t_4, __pyx_v_kwargs) < 0) __PYX_ERR(0, 1617, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1617, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1616
 *         if to == 'numpy':
 *             return self
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame.conv_from(self, fmt='numpy', **kwargs)
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":1613
 *             return arr
 * 
 *     def conv_to(self, to='numpy', **kwargs):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3Array.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1620
 * 
 *     @classmethod
 *     def from_dict(cls, map, dtype=None, **kwargs):             # <<<<<<<<<<<<<<
 *         if dtype is None:
 *             dtype = np.dtype([(key, float) for key in sorted(map.keys())])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_8KM3Array_15from_dict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_8KM3Array_14from_dict[] = "KM3Array.from_dict(cls, map, dtype=None, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_8KM3Array_15from_dict = {"from_dict", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_8KM3Array_15from_dict, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_8KM3Array_14from_dict};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_8KM3Array_15from_dict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_map = 0;
  PyObject *__pyx_v_dtype = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_dict (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_map,&__pyx_n_s_dtype,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)((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  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_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_map)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_dict", 0, 2, 3, 1); __PYX_ERR(0, 1620, __pyx_L3_error)
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dtype);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "from_dict") < 0)) __PYX_ERR(0, 1620, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        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_cls = values[0];
    __pyx_v_map = values[1];
    __pyx_v_dtype = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_dict", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1620, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3Array.from_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_8KM3Array_14from_dict(__pyx_self, __pyx_v_cls, __pyx_v_map, __pyx_v_dtype, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_7km3pipe_11dataclasses_8KM3Array_9from_dict_2generator5(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "km3pipe/dataclasses.pyx":1623
 *         if dtype is None:
 *             dtype = np.dtype([(key, float) for key in sorted(map.keys())])
 *         return cls(np.array([tuple((map[key] for key in dtype.names))],             # <<<<<<<<<<<<<<
 *                             dtype=dtype), **kwargs)
 * 
 */

static PyObject *__pyx_pf_7km3pipe_11dataclasses_8KM3Array_9from_dict_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr *)__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr(__pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1623, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 1623, 0, __PYX_ERR(0, 1623, __pyx_L1_error));
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7km3pipe_11dataclasses_8KM3Array_9from_dict_2generator5, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_KM3Array_from_dict_locals_genexp, __pyx_n_s_km3pipe_dataclasses); if (unlikely(!gen)) __PYX_ERR(0, 1623, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3Array.from_dict.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_7km3pipe_11dataclasses_8KM3Array_9from_dict_2generator5(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr *__pyx_cur_scope = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  __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_ERR(0, 1623, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dtype)) { __Pyx_RaiseClosureNameError("dtype"); __PYX_ERR(0, 1623, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dtype, __pyx_n_s_names); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1623, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1623, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1623, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1623, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1623, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1623, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      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_ERR(0, 1623, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_map)) { __Pyx_RaiseClosureNameError("map"); __PYX_ERR(0, 1623, __pyx_L1_error) }
    __pyx_t_1 = PyObject_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_map, __pyx_cur_scope->__pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1623, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    __Pyx_XGIVEREF(__pyx_t_2);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_3;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_4;
    __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_2 = __pyx_cur_scope->__pyx_t_0;
    __pyx_cur_scope->__pyx_t_0 = 0;
    __Pyx_XGOTREF(__pyx_t_2);
    __pyx_t_3 = __pyx_cur_scope->__pyx_t_1;
    __pyx_t_4 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1623, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1620
 * 
 *     @classmethod
 *     def from_dict(cls, map, dtype=None, **kwargs):             # <<<<<<<<<<<<<<
 *         if dtype is None:
 *             dtype = np.dtype([(key, float) for key in sorted(map.keys())])
 */

static PyObject *__pyx_pf_7km3pipe_11dataclasses_8KM3Array_14from_dict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_map, PyObject *__pyx_v_dtype, PyObject *__pyx_v_kwargs) {
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict *__pyx_cur_scope;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  __Pyx_TraceFrameInit(__pyx_codeobj__202)
  __Pyx_RefNannySetupContext("from_dict", 0);
  __pyx_cur_scope = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict *)__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict(__pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1620, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("from_dict", __pyx_f[0], 1620, 0, __PYX_ERR(0, 1620, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_map = __pyx_v_map;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_map);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_map);
  __pyx_cur_scope->__pyx_v_dtype = __pyx_v_dtype;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dtype);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_dtype);

  /* "km3pipe/dataclasses.pyx":1621
 *     @classmethod
 *     def from_dict(cls, map, dtype=None, **kwargs):
 *         if dtype is None:             # <<<<<<<<<<<<<<
 *             dtype = np.dtype([(key, float) for key in sorted(map.keys())])
 *         return cls(np.array([tuple((map[key] for key in dtype.names))],
 */
  __Pyx_TraceLine(1621,0,__PYX_ERR(0, 1621, __pyx_L1_error))
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v_dtype == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "km3pipe/dataclasses.pyx":1622
 *     def from_dict(cls, map, dtype=None, **kwargs):
 *         if dtype is None:
 *             dtype = np.dtype([(key, float) for key in sorted(map.keys())])             # <<<<<<<<<<<<<<
 *         return cls(np.array([tuple((map[key] for key in dtype.names))],
 *                             dtype=dtype), **kwargs)
 */
    __Pyx_TraceLine(1622,0,__PYX_ERR(0, 1622, __pyx_L1_error))
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_map, __pyx_n_s_keys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (__pyx_t_7) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1622, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else {
      __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1622, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PySequence_List(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_4 = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_8 = PyList_Sort(__pyx_t_4); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 1622, __pyx_L1_error)
    if (unlikely(__pyx_t_4 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(0, 1622, __pyx_L1_error)
    }
    __pyx_t_6 = __pyx_t_4; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    for (;;) {
      if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_6)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 1622, __pyx_L1_error)
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1622, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1622, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_key);
      __Pyx_INCREF(((PyObject *)(&PyFloat_Type)));
      __Pyx_GIVEREF(((PyObject *)(&PyFloat_Type)));
      PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)(&PyFloat_Type)));
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 1622, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_dtype), __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_dtype);
    __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_dtype, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;

    /* "km3pipe/dataclasses.pyx":1621
 *     @classmethod
 *     def from_dict(cls, map, dtype=None, **kwargs):
 *         if dtype is None:             # <<<<<<<<<<<<<<
 *             dtype = np.dtype([(key, float) for key in sorted(map.keys())])
 *         return cls(np.array([tuple((map[key] for key in dtype.names))],
 */
  }

  /* "km3pipe/dataclasses.pyx":1623
 *         if dtype is None:
 *             dtype = np.dtype([(key, float) for key in sorted(map.keys())])
 *         return cls(np.array([tuple((map[key] for key in dtype.names))],             # <<<<<<<<<<<<<<
 *                             dtype=dtype), **kwargs)
 * 
 */
  __Pyx_TraceLine(1623,0,__PYX_ERR(0, 1623, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __pyx_pf_7km3pipe_11dataclasses_8KM3Array_9from_dict_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":1624
 *             dtype = np.dtype([(key, float) for key in sorted(map.keys())])
 *         return cls(np.array([tuple((map[key] for key in dtype.names))],
 *                             dtype=dtype), **kwargs)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(1624,0,__PYX_ERR(0, 1624, __pyx_L1_error))
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_cur_scope->__pyx_v_dtype) < 0) __PYX_ERR(0, 1624, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1623
 *         if dtype is None:
 *             dtype = np.dtype([(key, float) for key in sorted(map.keys())])
 *         return cls(np.array([tuple((map[key] for key in dtype.names))],             # <<<<<<<<<<<<<<
 *                             dtype=dtype), **kwargs)
 * 
 */
  __Pyx_TraceLine(1623,0,__PYX_ERR(0, 1623, __pyx_L1_error))
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1623, __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_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":1624
 *             dtype = np.dtype([(key, float) for key in sorted(map.keys())])
 *         return cls(np.array([tuple((map[key] for key in dtype.names))],
 *                             dtype=dtype), **kwargs)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(1624,0,__PYX_ERR(0, 1624, __pyx_L1_error))
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_cls, __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1620
 * 
 *     @classmethod
 *     def from_dict(cls, map, dtype=None, **kwargs):             # <<<<<<<<<<<<<<
 *         if dtype is None:
 *             dtype = np.dtype([(key, float) for key in sorted(map.keys())])
 */

  /* function exit code */
  __pyx_L1_error:;
  __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_AddTraceback("km3pipe.dataclasses.KM3Array.from_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1654
 * 
 *     @property
 *     def _constructor(self):             # <<<<<<<<<<<<<<
 *         return KM3DataFrame
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12KM3DataFrame_1_constructor(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12KM3DataFrame__constructor[] = "KM3DataFrame._constructor(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12KM3DataFrame_1_constructor = {"_constructor", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12KM3DataFrame_1_constructor, METH_O, __pyx_doc_7km3pipe_11dataclasses_12KM3DataFrame__constructor};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12KM3DataFrame_1_constructor(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_constructor (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12KM3DataFrame__constructor(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12KM3DataFrame__constructor(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__203)
  __Pyx_RefNannySetupContext("_constructor", 0);
  __Pyx_TraceCall("_constructor", __pyx_f[0], 1654, 0, __PYX_ERR(0, 1654, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1655
 *     @property
 *     def _constructor(self):
 *         return KM3DataFrame             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, *args, **kwargs):
 */
  __Pyx_TraceLine(1655,0,__PYX_ERR(0, 1655, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3DataFrame); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1654
 * 
 *     @property
 *     def _constructor(self):             # <<<<<<<<<<<<<<
 *         return KM3DataFrame
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3DataFrame._constructor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1657
 *         return KM3DataFrame
 * 
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         h5loc = kwargs.pop('h5loc', '/')
 *         super(KM3DataFrame, self).__init__(*args, **kwargs)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12KM3DataFrame_3__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12KM3DataFrame_2__init__[] = "KM3DataFrame.__init__(self, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12KM3DataFrame_3__init__ = {"__init__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12KM3DataFrame_3__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_12KM3DataFrame_2__init__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12KM3DataFrame_3__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,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_self)) != 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, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(0, 1657, __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_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1657, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3DataFrame.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12KM3DataFrame_2__init__(__pyx_self, __pyx_v_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_7km3pipe_11dataclasses_12KM3DataFrame_2__init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_h5loc = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__204)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 1657, 0, __PYX_ERR(0, 1657, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1658
 * 
 *     def __init__(self, *args, **kwargs):
 *         h5loc = kwargs.pop('h5loc', '/')             # <<<<<<<<<<<<<<
 *         super(KM3DataFrame, self).__init__(*args, **kwargs)
 *         self.h5loc = h5loc
 */
  __Pyx_TraceLine(1658,0,__PYX_ERR(0, 1658, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_kwargs, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__205, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_h5loc = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":1659
 *     def __init__(self, *args, **kwargs):
 *         h5loc = kwargs.pop('h5loc', '/')
 *         super(KM3DataFrame, self).__init__(*args, **kwargs)             # <<<<<<<<<<<<<<
 *         self.h5loc = h5loc
 * 
 */
  __Pyx_TraceLine(1659,0,__PYX_ERR(0, 1659, __pyx_L1_error))
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3DataFrame); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":1660
 *         h5loc = kwargs.pop('h5loc', '/')
 *         super(KM3DataFrame, self).__init__(*args, **kwargs)
 *         self.h5loc = h5loc             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1660,0,__PYX_ERR(0, 1660, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_h5loc, __pyx_v_h5loc) < 0) __PYX_ERR(0, 1660, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1657
 *         return KM3DataFrame
 * 
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         h5loc = kwargs.pop('h5loc', '/')
 *         super(KM3DataFrame, self).__init__(*args, **kwargs)
 */

  /* 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_AddTraceback("km3pipe.dataclasses.KM3DataFrame.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_h5loc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1663
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12KM3DataFrame_5deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12KM3DataFrame_4deserialise[] = "KM3DataFrame.deserialise(cls, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12KM3DataFrame_5deserialise = {"deserialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12KM3DataFrame_5deserialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_12KM3DataFrame_4deserialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12KM3DataFrame_5deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("deserialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,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_cls)) != 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, __pyx_v_kwargs, values, used_pos_args, "deserialise") < 0)) __PYX_ERR(0, 1663, __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_cls = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("deserialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1663, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3DataFrame.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12KM3DataFrame_4deserialise(__pyx_self, __pyx_v_cls, __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_7km3pipe_11dataclasses_12KM3DataFrame_4deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__206)
  __Pyx_RefNannySetupContext("deserialise", 0);
  __Pyx_TraceCall("deserialise", __pyx_f[0], 1663, 0, __PYX_ERR(0, 1663, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1664
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def serialise(self, *args, **kwargs):
 */
  __Pyx_TraceLine(1664,0,__PYX_ERR(0, 1664, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_conv_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1663
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3DataFrame.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1666
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12KM3DataFrame_7serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12KM3DataFrame_6serialise[] = "KM3DataFrame.serialise(self, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12KM3DataFrame_7serialise = {"serialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12KM3DataFrame_7serialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_12KM3DataFrame_6serialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12KM3DataFrame_7serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,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_self)) != 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, __pyx_v_kwargs, values, used_pos_args, "serialise") < 0)) __PYX_ERR(0, 1666, __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_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1666, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3DataFrame.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12KM3DataFrame_6serialise(__pyx_self, __pyx_v_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_7km3pipe_11dataclasses_12KM3DataFrame_6serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__207)
  __Pyx_RefNannySetupContext("serialise", 0);
  __Pyx_TraceCall("serialise", __pyx_f[0], 1666, 0, __PYX_ERR(0, 1666, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1667
 * 
 *     def serialise(self, *args, **kwargs):
 *         return self.conv_to(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1667,0,__PYX_ERR(0, 1667, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1666
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3DataFrame.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1670
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, h5loc='/', fmt='pandas', **kwargs):             # <<<<<<<<<<<<<<
 *         if fmt in {'numpy', 'pandas'}:
 *             return cls(data, h5loc=h5loc, **kwargs)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12KM3DataFrame_9conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12KM3DataFrame_8conv_from[] = "KM3DataFrame.conv_from(cls, data, event_id=None, h5loc='/', fmt='pandas', **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12KM3DataFrame_9conv_from = {"conv_from", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12KM3DataFrame_9conv_from, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_12KM3DataFrame_8conv_from};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12KM3DataFrame_9conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_data = 0;
  CYTHON_UNUSED PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_v_fmt = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_from (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_data,&__pyx_n_s_event_id,&__pyx_n_s_h5loc,&__pyx_n_s_fmt,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    values[4] = ((PyObject *)((PyObject*)__pyx_n_s_pandas));
    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_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 2, 5, 1); __PYX_ERR(0, 1670, __pyx_L3_error)
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fmt);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "conv_from") < 0)) __PYX_ERR(0, 1670, __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);
        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_cls = values[0];
    __pyx_v_data = values[1];
    __pyx_v_event_id = values[2];
    __pyx_v_h5loc = values[3];
    __pyx_v_fmt = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_from", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1670, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3DataFrame.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12KM3DataFrame_8conv_from(__pyx_self, __pyx_v_cls, __pyx_v_data, __pyx_v_event_id, __pyx_v_h5loc, __pyx_v_fmt, __pyx_v_kwargs);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12KM3DataFrame_8conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_event_id, PyObject *__pyx_v_h5loc, PyObject *__pyx_v_fmt, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__208)
  __Pyx_RefNannySetupContext("conv_from", 0);
  __Pyx_TraceCall("conv_from", __pyx_f[0], 1670, 0, __PYX_ERR(0, 1670, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1671
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, h5loc='/', fmt='pandas', **kwargs):
 *         if fmt in {'numpy', 'pandas'}:             # <<<<<<<<<<<<<<
 *             return cls(data, h5loc=h5loc, **kwargs)
 *         if fmt == 'dict':
 */
  __Pyx_TraceLine(1671,0,__PYX_ERR(0, 1671, __pyx_L1_error))
  __Pyx_INCREF(__pyx_v_fmt);
  __pyx_t_1 = __pyx_v_fmt;
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1671, __pyx_L1_error)
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_pandas, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1671, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "km3pipe/dataclasses.pyx":1672
 *     def conv_from(cls, data, event_id=None, h5loc='/', fmt='pandas', **kwargs):
 *         if fmt in {'numpy', 'pandas'}:
 *             return cls(data, h5loc=h5loc, **kwargs)             # <<<<<<<<<<<<<<
 *         if fmt == 'dict':
 *             return cls(data, index=[0], h5loc=h5loc, **kwargs)
 */
    __Pyx_TraceLine(1672,0,__PYX_ERR(0, 1672, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_data);
    __Pyx_GIVEREF(__pyx_v_data);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_data);
    __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_h5loc, __pyx_v_h5loc) < 0) __PYX_ERR(0, 1672, __pyx_L1_error)
    __pyx_t_4 = __pyx_t_5;
    __pyx_t_5 = 0;
    if (__Pyx_MergeKeywords(__pyx_t_4, __pyx_v_kwargs) < 0) __PYX_ERR(0, 1672, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_cls, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1671
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, h5loc='/', fmt='pandas', **kwargs):
 *         if fmt in {'numpy', 'pandas'}:             # <<<<<<<<<<<<<<
 *             return cls(data, h5loc=h5loc, **kwargs)
 *         if fmt == 'dict':
 */
  }

  /* "km3pipe/dataclasses.pyx":1673
 *         if fmt in {'numpy', 'pandas'}:
 *             return cls(data, h5loc=h5loc, **kwargs)
 *         if fmt == 'dict':             # <<<<<<<<<<<<<<
 *             return cls(data, index=[0], h5loc=h5loc, **kwargs)
 * 
 */
  __Pyx_TraceLine(1673,0,__PYX_ERR(0, 1673, __pyx_L1_error))
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_fmt, __pyx_n_s_dict, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1673, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "km3pipe/dataclasses.pyx":1674
 *             return cls(data, h5loc=h5loc, **kwargs)
 *         if fmt == 'dict':
 *             return cls(data, index=[0], h5loc=h5loc, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def conv_to(self, to='numpy', **kwargs):
 */
    __Pyx_TraceLine(1674,0,__PYX_ERR(0, 1674, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1674, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_data);
    __Pyx_GIVEREF(__pyx_v_data);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_data);
    __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1674, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1674, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyList_SET_ITEM(__pyx_t_6, 0, __pyx_int_0);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_index_2, __pyx_t_6) < 0) __PYX_ERR(0, 1674, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_h5loc, __pyx_v_h5loc) < 0) __PYX_ERR(0, 1674, __pyx_L1_error)
    __pyx_t_4 = __pyx_t_1;
    __pyx_t_1 = 0;
    if (__Pyx_MergeKeywords(__pyx_t_4, __pyx_v_kwargs) < 0) __PYX_ERR(0, 1674, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_cls, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1674, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1673
 *         if fmt in {'numpy', 'pandas'}:
 *             return cls(data, h5loc=h5loc, **kwargs)
 *         if fmt == 'dict':             # <<<<<<<<<<<<<<
 *             return cls(data, index=[0], h5loc=h5loc, **kwargs)
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":1670
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, h5loc='/', fmt='pandas', **kwargs):             # <<<<<<<<<<<<<<
 *         if fmt in {'numpy', 'pandas'}:
 *             return cls(data, h5loc=h5loc, **kwargs)
 */

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3DataFrame.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1676
 *             return cls(data, index=[0], h5loc=h5loc, **kwargs)
 * 
 *     def conv_to(self, to='numpy', **kwargs):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(self.to_records(index=False), h5loc=self.h5loc,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12KM3DataFrame_11conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12KM3DataFrame_10conv_to[] = "KM3DataFrame.conv_to(self, to='numpy', **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12KM3DataFrame_11conv_to = {"conv_to", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12KM3DataFrame_11conv_to, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_12KM3DataFrame_10conv_to};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12KM3DataFrame_11conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_to = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_to (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_to,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_to);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "conv_to") < 0)) __PYX_ERR(0, 1676, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        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_self = values[0];
    __pyx_v_to = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_to", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1676, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3DataFrame.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12KM3DataFrame_10conv_to(__pyx_self, __pyx_v_self, __pyx_v_to, __pyx_v_kwargs);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12KM3DataFrame_10conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  __Pyx_TraceFrameInit(__pyx_codeobj__209)
  __Pyx_RefNannySetupContext("conv_to", 0);
  __Pyx_TraceCall("conv_to", __pyx_f[0], 1676, 0, __PYX_ERR(0, 1676, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1677
 * 
 *     def conv_to(self, to='numpy', **kwargs):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return KM3Array(self.to_records(index=False), h5loc=self.h5loc,
 *                             **kwargs)
 */
  __Pyx_TraceLine(1677,0,__PYX_ERR(0, 1677, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1677, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1678
 *     def conv_to(self, to='numpy', **kwargs):
 *         if to == 'numpy':
 *             return KM3Array(self.to_records(index=False), h5loc=self.h5loc,             # <<<<<<<<<<<<<<
 *                             **kwargs)
 *         if to == 'pandas':
 */
    __Pyx_TraceLine(1678,0,__PYX_ERR(0, 1678, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3Array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1678, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_to_records); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1678, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1678, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_index_2, Py_False) < 0) __PYX_ERR(0, 1678, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1678, __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_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1678, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1678, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_h5loc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1678, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_h5loc, __pyx_t_6) < 0) __PYX_ERR(0, 1678, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "km3pipe/dataclasses.pyx":1679
 *         if to == 'numpy':
 *             return KM3Array(self.to_records(index=False), h5loc=self.h5loc,
 *                             **kwargs)             # <<<<<<<<<<<<<<
 *         if to == 'pandas':
 *             return self
 */
    __Pyx_TraceLine(1679,0,__PYX_ERR(0, 1679, __pyx_L1_error))
    if (__Pyx_MergeKeywords(__pyx_t_5, __pyx_v_kwargs) < 0) __PYX_ERR(0, 1679, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":1678
 *     def conv_to(self, to='numpy', **kwargs):
 *         if to == 'numpy':
 *             return KM3Array(self.to_records(index=False), h5loc=self.h5loc,             # <<<<<<<<<<<<<<
 *                             **kwargs)
 *         if to == 'pandas':
 */
    __Pyx_TraceLine(1678,0,__PYX_ERR(0, 1678, __pyx_L1_error))
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1678, __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_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1677
 * 
 *     def conv_to(self, to='numpy', **kwargs):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return KM3Array(self.to_records(index=False), h5loc=self.h5loc,
 *                             **kwargs)
 */
  }

  /* "km3pipe/dataclasses.pyx":1680
 *             return KM3Array(self.to_records(index=False), h5loc=self.h5loc,
 *                             **kwargs)
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return self
 * 
 */
  __Pyx_TraceLine(1680,0,__PYX_ERR(0, 1680, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_pandas, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1680, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1681
 *                             **kwargs)
 *         if to == 'pandas':
 *             return self             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_TraceLine(1681,0,__PYX_ERR(0, 1681, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1680
 *             return KM3Array(self.to_records(index=False), h5loc=self.h5loc,
 *                             **kwargs)
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return self
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":1676
 *             return cls(data, index=[0], h5loc=h5loc, **kwargs)
 * 
 *     def conv_to(self, to='numpy', **kwargs):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(self.to_records(index=False), h5loc=self.h5loc,
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3DataFrame.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1713
 *     _fields = ()
 * 
 *     def __init__(self, stream):             # <<<<<<<<<<<<<<
 *         data = Struct(self._structure).unpack_from(stream.read(self._size))
 *         for attr, value in zip(self._fields, data):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12BinaryStruct_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12BinaryStruct___init__[] = "BinaryStruct.__init__(self, stream)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12BinaryStruct_1__init__ = {"__init__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12BinaryStruct_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_12BinaryStruct___init__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12BinaryStruct_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_stream = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stream,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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stream)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 1713, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1713, __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_self = values[0];
    __pyx_v_stream = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1713, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.BinaryStruct.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12BinaryStruct___init__(__pyx_self, __pyx_v_self, __pyx_v_stream);

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12BinaryStruct___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream) {
  PyObject *__pyx_v_data = NULL;
  PyObject *__pyx_v_attr = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_t_11;
  __Pyx_TraceFrameInit(__pyx_codeobj__210)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 1713, 0, __PYX_ERR(0, 1713, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1714
 * 
 *     def __init__(self, stream):
 *         data = Struct(self._structure).unpack_from(stream.read(self._size))             # <<<<<<<<<<<<<<
 *         for attr, value in zip(self._fields, data):
 *             setattr(self, attr, value)
 */
  __Pyx_TraceLine(1714,0,__PYX_ERR(0, 1714, __pyx_L1_error))
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Struct); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_structure); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1714, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1714, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1714, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1714, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1714, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_unpack_from); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_stream, __pyx_n_s_read); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1714, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1714, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1714, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1714, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1714, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1714, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1714, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1714, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1714, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1714, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_data = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":1715
 *     def __init__(self, stream):
 *         data = Struct(self._structure).unpack_from(stream.read(self._size))
 *         for attr, value in zip(self._fields, data):             # <<<<<<<<<<<<<<
 *             setattr(self, attr, value)
 * 
 */
  __Pyx_TraceLine(1715,0,__PYX_ERR(0, 1715, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fields); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_data);
  __Pyx_GIVEREF(__pyx_v_data);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_data);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_8 = 0;
    __pyx_t_9 = NULL;
  } else {
    __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1715, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1715, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_9)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1715, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1715, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1715, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1715, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_9(__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_ERR(0, 1715, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      #if !CYTHON_COMPILING_IN_PYPY
      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_ERR(0, 1715, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_7 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_2);
      #else
      __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1715, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1715, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1715, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext;
      index = 0; __pyx_t_7 = __pyx_t_10(__pyx_t_6); if (unlikely(!__pyx_t_7)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      index = 1; __pyx_t_2 = __pyx_t_10(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_6), 2) < 0) __PYX_ERR(0, 1715, __pyx_L1_error)
      __pyx_t_10 = NULL;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_10 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 1715, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_attr, __pyx_t_7);
    __pyx_t_7 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "km3pipe/dataclasses.pyx":1716
 *         data = Struct(self._structure).unpack_from(stream.read(self._size))
 *         for attr, value in zip(self._fields, data):
 *             setattr(self, attr, value)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
    __Pyx_TraceLine(1716,0,__PYX_ERR(0, 1716, __pyx_L1_error))
    __pyx_t_11 = PyObject_SetAttr(__pyx_v_self, __pyx_v_attr, __pyx_v_value); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 1716, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":1715
 *     def __init__(self, stream):
 *         data = Struct(self._structure).unpack_from(stream.read(self._size))
 *         for attr, value in zip(self._fields, data):             # <<<<<<<<<<<<<<
 *             setattr(self, attr, value)
 * 
 */
    __Pyx_TraceLine(1715,0,__PYX_ERR(0, 1715, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":1713
 *     _fields = ()
 * 
 *     def __init__(self, stream):             # <<<<<<<<<<<<<<
 *         data = Struct(self._structure).unpack_from(stream.read(self._size))
 *         for attr, value in zip(self._fields, data):
 */

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.BinaryStruct.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_data);
  __Pyx_XDECREF(__pyx_v_attr);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1719
 * 
 *     @property
 *     def _size(self):             # <<<<<<<<<<<<<<
 *         return calcsize(self._structure)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12BinaryStruct_3_size(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12BinaryStruct_2_size[] = "BinaryStruct._size(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12BinaryStruct_3_size = {"_size", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12BinaryStruct_3_size, METH_O, __pyx_doc_7km3pipe_11dataclasses_12BinaryStruct_2_size};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12BinaryStruct_3_size(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_size (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12BinaryStruct_2_size(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12BinaryStruct_2_size(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__211)
  __Pyx_RefNannySetupContext("_size", 0);
  __Pyx_TraceCall("_size", __pyx_f[0], 1719, 0, __PYX_ERR(0, 1719, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1720
 *     @property
 *     def _size(self):
 *         return calcsize(self._structure)             # <<<<<<<<<<<<<<
 */
  __Pyx_TraceLine(1720,0,__PYX_ERR(0, 1720, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_calcsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_structure); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1720, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1720, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1720, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1720, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1720, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1719
 * 
 *     @property
 *     def _size(self):             # <<<<<<<<<<<<<<
 *         return calcsize(self._structure)
 */

  /* 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_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.BinaryStruct._size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":197
 *         # 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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  char *__pyx_t_7;
  __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);
  }
  __Pyx_TraceCall("__getbuffer__", __pyx_f[1], 197, 0, __PYX_ERR(1, 197, __pyx_L1_error));

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":203
 *             # of flags
 * 
 *             if info == NULL: return             # <<<<<<<<<<<<<<
 * 
 *             cdef int copy_shape, i, ndim
 */
  __Pyx_TraceLine(203,0,__PYX_ERR(1, 203, __pyx_L1_error))
  __pyx_t_1 = ((__pyx_v_info == NULL) != 0);
  if (__pyx_t_1) {
    __pyx_r = 0;
    goto __pyx_L0;
  }

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":206
 * 
 *             cdef int copy_shape, i, ndim
 *             cdef int endian_detector = 1             # <<<<<<<<<<<<<<
 *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
 * 
 */
  __Pyx_TraceLine(206,0,__PYX_ERR(1, 206, __pyx_L1_error))
  __pyx_v_endian_detector = 1;

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":207
 *             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_TraceLine(207,0,__PYX_ERR(1, 207, __pyx_L1_error))
  __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":209
 *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
 * 
 *             ndim = PyArray_NDIM(self)             # <<<<<<<<<<<<<<
 * 
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 */
  __Pyx_TraceLine(209,0,__PYX_ERR(1, 209, __pyx_L1_error))
  __pyx_v_ndim = PyArray_NDIM(__pyx_v_self);

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":211
 *             ndim = PyArray_NDIM(self)
 * 
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
 *                 copy_shape = 1
 *             else:
 */
  __Pyx_TraceLine(211,0,__PYX_ERR(1, 211, __pyx_L1_error))
  __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
  if (__pyx_t_1) {

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":212
 * 
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 *                 copy_shape = 1             # <<<<<<<<<<<<<<
 *             else:
 *                 copy_shape = 0
 */
    __Pyx_TraceLine(212,0,__PYX_ERR(1, 212, __pyx_L1_error))
    __pyx_v_copy_shape = 1;

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":211
 *             ndim = PyArray_NDIM(self)
 * 
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
 *                 copy_shape = 1
 *             else:
 */
    goto __pyx_L4;
  }

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":214
 *                 copy_shape = 1
 *             else:
 *                 copy_shape = 0             # <<<<<<<<<<<<<<
 * 
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 */
  __Pyx_TraceLine(214,0,__PYX_ERR(1, 214, __pyx_L1_error))
  /*else*/ {
    __pyx_v_copy_shape = 0;
  }
  __pyx_L4:;

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":216
 *                 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_TraceLine(216,0,__PYX_ERR(1, 216, __pyx_L1_error))
  __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":217
 * 
 *             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_TraceLine(217,0,__PYX_ERR(1, 217, __pyx_L1_error))
  __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_C_CONTIGUOUS) != 0)) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L6_bool_binop_done:;

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":216
 *                 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_TraceLine(216,0,__PYX_ERR(1, 216, __pyx_L1_error))
  if (__pyx_t_1) {

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":218
 *             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_TraceLine(218,0,__PYX_ERR(1, 218, __pyx_L1_error))
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__212, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 218, __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_ERR(1, 218, __pyx_L1_error)

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":216
 *                 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")
 */
  }

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":220
 *                 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_TraceLine(220,0,__PYX_ERR(1, 220, __pyx_L1_error))
  __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L9_bool_binop_done;
  }

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":221
 * 
 *             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_TraceLine(221,0,__PYX_ERR(1, 221, __pyx_L1_error))
  __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L9_bool_binop_done:;

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":220
 *                 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_TraceLine(220,0,__PYX_ERR(1, 220, __pyx_L1_error))
  if (__pyx_t_1) {

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":222
 *             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_TraceLine(222,0,__PYX_ERR(1, 222, __pyx_L1_error))
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__213, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 222, __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_ERR(1, 222, __pyx_L1_error)

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":220
 *                 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")
 */
  }

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":224
 *                 raise ValueError(u"ndarray is not Fortran contiguous")
 * 
 *             info.buf = PyArray_DATA(self)             # <<<<<<<<<<<<<<
 *             info.ndim = ndim
 *             if copy_shape:
 */
  __Pyx_TraceLine(224,0,__PYX_ERR(1, 224, __pyx_L1_error))
  __pyx_v_info->buf = PyArray_DATA(__pyx_v_self);

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":225
 * 
 *             info.buf = PyArray_DATA(self)
 *             info.ndim = ndim             # <<<<<<<<<<<<<<
 *             if copy_shape:
 *                 # Allocate new buffer for strides and shape info.
 */
  __Pyx_TraceLine(225,0,__PYX_ERR(1, 225, __pyx_L1_error))
  __pyx_v_info->ndim = __pyx_v_ndim;

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":226
 *             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_TraceLine(226,0,__PYX_ERR(1, 226, __pyx_L1_error))
  __pyx_t_1 = (__pyx_v_copy_shape != 0);
  if (__pyx_t_1) {

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":229
 *                 # 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_TraceLine(229,0,__PYX_ERR(1, 229, __pyx_L1_error))
    __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2)));

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":230
 *                 # 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_TraceLine(230,0,__PYX_ERR(1, 230, __pyx_L1_error))
    __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":231
 *                 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_TraceLine(231,0,__PYX_ERR(1, 231, __pyx_L1_error))
    __pyx_t_4 = __pyx_v_ndim;
    for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
      __pyx_v_i = __pyx_t_5;

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":232
 *                 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_TraceLine(232,0,__PYX_ERR(1, 232, __pyx_L1_error))
      (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]);

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":233
 *                 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_TraceLine(233,0,__PYX_ERR(1, 233, __pyx_L1_error))
      (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]);
    }

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":226
 *             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.
 */
    goto __pyx_L11;
  }

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":235
 *                     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_TraceLine(235,0,__PYX_ERR(1, 235, __pyx_L1_error))
  /*else*/ {
    __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self));

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":236
 *             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_TraceLine(236,0,__PYX_ERR(1, 236, __pyx_L1_error))
    __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self));
  }
  __pyx_L11:;

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":237
 *                 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_TraceLine(237,0,__PYX_ERR(1, 237, __pyx_L1_error))
  __pyx_v_info->suboffsets = NULL;

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":238
 *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
 *             info.suboffsets = NULL
 *             info.itemsize = PyArray_ITEMSIZE(self)             # <<<<<<<<<<<<<<
 *             info.readonly = not PyArray_ISWRITEABLE(self)
 * 
 */
  __Pyx_TraceLine(238,0,__PYX_ERR(1, 238, __pyx_L1_error))
  __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self);

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":239
 *             info.suboffsets = NULL
 *             info.itemsize = PyArray_ITEMSIZE(self)
 *             info.readonly = not PyArray_ISWRITEABLE(self)             # <<<<<<<<<<<<<<
 * 
 *             cdef int t
 */
  __Pyx_TraceLine(239,0,__PYX_ERR(1, 239, __pyx_L1_error))
  __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0));

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":242
 * 
 *             cdef int t
 *             cdef char* f = NULL             # <<<<<<<<<<<<<<
 *             cdef dtype descr = self.descr
 *             cdef int offset
 */
  __Pyx_TraceLine(242,0,__PYX_ERR(1, 242, __pyx_L1_error))
  __pyx_v_f = NULL;

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":243
 *             cdef int t
 *             cdef char* f = NULL
 *             cdef dtype descr = self.descr             # <<<<<<<<<<<<<<
 *             cdef int offset
 * 
 */
  __Pyx_TraceLine(243,0,__PYX_ERR(1, 243, __pyx_L1_error))
  __pyx_t_3 = ((PyObject *)__pyx_v_self->descr);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":246
 *             cdef int offset
 * 
 *             cdef bint hasfields = PyDataType_HASFIELDS(descr)             # <<<<<<<<<<<<<<
 * 
 *             if not hasfields and not copy_shape:
 */
  __Pyx_TraceLine(246,0,__PYX_ERR(1, 246, __pyx_L1_error))
  __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr);

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":248
 *             cdef bint hasfields = PyDataType_HASFIELDS(descr)
 * 
 *             if not hasfields and not copy_shape:             # <<<<<<<<<<<<<<
 *                 # do not call releasebuffer
 *                 info.obj = None
 */
  __Pyx_TraceLine(248,0,__PYX_ERR(1, 248, __pyx_L1_error))
  __pyx_t_2 = ((!(__pyx_v_hasfields != 0)) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L15_bool_binop_done;
  }
  __pyx_t_2 = ((!(__pyx_v_copy_shape != 0)) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L15_bool_binop_done:;
  if (__pyx_t_1) {

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":250
 *             if not hasfields and not copy_shape:
 *                 # do not call releasebuffer
 *                 info.obj = None             # <<<<<<<<<<<<<<
 *             else:
 *                 # need to call releasebuffer
 */
    __Pyx_TraceLine(250,0,__PYX_ERR(1, 250, __pyx_L1_error))
    __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;

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":248
 *             cdef bint hasfields = PyDataType_HASFIELDS(descr)
 * 
 *             if not hasfields and not copy_shape:             # <<<<<<<<<<<<<<
 *                 # do not call releasebuffer
 *                 info.obj = None
 */
    goto __pyx_L14;
  }

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":253
 *             else:
 *                 # need to call releasebuffer
 *                 info.obj = self             # <<<<<<<<<<<<<<
 * 
 *             if not hasfields:
 */
  __Pyx_TraceLine(253,0,__PYX_ERR(1, 253, __pyx_L1_error))
  /*else*/ {
    __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_L14:;

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":255
 *                 info.obj = self
 * 
 *             if not hasfields:             # <<<<<<<<<<<<<<
 *                 t = descr.type_num
 *                 if ((descr.byteorder == c'>' and little_endian) or
 */
  __Pyx_TraceLine(255,0,__PYX_ERR(1, 255, __pyx_L1_error))
  __pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0);
  if (__pyx_t_1) {

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":256
 * 
 *             if not hasfields:
 *                 t = descr.type_num             # <<<<<<<<<<<<<<
 *                 if ((descr.byteorder == c'>' and little_endian) or
 *                     (descr.byteorder == c'<' and not little_endian)):
 */
    __Pyx_TraceLine(256,0,__PYX_ERR(1, 256, __pyx_L1_error))
    __pyx_t_4 = __pyx_v_descr->type_num;
    __pyx_v_t = __pyx_t_4;

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":257
 *             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_TraceLine(257,0,__PYX_ERR(1, 257, __pyx_L1_error))
    __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0);
    if (!__pyx_t_2) {
      goto __pyx_L20_next_or;
    } else {
    }
    __pyx_t_2 = (__pyx_v_little_endian != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L19_bool_binop_done;
    }
    __pyx_L20_next_or:;

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":258
 *                 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_TraceLine(258,0,__PYX_ERR(1, 258, __pyx_L1_error))
    __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L19_bool_binop_done;
    }
    __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L19_bool_binop_done:;

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":257
 *             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_TraceLine(257,0,__PYX_ERR(1, 257, __pyx_L1_error))
    if (__pyx_t_1) {

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":259
 *                 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_TraceLine(259,0,__PYX_ERR(1, 259, __pyx_L1_error))
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__214, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 259, __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_ERR(1, 259, __pyx_L1_error)

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":257
 *             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")
 */
    }

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":260
 *                     (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"
 */
    __Pyx_TraceLine(260,0,__PYX_ERR(1, 260, __pyx_L1_error))
    switch (__pyx_v_t) {
      case NPY_BYTE:
      __pyx_v_f = ((char *)"b");
      break;

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":261
 *                     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"
 */
      __Pyx_TraceLine(261,0,__PYX_ERR(1, 261, __pyx_L1_error))
      case NPY_UBYTE:
      __pyx_v_f = ((char *)"B");
      break;

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":262
 *                 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"
 */
      __Pyx_TraceLine(262,0,__PYX_ERR(1, 262, __pyx_L1_error))
      case NPY_SHORT:
      __pyx_v_f = ((char *)"h");
      break;

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":263
 *                 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"
 */
      __Pyx_TraceLine(263,0,__PYX_ERR(1, 263, __pyx_L1_error))
      case NPY_USHORT:
      __pyx_v_f = ((char *)"H");
      break;

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":264
 *                 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"
 */
      __Pyx_TraceLine(264,0,__PYX_ERR(1, 264, __pyx_L1_error))
      case NPY_INT:
      __pyx_v_f = ((char *)"i");
      break;

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":265
 *                 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"
 */
      __Pyx_TraceLine(265,0,__PYX_ERR(1, 265, __pyx_L1_error))
      case NPY_UINT:
      __pyx_v_f = ((char *)"I");
      break;

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":266
 *                 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"
 */
      __Pyx_TraceLine(266,0,__PYX_ERR(1, 266, __pyx_L1_error))
      case NPY_LONG:
      __pyx_v_f = ((char *)"l");
      break;

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":267
 *                 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"
 */
      __Pyx_TraceLine(267,0,__PYX_ERR(1, 267, __pyx_L1_error))
      case NPY_ULONG:
      __pyx_v_f = ((char *)"L");
      break;

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":268
 *                 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"
 */
      __Pyx_TraceLine(268,0,__PYX_ERR(1, 268, __pyx_L1_error))
      case NPY_LONGLONG:
      __pyx_v_f = ((char *)"q");
      break;

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":269
 *                 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"
 */
      __Pyx_TraceLine(269,0,__PYX_ERR(1, 269, __pyx_L1_error))
      case NPY_ULONGLONG:
      __pyx_v_f = ((char *)"Q");
      break;

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270
 *                 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"
 */
      __Pyx_TraceLine(270,0,__PYX_ERR(1, 270, __pyx_L1_error))
      case NPY_FLOAT:
      __pyx_v_f = ((char *)"f");
      break;

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":271
 *                 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"
 */
      __Pyx_TraceLine(271,0,__PYX_ERR(1, 271, __pyx_L1_error))
      case NPY_DOUBLE:
      __pyx_v_f = ((char *)"d");
      break;

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":272
 *                 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"
 */
      __Pyx_TraceLine(272,0,__PYX_ERR(1, 272, __pyx_L1_error))
      case NPY_LONGDOUBLE:
      __pyx_v_f = ((char *)"g");
      break;

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":273
 *                 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"
 */
      __Pyx_TraceLine(273,0,__PYX_ERR(1, 273, __pyx_L1_error))
      case NPY_CFLOAT:
      __pyx_v_f = ((char *)"Zf");
      break;

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274
 *                 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"
 */
      __Pyx_TraceLine(274,0,__PYX_ERR(1, 274, __pyx_L1_error))
      case NPY_CDOUBLE:
      __pyx_v_f = ((char *)"Zd");
      break;

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":275
 *                 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:
 */
      __Pyx_TraceLine(275,0,__PYX_ERR(1, 275, __pyx_L1_error))
      case NPY_CLONGDOUBLE:
      __pyx_v_f = ((char *)"Zg");
      break;

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":276
 *                 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)
 */
      __Pyx_TraceLine(276,0,__PYX_ERR(1, 276, __pyx_L1_error))
      case NPY_OBJECT:
      __pyx_v_f = ((char *)"O");
      break;
      default:

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":278
 *                 elif t == NPY_OBJECT:      f = "O"
 *                 else:
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
 *                 info.format = f
 *                 return
 */
      __Pyx_TraceLine(278,0,__PYX_ERR(1, 278, __pyx_L1_error))
      __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 278, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 278, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 278, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 278, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __PYX_ERR(1, 278, __pyx_L1_error)
      break;
    }

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":279
 *                 else:
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 *                 info.format = f             # <<<<<<<<<<<<<<
 *                 return
 *             else:
 */
    __Pyx_TraceLine(279,0,__PYX_ERR(1, 279, __pyx_L1_error))
    __pyx_v_info->format = __pyx_v_f;

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":280
 *                     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_TraceLine(280,0,__PYX_ERR(1, 280, __pyx_L1_error))
    __pyx_r = 0;
    goto __pyx_L0;

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":255
 *                 info.obj = self
 * 
 *             if not hasfields:             # <<<<<<<<<<<<<<
 *                 t = descr.type_num
 *                 if ((descr.byteorder == c'>' and little_endian) or
 */
  }

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":282
 *                 return
 *             else:
 *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)             # <<<<<<<<<<<<<<
 *                 info.format[0] = c'^' # Native data types, manual alignment
 *                 offset = 0
 */
  __Pyx_TraceLine(282,0,__PYX_ERR(1, 282, __pyx_L1_error))
  /*else*/ {
    __pyx_v_info->format = ((char *)malloc(0xFF));

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":283
 *             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_TraceLine(283,0,__PYX_ERR(1, 283, __pyx_L1_error))
    (__pyx_v_info->format[0]) = '^';

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":284
 *                 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_TraceLine(284,0,__PYX_ERR(1, 284, __pyx_L1_error))
    __pyx_v_offset = 0;

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":285
 *                 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_TraceLine(285,0,__PYX_ERR(1, 285, __pyx_L1_error))
    __pyx_t_7 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_7 == NULL)) __PYX_ERR(1, 285, __pyx_L1_error)
    __pyx_v_f = __pyx_t_7;

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":288
 *                                       info.format + _buffer_format_string_len,
 *                                       &offset)
 *                 f[0] = c'\0' # Terminate format string             # <<<<<<<<<<<<<<
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):
 */
    __Pyx_TraceLine(288,0,__PYX_ERR(1, 288, __pyx_L1_error))
    (__pyx_v_f[0]) = '\x00';
  }

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":197
 *         # 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_3);
  __Pyx_XDECREF(__pyx_t_6);
  __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_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":290
 *                 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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__releasebuffer__", 0);
  __Pyx_TraceCall("__releasebuffer__", __pyx_f[1], 290, 0, __PYX_ERR(1, 290, __pyx_L1_error));

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":291
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):
 *             if PyArray_HASFIELDS(self):             # <<<<<<<<<<<<<<
 *                 stdlib.free(info.format)
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 */
  __Pyx_TraceLine(291,0,__PYX_ERR(1, 291, __pyx_L1_error))
  __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0);
  if (__pyx_t_1) {

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":292
 *         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)
 */
    __Pyx_TraceLine(292,0,__PYX_ERR(1, 292, __pyx_L1_error))
    free(__pyx_v_info->format);

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":291
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):
 *             if PyArray_HASFIELDS(self):             # <<<<<<<<<<<<<<
 *                 stdlib.free(info.format)
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 */
  }

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":293
 *             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_TraceLine(293,0,__PYX_ERR(1, 293, __pyx_L1_error))
  __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
  if (__pyx_t_1) {

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":294
 *                 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_TraceLine(294,0,__PYX_ERR(1, 294, __pyx_L1_error))
    free(__pyx_v_info->strides);

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":293
 *             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
 */
  }

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":290
 *                 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 */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("numpy.ndarray.__releasebuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":770
 * 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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
  __Pyx_TraceCall("PyArray_MultiIterNew1", __pyx_f[1], 770, 0, __PYX_ERR(1, 770, __pyx_L1_error));

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":771
 * 
 * cdef inline object PyArray_MultiIterNew1(a):
 *     return PyArray_MultiIterNew(1, <void*>a)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):
 */
  __Pyx_TraceLine(771,0,__PYX_ERR(1, 771, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":770
 * 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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":773
 *     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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
  __Pyx_TraceCall("PyArray_MultiIterNew2", __pyx_f[1], 773, 0, __PYX_ERR(1, 773, __pyx_L1_error));

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":774
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):
 */
  __Pyx_TraceLine(774,0,__PYX_ERR(1, 774, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":773
 *     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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":776
 *     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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
  __Pyx_TraceCall("PyArray_MultiIterNew3", __pyx_f[1], 776, 0, __PYX_ERR(1, 776, __pyx_L1_error));

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":777
 * 
 * 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_TraceLine(777,0,__PYX_ERR(1, 777, __pyx_L1_error))
  __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_ERR(1, 777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":776
 *     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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":779
 *     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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
  __Pyx_TraceCall("PyArray_MultiIterNew4", __pyx_f[1], 779, 0, __PYX_ERR(1, 779, __pyx_L1_error));

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":780
 * 
 * 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_TraceLine(780,0,__PYX_ERR(1, 780, __pyx_L1_error))
  __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_ERR(1, 780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":779
 *     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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":782
 *     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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
  __Pyx_TraceCall("PyArray_MultiIterNew5", __pyx_f[1], 782, 0, __PYX_ERR(1, 782, __pyx_L1_error));

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":783
 * 
 * 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_TraceLine(783,0,__PYX_ERR(1, 783, __pyx_L1_error))
  __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_ERR(1, 783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":782
 *     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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":785
 *     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_TraceDeclarations
  __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_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  long __pyx_t_8;
  char *__pyx_t_9;
  __Pyx_RefNannySetupContext("_util_dtypestring", 0);
  __Pyx_TraceCall("_util_dtypestring", __pyx_f[1], 785, 0, __PYX_ERR(1, 785, __pyx_L1_error));

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":790
 * 
 *     cdef dtype child
 *     cdef int endian_detector = 1             # <<<<<<<<<<<<<<
 *     cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
 *     cdef tuple fields
 */
  __Pyx_TraceLine(790,0,__PYX_ERR(1, 790, __pyx_L1_error))
  __pyx_v_endian_detector = 1;

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":791
 *     cdef dtype child
 *     cdef int endian_detector = 1
 *     cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)             # <<<<<<<<<<<<<<
 *     cdef tuple fields
 * 
 */
  __Pyx_TraceLine(791,0,__PYX_ERR(1, 791, __pyx_L1_error))
  __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":794
 *     cdef tuple fields
 * 
 *     for childname in descr.names:             # <<<<<<<<<<<<<<
 *         fields = descr.fields[childname]
 *         child, new_offset = fields
 */
  __Pyx_TraceLine(794,0,__PYX_ERR(1, 794, __pyx_L1_error))
  if (unlikely(__pyx_v_descr->names == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(1, 794, __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_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __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_ERR(1, 794, __pyx_L1_error)
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 794, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":795
 * 
 *     for childname in descr.names:
 *         fields = descr.fields[childname]             # <<<<<<<<<<<<<<
 *         child, new_offset = fields
 * 
 */
    __Pyx_TraceLine(795,0,__PYX_ERR(1, 795, __pyx_L1_error))
    if (unlikely(__pyx_v_descr->fields == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 795, __pyx_L1_error)
    }
    __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 795, __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_ERR(1, 795, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":796
 *     for childname in descr.names:
 *         fields = descr.fields[childname]
 *         child, new_offset = fields             # <<<<<<<<<<<<<<
 * 
 *         if (end - f) - <int>(new_offset - offset[0]) < 15:
 */
    __Pyx_TraceLine(796,0,__PYX_ERR(1, 796, __pyx_L1_error))
    if (likely(__pyx_v_fields != Py_None)) {
      PyObject* sequence = __pyx_v_fields;
      #if !CYTHON_COMPILING_IN_PYPY
      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_ERR(1, 796, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __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_ERR(1, 796, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 796, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
    } else {
      __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 796, __pyx_L1_error)
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(1, 796, __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;

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":798
 *         child, new_offset = fields
 * 
 *         if (end - f) - <int>(new_offset - offset[0]) < 15:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
 * 
 */
    __Pyx_TraceLine(798,0,__PYX_ERR(1, 798, __pyx_L1_error))
    __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 798, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0);
    if (__pyx_t_6) {

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":799
 * 
 *         if (end - f) - <int>(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_TraceLine(799,0,__PYX_ERR(1, 799, __pyx_L1_error))
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__215, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 799, __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_ERR(1, 799, __pyx_L1_error)

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":798
 *         child, new_offset = fields
 * 
 *         if (end - f) - <int>(new_offset - offset[0]) < 15:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
 * 
 */
    }

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.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_TraceLine(801,0,__PYX_ERR(1, 801, __pyx_L1_error))
    __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0);
    if (!__pyx_t_7) {
      goto __pyx_L8_next_or;
    } else {
    }
    __pyx_t_7 = (__pyx_v_little_endian != 0);
    if (!__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_L8_next_or:;

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.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_TraceLine(802,0,__PYX_ERR(1, 802, __pyx_L1_error))
    __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0);
    if (__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0);
    __pyx_t_6 = __pyx_t_7;
    __pyx_L7_bool_binop_done:;

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.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_TraceLine(801,0,__PYX_ERR(1, 801, __pyx_L1_error))
    if (__pyx_t_6) {

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.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_TraceLine(803,0,__PYX_ERR(1, 803, __pyx_L1_error))
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__216, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 803, __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_ERR(1, 803, __pyx_L1_error)

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.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")
 */
    }

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":813
 * 
 *         # Output padding bytes
 *         while offset[0] < new_offset:             # <<<<<<<<<<<<<<
 *             f[0] = 120 # "x"; pad byte
 *             f += 1
 */
    __Pyx_TraceLine(813,0,__PYX_ERR(1, 813, __pyx_L1_error))
    while (1) {
      __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 813, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 813, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 813, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (!__pyx_t_6) break;

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":814
 *         # Output padding bytes
 *         while offset[0] < new_offset:
 *             f[0] = 120 # "x"; pad byte             # <<<<<<<<<<<<<<
 *             f += 1
 *             offset[0] += 1
 */
      __Pyx_TraceLine(814,0,__PYX_ERR(1, 814, __pyx_L1_error))
      (__pyx_v_f[0]) = 0x78;

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":815
 *         while offset[0] < new_offset:
 *             f[0] = 120 # "x"; pad byte
 *             f += 1             # <<<<<<<<<<<<<<
 *             offset[0] += 1
 * 
 */
      __Pyx_TraceLine(815,0,__PYX_ERR(1, 815, __pyx_L1_error))
      __pyx_v_f = (__pyx_v_f + 1);

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":816
 *             f[0] = 120 # "x"; pad byte
 *             f += 1
 *             offset[0] += 1             # <<<<<<<<<<<<<<
 * 
 *         offset[0] += child.itemsize
 */
      __Pyx_TraceLine(816,0,__PYX_ERR(1, 816, __pyx_L1_error))
      __pyx_t_8 = 0;
      (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1);
    }

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":818
 *             offset[0] += 1
 * 
 *         offset[0] += child.itemsize             # <<<<<<<<<<<<<<
 * 
 *         if not PyDataType_HASFIELDS(child):
 */
    __Pyx_TraceLine(818,0,__PYX_ERR(1, 818, __pyx_L1_error))
    __pyx_t_8 = 0;
    (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize);

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":820
 *         offset[0] += child.itemsize
 * 
 *         if not PyDataType_HASFIELDS(child):             # <<<<<<<<<<<<<<
 *             t = child.type_num
 *             if end - f < 5:
 */
    __Pyx_TraceLine(820,0,__PYX_ERR(1, 820, __pyx_L1_error))
    __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0);
    if (__pyx_t_6) {

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":821
 * 
 *         if not PyDataType_HASFIELDS(child):
 *             t = child.type_num             # <<<<<<<<<<<<<<
 *             if end - f < 5:
 *                 raise RuntimeError(u"Format string allocated too short.")
 */
      __Pyx_TraceLine(821,0,__PYX_ERR(1, 821, __pyx_L1_error))
      __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 821, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":822
 *         if not PyDataType_HASFIELDS(child):
 *             t = child.type_num
 *             if end - f < 5:             # <<<<<<<<<<<<<<
 *                 raise RuntimeError(u"Format string allocated too short.")
 * 
 */
      __Pyx_TraceLine(822,0,__PYX_ERR(1, 822, __pyx_L1_error))
      __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0);
      if (__pyx_t_6) {

        /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.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_TraceLine(823,0,__PYX_ERR(1, 823, __pyx_L1_error))
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__217, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 823, __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_ERR(1, 823, __pyx_L1_error)

        /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":822
 *         if not PyDataType_HASFIELDS(child):
 *             t = child.type_num
 *             if end - f < 5:             # <<<<<<<<<<<<<<
 *                 raise RuntimeError(u"Format string allocated too short.")
 * 
 */
      }

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.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_TraceLine(826,0,__PYX_ERR(1, 826, __pyx_L1_error))
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 826, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 826, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 826, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 98;
        goto __pyx_L15;
      }

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.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_TraceLine(827,0,__PYX_ERR(1, 827, __pyx_L1_error))
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 827, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 827, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 827, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 66;
        goto __pyx_L15;
      }

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.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_TraceLine(828,0,__PYX_ERR(1, 828, __pyx_L1_error))
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 828, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 828, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 828, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 0x68;
        goto __pyx_L15;
      }

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.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_TraceLine(829,0,__PYX_ERR(1, 829, __pyx_L1_error))
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 829, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 829, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 829, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 72;
        goto __pyx_L15;
      }

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.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_TraceLine(830,0,__PYX_ERR(1, 830, __pyx_L1_error))
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 830, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 830, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 830, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 0x69;
        goto __pyx_L15;
      }

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.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_TraceLine(831,0,__PYX_ERR(1, 831, __pyx_L1_error))
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 831, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 831, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 831, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 73;
        goto __pyx_L15;
      }

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.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_TraceLine(832,0,__PYX_ERR(1, 832, __pyx_L1_error))
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 832, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 832, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 832, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 0x6C;
        goto __pyx_L15;
      }

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.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_TraceLine(833,0,__PYX_ERR(1, 833, __pyx_L1_error))
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 833, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 833, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 833, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 76;
        goto __pyx_L15;
      }

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.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_TraceLine(834,0,__PYX_ERR(1, 834, __pyx_L1_error))
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 834, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 834, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 834, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 0x71;
        goto __pyx_L15;
      }

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.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_TraceLine(835,0,__PYX_ERR(1, 835, __pyx_L1_error))
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 835, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 835, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 835, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 81;
        goto __pyx_L15;
      }

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.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_TraceLine(836,0,__PYX_ERR(1, 836, __pyx_L1_error))
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 836, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 836, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 836, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 0x66;
        goto __pyx_L15;
      }

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.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_TraceLine(837,0,__PYX_ERR(1, 837, __pyx_L1_error))
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 837, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 837, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 837, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 0x64;
        goto __pyx_L15;
      }

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.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_TraceLine(838,0,__PYX_ERR(1, 838, __pyx_L1_error))
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 838, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 838, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 838, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 0x67;
        goto __pyx_L15;
      }

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.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_TraceLine(839,0,__PYX_ERR(1, 839, __pyx_L1_error))
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 839, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 839, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 839, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 90;
        (__pyx_v_f[1]) = 0x66;
        __pyx_v_f = (__pyx_v_f + 1);
        goto __pyx_L15;
      }

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.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_TraceLine(840,0,__PYX_ERR(1, 840, __pyx_L1_error))
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 840, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 840, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 840, __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]) = 0x64;
        __pyx_v_f = (__pyx_v_f + 1);
        goto __pyx_L15;
      }

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.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_TraceLine(841,0,__PYX_ERR(1, 841, __pyx_L1_error))
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 841, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 841, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 841, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 90;
        (__pyx_v_f[1]) = 0x67;
        __pyx_v_f = (__pyx_v_f + 1);
        goto __pyx_L15;
      }

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.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_TraceLine(842,0,__PYX_ERR(1, 842, __pyx_L1_error))
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 842, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 842, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 842, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 79;
        goto __pyx_L15;
      }

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.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_TraceLine(844,0,__PYX_ERR(1, 844, __pyx_L1_error))
      /*else*/ {
        __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 844, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 844, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 844, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(1, 844, __pyx_L1_error)
      }
      __pyx_L15:;

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":845
 *             else:
 *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 *             f += 1             # <<<<<<<<<<<<<<
 *         else:
 *             # Cython ignores struct boundary information ("T{...}"),
 */
      __Pyx_TraceLine(845,0,__PYX_ERR(1, 845, __pyx_L1_error))
      __pyx_v_f = (__pyx_v_f + 1);

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":820
 *         offset[0] += child.itemsize
 * 
 *         if not PyDataType_HASFIELDS(child):             # <<<<<<<<<<<<<<
 *             t = child.type_num
 *             if end - f < 5:
 */
      goto __pyx_L13;
    }

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":849
 *             # Cython ignores struct boundary information ("T{...}"),
 *             # so don't output it
 *             f = _util_dtypestring(child, f, end, offset)             # <<<<<<<<<<<<<<
 *     return f
 * 
 */
    __Pyx_TraceLine(849,0,__PYX_ERR(1, 849, __pyx_L1_error))
    /*else*/ {
      __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == NULL)) __PYX_ERR(1, 849, __pyx_L1_error)
      __pyx_v_f = __pyx_t_9;
    }
    __pyx_L13:;

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":794
 *     cdef tuple fields
 * 
 *     for childname in descr.names:             # <<<<<<<<<<<<<<
 *         fields = descr.fields[childname]
 *         child, new_offset = fields
 */
    __Pyx_TraceLine(794,0,__PYX_ERR(1, 794, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":850
 *             # so don't output it
 *             f = _util_dtypestring(child, f, end, offset)
 *     return f             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(850,0,__PYX_ERR(1, 850, __pyx_L1_error))
  __pyx_r = __pyx_v_f;
  goto __pyx_L0;

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":785
 *     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_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_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":966
 * 
 * 
 * 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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("set_array_base", 0);
  __Pyx_TraceCall("set_array_base", __pyx_f[1], 966, 0, __PYX_ERR(1, 966, __pyx_L1_error));

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":968
 * cdef inline void set_array_base(ndarray arr, object base):
 *      cdef PyObject* baseptr
 *      if base is None:             # <<<<<<<<<<<<<<
 *          baseptr = NULL
 *      else:
 */
  __Pyx_TraceLine(968,0,__PYX_ERR(1, 968, __pyx_L1_error))
  __pyx_t_1 = (__pyx_v_base == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":969
 *      cdef PyObject* baseptr
 *      if base is None:
 *          baseptr = NULL             # <<<<<<<<<<<<<<
 *      else:
 *          Py_INCREF(base) # important to do this before decref below!
 */
    __Pyx_TraceLine(969,0,__PYX_ERR(1, 969, __pyx_L1_error))
    __pyx_v_baseptr = NULL;

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":968
 * cdef inline void set_array_base(ndarray arr, object base):
 *      cdef PyObject* baseptr
 *      if base is None:             # <<<<<<<<<<<<<<
 *          baseptr = NULL
 *      else:
 */
    goto __pyx_L3;
  }

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":971
 *          baseptr = NULL
 *      else:
 *          Py_INCREF(base) # important to do this before decref below!             # <<<<<<<<<<<<<<
 *          baseptr = <PyObject*>base
 *      Py_XDECREF(arr.base)
 */
  __Pyx_TraceLine(971,0,__PYX_ERR(1, 971, __pyx_L1_error))
  /*else*/ {
    Py_INCREF(__pyx_v_base);

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":972
 *      else:
 *          Py_INCREF(base) # important to do this before decref below!
 *          baseptr = <PyObject*>base             # <<<<<<<<<<<<<<
 *      Py_XDECREF(arr.base)
 *      arr.base = baseptr
 */
    __Pyx_TraceLine(972,0,__PYX_ERR(1, 972, __pyx_L1_error))
    __pyx_v_baseptr = ((PyObject *)__pyx_v_base);
  }
  __pyx_L3:;

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":973
 *          Py_INCREF(base) # important to do this before decref below!
 *          baseptr = <PyObject*>base
 *      Py_XDECREF(arr.base)             # <<<<<<<<<<<<<<
 *      arr.base = baseptr
 * 
 */
  __Pyx_TraceLine(973,0,__PYX_ERR(1, 973, __pyx_L1_error))
  Py_XDECREF(__pyx_v_arr->base);

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":974
 *          baseptr = <PyObject*>base
 *      Py_XDECREF(arr.base)
 *      arr.base = baseptr             # <<<<<<<<<<<<<<
 * 
 * cdef inline object get_array_base(ndarray arr):
 */
  __Pyx_TraceLine(974,0,__PYX_ERR(1, 974, __pyx_L1_error))
  __pyx_v_arr->base = __pyx_v_baseptr;

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":966
 * 
 * 
 * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
 *      cdef PyObject* baseptr
 *      if base is None:
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("numpy.set_array_base", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":976
 *      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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("get_array_base", 0);
  __Pyx_TraceCall("get_array_base", __pyx_f[1], 976, 0, __PYX_ERR(1, 976, __pyx_L1_error));

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":977
 * 
 * cdef inline object get_array_base(ndarray arr):
 *     if arr.base is NULL:             # <<<<<<<<<<<<<<
 *         return None
 *     else:
 */
  __Pyx_TraceLine(977,0,__PYX_ERR(1, 977, __pyx_L1_error))
  __pyx_t_1 = ((__pyx_v_arr->base == NULL) != 0);
  if (__pyx_t_1) {

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":978
 * cdef inline object get_array_base(ndarray arr):
 *     if arr.base is NULL:
 *         return None             # <<<<<<<<<<<<<<
 *     else:
 *         return <object>arr.base
 */
    __Pyx_TraceLine(978,0,__PYX_ERR(1, 978, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":977
 * 
 * cdef inline object get_array_base(ndarray arr):
 *     if arr.base is NULL:             # <<<<<<<<<<<<<<
 *         return None
 *     else:
 */
  }

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":980
 *         return None
 *     else:
 *         return <object>arr.base             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(980,0,__PYX_ERR(1, 980, __pyx_L1_error))
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_arr->base));
    __pyx_r = ((PyObject *)__pyx_v_arr->base);
    goto __pyx_L0;
  }

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":976
 *      arr.base = baseptr
 * 
 * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
 *     if arr.base is NULL:
 *         return None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("numpy.get_array_base", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":985
 * # Versions of the import_* functions which are more suitable for
 * # Cython code.
 * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_array()
 */

static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("import_array", 0);
  __Pyx_TraceCall("import_array", __pyx_f[1], 985, 0, __PYX_ERR(1, 985, __pyx_L1_error));

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":986
 * # Cython code.
 * cdef inline int import_array() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_array()
 *     except Exception:
 */
  __Pyx_TraceLine(986,0,__PYX_ERR(1, 986, __pyx_L3_error))
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":987
 * cdef inline int import_array() except -1:
 *     try:
 *         _import_array()             # <<<<<<<<<<<<<<
 *     except Exception:
 *         raise ImportError("numpy.core.multiarray failed to import")
 */
      __Pyx_TraceLine(987,0,__PYX_ERR(1, 987, __pyx_L3_error))
      __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(1, 987, __pyx_L3_error)

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":986
 * # Cython code.
 * cdef inline int import_array() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_array()
 *     except Exception:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L3_error:;
    __Pyx_PyThreadState_assign

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":988
 *     try:
 *         _import_array()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         raise ImportError("numpy.core.multiarray failed to import")
 * 
 */
    __Pyx_TraceLine(988,0,__PYX_ERR(1, 988, __pyx_L5_except_error))
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_4) {
      __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 988, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":989
 *         _import_array()
 *     except Exception:
 *         raise ImportError("numpy.core.multiarray failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_umath() except -1:
 */
      __Pyx_TraceLine(989,0,__PYX_ERR(1, 989, __pyx_L5_except_error))
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__218, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 989, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(1, 989, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":986
 * # Cython code.
 * cdef inline int import_array() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_array()
 *     except Exception:
 */
    __Pyx_PyThreadState_assign
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L10_try_end:;
  }

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":985
 * # Versions of the import_* functions which are more suitable for
 * # Cython code.
 * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_array()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":991
 *         raise ImportError("numpy.core.multiarray failed to import")
 * 
 * cdef inline int import_umath() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
 */

static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("import_umath", 0);
  __Pyx_TraceCall("import_umath", __pyx_f[1], 991, 0, __PYX_ERR(1, 991, __pyx_L1_error));

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":992
 * 
 * cdef inline int import_umath() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
  __Pyx_TraceLine(992,0,__PYX_ERR(1, 992, __pyx_L3_error))
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":993
 * cdef inline int import_umath() except -1:
 *     try:
 *         _import_umath()             # <<<<<<<<<<<<<<
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")
 */
      __Pyx_TraceLine(993,0,__PYX_ERR(1, 993, __pyx_L3_error))
      __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(1, 993, __pyx_L3_error)

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":992
 * 
 * cdef inline int import_umath() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L3_error:;
    __Pyx_PyThreadState_assign

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":994
 *     try:
 *         _import_umath()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         raise ImportError("numpy.core.umath failed to import")
 * 
 */
    __Pyx_TraceLine(994,0,__PYX_ERR(1, 994, __pyx_L5_except_error))
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_4) {
      __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 994, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":995
 *         _import_umath()
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_ufunc() except -1:
 */
      __Pyx_TraceLine(995,0,__PYX_ERR(1, 995, __pyx_L5_except_error))
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__219, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 995, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(1, 995, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":992
 * 
 * cdef inline int import_umath() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
    __Pyx_PyThreadState_assign
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L10_try_end:;
  }

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":991
 *         raise ImportError("numpy.core.multiarray failed to import")
 * 
 * cdef inline int import_umath() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":997
 *         raise ImportError("numpy.core.umath failed to import")
 * 
 * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
 */

static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("import_ufunc", 0);
  __Pyx_TraceCall("import_ufunc", __pyx_f[1], 997, 0, __PYX_ERR(1, 997, __pyx_L1_error));

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":998
 * 
 * cdef inline int import_ufunc() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
  __Pyx_TraceLine(998,0,__PYX_ERR(1, 998, __pyx_L3_error))
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":999
 * cdef inline int import_ufunc() except -1:
 *     try:
 *         _import_umath()             # <<<<<<<<<<<<<<
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")
 */
      __Pyx_TraceLine(999,0,__PYX_ERR(1, 999, __pyx_L3_error))
      __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(1, 999, __pyx_L3_error)

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":998
 * 
 * cdef inline int import_ufunc() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L3_error:;
    __Pyx_PyThreadState_assign

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1000
 *     try:
 *         _import_umath()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         raise ImportError("numpy.core.umath failed to import")
 */
    __Pyx_TraceLine(1000,0,__PYX_ERR(1, 1000, __pyx_L5_except_error))
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_4) {
      __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1000, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);

      /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1001
 *         _import_umath()
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
 */
      __Pyx_TraceLine(1001,0,__PYX_ERR(1, 1001, __pyx_L5_except_error))
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__220, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1001, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(1, 1001, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":998
 * 
 * cdef inline int import_ufunc() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
    __Pyx_PyThreadState_assign
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L10_try_end:;
  }

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":997
 *         raise ImportError("numpy.core.umath failed to import")
 * 
 * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_tp_new_7km3pipe_11dataclasses_Hit(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_7km3pipe_11dataclasses_3Hit_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7km3pipe_11dataclasses_Hit(PyObject *o) {
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_3Hit_dir(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_3Hit_3dir_1__get__(o);
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_3Hit_pos(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_3Hit_3pos_1__get__(o);
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_3Hit_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_3Hit_2id_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_3Hit_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_3Hit_2id_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_3Hit_dom_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_3Hit_6dom_id_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_3Hit_dom_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_3Hit_6dom_id_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_3Hit_time(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_3Hit_4time_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_3Hit_time(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_3Hit_4time_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_3Hit_tot(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_3Hit_3tot_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_3Hit_tot(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_3Hit_3tot_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_3Hit_channel_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_3Hit_10channel_id_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_3Hit_channel_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_3Hit_10channel_id_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_3Hit_pmt_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_3Hit_6pmt_id_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_3Hit_pmt_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_3Hit_6pmt_id_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_3Hit_triggered(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_3Hit_9triggered_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_3Hit_triggered(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_3Hit_9triggered_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_3Hit_pos_x(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_3Hit_5pos_x_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_3Hit_pos_x(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_3Hit_5pos_x_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_3Hit_pos_y(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_3Hit_5pos_y_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_3Hit_pos_y(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_3Hit_5pos_y_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_3Hit_pos_z(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_3Hit_5pos_z_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_3Hit_pos_z(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_3Hit_5pos_z_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_3Hit_dir_x(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_3Hit_5dir_x_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_3Hit_dir_x(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_3Hit_5dir_x_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_3Hit_dir_y(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_3Hit_5dir_y_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_3Hit_dir_y(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_3Hit_5dir_y_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_3Hit_dir_z(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_3Hit_5dir_z_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_3Hit_dir_z(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_3Hit_5dir_z_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_3Hit_t0(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_3Hit_2t0_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_3Hit_t0(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_3Hit_2t0_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_7km3pipe_11dataclasses_Hit[] = {
  {"__insp__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_3Hit_7__insp__, METH_NOARGS, __pyx_doc_7km3pipe_11dataclasses_3Hit_6__insp__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7km3pipe_11dataclasses_Hit[] = {
  {(char *)"dir", __pyx_getprop_7km3pipe_11dataclasses_3Hit_dir, 0, (char *)0, 0},
  {(char *)"pos", __pyx_getprop_7km3pipe_11dataclasses_3Hit_pos, 0, (char *)0, 0},
  {(char *)"id", __pyx_getprop_7km3pipe_11dataclasses_3Hit_id, __pyx_setprop_7km3pipe_11dataclasses_3Hit_id, (char *)"id: 'int'", 0},
  {(char *)"dom_id", __pyx_getprop_7km3pipe_11dataclasses_3Hit_dom_id, __pyx_setprop_7km3pipe_11dataclasses_3Hit_dom_id, (char *)"dom_id: 'int'", 0},
  {(char *)"time", __pyx_getprop_7km3pipe_11dataclasses_3Hit_time, __pyx_setprop_7km3pipe_11dataclasses_3Hit_time, (char *)"time: 'int'", 0},
  {(char *)"tot", __pyx_getprop_7km3pipe_11dataclasses_3Hit_tot, __pyx_setprop_7km3pipe_11dataclasses_3Hit_tot, (char *)"tot: 'int'", 0},
  {(char *)"channel_id", __pyx_getprop_7km3pipe_11dataclasses_3Hit_channel_id, __pyx_setprop_7km3pipe_11dataclasses_3Hit_channel_id, (char *)"channel_id: 'int'", 0},
  {(char *)"pmt_id", __pyx_getprop_7km3pipe_11dataclasses_3Hit_pmt_id, __pyx_setprop_7km3pipe_11dataclasses_3Hit_pmt_id, (char *)"pmt_id: 'int'", 0},
  {(char *)"triggered", __pyx_getprop_7km3pipe_11dataclasses_3Hit_triggered, __pyx_setprop_7km3pipe_11dataclasses_3Hit_triggered, (char *)"triggered: 'unsigned short'", 0},
  {(char *)"pos_x", __pyx_getprop_7km3pipe_11dataclasses_3Hit_pos_x, __pyx_setprop_7km3pipe_11dataclasses_3Hit_pos_x, (char *)"pos_x: 'float'", 0},
  {(char *)"pos_y", __pyx_getprop_7km3pipe_11dataclasses_3Hit_pos_y, __pyx_setprop_7km3pipe_11dataclasses_3Hit_pos_y, (char *)"pos_y: 'float'", 0},
  {(char *)"pos_z", __pyx_getprop_7km3pipe_11dataclasses_3Hit_pos_z, __pyx_setprop_7km3pipe_11dataclasses_3Hit_pos_z, (char *)"pos_z: 'float'", 0},
  {(char *)"dir_x", __pyx_getprop_7km3pipe_11dataclasses_3Hit_dir_x, __pyx_setprop_7km3pipe_11dataclasses_3Hit_dir_x, (char *)"dir_x: 'float'", 0},
  {(char *)"dir_y", __pyx_getprop_7km3pipe_11dataclasses_3Hit_dir_y, __pyx_setprop_7km3pipe_11dataclasses_3Hit_dir_y, (char *)"dir_y: 'float'", 0},
  {(char *)"dir_z", __pyx_getprop_7km3pipe_11dataclasses_3Hit_dir_z, __pyx_setprop_7km3pipe_11dataclasses_3Hit_dir_z, (char *)"dir_z: 'float'", 0},
  {(char *)"t0", __pyx_getprop_7km3pipe_11dataclasses_3Hit_t0, __pyx_setprop_7km3pipe_11dataclasses_3Hit_t0, (char *)"t0: 'float'", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7km3pipe_11dataclasses_Hit = {
  PyVarObject_HEAD_INIT(0, 0)
  "km3pipe.dataclasses.Hit", /*tp_name*/
  sizeof(struct __pyx_obj_7km3pipe_11dataclasses_Hit), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7km3pipe_11dataclasses_Hit, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_7km3pipe_11dataclasses_3Hit_5__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_7km3pipe_11dataclasses_3Hit_3__str__, /*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_BASETYPE, /*tp_flags*/
  "Hit on a PMT.\n\n    Parameters\n    ----------\n    channel_id : int\n    dir_x : float\n    dir_y : float\n    dir_z : float\n    dom_id : int\n    id : int\n    pmt_id : int\n    pos_x : float\n    pos_y : float\n    pos_z : float\n    t0 : int\n    time : int\n    tot : int\n    triggered : int\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7km3pipe_11dataclasses_Hit, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7km3pipe_11dataclasses_Hit, /*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_7km3pipe_11dataclasses_Hit, /*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*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_7km3pipe_11dataclasses_TimesliceHit(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)o);
  p->pos = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  p->dir = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7km3pipe_11dataclasses_TimesliceHit(PyObject *o) {
  struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *p = (struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)o;
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->pos);
  Py_CLEAR(p->dir);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7km3pipe_11dataclasses_TimesliceHit(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *p = (struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)o;
  if (p->pos) {
    e = (*v)(((PyObject*)p->pos), a); if (e) return e;
  }
  if (p->dir) {
    e = (*v)(((PyObject*)p->dir), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7km3pipe_11dataclasses_TimesliceHit(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *p = (struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)o;
  tmp = ((PyObject*)p->pos);
  p->pos = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->dir);
  p->dir = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_12TimesliceHit_dom_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_6dom_id_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_12TimesliceHit_dom_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_6dom_id_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_12TimesliceHit_time(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_4time_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_12TimesliceHit_time(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_4time_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_12TimesliceHit_tot(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3tot_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_12TimesliceHit_tot(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3tot_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_12TimesliceHit_channel_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_10channel_id_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_12TimesliceHit_channel_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_10channel_id_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_12TimesliceHit_pos(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3pos_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_12TimesliceHit_pos(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3pos_3__set__(o, v);
  }
  else {
    return __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3pos_5__del__(o);
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_12TimesliceHit_dir(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3dir_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_12TimesliceHit_dir(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3dir_3__set__(o, v);
  }
  else {
    return __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3dir_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_7km3pipe_11dataclasses_TimesliceHit[] = {
  {"__insp__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_7__insp__, METH_NOARGS, __pyx_doc_7km3pipe_11dataclasses_12TimesliceHit_6__insp__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7km3pipe_11dataclasses_TimesliceHit[] = {
  {(char *)"dom_id", __pyx_getprop_7km3pipe_11dataclasses_12TimesliceHit_dom_id, __pyx_setprop_7km3pipe_11dataclasses_12TimesliceHit_dom_id, (char *)"dom_id: 'int'", 0},
  {(char *)"time", __pyx_getprop_7km3pipe_11dataclasses_12TimesliceHit_time, __pyx_setprop_7km3pipe_11dataclasses_12TimesliceHit_time, (char *)"time: 'int'", 0},
  {(char *)"tot", __pyx_getprop_7km3pipe_11dataclasses_12TimesliceHit_tot, __pyx_setprop_7km3pipe_11dataclasses_12TimesliceHit_tot, (char *)"tot: 'int'", 0},
  {(char *)"channel_id", __pyx_getprop_7km3pipe_11dataclasses_12TimesliceHit_channel_id, __pyx_setprop_7km3pipe_11dataclasses_12TimesliceHit_channel_id, (char *)"channel_id: 'int'", 0},
  {(char *)"pos", __pyx_getprop_7km3pipe_11dataclasses_12TimesliceHit_pos, __pyx_setprop_7km3pipe_11dataclasses_12TimesliceHit_pos, (char *)"pos: numpy.ndarray", 0},
  {(char *)"dir", __pyx_getprop_7km3pipe_11dataclasses_12TimesliceHit_dir, __pyx_setprop_7km3pipe_11dataclasses_12TimesliceHit_dir, (char *)"dir: numpy.ndarray", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7km3pipe_11dataclasses_TimesliceHit = {
  PyVarObject_HEAD_INIT(0, 0)
  "km3pipe.dataclasses.TimesliceHit", /*tp_name*/
  sizeof(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7km3pipe_11dataclasses_TimesliceHit, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_5__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3__str__, /*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_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "Timeslice hit on a PMT.\n\n    Parameters\n    ----------\n    channel_id : int\n    dom_id : int\n    time : int\n    tot : int\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_7km3pipe_11dataclasses_TimesliceHit, /*tp_traverse*/
  __pyx_tp_clear_7km3pipe_11dataclasses_TimesliceHit, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7km3pipe_11dataclasses_TimesliceHit, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7km3pipe_11dataclasses_TimesliceHit, /*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_7km3pipe_11dataclasses_TimesliceHit, /*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*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_7km3pipe_11dataclasses_MCHit(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7km3pipe_11dataclasses_MCHit *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7km3pipe_11dataclasses_MCHit *)o);
  p->pos = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  p->dir = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7km3pipe_11dataclasses_5MCHit_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7km3pipe_11dataclasses_MCHit(PyObject *o) {
  struct __pyx_obj_7km3pipe_11dataclasses_MCHit *p = (struct __pyx_obj_7km3pipe_11dataclasses_MCHit *)o;
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->pos);
  Py_CLEAR(p->dir);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7km3pipe_11dataclasses_MCHit(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7km3pipe_11dataclasses_MCHit *p = (struct __pyx_obj_7km3pipe_11dataclasses_MCHit *)o;
  if (p->pos) {
    e = (*v)(((PyObject*)p->pos), a); if (e) return e;
  }
  if (p->dir) {
    e = (*v)(((PyObject*)p->dir), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7km3pipe_11dataclasses_MCHit(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7km3pipe_11dataclasses_MCHit *p = (struct __pyx_obj_7km3pipe_11dataclasses_MCHit *)o;
  tmp = ((PyObject*)p->pos);
  p->pos = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->dir);
  p->dir = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_5MCHit_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_5MCHit_2id_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_5MCHit_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_5MCHit_2id_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_5MCHit_dom_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_5MCHit_6dom_id_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_5MCHit_dom_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_5MCHit_6dom_id_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_5MCHit_time(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_5MCHit_4time_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_5MCHit_time(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_5MCHit_4time_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_5MCHit_tot(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_5MCHit_3tot_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_5MCHit_tot(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_5MCHit_3tot_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_5MCHit_channel_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_5MCHit_10channel_id_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_5MCHit_channel_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_5MCHit_10channel_id_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_5MCHit_pmt_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_5MCHit_6pmt_id_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_5MCHit_pmt_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_5MCHit_6pmt_id_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_5MCHit_triggered(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_5MCHit_9triggered_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_5MCHit_triggered(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_5MCHit_9triggered_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_5MCHit_pos(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_5MCHit_3pos_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_5MCHit_pos(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_5MCHit_3pos_3__set__(o, v);
  }
  else {
    return __pyx_pw_7km3pipe_11dataclasses_5MCHit_3pos_5__del__(o);
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_5MCHit_dir(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_5MCHit_3dir_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_5MCHit_dir(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_5MCHit_3dir_3__set__(o, v);
  }
  else {
    return __pyx_pw_7km3pipe_11dataclasses_5MCHit_3dir_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_7km3pipe_11dataclasses_MCHit[] = {
  {"__insp__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_5MCHit_7__insp__, METH_NOARGS, __pyx_doc_7km3pipe_11dataclasses_5MCHit_6__insp__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7km3pipe_11dataclasses_MCHit[] = {
  {(char *)"id", __pyx_getprop_7km3pipe_11dataclasses_5MCHit_id, __pyx_setprop_7km3pipe_11dataclasses_5MCHit_id, (char *)"id: 'int'", 0},
  {(char *)"dom_id", __pyx_getprop_7km3pipe_11dataclasses_5MCHit_dom_id, __pyx_setprop_7km3pipe_11dataclasses_5MCHit_dom_id, (char *)"dom_id: 'int'", 0},
  {(char *)"time", __pyx_getprop_7km3pipe_11dataclasses_5MCHit_time, __pyx_setprop_7km3pipe_11dataclasses_5MCHit_time, (char *)"time: 'int'", 0},
  {(char *)"tot", __pyx_getprop_7km3pipe_11dataclasses_5MCHit_tot, __pyx_setprop_7km3pipe_11dataclasses_5MCHit_tot, (char *)"tot: 'int'", 0},
  {(char *)"channel_id", __pyx_getprop_7km3pipe_11dataclasses_5MCHit_channel_id, __pyx_setprop_7km3pipe_11dataclasses_5MCHit_channel_id, (char *)"channel_id: 'int'", 0},
  {(char *)"pmt_id", __pyx_getprop_7km3pipe_11dataclasses_5MCHit_pmt_id, __pyx_setprop_7km3pipe_11dataclasses_5MCHit_pmt_id, (char *)"pmt_id: 'int'", 0},
  {(char *)"triggered", __pyx_getprop_7km3pipe_11dataclasses_5MCHit_triggered, __pyx_setprop_7km3pipe_11dataclasses_5MCHit_triggered, (char *)"triggered: 'unsigned short'", 0},
  {(char *)"pos", __pyx_getprop_7km3pipe_11dataclasses_5MCHit_pos, __pyx_setprop_7km3pipe_11dataclasses_5MCHit_pos, (char *)"pos: numpy.ndarray", 0},
  {(char *)"dir", __pyx_getprop_7km3pipe_11dataclasses_5MCHit_dir, __pyx_setprop_7km3pipe_11dataclasses_5MCHit_dir, (char *)"dir: numpy.ndarray", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7km3pipe_11dataclasses_MCHit = {
  PyVarObject_HEAD_INIT(0, 0)
  "km3pipe.dataclasses.MCHit", /*tp_name*/
  sizeof(struct __pyx_obj_7km3pipe_11dataclasses_MCHit), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7km3pipe_11dataclasses_MCHit, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_7km3pipe_11dataclasses_5MCHit_5__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_7km3pipe_11dataclasses_5MCHit_3__str__, /*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_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "Monte Carlo Hit on a PMT.\n\n    Parameters\n    ----------\n    channel_id : int\n    dir : Direction or numpy.ndarray\n    dom_id : int\n    id : int\n    pmt_id : int\n    pos : Position or numpy.ndarray\n    time : int\n    tot : int\n    triggered : int\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_7km3pipe_11dataclasses_MCHit, /*tp_traverse*/
  __pyx_tp_clear_7km3pipe_11dataclasses_MCHit, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7km3pipe_11dataclasses_MCHit, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7km3pipe_11dataclasses_MCHit, /*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_7km3pipe_11dataclasses_MCHit, /*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*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_7km3pipe_11dataclasses_Track(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7km3pipe_11dataclasses_Track *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7km3pipe_11dataclasses_Track *)o);
  p->pos = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  p->dir = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7km3pipe_11dataclasses_5Track_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7km3pipe_11dataclasses_Track(PyObject *o) {
  struct __pyx_obj_7km3pipe_11dataclasses_Track *p = (struct __pyx_obj_7km3pipe_11dataclasses_Track *)o;
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->pos);
  Py_CLEAR(p->dir);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7km3pipe_11dataclasses_Track(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7km3pipe_11dataclasses_Track *p = (struct __pyx_obj_7km3pipe_11dataclasses_Track *)o;
  if (p->pos) {
    e = (*v)(((PyObject*)p->pos), a); if (e) return e;
  }
  if (p->dir) {
    e = (*v)(((PyObject*)p->dir), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7km3pipe_11dataclasses_Track(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7km3pipe_11dataclasses_Track *p = (struct __pyx_obj_7km3pipe_11dataclasses_Track *)o;
  tmp = ((PyObject*)p->pos);
  p->pos = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->dir);
  p->dir = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_5Track_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_5Track_2id_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_5Track_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_5Track_2id_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_5Track_time(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_5Track_4time_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_5Track_time(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_5Track_4time_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_5Track_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_5Track_4type_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_5Track_type(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_5Track_4type_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_5Track_interaction_channel(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_5Track_19interaction_channel_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_5Track_interaction_channel(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_5Track_19interaction_channel_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_5Track_energy(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_5Track_6energy_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_5Track_energy(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_5Track_6energy_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_5Track_length(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_5Track_6length_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_5Track_length(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_5Track_6length_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_5Track_bjorkeny(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_5Track_8bjorkeny_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_5Track_bjorkeny(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_5Track_8bjorkeny_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_5Track_is_cc(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_5Track_5is_cc_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_5Track_is_cc(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_5Track_5is_cc_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_5Track_pos(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_5Track_3pos_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_5Track_pos(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_5Track_3pos_3__set__(o, v);
  }
  else {
    return __pyx_pw_7km3pipe_11dataclasses_5Track_3pos_5__del__(o);
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_5Track_dir(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_5Track_3dir_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_5Track_dir(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_5Track_3dir_3__set__(o, v);
  }
  else {
    return __pyx_pw_7km3pipe_11dataclasses_5Track_3dir_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_7km3pipe_11dataclasses_Track[] = {
  {"__insp__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_5Track_7__insp__, METH_NOARGS, __pyx_doc_7km3pipe_11dataclasses_5Track_6__insp__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7km3pipe_11dataclasses_Track[] = {
  {(char *)"id", __pyx_getprop_7km3pipe_11dataclasses_5Track_id, __pyx_setprop_7km3pipe_11dataclasses_5Track_id, (char *)"id: 'int'", 0},
  {(char *)"time", __pyx_getprop_7km3pipe_11dataclasses_5Track_time, __pyx_setprop_7km3pipe_11dataclasses_5Track_time, (char *)"time: 'int'", 0},
  {(char *)"type", __pyx_getprop_7km3pipe_11dataclasses_5Track_type, __pyx_setprop_7km3pipe_11dataclasses_5Track_type, (char *)"type: 'int'", 0},
  {(char *)"interaction_channel", __pyx_getprop_7km3pipe_11dataclasses_5Track_interaction_channel, __pyx_setprop_7km3pipe_11dataclasses_5Track_interaction_channel, (char *)"interaction_channel: 'int'", 0},
  {(char *)"energy", __pyx_getprop_7km3pipe_11dataclasses_5Track_energy, __pyx_setprop_7km3pipe_11dataclasses_5Track_energy, (char *)"energy: 'float'", 0},
  {(char *)"length", __pyx_getprop_7km3pipe_11dataclasses_5Track_length, __pyx_setprop_7km3pipe_11dataclasses_5Track_length, (char *)"length: 'float'", 0},
  {(char *)"bjorkeny", __pyx_getprop_7km3pipe_11dataclasses_5Track_bjorkeny, __pyx_setprop_7km3pipe_11dataclasses_5Track_bjorkeny, (char *)"bjorkeny: 'float'", 0},
  {(char *)"is_cc", __pyx_getprop_7km3pipe_11dataclasses_5Track_is_cc, __pyx_setprop_7km3pipe_11dataclasses_5Track_is_cc, (char *)"is_cc: 'unsigned short'", 0},
  {(char *)"pos", __pyx_getprop_7km3pipe_11dataclasses_5Track_pos, __pyx_setprop_7km3pipe_11dataclasses_5Track_pos, (char *)"pos: numpy.ndarray", 0},
  {(char *)"dir", __pyx_getprop_7km3pipe_11dataclasses_5Track_dir, __pyx_setprop_7km3pipe_11dataclasses_5Track_dir, (char *)"dir: numpy.ndarray", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7km3pipe_11dataclasses_Track = {
  PyVarObject_HEAD_INIT(0, 0)
  "km3pipe.dataclasses.Track", /*tp_name*/
  sizeof(struct __pyx_obj_7km3pipe_11dataclasses_Track), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7km3pipe_11dataclasses_Track, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_7km3pipe_11dataclasses_5Track_5__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_7km3pipe_11dataclasses_5Track_3__str__, /*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_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "Particle track.\n\n    Parameters\n    ----------\n    bjorkeny : float\n    dir : Direction or numpy.ndarray\n    energy : float\n    id : int\n    interaction_channel : int\n    is_cc : int\n    length : float\n    pos : Position or numpy.ndarray\n    time : int\n    type : int\n    ", /*tp_doc*/
  __pyx_tp_traverse_7km3pipe_11dataclasses_Track, /*tp_traverse*/
  __pyx_tp_clear_7km3pipe_11dataclasses_Track, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7km3pipe_11dataclasses_Track, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7km3pipe_11dataclasses_Track, /*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_7km3pipe_11dataclasses_Track, /*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*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row *__pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct__from_row[8];
static int __pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct__from_row = 0;

static PyObject *__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct__from_row(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct__from_row > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row)))) {
    o = (PyObject*)__pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct__from_row[--__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct__from_row];
    memset(o, 0, sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row));
    (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_7km3pipe_11dataclasses___pyx_scope_struct__from_row(PyObject *o) {
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_cls);
  Py_CLEAR(p->__pyx_v_row);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct__from_row < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row)))) {
    __pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct__from_row[__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct__from_row++] = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_7km3pipe_11dataclasses___pyx_scope_struct__from_row(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row *)o;
  if (p->__pyx_v_cls) {
    e = (*v)(p->__pyx_v_cls, a); if (e) return e;
  }
  if (p->__pyx_v_row) {
    e = (*v)(p->__pyx_v_row, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7km3pipe_11dataclasses___pyx_scope_struct__from_row(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row *)o;
  tmp = ((PyObject*)p->__pyx_v_cls);
  p->__pyx_v_cls = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_row);
  p->__pyx_v_row = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_7km3pipe_11dataclasses___pyx_scope_struct__from_row = {
  PyVarObject_HEAD_INIT(0, 0)
  "km3pipe.dataclasses.__pyx_scope_struct__from_row", /*tp_name*/
  sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7km3pipe_11dataclasses___pyx_scope_struct__from_row, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #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_7km3pipe_11dataclasses___pyx_scope_struct__from_row, /*tp_traverse*/
  __pyx_tp_clear_7km3pipe_11dataclasses___pyx_scope_struct__from_row, /*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_7km3pipe_11dataclasses___pyx_scope_struct__from_row, /*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*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr *__pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr[8];
static int __pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr = 0;

static PyObject *__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr)))) {
    o = (PyObject*)__pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr[--__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_7km3pipe_11dataclasses___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_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr(PyObject *o) {
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_col);
  Py_CLEAR(p->__pyx_t_0);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr)))) {
    __pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr[__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr++] = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_7km3pipe_11dataclasses___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_col) {
    e = (*v)(p->__pyx_v_col, 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_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr *)o;
  tmp = ((PyObject*)p->__pyx_outer_scope);
  p->__pyx_outer_scope = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_col);
  p->__pyx_v_col = 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_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "km3pipe.dataclasses.__pyx_scope_struct_1_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #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_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr, /*tp_traverse*/
  __pyx_tp_clear_7km3pipe_11dataclasses___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_7km3pipe_11dataclasses___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*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator *__pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator[8];
static int __pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator = 0;

static PyObject *__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator)))) {
    o = (PyObject*)__pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator[--__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator];
    memset(o, 0, sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator));
    (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_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator(PyObject *o) {
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_i);
  Py_CLEAR(p->__pyx_v_index);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_start);
  Py_CLEAR(p->__pyx_v_step);
  Py_CLEAR(p->__pyx_v_stop);
  Py_CLEAR(p->__pyx_t_0);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator)))) {
    __pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator[__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator++] = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator *)o;
  if (p->__pyx_v_i) {
    e = (*v)(p->__pyx_v_i, a); if (e) return e;
  }
  if (p->__pyx_v_index) {
    e = (*v)(p->__pyx_v_index, a); if (e) return e;
  }
  if (p->__pyx_v_self) {
    e = (*v)(p->__pyx_v_self, a); if (e) return e;
  }
  if (p->__pyx_v_start) {
    e = (*v)(p->__pyx_v_start, a); if (e) return e;
  }
  if (p->__pyx_v_step) {
    e = (*v)(p->__pyx_v_step, a); if (e) return e;
  }
  if (p->__pyx_v_stop) {
    e = (*v)(p->__pyx_v_stop, 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_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator *)o;
  tmp = ((PyObject*)p->__pyx_v_i);
  p->__pyx_v_i = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_index);
  p->__pyx_v_index = 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);
  tmp = ((PyObject*)p->__pyx_v_start);
  p->__pyx_v_start = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_step);
  p->__pyx_v_step = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_stop);
  p->__pyx_v_stop = 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_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator = {
  PyVarObject_HEAD_INIT(0, 0)
  "km3pipe.dataclasses.__pyx_scope_struct_2__slice_generator", /*tp_name*/
  sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #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_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator, /*tp_traverse*/
  __pyx_tp_clear_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator, /*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_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator, /*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*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator *__pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator[8];
static int __pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator = 0;

static PyObject *__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator)))) {
    o = (PyObject*)__pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator[--__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator];
    memset(o, 0, sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator));
    (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_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator(PyObject *o) {
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_i);
  Py_CLEAR(p->__pyx_v_index);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_start);
  Py_CLEAR(p->__pyx_v_step);
  Py_CLEAR(p->__pyx_v_stop);
  Py_CLEAR(p->__pyx_t_0);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator)))) {
    __pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator[__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator++] = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator *)o;
  if (p->__pyx_v_i) {
    e = (*v)(p->__pyx_v_i, a); if (e) return e;
  }
  if (p->__pyx_v_index) {
    e = (*v)(p->__pyx_v_index, a); if (e) return e;
  }
  if (p->__pyx_v_self) {
    e = (*v)(p->__pyx_v_self, a); if (e) return e;
  }
  if (p->__pyx_v_start) {
    e = (*v)(p->__pyx_v_start, a); if (e) return e;
  }
  if (p->__pyx_v_step) {
    e = (*v)(p->__pyx_v_step, a); if (e) return e;
  }
  if (p->__pyx_v_stop) {
    e = (*v)(p->__pyx_v_stop, 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_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator *)o;
  tmp = ((PyObject*)p->__pyx_v_i);
  p->__pyx_v_i = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_index);
  p->__pyx_v_index = 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);
  tmp = ((PyObject*)p->__pyx_v_start);
  p->__pyx_v_start = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_step);
  p->__pyx_v_step = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_stop);
  p->__pyx_v_stop = 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_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator = {
  PyVarObject_HEAD_INIT(0, 0)
  "km3pipe.dataclasses.__pyx_scope_struct_3__slice_generator", /*tp_name*/
  sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #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_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator, /*tp_traverse*/
  __pyx_tp_clear_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator, /*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_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator, /*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*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator *__pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator[8];
static int __pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator = 0;

static PyObject *__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator)))) {
    o = (PyObject*)__pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator[--__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator];
    memset(o, 0, sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator));
    (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_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator(PyObject *o) {
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_i);
  Py_CLEAR(p->__pyx_v_index);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_start);
  Py_CLEAR(p->__pyx_v_step);
  Py_CLEAR(p->__pyx_v_stop);
  Py_CLEAR(p->__pyx_t_0);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator)))) {
    __pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator[__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator++] = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator *)o;
  if (p->__pyx_v_i) {
    e = (*v)(p->__pyx_v_i, a); if (e) return e;
  }
  if (p->__pyx_v_index) {
    e = (*v)(p->__pyx_v_index, a); if (e) return e;
  }
  if (p->__pyx_v_self) {
    e = (*v)(p->__pyx_v_self, a); if (e) return e;
  }
  if (p->__pyx_v_start) {
    e = (*v)(p->__pyx_v_start, a); if (e) return e;
  }
  if (p->__pyx_v_step) {
    e = (*v)(p->__pyx_v_step, a); if (e) return e;
  }
  if (p->__pyx_v_stop) {
    e = (*v)(p->__pyx_v_stop, 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_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator *)o;
  tmp = ((PyObject*)p->__pyx_v_i);
  p->__pyx_v_i = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_index);
  p->__pyx_v_index = 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);
  tmp = ((PyObject*)p->__pyx_v_start);
  p->__pyx_v_start = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_step);
  p->__pyx_v_step = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_stop);
  p->__pyx_v_stop = 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_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator = {
  PyVarObject_HEAD_INIT(0, 0)
  "km3pipe.dataclasses.__pyx_scope_struct_4__slice_generator", /*tp_name*/
  sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #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_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator, /*tp_traverse*/
  __pyx_tp_clear_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator, /*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_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator, /*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*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator *__pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator[8];
static int __pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator = 0;

static PyObject *__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator)))) {
    o = (PyObject*)__pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator[--__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator];
    memset(o, 0, sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator));
    (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_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator(PyObject *o) {
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_i);
  Py_CLEAR(p->__pyx_v_index);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_start);
  Py_CLEAR(p->__pyx_v_step);
  Py_CLEAR(p->__pyx_v_stop);
  Py_CLEAR(p->__pyx_t_0);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator)))) {
    __pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator[__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator++] = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator *)o;
  if (p->__pyx_v_i) {
    e = (*v)(p->__pyx_v_i, a); if (e) return e;
  }
  if (p->__pyx_v_index) {
    e = (*v)(p->__pyx_v_index, a); if (e) return e;
  }
  if (p->__pyx_v_self) {
    e = (*v)(p->__pyx_v_self, a); if (e) return e;
  }
  if (p->__pyx_v_start) {
    e = (*v)(p->__pyx_v_start, a); if (e) return e;
  }
  if (p->__pyx_v_step) {
    e = (*v)(p->__pyx_v_step, a); if (e) return e;
  }
  if (p->__pyx_v_stop) {
    e = (*v)(p->__pyx_v_stop, 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_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator *)o;
  tmp = ((PyObject*)p->__pyx_v_i);
  p->__pyx_v_i = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_index);
  p->__pyx_v_index = 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);
  tmp = ((PyObject*)p->__pyx_v_start);
  p->__pyx_v_start = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_step);
  p->__pyx_v_step = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_stop);
  p->__pyx_v_stop = 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_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator = {
  PyVarObject_HEAD_INIT(0, 0)
  "km3pipe.dataclasses.__pyx_scope_struct_5__slice_generator", /*tp_name*/
  sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #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_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator, /*tp_traverse*/
  __pyx_tp_clear_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator, /*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_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator, /*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*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict *__pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict[8];
static int __pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict = 0;

static PyObject *__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict)))) {
    o = (PyObject*)__pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict[--__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict];
    memset(o, 0, sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict));
    (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_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict(PyObject *o) {
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_dtype);
  Py_CLEAR(p->__pyx_v_map);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict)))) {
    __pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict[__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict++] = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict *)o;
  if (p->__pyx_v_dtype) {
    e = (*v)(p->__pyx_v_dtype, a); if (e) return e;
  }
  if (p->__pyx_v_map) {
    e = (*v)(p->__pyx_v_map, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict *)o;
  tmp = ((PyObject*)p->__pyx_v_dtype);
  p->__pyx_v_dtype = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_map);
  p->__pyx_v_map = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict = {
  PyVarObject_HEAD_INIT(0, 0)
  "km3pipe.dataclasses.__pyx_scope_struct_6_from_dict", /*tp_name*/
  sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #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_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict, /*tp_traverse*/
  __pyx_tp_clear_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict, /*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_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict, /*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*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr *__pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr[8];
static int __pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr = 0;

static PyObject *__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr)))) {
    o = (PyObject*)__pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr[--__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_7km3pipe_11dataclasses___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_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr(PyObject *o) {
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_key);
  Py_CLEAR(p->__pyx_t_0);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr)))) {
    __pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr[__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr++] = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr *p = (struct __pyx_obj_7km3pipe_11dataclasses___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_key) {
    e = (*v)(p->__pyx_v_key, 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_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr *)o;
  tmp = ((PyObject*)p->__pyx_outer_scope);
  p->__pyx_outer_scope = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_key);
  p->__pyx_v_key = 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_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "km3pipe.dataclasses.__pyx_scope_struct_7_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #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_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr, /*tp_traverse*/
  __pyx_tp_clear_7km3pipe_11dataclasses___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_7km3pipe_11dataclasses___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*/
  0, /*tp_version_tag*/
  #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
    "dataclasses",
    __pyx_k__221, /* 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_0_4_1_4_2_4, __pyx_k_0_4_1_4_2_4, sizeof(__pyx_k_0_4_1_4_2_4), 0, 0, 1, 0},
  {&__pyx_kp_s_A_binary_struct_superclass_which, __pyx_k_A_binary_struct_superclass_which, sizeof(__pyx_k_A_binary_struct_superclass_which), 0, 0, 1, 0},
  {&__pyx_kp_s_A_metaclass_for_serialisable_cla, __pyx_k_A_metaclass_for_serialisable_cla, sizeof(__pyx_k_A_metaclass_for_serialisable_cla), 0, 0, 1, 0},
  {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1},
  {&__pyx_n_s_BinaryStruct, __pyx_k_BinaryStruct, sizeof(__pyx_k_BinaryStruct), 0, 0, 1, 1},
  {&__pyx_n_s_BinaryStruct___init, __pyx_k_BinaryStruct___init, sizeof(__pyx_k_BinaryStruct___init), 0, 0, 1, 1},
  {&__pyx_n_s_BinaryStruct__size, __pyx_k_BinaryStruct__size, sizeof(__pyx_k_BinaryStruct__size), 0, 0, 1, 1},
  {&__pyx_kp_s_Collection_of_multiple_Hits, __pyx_k_Collection_of_multiple_Hits, sizeof(__pyx_k_Collection_of_multiple_Hits), 0, 0, 1, 0},
  {&__pyx_kp_s_Collection_of_multiple_Tracks_At, __pyx_k_Collection_of_multiple_Tracks_At, sizeof(__pyx_k_Collection_of_multiple_Tracks_At), 0, 0, 1, 0},
  {&__pyx_kp_s_Collection_of_multiple_timeslice, __pyx_k_Collection_of_multiple_timeslice, sizeof(__pyx_k_Collection_of_multiple_timeslice), 0, 0, 1, 0},
  {&__pyx_kp_s_Collection_of_summary_frames, __pyx_k_Collection_of_summary_frames, sizeof(__pyx_k_Collection_of_summary_frames), 0, 0, 1, 0},
  {&__pyx_kp_s_Copyright_2016_Tamas_Gal_and_the, __pyx_k_Copyright_2016_Tamas_Gal_and_the, sizeof(__pyx_k_Copyright_2016_Tamas_Gal_and_the), 0, 0, 1, 0},
  {&__pyx_n_s_DataFrame, __pyx_k_DataFrame, sizeof(__pyx_k_DataFrame), 0, 0, 1, 1},
  {&__pyx_n_s_Development, __pyx_k_Development, sizeof(__pyx_k_Development), 0, 0, 1, 1},
  {&__pyx_n_s_Direction, __pyx_k_Direction, sizeof(__pyx_k_Direction), 0, 0, 1, 1},
  {&__pyx_n_s_Direction_2, __pyx_k_Direction_2, sizeof(__pyx_k_Direction_2), 0, 0, 1, 1},
  {&__pyx_n_s_Direction____new, __pyx_k_Direction____new, sizeof(__pyx_k_Direction____new), 0, 0, 1, 1},
  {&__pyx_n_s_Direction____str, __pyx_k_Direction____str, sizeof(__pyx_k_Direction____str), 0, 0, 1, 1},
  {&__pyx_n_s_Direction___normalise, __pyx_k_Direction___normalise, sizeof(__pyx_k_Direction___normalise), 0, 0, 1, 1},
  {&__pyx_n_s_Direction__x, __pyx_k_Direction__x, sizeof(__pyx_k_Direction__x), 0, 0, 1, 1},
  {&__pyx_n_s_Direction__y, __pyx_k_Direction__y, sizeof(__pyx_k_Direction__y), 0, 0, 1, 1},
  {&__pyx_n_s_Direction__z, __pyx_k_Direction__z, sizeof(__pyx_k_Direction__z), 0, 0, 1, 1},
  {&__pyx_n_s_Direction__zenith, __pyx_k_Direction__zenith, sizeof(__pyx_k_Direction__zenith), 0, 0, 1, 1},
  {&__pyx_n_s_E, __pyx_k_E, sizeof(__pyx_k_E), 0, 0, 1, 1},
  {&__pyx_n_s_EventInfo, __pyx_k_EventInfo, sizeof(__pyx_k_EventInfo), 0, 0, 1, 1},
  {&__pyx_n_s_EventInfo___array, __pyx_k_EventInfo___array, sizeof(__pyx_k_EventInfo___array), 0, 0, 1, 1},
  {&__pyx_n_s_EventInfo___init, __pyx_k_EventInfo___init, sizeof(__pyx_k_EventInfo___init), 0, 0, 1, 1},
  {&__pyx_n_s_EventInfo___insp, __pyx_k_EventInfo___insp, sizeof(__pyx_k_EventInfo___insp), 0, 0, 1, 1},
  {&__pyx_n_s_EventInfo___len, __pyx_k_EventInfo___len, sizeof(__pyx_k_EventInfo___len), 0, 0, 1, 1},
  {&__pyx_n_s_EventInfo___repr, __pyx_k_EventInfo___repr, sizeof(__pyx_k_EventInfo___repr), 0, 0, 1, 1},
  {&__pyx_n_s_EventInfo___str, __pyx_k_EventInfo___str, sizeof(__pyx_k_EventInfo___str), 0, 0, 1, 1},
  {&__pyx_n_s_EventInfo_conv_from, __pyx_k_EventInfo_conv_from, sizeof(__pyx_k_EventInfo_conv_from), 0, 0, 1, 1},
  {&__pyx_n_s_EventInfo_conv_to, __pyx_k_EventInfo_conv_to, sizeof(__pyx_k_EventInfo_conv_to), 0, 0, 1, 1},
  {&__pyx_n_s_EventInfo_deserialise, __pyx_k_EventInfo_deserialise, sizeof(__pyx_k_EventInfo_deserialise), 0, 0, 1, 1},
  {&__pyx_n_s_EventInfo_from_row, __pyx_k_EventInfo_from_row, sizeof(__pyx_k_EventInfo_from_row), 0, 0, 1, 1},
  {&__pyx_n_s_EventInfo_from_row_locals_genexp, __pyx_k_EventInfo_from_row_locals_genexp, sizeof(__pyx_k_EventInfo_from_row_locals_genexp), 0, 0, 1, 1},
  {&__pyx_n_s_EventInfo_serialise, __pyx_k_EventInfo_serialise, sizeof(__pyx_k_EventInfo_serialise), 0, 0, 1, 1},
  {&__pyx_kp_s_Event_0_detector_id_1_frame_inde, __pyx_k_Event_0_detector_id_1_frame_inde, sizeof(__pyx_k_Event_0_detector_id_1_frame_inde), 0, 0, 1, 0},
  {&__pyx_kp_s_Event_Metadata, __pyx_k_Event_Metadata, sizeof(__pyx_k_Event_Metadata), 0, 0, 1, 0},
  {&__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_Hit, __pyx_k_Hit, sizeof(__pyx_k_Hit), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries, __pyx_k_HitSeries, sizeof(__pyx_k_HitSeries), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries___array, __pyx_k_HitSeries___array, sizeof(__pyx_k_HitSeries___array), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries___getitem, __pyx_k_HitSeries___getitem, sizeof(__pyx_k_HitSeries___getitem), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries___init, __pyx_k_HitSeries___init, sizeof(__pyx_k_HitSeries___init), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries___insp, __pyx_k_HitSeries___insp, sizeof(__pyx_k_HitSeries___insp), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries___iter, __pyx_k_HitSeries___iter, sizeof(__pyx_k_HitSeries___iter), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries___len, __pyx_k_HitSeries___len, sizeof(__pyx_k_HitSeries___len), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries___next, __pyx_k_HitSeries___next, sizeof(__pyx_k_HitSeries___next), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries___repr, __pyx_k_HitSeries___repr, sizeof(__pyx_k_HitSeries___repr), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries___str, __pyx_k_HitSeries___str, sizeof(__pyx_k_HitSeries___str), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries__slice_generator, __pyx_k_HitSeries__slice_generator, sizeof(__pyx_k_HitSeries__slice_generator), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_channel_id, __pyx_k_HitSeries_channel_id, sizeof(__pyx_k_HitSeries_channel_id), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_conv_from, __pyx_k_HitSeries_conv_from, sizeof(__pyx_k_HitSeries_conv_from), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_conv_to, __pyx_k_HitSeries_conv_to, sizeof(__pyx_k_HitSeries_conv_to), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_deserialise, __pyx_k_HitSeries_deserialise, sizeof(__pyx_k_HitSeries_deserialise), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_dir_x, __pyx_k_HitSeries_dir_x, sizeof(__pyx_k_HitSeries_dir_x), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_dir_y, __pyx_k_HitSeries_dir_y, sizeof(__pyx_k_HitSeries_dir_y), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_dir_z, __pyx_k_HitSeries_dir_z, sizeof(__pyx_k_HitSeries_dir_z), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_dom_id, __pyx_k_HitSeries_dom_id, sizeof(__pyx_k_HitSeries_dom_id), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_first_hits, __pyx_k_HitSeries_first_hits, sizeof(__pyx_k_HitSeries_first_hits), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_from_aanet, __pyx_k_HitSeries_from_aanet, sizeof(__pyx_k_HitSeries_from_aanet), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_from_arrays, __pyx_k_HitSeries_from_arrays, sizeof(__pyx_k_HitSeries_from_arrays), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_from_dict, __pyx_k_HitSeries_from_dict, sizeof(__pyx_k_HitSeries_from_dict), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_from_evt, __pyx_k_HitSeries_from_evt, sizeof(__pyx_k_HitSeries_from_evt), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_from_table, __pyx_k_HitSeries_from_table, sizeof(__pyx_k_HitSeries_from_table), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_id, __pyx_k_HitSeries_id, sizeof(__pyx_k_HitSeries_id), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_next, __pyx_k_HitSeries_next, sizeof(__pyx_k_HitSeries_next), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_pmt_id, __pyx_k_HitSeries_pmt_id, sizeof(__pyx_k_HitSeries_pmt_id), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_pos_x, __pyx_k_HitSeries_pos_x, sizeof(__pyx_k_HitSeries_pos_x), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_pos_y, __pyx_k_HitSeries_pos_y, sizeof(__pyx_k_HitSeries_pos_y), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_pos_z, __pyx_k_HitSeries_pos_z, sizeof(__pyx_k_HitSeries_pos_z), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_serialise, __pyx_k_HitSeries_serialise, sizeof(__pyx_k_HitSeries_serialise), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_t0, __pyx_k_HitSeries_t0, sizeof(__pyx_k_HitSeries_t0), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_time, __pyx_k_HitSeries_time, sizeof(__pyx_k_HitSeries_time), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_tot, __pyx_k_HitSeries_tot, sizeof(__pyx_k_HitSeries_tot), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_triggered, __pyx_k_HitSeries_triggered, sizeof(__pyx_k_HitSeries_triggered), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_triggered_hits, __pyx_k_HitSeries_triggered_hits, sizeof(__pyx_k_HitSeries_triggered_hits), 0, 0, 1, 1},
  {&__pyx_kp_s_HitSeries_with_0_hit_1, __pyx_k_HitSeries_with_0_hit_1, sizeof(__pyx_k_HitSeries_with_0_hit_1), 0, 0, 1, 0},
  {&__pyx_n_s_Hit___insp, __pyx_k_Hit___insp, sizeof(__pyx_k_Hit___insp), 0, 0, 1, 1},
  {&__pyx_kp_s_Hit_channel_id_0_dom_id_1_pmt_id, __pyx_k_Hit_channel_id_0_dom_id_1_pmt_id, sizeof(__pyx_k_Hit_channel_id_0_dom_id_1_pmt_id), 0, 0, 1, 0},
  {&__pyx_n_s_Hits, __pyx_k_Hits, sizeof(__pyx_k_Hits), 0, 0, 1, 1},
  {&__pyx_n_s_IS_CC, __pyx_k_IS_CC, sizeof(__pyx_k_IS_CC), 0, 0, 1, 1},
  {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
  {&__pyx_kp_s_JDAQSummaryslice_Metadata, __pyx_k_JDAQSummaryslice_Metadata, sizeof(__pyx_k_JDAQSummaryslice_Metadata), 0, 0, 1, 0},
  {&__pyx_kp_s_JDAQSummaryslice_frame_metadata, __pyx_k_JDAQSummaryslice_frame_metadata, sizeof(__pyx_k_JDAQSummaryslice_frame_metadata), 0, 0, 1, 0},
  {&__pyx_kp_s_JDAQTimeslice_frame_metadata, __pyx_k_JDAQTimeslice_frame_metadata, sizeof(__pyx_k_JDAQTimeslice_frame_metadata), 0, 0, 1, 0},
  {&__pyx_kp_s_JDAQTimeslice_metadata, __pyx_k_JDAQTimeslice_metadata, sizeof(__pyx_k_JDAQTimeslice_metadata), 0, 0, 1, 0},
  {&__pyx_n_s_KM3Array, __pyx_k_KM3Array, sizeof(__pyx_k_KM3Array), 0, 0, 1, 1},
  {&__pyx_n_s_KM3Array___array_finalize, __pyx_k_KM3Array___array_finalize, sizeof(__pyx_k_KM3Array___array_finalize), 0, 0, 1, 1},
  {&__pyx_n_s_KM3Array___init, __pyx_k_KM3Array___init, sizeof(__pyx_k_KM3Array___init), 0, 0, 1, 1},
  {&__pyx_n_s_KM3Array___new, __pyx_k_KM3Array___new, sizeof(__pyx_k_KM3Array___new), 0, 0, 1, 1},
  {&__pyx_n_s_KM3Array_conv_from, __pyx_k_KM3Array_conv_from, sizeof(__pyx_k_KM3Array_conv_from), 0, 0, 1, 1},
  {&__pyx_n_s_KM3Array_conv_to, __pyx_k_KM3Array_conv_to, sizeof(__pyx_k_KM3Array_conv_to), 0, 0, 1, 1},
  {&__pyx_n_s_KM3Array_deserialise, __pyx_k_KM3Array_deserialise, sizeof(__pyx_k_KM3Array_deserialise), 0, 0, 1, 1},
  {&__pyx_n_s_KM3Array_from_dict, __pyx_k_KM3Array_from_dict, sizeof(__pyx_k_KM3Array_from_dict), 0, 0, 1, 1},
  {&__pyx_n_s_KM3Array_from_dict_locals_genexp, __pyx_k_KM3Array_from_dict_locals_genexp, sizeof(__pyx_k_KM3Array_from_dict_locals_genexp), 0, 0, 1, 1},
  {&__pyx_n_s_KM3Array_serialise, __pyx_k_KM3Array_serialise, sizeof(__pyx_k_KM3Array_serialise), 0, 0, 1, 1},
  {&__pyx_n_s_KM3DataFrame, __pyx_k_KM3DataFrame, sizeof(__pyx_k_KM3DataFrame), 0, 0, 1, 1},
  {&__pyx_n_s_KM3DataFrame___init, __pyx_k_KM3DataFrame___init, sizeof(__pyx_k_KM3DataFrame___init), 0, 0, 1, 1},
  {&__pyx_n_s_KM3DataFrame__constructor, __pyx_k_KM3DataFrame__constructor, sizeof(__pyx_k_KM3DataFrame__constructor), 0, 0, 1, 1},
  {&__pyx_n_s_KM3DataFrame_conv_from, __pyx_k_KM3DataFrame_conv_from, sizeof(__pyx_k_KM3DataFrame_conv_from), 0, 0, 1, 1},
  {&__pyx_n_s_KM3DataFrame_conv_to, __pyx_k_KM3DataFrame_conv_to, sizeof(__pyx_k_KM3DataFrame_conv_to), 0, 0, 1, 1},
  {&__pyx_n_s_KM3DataFrame_deserialise, __pyx_k_KM3DataFrame_deserialise, sizeof(__pyx_k_KM3DataFrame_deserialise), 0, 0, 1, 1},
  {&__pyx_n_s_KM3DataFrame_serialise, __pyx_k_KM3DataFrame_serialise, sizeof(__pyx_k_KM3DataFrame_serialise), 0, 0, 1, 1},
  {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
  {&__pyx_n_s_MCHit___insp, __pyx_k_MCHit___insp, sizeof(__pyx_k_MCHit___insp), 0, 0, 1, 1},
  {&__pyx_n_s_MIT, __pyx_k_MIT, sizeof(__pyx_k_MIT), 0, 0, 1, 1},
  {&__pyx_n_s_McHits, __pyx_k_McHits, sizeof(__pyx_k_McHits), 0, 0, 1, 1},
  {&__pyx_n_s_McTracks, __pyx_k_McTracks, sizeof(__pyx_k_McTracks), 0, 0, 1, 1},
  {&__pyx_kp_s_No_muon_found, __pyx_k_No_muon_found, sizeof(__pyx_k_No_muon_found), 0, 0, 1, 0},
  {&__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_kp_s_Numpy_NDarray_metadata_This_clas, __pyx_k_Numpy_NDarray_metadata_This_clas, sizeof(__pyx_k_Numpy_NDarray_metadata_This_clas), 0, 0, 1, 0},
  {&__pyx_kp_s_Pandas_Dataframe_metadata_This_c, __pyx_k_Pandas_Dataframe_metadata_This_c, sizeof(__pyx_k_Pandas_Dataframe_metadata_This_c), 0, 0, 1, 0},
  {&__pyx_n_s_Point, __pyx_k_Point, sizeof(__pyx_k_Point), 0, 0, 1, 1},
  {&__pyx_n_s_Point___new, __pyx_k_Point___new, sizeof(__pyx_k_Point___new), 0, 0, 1, 1},
  {&__pyx_n_s_Point_x, __pyx_k_Point_x, sizeof(__pyx_k_Point_x), 0, 0, 1, 1},
  {&__pyx_n_s_Point_y, __pyx_k_Point_y, sizeof(__pyx_k_Point_y), 0, 0, 1, 1},
  {&__pyx_n_s_Point_z, __pyx_k_Point_z, sizeof(__pyx_k_Point_z), 0, 0, 1, 1},
  {&__pyx_n_s_Position, __pyx_k_Position, sizeof(__pyx_k_Position), 0, 0, 1, 1},
  {&__pyx_kp_s_Represents_a_direction_in_a_3D_s, __pyx_k_Represents_a_direction_in_a_3D_s, sizeof(__pyx_k_Represents_a_direction_in_a_3D_s), 0, 0, 1, 0},
  {&__pyx_kp_s_Represents_a_point_in_a_3D_space, __pyx_k_Represents_a_point_in_a_3D_space, sizeof(__pyx_k_Represents_a_point_in_a_3D_space), 0, 0, 1, 0},
  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
  {&__pyx_n_s_Serialisable, __pyx_k_Serialisable, sizeof(__pyx_k_Serialisable), 0, 0, 1, 1},
  {&__pyx_n_s_Serialisable___new, __pyx_k_Serialisable___new, sizeof(__pyx_k_Serialisable___new), 0, 0, 1, 1},
  {&__pyx_n_s_Serialisable___new___locals___in, __pyx_k_Serialisable___new___locals___in, sizeof(__pyx_k_Serialisable___new___locals___in), 0, 0, 1, 1},
  {&__pyx_n_s_StopIteration, __pyx_k_StopIteration, sizeof(__pyx_k_StopIteration), 0, 0, 1, 1},
  {&__pyx_n_s_Struct, __pyx_k_Struct, sizeof(__pyx_k_Struct), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeInfo, __pyx_k_SummaryframeInfo, sizeof(__pyx_k_SummaryframeInfo), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeInfo___array, __pyx_k_SummaryframeInfo___array, sizeof(__pyx_k_SummaryframeInfo___array), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeInfo___insp, __pyx_k_SummaryframeInfo___insp, sizeof(__pyx_k_SummaryframeInfo___insp), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeInfo___len, __pyx_k_SummaryframeInfo___len, sizeof(__pyx_k_SummaryframeInfo___len), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeInfo___str, __pyx_k_SummaryframeInfo___str, sizeof(__pyx_k_SummaryframeInfo___str), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeInfo_conv_from, __pyx_k_SummaryframeInfo_conv_from, sizeof(__pyx_k_SummaryframeInfo_conv_from), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeInfo_conv_to, __pyx_k_SummaryframeInfo_conv_to, sizeof(__pyx_k_SummaryframeInfo_conv_to), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeInfo_deserialise, __pyx_k_SummaryframeInfo_deserialise, sizeof(__pyx_k_SummaryframeInfo_deserialise), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeInfo_from_table, __pyx_k_SummaryframeInfo_from_table, sizeof(__pyx_k_SummaryframeInfo_from_table), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeInfo_serialise, __pyx_k_SummaryframeInfo_serialise, sizeof(__pyx_k_SummaryframeInfo_serialise), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeSeries, __pyx_k_SummaryframeSeries, sizeof(__pyx_k_SummaryframeSeries), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeSeries___array, __pyx_k_SummaryframeSeries___array, sizeof(__pyx_k_SummaryframeSeries___array), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeSeries___getitem, __pyx_k_SummaryframeSeries___getitem, sizeof(__pyx_k_SummaryframeSeries___getitem), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeSeries___init, __pyx_k_SummaryframeSeries___init, sizeof(__pyx_k_SummaryframeSeries___init), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeSeries___iter, __pyx_k_SummaryframeSeries___iter, sizeof(__pyx_k_SummaryframeSeries___iter), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeSeries___len, __pyx_k_SummaryframeSeries___len, sizeof(__pyx_k_SummaryframeSeries___len), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeSeries___next, __pyx_k_SummaryframeSeries___next, sizeof(__pyx_k_SummaryframeSeries___next), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeSeries__slice_genera, __pyx_k_SummaryframeSeries__slice_genera, sizeof(__pyx_k_SummaryframeSeries__slice_genera), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeSeries_conv_from, __pyx_k_SummaryframeSeries_conv_from, sizeof(__pyx_k_SummaryframeSeries_conv_from), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeSeries_conv_to, __pyx_k_SummaryframeSeries_conv_to, sizeof(__pyx_k_SummaryframeSeries_conv_to), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeSeries_deserialise, __pyx_k_SummaryframeSeries_deserialise, sizeof(__pyx_k_SummaryframeSeries_deserialise), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeSeries_dom_ids, __pyx_k_SummaryframeSeries_dom_ids, sizeof(__pyx_k_SummaryframeSeries_dom_ids), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeSeries_from_arrays, __pyx_k_SummaryframeSeries_from_arrays, sizeof(__pyx_k_SummaryframeSeries_from_arrays), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeSeries_from_table, __pyx_k_SummaryframeSeries_from_table, sizeof(__pyx_k_SummaryframeSeries_from_table), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeSeries_max_sequence, __pyx_k_SummaryframeSeries_max_sequence, sizeof(__pyx_k_SummaryframeSeries_max_sequence), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeSeries_n_received_pa, __pyx_k_SummaryframeSeries_n_received_pa, sizeof(__pyx_k_SummaryframeSeries_n_received_pa), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeSeries_next, __pyx_k_SummaryframeSeries_next, sizeof(__pyx_k_SummaryframeSeries_next), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeSeries_serialise, __pyx_k_SummaryframeSeries_serialise, sizeof(__pyx_k_SummaryframeSeries_serialise), 0, 0, 1, 1},
  {&__pyx_n_s_SummarysliceInfo, __pyx_k_SummarysliceInfo, sizeof(__pyx_k_SummarysliceInfo), 0, 0, 1, 1},
  {&__pyx_n_s_SummarysliceInfo___array, __pyx_k_SummarysliceInfo___array, sizeof(__pyx_k_SummarysliceInfo___array), 0, 0, 1, 1},
  {&__pyx_n_s_SummarysliceInfo___insp, __pyx_k_SummarysliceInfo___insp, sizeof(__pyx_k_SummarysliceInfo___insp), 0, 0, 1, 1},
  {&__pyx_n_s_SummarysliceInfo___len, __pyx_k_SummarysliceInfo___len, sizeof(__pyx_k_SummarysliceInfo___len), 0, 0, 1, 1},
  {&__pyx_n_s_SummarysliceInfo___str, __pyx_k_SummarysliceInfo___str, sizeof(__pyx_k_SummarysliceInfo___str), 0, 0, 1, 1},
  {&__pyx_n_s_SummarysliceInfo_conv_from, __pyx_k_SummarysliceInfo_conv_from, sizeof(__pyx_k_SummarysliceInfo_conv_from), 0, 0, 1, 1},
  {&__pyx_n_s_SummarysliceInfo_conv_to, __pyx_k_SummarysliceInfo_conv_to, sizeof(__pyx_k_SummarysliceInfo_conv_to), 0, 0, 1, 1},
  {&__pyx_n_s_SummarysliceInfo_deserialise, __pyx_k_SummarysliceInfo_deserialise, sizeof(__pyx_k_SummarysliceInfo_deserialise), 0, 0, 1, 1},
  {&__pyx_n_s_SummarysliceInfo_from_table, __pyx_k_SummarysliceInfo_from_table, sizeof(__pyx_k_SummarysliceInfo_from_table), 0, 0, 1, 1},
  {&__pyx_n_s_SummarysliceInfo_serialise, __pyx_k_SummarysliceInfo_serialise, sizeof(__pyx_k_SummarysliceInfo_serialise), 0, 0, 1, 1},
  {&__pyx_kp_s_Summaryslice_0_detector_id_1_fra, __pyx_k_Summaryslice_0_detector_id_1_fra, sizeof(__pyx_k_Summaryslice_0_detector_id_1_fra), 0, 0, 1, 0},
  {&__pyx_kp_s_Summaryslice_frame_0_slice_id_1, __pyx_k_Summaryslice_frame_0_slice_id_1, sizeof(__pyx_k_Summaryslice_frame_0_slice_id_1), 0, 0, 1, 0},
  {&__pyx_kp_s_Tamas_Gal_and_Moritz_Lotze, __pyx_k_Tamas_Gal_and_Moritz_Lotze, sizeof(__pyx_k_Tamas_Gal_and_Moritz_Lotze), 0, 0, 1, 0},
  {&__pyx_n_s_TimesliceFrameInfo, __pyx_k_TimesliceFrameInfo, sizeof(__pyx_k_TimesliceFrameInfo), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceFrameInfo___array, __pyx_k_TimesliceFrameInfo___array, sizeof(__pyx_k_TimesliceFrameInfo___array), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceFrameInfo___insp, __pyx_k_TimesliceFrameInfo___insp, sizeof(__pyx_k_TimesliceFrameInfo___insp), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceFrameInfo___len, __pyx_k_TimesliceFrameInfo___len, sizeof(__pyx_k_TimesliceFrameInfo___len), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceFrameInfo___str, __pyx_k_TimesliceFrameInfo___str, sizeof(__pyx_k_TimesliceFrameInfo___str), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceFrameInfo_conv_from, __pyx_k_TimesliceFrameInfo_conv_from, sizeof(__pyx_k_TimesliceFrameInfo_conv_from), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceFrameInfo_conv_to, __pyx_k_TimesliceFrameInfo_conv_to, sizeof(__pyx_k_TimesliceFrameInfo_conv_to), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceFrameInfo_deserialise, __pyx_k_TimesliceFrameInfo_deserialise, sizeof(__pyx_k_TimesliceFrameInfo_deserialise), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceFrameInfo_from_table, __pyx_k_TimesliceFrameInfo_from_table, sizeof(__pyx_k_TimesliceFrameInfo_from_table), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceFrameInfo_serialise, __pyx_k_TimesliceFrameInfo_serialise, sizeof(__pyx_k_TimesliceFrameInfo_serialise), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries, __pyx_k_TimesliceHitSeries, sizeof(__pyx_k_TimesliceHitSeries), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries___array, __pyx_k_TimesliceHitSeries___array, sizeof(__pyx_k_TimesliceHitSeries___array), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries___getitem, __pyx_k_TimesliceHitSeries___getitem, sizeof(__pyx_k_TimesliceHitSeries___getitem), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries___init, __pyx_k_TimesliceHitSeries___init, sizeof(__pyx_k_TimesliceHitSeries___init), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries___insp, __pyx_k_TimesliceHitSeries___insp, sizeof(__pyx_k_TimesliceHitSeries___insp), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries___iter, __pyx_k_TimesliceHitSeries___iter, sizeof(__pyx_k_TimesliceHitSeries___iter), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries___len, __pyx_k_TimesliceHitSeries___len, sizeof(__pyx_k_TimesliceHitSeries___len), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries___next, __pyx_k_TimesliceHitSeries___next, sizeof(__pyx_k_TimesliceHitSeries___next), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries___repr, __pyx_k_TimesliceHitSeries___repr, sizeof(__pyx_k_TimesliceHitSeries___repr), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries___str, __pyx_k_TimesliceHitSeries___str, sizeof(__pyx_k_TimesliceHitSeries___str), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries__slice_genera, __pyx_k_TimesliceHitSeries__slice_genera, sizeof(__pyx_k_TimesliceHitSeries__slice_genera), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries_channel_id, __pyx_k_TimesliceHitSeries_channel_id, sizeof(__pyx_k_TimesliceHitSeries_channel_id), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries_conv_from, __pyx_k_TimesliceHitSeries_conv_from, sizeof(__pyx_k_TimesliceHitSeries_conv_from), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries_conv_to, __pyx_k_TimesliceHitSeries_conv_to, sizeof(__pyx_k_TimesliceHitSeries_conv_to), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries_deserialise, __pyx_k_TimesliceHitSeries_deserialise, sizeof(__pyx_k_TimesliceHitSeries_deserialise), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries_dom_id, __pyx_k_TimesliceHitSeries_dom_id, sizeof(__pyx_k_TimesliceHitSeries_dom_id), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries_from_arrays, __pyx_k_TimesliceHitSeries_from_arrays, sizeof(__pyx_k_TimesliceHitSeries_from_arrays), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries_from_dict, __pyx_k_TimesliceHitSeries_from_dict, sizeof(__pyx_k_TimesliceHitSeries_from_dict), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries_from_table, __pyx_k_TimesliceHitSeries_from_table, sizeof(__pyx_k_TimesliceHitSeries_from_table), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries_h5loc, __pyx_k_TimesliceHitSeries_h5loc, sizeof(__pyx_k_TimesliceHitSeries_h5loc), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries_next, __pyx_k_TimesliceHitSeries_next, sizeof(__pyx_k_TimesliceHitSeries_next), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries_serialise, __pyx_k_TimesliceHitSeries_serialise, sizeof(__pyx_k_TimesliceHitSeries_serialise), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries_tabname, __pyx_k_TimesliceHitSeries_tabname, sizeof(__pyx_k_TimesliceHitSeries_tabname), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries_time, __pyx_k_TimesliceHitSeries_time, sizeof(__pyx_k_TimesliceHitSeries_time), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries_tot, __pyx_k_TimesliceHitSeries_tot, sizeof(__pyx_k_TimesliceHitSeries_tot), 0, 0, 1, 1},
  {&__pyx_kp_s_TimesliceHitSeries_with_0_hit_1, __pyx_k_TimesliceHitSeries_with_0_hit_1, sizeof(__pyx_k_TimesliceHitSeries_with_0_hit_1), 0, 0, 1, 0},
  {&__pyx_n_s_TimesliceHit___insp, __pyx_k_TimesliceHit___insp, sizeof(__pyx_k_TimesliceHit___insp), 0, 0, 1, 1},
  {&__pyx_kp_s_TimesliceHit_channel_id_0_dom_id, __pyx_k_TimesliceHit_channel_id_0_dom_id, sizeof(__pyx_k_TimesliceHit_channel_id_0_dom_id), 0, 0, 1, 0},
  {&__pyx_n_s_TimesliceHits, __pyx_k_TimesliceHits, sizeof(__pyx_k_TimesliceHits), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceInfo, __pyx_k_TimesliceInfo, sizeof(__pyx_k_TimesliceInfo), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceInfo___array, __pyx_k_TimesliceInfo___array, sizeof(__pyx_k_TimesliceInfo___array), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceInfo___insp, __pyx_k_TimesliceInfo___insp, sizeof(__pyx_k_TimesliceInfo___insp), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceInfo___len, __pyx_k_TimesliceInfo___len, sizeof(__pyx_k_TimesliceInfo___len), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceInfo___str, __pyx_k_TimesliceInfo___str, sizeof(__pyx_k_TimesliceInfo___str), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceInfo_conv_from, __pyx_k_TimesliceInfo_conv_from, sizeof(__pyx_k_TimesliceInfo_conv_from), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceInfo_conv_to, __pyx_k_TimesliceInfo_conv_to, sizeof(__pyx_k_TimesliceInfo_conv_to), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceInfo_deserialise, __pyx_k_TimesliceInfo_deserialise, sizeof(__pyx_k_TimesliceInfo_deserialise), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceInfo_from_table, __pyx_k_TimesliceInfo_from_table, sizeof(__pyx_k_TimesliceInfo_from_table), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceInfo_serialise, __pyx_k_TimesliceInfo_serialise, sizeof(__pyx_k_TimesliceInfo_serialise), 0, 0, 1, 1},
  {&__pyx_kp_s_Timeslice_frame_slice_id_0_frame, __pyx_k_Timeslice_frame_slice_id_0_frame, sizeof(__pyx_k_Timeslice_frame_slice_id_0_frame), 0, 0, 1, 0},
  {&__pyx_kp_s_Timeslice_frame_slice_id_0_frame_2, __pyx_k_Timeslice_frame_slice_id_0_frame_2, sizeof(__pyx_k_Timeslice_frame_slice_id_0_frame_2), 0, 0, 1, 0},
  {&__pyx_n_s_Track, __pyx_k_Track, sizeof(__pyx_k_Track), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries, __pyx_k_TrackSeries, sizeof(__pyx_k_TrackSeries), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries___array, __pyx_k_TrackSeries___array, sizeof(__pyx_k_TrackSeries___array), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries___getitem, __pyx_k_TrackSeries___getitem, sizeof(__pyx_k_TrackSeries___getitem), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries___init, __pyx_k_TrackSeries___init, sizeof(__pyx_k_TrackSeries___init), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries___insp, __pyx_k_TrackSeries___insp, sizeof(__pyx_k_TrackSeries___insp), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries___iter, __pyx_k_TrackSeries___iter, sizeof(__pyx_k_TrackSeries___iter), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries___len, __pyx_k_TrackSeries___len, sizeof(__pyx_k_TrackSeries___len), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries___next, __pyx_k_TrackSeries___next, sizeof(__pyx_k_TrackSeries___next), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries___repr, __pyx_k_TrackSeries___repr, sizeof(__pyx_k_TrackSeries___repr), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries___str, __pyx_k_TrackSeries___str, sizeof(__pyx_k_TrackSeries___str), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries__slice_generator, __pyx_k_TrackSeries__slice_generator, sizeof(__pyx_k_TrackSeries__slice_generator), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_bjorkeny, __pyx_k_TrackSeries_bjorkeny, sizeof(__pyx_k_TrackSeries_bjorkeny), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_conv_from, __pyx_k_TrackSeries_conv_from, sizeof(__pyx_k_TrackSeries_conv_from), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_conv_to, __pyx_k_TrackSeries_conv_to, sizeof(__pyx_k_TrackSeries_conv_to), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_deserialise, __pyx_k_TrackSeries_deserialise, sizeof(__pyx_k_TrackSeries_deserialise), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_dir, __pyx_k_TrackSeries_dir, sizeof(__pyx_k_TrackSeries_dir), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_energy, __pyx_k_TrackSeries_energy, sizeof(__pyx_k_TrackSeries_energy), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_from_aanet, __pyx_k_TrackSeries_from_aanet, sizeof(__pyx_k_TrackSeries_from_aanet), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_from_arrays, __pyx_k_TrackSeries_from_arrays, sizeof(__pyx_k_TrackSeries_from_arrays), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_from_km3df, __pyx_k_TrackSeries_from_km3df, sizeof(__pyx_k_TrackSeries_from_km3df), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_from_table, __pyx_k_TrackSeries_from_table, sizeof(__pyx_k_TrackSeries_from_table), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_get_len, __pyx_k_TrackSeries_get_len, sizeof(__pyx_k_TrackSeries_get_len), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_get_usr_item, __pyx_k_TrackSeries_get_usr_item, sizeof(__pyx_k_TrackSeries_get_usr_item), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_highest_energetic_mu, __pyx_k_TrackSeries_highest_energetic_mu, sizeof(__pyx_k_TrackSeries_highest_energetic_mu), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_highest_energetic_mu_2, __pyx_k_TrackSeries_highest_energetic_mu_2, sizeof(__pyx_k_TrackSeries_highest_energetic_mu_2), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_id, __pyx_k_TrackSeries_id, sizeof(__pyx_k_TrackSeries_id), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_interaction_channel, __pyx_k_TrackSeries_interaction_channel, sizeof(__pyx_k_TrackSeries_interaction_channel), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_is_cc, __pyx_k_TrackSeries_is_cc, sizeof(__pyx_k_TrackSeries_is_cc), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_length, __pyx_k_TrackSeries_length, sizeof(__pyx_k_TrackSeries_length), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_next, __pyx_k_TrackSeries_next, sizeof(__pyx_k_TrackSeries_next), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_pos, __pyx_k_TrackSeries_pos, sizeof(__pyx_k_TrackSeries_pos), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_serialise, __pyx_k_TrackSeries_serialise, sizeof(__pyx_k_TrackSeries_serialise), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_time, __pyx_k_TrackSeries_time, sizeof(__pyx_k_TrackSeries_time), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_type, __pyx_k_TrackSeries_type, sizeof(__pyx_k_TrackSeries_type), 0, 0, 1, 1},
  {&__pyx_kp_s_TrackSeries_with_0_track_1, __pyx_k_TrackSeries_with_0_track_1, sizeof(__pyx_k_TrackSeries_with_0_track_1), 0, 0, 1, 0},
  {&__pyx_n_s_Track___insp, __pyx_k_Track___insp, sizeof(__pyx_k_Track___insp), 0, 0, 1, 1},
  {&__pyx_kp_s_Track_pos_0_dir_1_t_2_E_3_type_4, __pyx_k_Track_pos_0_dir_1_t_2_E_3_type_4, sizeof(__pyx_k_Track_pos_0_dir_1_t_2_E_3_type_4), 0, 0, 1, 0},
  {&__pyx_n_s_Tracks, __pyx_k_Tracks, sizeof(__pyx_k_Tracks), 0, 0, 1, 1},
  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {&__pyx_kp_s__113, __pyx_k__113, sizeof(__pyx_k__113), 0, 0, 1, 0},
  {&__pyx_kp_s__116, __pyx_k__116, sizeof(__pyx_k__116), 0, 0, 1, 0},
  {&__pyx_kp_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 0},
  {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1},
  {&__pyx_n_s_angle_between, __pyx_k_angle_between, sizeof(__pyx_k_angle_between), 0, 0, 1, 1},
  {&__pyx_n_s_arg, __pyx_k_arg, sizeof(__pyx_k_arg), 0, 0, 1, 1},
  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
  {&__pyx_n_s_arr, __pyx_k_arr, sizeof(__pyx_k_arr), 0, 0, 1, 1},
  {&__pyx_n_s_arr_2, __pyx_k_arr_2, sizeof(__pyx_k_arr_2), 0, 0, 1, 1},
  {&__pyx_n_s_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 0, 1, 1},
  {&__pyx_n_s_array_2, __pyx_k_array_2, sizeof(__pyx_k_array_2), 0, 0, 1, 1},
  {&__pyx_n_s_array_finalize, __pyx_k_array_finalize, sizeof(__pyx_k_array_finalize), 0, 0, 1, 1},
  {&__pyx_n_s_asarray, __pyx_k_asarray, sizeof(__pyx_k_asarray), 0, 0, 1, 1},
  {&__pyx_n_s_attr, __pyx_k_attr, sizeof(__pyx_k_attr), 0, 0, 1, 1},
  {&__pyx_n_s_author, __pyx_k_author, sizeof(__pyx_k_author), 0, 0, 1, 1},
  {&__pyx_n_s_bjorkeny, __pyx_k_bjorkeny, sizeof(__pyx_k_bjorkeny), 0, 0, 1, 1},
  {&__pyx_n_s_bjorkeny_2, __pyx_k_bjorkeny_2, sizeof(__pyx_k_bjorkeny_2), 0, 0, 1, 1},
  {&__pyx_n_s_bjorkenys, __pyx_k_bjorkenys, sizeof(__pyx_k_bjorkenys), 0, 0, 1, 1},
  {&__pyx_n_s_calcsize, __pyx_k_calcsize, sizeof(__pyx_k_calcsize), 0, 0, 1, 1},
  {&__pyx_n_s_channel_id, __pyx_k_channel_id, sizeof(__pyx_k_channel_id), 0, 0, 1, 1},
  {&__pyx_n_s_channel_ids, __pyx_k_channel_ids, sizeof(__pyx_k_channel_ids), 0, 0, 1, 1},
  {&__pyx_n_s_class_attr, __pyx_k_class_attr, sizeof(__pyx_k_class_attr), 0, 0, 1, 1},
  {&__pyx_n_s_class_name, __pyx_k_class_name, sizeof(__pyx_k_class_name), 0, 0, 1, 1},
  {&__pyx_n_s_class_parents, __pyx_k_class_parents, sizeof(__pyx_k_class_parents), 0, 0, 1, 1},
  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
  {&__pyx_n_s_cls, __pyx_k_cls, sizeof(__pyx_k_cls), 0, 0, 1, 1},
  {&__pyx_n_s_col, __pyx_k_col, sizeof(__pyx_k_col), 0, 0, 1, 1},
  {&__pyx_n_s_column_stack, __pyx_k_column_stack, sizeof(__pyx_k_column_stack), 0, 0, 1, 1},
  {&__pyx_n_s_constructor, __pyx_k_constructor, sizeof(__pyx_k_constructor), 0, 0, 1, 1},
  {&__pyx_n_s_conv_from, __pyx_k_conv_from, sizeof(__pyx_k_conv_from), 0, 0, 1, 1},
  {&__pyx_n_s_conv_to, __pyx_k_conv_to, sizeof(__pyx_k_conv_to), 0, 0, 1, 1},
  {&__pyx_n_s_copyright, __pyx_k_copyright, sizeof(__pyx_k_copyright), 0, 0, 1, 1},
  {&__pyx_n_s_credits, __pyx_k_credits, sizeof(__pyx_k_credits), 0, 0, 1, 1},
  {&__pyx_n_s_ctypes, __pyx_k_ctypes, sizeof(__pyx_k_ctypes), 0, 0, 1, 1},
  {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
  {&__pyx_n_s_deserialise, __pyx_k_deserialise, sizeof(__pyx_k_deserialise), 0, 0, 1, 1},
  {&__pyx_n_s_deserialise_map, __pyx_k_deserialise_map, sizeof(__pyx_k_deserialise_map), 0, 0, 1, 1},
  {&__pyx_n_s_det_id, __pyx_k_det_id, sizeof(__pyx_k_det_id), 0, 0, 1, 1},
  {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
  {&__pyx_n_s_dir, __pyx_k_dir, sizeof(__pyx_k_dir), 0, 0, 1, 1},
  {&__pyx_n_s_dir_2, __pyx_k_dir_2, sizeof(__pyx_k_dir_2), 0, 0, 1, 1},
  {&__pyx_n_s_dir_x, __pyx_k_dir_x, sizeof(__pyx_k_dir_x), 0, 0, 1, 1},
  {&__pyx_n_s_dir_xs, __pyx_k_dir_xs, sizeof(__pyx_k_dir_xs), 0, 0, 1, 1},
  {&__pyx_n_s_dir_y, __pyx_k_dir_y, sizeof(__pyx_k_dir_y), 0, 0, 1, 1},
  {&__pyx_n_s_dir_ys, __pyx_k_dir_ys, sizeof(__pyx_k_dir_ys), 0, 0, 1, 1},
  {&__pyx_n_s_dir_z, __pyx_k_dir_z, sizeof(__pyx_k_dir_z), 0, 0, 1, 1},
  {&__pyx_n_s_dir_zs, __pyx_k_dir_zs, sizeof(__pyx_k_dir_zs), 0, 0, 1, 1},
  {&__pyx_n_s_directions, __pyx_k_directions, sizeof(__pyx_k_directions), 0, 0, 1, 1},
  {&__pyx_n_s_directions_x, __pyx_k_directions_x, sizeof(__pyx_k_directions_x), 0, 0, 1, 1},
  {&__pyx_n_s_directions_y, __pyx_k_directions_y, sizeof(__pyx_k_directions_y), 0, 0, 1, 1},
  {&__pyx_n_s_directions_z, __pyx_k_directions_z, sizeof(__pyx_k_directions_z), 0, 0, 1, 1},
  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
  {&__pyx_n_s_dom_id, __pyx_k_dom_id, sizeof(__pyx_k_dom_id), 0, 0, 1, 1},
  {&__pyx_n_s_dom_ids, __pyx_k_dom_ids, sizeof(__pyx_k_dom_ids), 0, 0, 1, 1},
  {&__pyx_n_s_drop_duplicates, __pyx_k_drop_duplicates, sizeof(__pyx_k_drop_duplicates), 0, 0, 1, 1},
  {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1},
  {&__pyx_n_s_email, __pyx_k_email, sizeof(__pyx_k_email), 0, 0, 1, 1},
  {&__pyx_n_s_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 0, 0, 1, 1},
  {&__pyx_n_s_energies, __pyx_k_energies, sizeof(__pyx_k_energies), 0, 0, 1, 1},
  {&__pyx_n_s_energy, __pyx_k_energy, sizeof(__pyx_k_energy), 0, 0, 1, 1},
  {&__pyx_n_s_energy_2, __pyx_k_energy_2, sizeof(__pyx_k_energy_2), 0, 0, 1, 1},
  {&__pyx_n_s_event_id, __pyx_k_event_id, sizeof(__pyx_k_event_id), 0, 0, 1, 1},
  {&__pyx_kp_s_f8, __pyx_k_f8, sizeof(__pyx_k_f8), 0, 0, 1, 0},
  {&__pyx_n_s_fields, __pyx_k_fields, sizeof(__pyx_k_fields), 0, 0, 1, 1},
  {&__pyx_n_s_fifo_status, __pyx_k_fifo_status, sizeof(__pyx_k_fifo_status), 0, 0, 1, 1},
  {&__pyx_n_s_first_hits, __pyx_k_first_hits, sizeof(__pyx_k_first_hits), 0, 0, 1, 1},
  {&__pyx_n_s_fmt, __pyx_k_fmt, sizeof(__pyx_k_fmt), 0, 0, 1, 1},
  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
  {&__pyx_kp_s_frame__0, __pyx_k_frame__0, sizeof(__pyx_k_frame__0), 0, 0, 1, 0},
  {&__pyx_n_s_frame_id, __pyx_k_frame_id, sizeof(__pyx_k_frame_id), 0, 0, 1, 1},
  {&__pyx_n_s_frame_index, __pyx_k_frame_index, sizeof(__pyx_k_frame_index), 0, 0, 1, 1},
  {&__pyx_n_s_frames, __pyx_k_frames, sizeof(__pyx_k_frames), 0, 0, 1, 1},
  {&__pyx_n_s_frames_2, __pyx_k_frames_2, sizeof(__pyx_k_frames_2), 0, 0, 1, 1},
  {&__pyx_n_s_from_aanet, __pyx_k_from_aanet, sizeof(__pyx_k_from_aanet), 0, 0, 1, 1},
  {&__pyx_n_s_from_arrays, __pyx_k_from_arrays, sizeof(__pyx_k_from_arrays), 0, 0, 1, 1},
  {&__pyx_n_s_from_dict, __pyx_k_from_dict, sizeof(__pyx_k_from_dict), 0, 0, 1, 1},
  {&__pyx_n_s_from_evt, __pyx_k_from_evt, sizeof(__pyx_k_from_evt), 0, 0, 1, 1},
  {&__pyx_n_s_from_km3df, __pyx_k_from_km3df, sizeof(__pyx_k_from_km3df), 0, 0, 1, 1},
  {&__pyx_n_s_from_row, __pyx_k_from_row, sizeof(__pyx_k_from_row), 0, 0, 1, 1},
  {&__pyx_n_s_from_table, __pyx_k_from_table, sizeof(__pyx_k_from_table), 0, 0, 1, 1},
  {&__pyx_n_s_full, __pyx_k_full, sizeof(__pyx_k_full), 0, 0, 1, 1},
  {&__pyx_n_s_geant2pdg, __pyx_k_geant2pdg, sizeof(__pyx_k_geant2pdg), 0, 0, 1, 1},
  {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 0, 1, 1},
  {&__pyx_n_s_get_len, __pyx_k_get_len, sizeof(__pyx_k_get_len), 0, 0, 1, 1},
  {&__pyx_n_s_get_usr_item, __pyx_k_get_usr_item, sizeof(__pyx_k_get_usr_item), 0, 0, 1, 1},
  {&__pyx_n_s_getitem, __pyx_k_getitem, sizeof(__pyx_k_getitem), 0, 0, 1, 1},
  {&__pyx_n_s_h, __pyx_k_h, sizeof(__pyx_k_h), 0, 0, 1, 1},
  {&__pyx_n_s_h5loc, __pyx_k_h5loc, sizeof(__pyx_k_h5loc), 0, 0, 1, 1},
  {&__pyx_n_s_has_udp_trailer, __pyx_k_has_udp_trailer, sizeof(__pyx_k_has_udp_trailer), 0, 0, 1, 1},
  {&__pyx_n_s_high_rate_veto, __pyx_k_high_rate_veto, sizeof(__pyx_k_high_rate_veto), 0, 0, 1, 1},
  {&__pyx_n_s_highest_energetic_muon, __pyx_k_highest_energetic_muon, sizeof(__pyx_k_highest_energetic_muon), 0, 0, 1, 1},
  {&__pyx_n_s_highest_energetic_muon_2, __pyx_k_highest_energetic_muon_2, sizeof(__pyx_k_highest_energetic_muon_2), 0, 0, 1, 1},
  {&__pyx_n_s_hit, __pyx_k_hit, sizeof(__pyx_k_hit), 0, 0, 1, 1},
  {&__pyx_n_s_hits, __pyx_k_hits, sizeof(__pyx_k_hits), 0, 0, 1, 1},
  {&__pyx_n_s_hits_2, __pyx_k_hits_2, sizeof(__pyx_k_hits_2), 0, 0, 1, 1},
  {&__pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_k_home_moritz_pkg_km3pipe_km3pipe, sizeof(__pyx_k_home_moritz_pkg_km3pipe_km3pipe), 0, 0, 1, 0},
  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
  {&__pyx_kp_s_i4, __pyx_k_i4, sizeof(__pyx_k_i4), 0, 0, 1, 0},
  {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
  {&__pyx_n_s_id_2, __pyx_k_id_2, sizeof(__pyx_k_id_2), 0, 0, 1, 1},
  {&__pyx_n_s_ids, __pyx_k_ids, sizeof(__pyx_k_ids), 0, 0, 1, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
  {&__pyx_n_s_index_2, __pyx_k_index_2, sizeof(__pyx_k_index_2), 0, 0, 1, 1},
  {&__pyx_kp_s_index_must_be_int_or_slice, __pyx_k_index_must_be_int_or_slice, sizeof(__pyx_k_index_must_be_int_or_slice), 0, 0, 1, 0},
  {&__pyx_n_s_indices, __pyx_k_indices, sizeof(__pyx_k_indices), 0, 0, 1, 1},
  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
  {&__pyx_n_s_inplace, __pyx_k_inplace, sizeof(__pyx_k_inplace), 0, 0, 1, 1},
  {&__pyx_n_s_input_array, __pyx_k_input_array, sizeof(__pyx_k_input_array), 0, 0, 1, 1},
  {&__pyx_n_s_insp, __pyx_k_insp, sizeof(__pyx_k_insp), 0, 0, 1, 1},
  {&__pyx_n_s_interaction_channel, __pyx_k_interaction_channel, sizeof(__pyx_k_interaction_channel), 0, 0, 1, 1},
  {&__pyx_n_s_interaction_channel_2, __pyx_k_interaction_channel_2, sizeof(__pyx_k_interaction_channel_2), 0, 0, 1, 1},
  {&__pyx_n_s_interaction_channels, __pyx_k_interaction_channels, sizeof(__pyx_k_interaction_channels), 0, 0, 1, 1},
  {&__pyx_n_s_is_cc, __pyx_k_is_cc, sizeof(__pyx_k_is_cc), 0, 0, 1, 1},
  {&__pyx_n_s_is_cc_2, __pyx_k_is_cc_2, sizeof(__pyx_k_is_cc_2), 0, 0, 1, 1},
  {&__pyx_n_s_is_ccs, __pyx_k_is_ccs, sizeof(__pyx_k_is_ccs), 0, 0, 1, 1},
  {&__pyx_n_s_item, __pyx_k_item, sizeof(__pyx_k_item), 0, 0, 1, 1},
  {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
  {&__pyx_n_s_iter, __pyx_k_iter, sizeof(__pyx_k_iter), 0, 0, 1, 1},
  {&__pyx_n_s_iteritems, __pyx_k_iteritems, sizeof(__pyx_k_iteritems), 0, 0, 1, 1},
  {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
  {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1},
  {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1},
  {&__pyx_n_s_km3df, __pyx_k_km3df, sizeof(__pyx_k_km3df), 0, 0, 1, 1},
  {&__pyx_n_s_km3pipe_dataclasses, __pyx_k_km3pipe_dataclasses, sizeof(__pyx_k_km3pipe_dataclasses), 0, 0, 1, 1},
  {&__pyx_n_s_kwargs, __pyx_k_kwargs, sizeof(__pyx_k_kwargs), 0, 0, 1, 1},
  {&__pyx_n_s_len, __pyx_k_len, sizeof(__pyx_k_len), 0, 0, 1, 1},
  {&__pyx_n_s_len_2, __pyx_k_len_2, sizeof(__pyx_k_len_2), 0, 0, 1, 1},
  {&__pyx_n_s_length, __pyx_k_length, sizeof(__pyx_k_length), 0, 0, 1, 1},
  {&__pyx_n_s_length_2, __pyx_k_length_2, sizeof(__pyx_k_length_2), 0, 0, 1, 1},
  {&__pyx_n_s_lengths, __pyx_k_lengths, sizeof(__pyx_k_lengths), 0, 0, 1, 1},
  {&__pyx_n_s_license, __pyx_k_license, sizeof(__pyx_k_license), 0, 0, 1, 1},
  {&__pyx_n_s_linalg, __pyx_k_linalg, sizeof(__pyx_k_linalg), 0, 0, 1, 1},
  {&__pyx_n_s_livetime_sec, __pyx_k_livetime_sec, sizeof(__pyx_k_livetime_sec), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_maintainer, __pyx_k_maintainer, sizeof(__pyx_k_maintainer), 0, 0, 1, 1},
  {&__pyx_n_s_map, __pyx_k_map, sizeof(__pyx_k_map), 0, 0, 1, 1},
  {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
  {&__pyx_n_s_max_sequence_number, __pyx_k_max_sequence_number, sizeof(__pyx_k_max_sequence_number), 0, 0, 1, 1},
  {&__pyx_n_s_max_sequence_numbers, __pyx_k_max_sequence_numbers, sizeof(__pyx_k_max_sequence_numbers), 0, 0, 1, 1},
  {&__pyx_n_s_mc_id, __pyx_k_mc_id, sizeof(__pyx_k_mc_id), 0, 0, 1, 1},
  {&__pyx_n_s_mc_t, __pyx_k_mc_t, sizeof(__pyx_k_mc_t), 0, 0, 1, 1},
  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
  {&__pyx_n_s_metaclass_2, __pyx_k_metaclass_2, sizeof(__pyx_k_metaclass_2), 0, 0, 1, 1},
  {&__pyx_n_s_metadata, __pyx_k_metadata, sizeof(__pyx_k_metadata), 0, 0, 1, 1},
  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
  {&__pyx_n_s_muons, __pyx_k_muons, sizeof(__pyx_k_muons), 0, 0, 1, 1},
  {&__pyx_n_s_n_events_gen, __pyx_k_n_events_gen, sizeof(__pyx_k_n_events_gen), 0, 0, 1, 1},
  {&__pyx_n_s_n_files_gen, __pyx_k_n_files_gen, sizeof(__pyx_k_n_files_gen), 0, 0, 1, 1},
  {&__pyx_n_s_n_hits, __pyx_k_n_hits, sizeof(__pyx_k_n_hits), 0, 0, 1, 1},
  {&__pyx_n_s_n_packets, __pyx_k_n_packets, sizeof(__pyx_k_n_packets), 0, 0, 1, 1},
  {&__pyx_n_s_n_received_packets, __pyx_k_n_received_packets, sizeof(__pyx_k_n_received_packets), 0, 0, 1, 1},
  {&__pyx_n_s_n_tracks, __pyx_k_n_tracks, sizeof(__pyx_k_n_tracks), 0, 0, 1, 1},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_n_s_names, __pyx_k_names, sizeof(__pyx_k_names), 0, 0, 1, 1},
  {&__pyx_n_s_nan, __pyx_k_nan, sizeof(__pyx_k_nan), 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_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
  {&__pyx_n_s_next, __pyx_k_next, sizeof(__pyx_k_next), 0, 0, 1, 1},
  {&__pyx_n_s_next_2, __pyx_k_next_2, sizeof(__pyx_k_next_2), 0, 0, 1, 1},
  {&__pyx_n_s_norm, __pyx_k_norm, sizeof(__pyx_k_norm), 0, 0, 1, 1},
  {&__pyx_n_s_normalise, __pyx_k_normalise, sizeof(__pyx_k_normalise), 0, 0, 1, 1},
  {&__pyx_n_s_normed_array, __pyx_k_normed_array, sizeof(__pyx_k_normed_array), 0, 0, 1, 1},
  {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},
  {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
  {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0},
  {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0},
  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
  {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
  {&__pyx_n_s_overlays, __pyx_k_overlays, sizeof(__pyx_k_overlays), 0, 0, 1, 1},
  {&__pyx_n_s_pandas, __pyx_k_pandas, sizeof(__pyx_k_pandas), 0, 0, 1, 1},
  {&__pyx_n_s_pd, __pyx_k_pd, sizeof(__pyx_k_pd), 0, 0, 1, 1},
  {&__pyx_n_s_pdg2name, __pyx_k_pdg2name, sizeof(__pyx_k_pdg2name), 0, 0, 1, 1},
  {&__pyx_n_s_plural, __pyx_k_plural, sizeof(__pyx_k_plural), 0, 0, 1, 1},
  {&__pyx_n_s_pmt_id, __pyx_k_pmt_id, sizeof(__pyx_k_pmt_id), 0, 0, 1, 1},
  {&__pyx_n_s_pmt_ids, __pyx_k_pmt_ids, sizeof(__pyx_k_pmt_ids), 0, 0, 1, 1},
  {&__pyx_n_s_pop, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1},
  {&__pyx_n_s_pos, __pyx_k_pos, sizeof(__pyx_k_pos), 0, 0, 1, 1},
  {&__pyx_n_s_pos_2, __pyx_k_pos_2, sizeof(__pyx_k_pos_2), 0, 0, 1, 1},
  {&__pyx_n_s_pos_x, __pyx_k_pos_x, sizeof(__pyx_k_pos_x), 0, 0, 1, 1},
  {&__pyx_n_s_pos_xs, __pyx_k_pos_xs, sizeof(__pyx_k_pos_xs), 0, 0, 1, 1},
  {&__pyx_n_s_pos_y, __pyx_k_pos_y, sizeof(__pyx_k_pos_y), 0, 0, 1, 1},
  {&__pyx_n_s_pos_ys, __pyx_k_pos_ys, sizeof(__pyx_k_pos_ys), 0, 0, 1, 1},
  {&__pyx_n_s_pos_z, __pyx_k_pos_z, sizeof(__pyx_k_pos_z), 0, 0, 1, 1},
  {&__pyx_n_s_pos_zs, __pyx_k_pos_zs, sizeof(__pyx_k_pos_zs), 0, 0, 1, 1},
  {&__pyx_n_s_positions, __pyx_k_positions, sizeof(__pyx_k_positions), 0, 0, 1, 1},
  {&__pyx_n_s_positions_x, __pyx_k_positions_x, sizeof(__pyx_k_positions_x), 0, 0, 1, 1},
  {&__pyx_n_s_positions_y, __pyx_k_positions_y, sizeof(__pyx_k_positions_y), 0, 0, 1, 1},
  {&__pyx_n_s_positions_z, __pyx_k_positions_z, sizeof(__pyx_k_positions_z), 0, 0, 1, 1},
  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
  {&__pyx_n_s_property, __pyx_k_property, sizeof(__pyx_k_property), 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_read, __pyx_k_read, sizeof(__pyx_k_read), 0, 0, 1, 1},
  {&__pyx_n_s_repr, __pyx_k_repr, sizeof(__pyx_k_repr), 0, 0, 1, 1},
  {&__pyx_n_s_reshape, __pyx_k_reshape, sizeof(__pyx_k_reshape), 0, 0, 1, 1},
  {&__pyx_n_s_row, __pyx_k_row, sizeof(__pyx_k_row), 0, 0, 1, 1},
  {&__pyx_n_s_run_id, __pyx_k_run_id, sizeof(__pyx_k_run_id), 0, 0, 1, 1},
  {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1},
  {&__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_serialise, __pyx_k_serialise, sizeof(__pyx_k_serialise), 0, 0, 1, 1},
  {&__pyx_n_s_setter, __pyx_k_setter, sizeof(__pyx_k_setter), 0, 0, 1, 1},
  {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
  {&__pyx_n_s_six, __pyx_k_six, sizeof(__pyx_k_six), 0, 0, 1, 1},
  {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
  {&__pyx_n_s_slice_generator, __pyx_k_slice_generator, sizeof(__pyx_k_slice_generator), 0, 0, 1, 1},
  {&__pyx_n_s_slice_id, __pyx_k_slice_id, sizeof(__pyx_k_slice_id), 0, 0, 1, 1},
  {&__pyx_n_s_sort_values, __pyx_k_sort_values, sizeof(__pyx_k_sort_values), 0, 0, 1, 1},
  {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
  {&__pyx_n_s_status, __pyx_k_status, sizeof(__pyx_k_status), 0, 0, 1, 1},
  {&__pyx_n_s_step, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1},
  {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1},
  {&__pyx_n_s_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 0, 1, 1},
  {&__pyx_n_s_stream, __pyx_k_stream, sizeof(__pyx_k_stream), 0, 0, 1, 1},
  {&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1},
  {&__pyx_n_s_structure, __pyx_k_structure, sizeof(__pyx_k_structure), 0, 0, 1, 1},
  {&__pyx_n_s_subset, __pyx_k_subset, sizeof(__pyx_k_subset), 0, 0, 1, 1},
  {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
  {&__pyx_n_s_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 0, 1, 1},
  {&__pyx_n_s_t0, __pyx_k_t0, sizeof(__pyx_k_t0), 0, 0, 1, 1},
  {&__pyx_n_s_t0s, __pyx_k_t0s, sizeof(__pyx_k_t0s), 0, 0, 1, 1},
  {&__pyx_n_s_table, __pyx_k_table, sizeof(__pyx_k_table), 0, 0, 1, 1},
  {&__pyx_n_s_tabname, __pyx_k_tabname, sizeof(__pyx_k_tabname), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_kp_s_tgal_km3net_de, __pyx_k_tgal_km3net_de, sizeof(__pyx_k_tgal_km3net_de), 0, 0, 1, 0},
  {&__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_time_2, __pyx_k_time_2, sizeof(__pyx_k_time_2), 0, 0, 1, 1},
  {&__pyx_n_s_times, __pyx_k_times, sizeof(__pyx_k_times), 0, 0, 1, 1},
  {&__pyx_kp_s_timeslices_slice__0, __pyx_k_timeslices_slice__0, sizeof(__pyx_k_timeslices_slice__0), 0, 0, 1, 0},
  {&__pyx_n_s_to, __pyx_k_to, sizeof(__pyx_k_to), 0, 0, 1, 1},
  {&__pyx_n_s_to_records, __pyx_k_to_records, sizeof(__pyx_k_to_records), 0, 0, 1, 1},
  {&__pyx_n_s_tools, __pyx_k_tools, sizeof(__pyx_k_tools), 0, 0, 1, 1},
  {&__pyx_n_s_tot, __pyx_k_tot, sizeof(__pyx_k_tot), 0, 0, 1, 1},
  {&__pyx_n_s_tots, __pyx_k_tots, sizeof(__pyx_k_tots), 0, 0, 1, 1},
  {&__pyx_n_s_track, __pyx_k_track, sizeof(__pyx_k_track), 0, 0, 1, 1},
  {&__pyx_n_s_track_args, __pyx_k_track_args, sizeof(__pyx_k_track_args), 0, 0, 1, 1},
  {&__pyx_n_s_tracks, __pyx_k_tracks, sizeof(__pyx_k_tracks), 0, 0, 1, 1},
  {&__pyx_n_s_tracks_2, __pyx_k_tracks_2, sizeof(__pyx_k_tracks_2), 0, 0, 1, 1},
  {&__pyx_n_s_trig, __pyx_k_trig, sizeof(__pyx_k_trig), 0, 0, 1, 1},
  {&__pyx_n_s_trigger_counter, __pyx_k_trigger_counter, sizeof(__pyx_k_trigger_counter), 0, 0, 1, 1},
  {&__pyx_n_s_trigger_mask, __pyx_k_trigger_mask, sizeof(__pyx_k_trigger_mask), 0, 0, 1, 1},
  {&__pyx_n_s_triggered, __pyx_k_triggered, sizeof(__pyx_k_triggered), 0, 0, 1, 1},
  {&__pyx_n_s_triggered_hits, __pyx_k_triggered_hits, sizeof(__pyx_k_triggered_hits), 0, 0, 1, 1},
  {&__pyx_n_s_triggereds, __pyx_k_triggereds, sizeof(__pyx_k_triggereds), 0, 0, 1, 1},
  {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1},
  {&__pyx_n_s_type_2, __pyx_k_type_2, sizeof(__pyx_k_type_2), 0, 0, 1, 1},
  {&__pyx_n_s_types, __pyx_k_types, sizeof(__pyx_k_types), 0, 0, 1, 1},
  {&__pyx_n_s_u1, __pyx_k_u1, sizeof(__pyx_k_u1), 0, 0, 1, 1},
  {&__pyx_kp_s_u4, __pyx_k_u4, sizeof(__pyx_k_u4), 0, 0, 1, 0},
  {&__pyx_kp_s_u8, __pyx_k_u8, sizeof(__pyx_k_u8), 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_n_s_unpack_from, __pyx_k_unpack_from, sizeof(__pyx_k_unpack_from), 0, 0, 1, 1},
  {&__pyx_n_s_usr, __pyx_k_usr, sizeof(__pyx_k_usr), 0, 0, 1, 1},
  {&__pyx_n_s_utc_nanoseconds, __pyx_k_utc_nanoseconds, sizeof(__pyx_k_utc_nanoseconds), 0, 0, 1, 1},
  {&__pyx_n_s_utc_seconds, __pyx_k_utc_seconds, sizeof(__pyx_k_utc_seconds), 0, 0, 1, 1},
  {&__pyx_n_s_val, __pyx_k_val, sizeof(__pyx_k_val), 0, 0, 1, 1},
  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
  {&__pyx_n_s_view, __pyx_k_view, sizeof(__pyx_k_view), 0, 0, 1, 1},
  {&__pyx_n_s_weight_w1, __pyx_k_weight_w1, sizeof(__pyx_k_weight_w1), 0, 0, 1, 1},
  {&__pyx_n_s_weight_w2, __pyx_k_weight_w2, sizeof(__pyx_k_weight_w2), 0, 0, 1, 1},
  {&__pyx_n_s_weight_w3, __pyx_k_weight_w3, sizeof(__pyx_k_weight_w3), 0, 0, 1, 1},
  {&__pyx_n_s_white_rabbit_status, __pyx_k_white_rabbit_status, sizeof(__pyx_k_white_rabbit_status), 0, 0, 1, 1},
  {&__pyx_n_s_with_metaclass, __pyx_k_with_metaclass, sizeof(__pyx_k_with_metaclass), 0, 0, 1, 1},
  {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1},
  {&__pyx_n_s_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 0, 1, 1},
  {&__pyx_n_s_z, __pyx_k_z, sizeof(__pyx_k_z), 0, 0, 1, 1},
  {&__pyx_n_s_zenith, __pyx_k_zenith, sizeof(__pyx_k_zenith), 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_ERR(0, 346, __pyx_L1_error)
  __pyx_builtin_property = __Pyx_GetBuiltinName(__pyx_n_s_property); if (!__pyx_builtin_property) __PYX_ERR(0, 438, __pyx_L1_error)
  __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 70, __pyx_L1_error)
  __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 97, __pyx_L1_error)
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 792, __pyx_L1_error)
  __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 839, __pyx_L1_error)
  __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(0, 1008, __pyx_L1_error)
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 1023, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 1028, __pyx_L1_error)
  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 1344, __pyx_L1_error)
  __pyx_builtin_max = __Pyx_GetBuiltinName(__pyx_n_s_max); if (!__pyx_builtin_max) __PYX_ERR(0, 1354, __pyx_L1_error)
  __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 1659, __pyx_L1_error)
  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(1, 799, __pyx_L1_error)
  __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(1, 989, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "km3pipe/dataclasses.pyx":68
 *                 attr[name] = val
 * 
 *         def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *             """Take care of the attribute settings."""
 *             for arg, name in zip(args, self.dtype.names):
 */
  __pyx_tuple__3 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs, __pyx_n_s_arg, __pyx_n_s_name, __pyx_n_s_key, __pyx_n_s_value); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__3);
  __Pyx_GIVEREF(__pyx_tuple__3);
  __pyx_codeobj__4 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__3, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_init, 68, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__4)) __PYX_ERR(0, 68, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":370
 * 
 *     def __init__(self, arr, h5loc='/'):
 *         self._arr = np.array(arr, dtype=self.dtype).reshape(1)             # <<<<<<<<<<<<<<
 *         for col in self.dtype.names:
 *             setattr(self, col, self._arr[col])
 */
  __pyx_tuple__42 = PyTuple_Pack(1, __pyx_int_1); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__42);
  __Pyx_GIVEREF(__pyx_tuple__42);

  /* "km3pipe/dataclasses.pyx":472
 * 
 *     """
 *     def __new__(cls, input_array=(1, 0, 0)):             # <<<<<<<<<<<<<<
 *         """Add x, y and z to the ndarray"""
 *         normed_array = np.array(input_array) / np.linalg.norm(input_array)
 */
  __pyx_tuple__60 = PyTuple_Pack(3, __pyx_int_1, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__60);
  __Pyx_GIVEREF(__pyx_tuple__60);

  /* "km3pipe/dataclasses.pyx":513
 *     @property
 *     def zenith(self):
 *         return angle_between(self, (0, 0, -1))             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __pyx_tuple__70 = PyTuple_Pack(3, __pyx_int_0, __pyx_int_0, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__70);
  __Pyx_GIVEREF(__pyx_tuple__70);

  /* "km3pipe/dataclasses.pyx":945
 *     def first_hits(self):
 *         h = self.conv_to(to='pandas')
 *         h.sort_values('time', inplace=True)             # <<<<<<<<<<<<<<
 *         h = h.drop_duplicates(subset='dom_id')
 *         return HitSeries(h.to_records(index=False))
 */
  __pyx_tuple__92 = PyTuple_Pack(1, __pyx_n_s_time); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(0, 945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__92);
  __Pyx_GIVEREF(__pyx_tuple__92);

  /* "km3pipe/dataclasses.pyx":1023
 *             return self._slice_generator(index)
 *         else:
 *             raise TypeError("index must be int or slice")             # <<<<<<<<<<<<<<
 * 
 *     def _slice_generator(self, index):
 */
  __pyx_tuple__110 = PyTuple_Pack(1, __pyx_kp_s_index_must_be_int_or_slice); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(0, 1023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__110);
  __Pyx_GIVEREF(__pyx_tuple__110);

  /* "km3pipe/dataclasses.pyx":1161
 *             return self._slice_generator(index)
 *         else:
 *             raise TypeError("index must be int or slice")             # <<<<<<<<<<<<<<
 * 
 *     def _slice_generator(self, index):
 */
  __pyx_tuple__137 = PyTuple_Pack(1, __pyx_kp_s_index_must_be_int_or_slice); if (unlikely(!__pyx_tuple__137)) __PYX_ERR(0, 1161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__137);
  __Pyx_GIVEREF(__pyx_tuple__137);

  /* "km3pipe/dataclasses.pyx":1353
 *             muons = [track for track in self if abs(track.type) == 13]
 *             if len(muons) == 0:
 *                 raise AttributeError("No muon found")             # <<<<<<<<<<<<<<
 *             self._highest_energetic_muon = max(muons, key=lambda m: m.energy)
 *         return self._highest_energetic_muon
 */
  __pyx_tuple__155 = PyTuple_Pack(1, __pyx_kp_s_No_muon_found); if (unlikely(!__pyx_tuple__155)) __PYX_ERR(0, 1353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__155);
  __Pyx_GIVEREF(__pyx_tuple__155);

  /* "km3pipe/dataclasses.pyx":1445
 *             return self._slice_generator(index)
 *         else:
 *             raise TypeError("index must be int or slice")             # <<<<<<<<<<<<<<
 * 
 *     def _slice_generator(self, index):
 */
  __pyx_tuple__172 = PyTuple_Pack(1, __pyx_kp_s_index_must_be_int_or_slice); if (unlikely(!__pyx_tuple__172)) __PYX_ERR(0, 1445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__172);
  __Pyx_GIVEREF(__pyx_tuple__172);

  /* "km3pipe/dataclasses.pyx":1560
 *             return self._slice_generator(index)
 *         else:
 *             raise TypeError("index must be int or slice")             # <<<<<<<<<<<<<<
 * 
 *     def _slice_generator(self, index):
 */
  __pyx_tuple__193 = PyTuple_Pack(1, __pyx_kp_s_index_must_be_int_or_slice); if (unlikely(!__pyx_tuple__193)) __PYX_ERR(0, 1560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__193);
  __Pyx_GIVEREF(__pyx_tuple__193);

  /* "km3pipe/dataclasses.pyx":1658
 * 
 *     def __init__(self, *args, **kwargs):
 *         h5loc = kwargs.pop('h5loc', '/')             # <<<<<<<<<<<<<<
 *         super(KM3DataFrame, self).__init__(*args, **kwargs)
 *         self.h5loc = h5loc
 */
  __pyx_tuple__205 = PyTuple_Pack(2, __pyx_n_s_h5loc, __pyx_kp_s__2); if (unlikely(!__pyx_tuple__205)) __PYX_ERR(0, 1658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__205);
  __Pyx_GIVEREF(__pyx_tuple__205);

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":218
 *             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__212 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__212)) __PYX_ERR(1, 218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__212);
  __Pyx_GIVEREF(__pyx_tuple__212);

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":222
 *             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__213 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__213)) __PYX_ERR(1, 222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__213);
  __Pyx_GIVEREF(__pyx_tuple__213);

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":259
 *                 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__214 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__214)) __PYX_ERR(1, 259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__214);
  __Pyx_GIVEREF(__pyx_tuple__214);

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":799
 * 
 *         if (end - f) - <int>(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__215 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__215)) __PYX_ERR(1, 799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__215);
  __Pyx_GIVEREF(__pyx_tuple__215);

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.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__216 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__216)) __PYX_ERR(1, 803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__216);
  __Pyx_GIVEREF(__pyx_tuple__216);

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.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__217 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__217)) __PYX_ERR(1, 823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__217);
  __Pyx_GIVEREF(__pyx_tuple__217);

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":989
 *         _import_array()
 *     except Exception:
 *         raise ImportError("numpy.core.multiarray failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_umath() except -1:
 */
  __pyx_tuple__218 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__218)) __PYX_ERR(1, 989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__218);
  __Pyx_GIVEREF(__pyx_tuple__218);

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":995
 *         _import_umath()
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_ufunc() except -1:
 */
  __pyx_tuple__219 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__219)) __PYX_ERR(1, 995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__219);
  __Pyx_GIVEREF(__pyx_tuple__219);

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1001
 *         _import_umath()
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__220 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__220)) __PYX_ERR(1, 1001, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__220);
  __Pyx_GIVEREF(__pyx_tuple__220);

  /* "km3pipe/dataclasses.pyx":33
 * __email__ = "tgal@km3net.de"
 * __status__ = "Development"
 * __all__ = ('EventInfo', 'Point', 'Position', 'Direction', 'HitSeries',             # <<<<<<<<<<<<<<
 *            'TimesliceHitSeries', 'Hit',
 *            'Track', 'TrackSeries', 'Serialisable', 'SummaryframeInfo',
 */
  __pyx_tuple__222 = PyTuple_Pack(12, __pyx_n_s_EventInfo, __pyx_n_s_Point, __pyx_n_s_Position, __pyx_n_s_Direction, __pyx_n_s_HitSeries, __pyx_n_s_TimesliceHitSeries, __pyx_n_s_Hit, __pyx_n_s_Track, __pyx_n_s_TrackSeries, __pyx_n_s_Serialisable, __pyx_n_s_SummaryframeInfo, __pyx_n_s_BinaryStruct); if (unlikely(!__pyx_tuple__222)) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__222);
  __Pyx_GIVEREF(__pyx_tuple__222);

  /* "km3pipe/dataclasses.pyx":60
 * 
 *     """
 *     def __new__(metaclass, class_name, class_parents, class_attr):             # <<<<<<<<<<<<<<
 *         attr = {'h5loc': '/'}
 *         for name, val in class_attr.items():
 */
  __pyx_tuple__223 = PyTuple_Pack(9, __pyx_n_s_metaclass, __pyx_n_s_class_name, __pyx_n_s_class_parents, __pyx_n_s_class_attr, __pyx_n_s_attr, __pyx_n_s_name, __pyx_n_s_val, __pyx_n_s_init, __pyx_n_s_init); if (unlikely(!__pyx_tuple__223)) __PYX_ERR(0, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__223);
  __Pyx_GIVEREF(__pyx_tuple__223);
  __pyx_codeobj_ = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__223, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_new, 60, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj_)) __PYX_ERR(0, 60, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":85
 *     h5loc = '/'
 *     dtype = np.dtype([
 *         ('det_id', '<i4'),             # <<<<<<<<<<<<<<
 *         ('frame_index', '<u4'),
 *         ('run_id', '<i4'),
 */
  __pyx_tuple__224 = PyTuple_Pack(2, __pyx_n_s_det_id, __pyx_kp_s_i4); if (unlikely(!__pyx_tuple__224)) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__224);
  __Pyx_GIVEREF(__pyx_tuple__224);

  /* "km3pipe/dataclasses.pyx":86
 *     dtype = np.dtype([
 *         ('det_id', '<i4'),
 *         ('frame_index', '<u4'),             # <<<<<<<<<<<<<<
 *         ('run_id', '<i4'),
 *         ('slice_id', '<u4'),
 */
  __pyx_tuple__225 = PyTuple_Pack(2, __pyx_n_s_frame_index, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__225)) __PYX_ERR(0, 86, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__225);
  __Pyx_GIVEREF(__pyx_tuple__225);

  /* "km3pipe/dataclasses.pyx":87
 *         ('det_id', '<i4'),
 *         ('frame_index', '<u4'),
 *         ('run_id', '<i4'),             # <<<<<<<<<<<<<<
 *         ('slice_id', '<u4'),
 *     ])
 */
  __pyx_tuple__226 = PyTuple_Pack(2, __pyx_n_s_run_id, __pyx_kp_s_i4); if (unlikely(!__pyx_tuple__226)) __PYX_ERR(0, 87, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__226);
  __Pyx_GIVEREF(__pyx_tuple__226);

  /* "km3pipe/dataclasses.pyx":88
 *         ('frame_index', '<u4'),
 *         ('run_id', '<i4'),
 *         ('slice_id', '<u4'),             # <<<<<<<<<<<<<<
 *     ])
 * 
 */
  __pyx_tuple__227 = PyTuple_Pack(2, __pyx_n_s_slice_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__227)) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__227);
  __Pyx_GIVEREF(__pyx_tuple__227);

  /* "km3pipe/dataclasses.pyx":92
 * 
 *     @classmethod
 *     def from_table(cls, row):             # <<<<<<<<<<<<<<
 *         args = []
 *         for col in cls.dtype.names:
 */
  __pyx_tuple__228 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_row, __pyx_n_s_args, __pyx_n_s_col); if (unlikely(!__pyx_tuple__228)) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__228);
  __Pyx_GIVEREF(__pyx_tuple__228);
  __pyx_codeobj__5 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__228, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_from_table, 92, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__5)) __PYX_ERR(0, 92, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":102
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __pyx_tuple__229 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__229)) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__229);
  __Pyx_GIVEREF(__pyx_tuple__229);
  __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__229, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_deserialise, 102, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(0, 102, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":105
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __pyx_tuple__230 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__230)) __PYX_ERR(0, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__230);
  __Pyx_GIVEREF(__pyx_tuple__230);
  __pyx_codeobj__7 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__230, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_serialise, 105, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__7)) __PYX_ERR(0, 105, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":109
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])
 */
  __pyx_tuple__231 = PyTuple_Pack(5, __pyx_n_s_cls, __pyx_n_s_data, __pyx_n_s_event_id, __pyx_n_s_fmt, __pyx_n_s_h5loc); if (unlikely(!__pyx_tuple__231)) __PYX_ERR(0, 109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__231);
  __Pyx_GIVEREF(__pyx_tuple__231);
  __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__231, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_conv_from, 109, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 109, __pyx_L1_error)
  __pyx_tuple__232 = PyTuple_Pack(2, ((PyObject*)__pyx_n_s_numpy), ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__232)) __PYX_ERR(0, 109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__232);
  __Pyx_GIVEREF(__pyx_tuple__232);

  /* "km3pipe/dataclasses.pyx":113
 *             return cls.from_table(data[0])
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 */
  __pyx_tuple__233 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_to); if (unlikely(!__pyx_tuple__233)) __PYX_ERR(0, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__233);
  __Pyx_GIVEREF(__pyx_tuple__233);
  __pyx_codeobj__9 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__233, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_conv_to, 113, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__9)) __PYX_ERR(0, 113, __pyx_L1_error)
  __pyx_tuple__234 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_numpy)); if (unlikely(!__pyx_tuple__234)) __PYX_ERR(0, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__234);
  __Pyx_GIVEREF(__pyx_tuple__234);

  /* "km3pipe/dataclasses.pyx":120
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return [(
 *             self.det_id, self.frame_index, self.run_id, self.slice_id,
 */
  __pyx_tuple__235 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__235)) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__235);
  __Pyx_GIVEREF(__pyx_tuple__235);
  __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__235, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_array_2, 120, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 120, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":125
 *         ), ]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Summaryslice #{0}:\n" \
 *                "    detector id:     {1}\n" \
 */
  __pyx_tuple__236 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__236)) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__236);
  __Pyx_GIVEREF(__pyx_tuple__236);
  __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__236, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_str, 125, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) __PYX_ERR(0, 125, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":134
 *                        )
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __pyx_tuple__237 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__237)) __PYX_ERR(0, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__237);
  __Pyx_GIVEREF(__pyx_tuple__237);
  __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__237, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_insp, 134, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 134, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":137
 *         return self.__str__()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */
  __pyx_tuple__238 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__238)) __PYX_ERR(0, 137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__238);
  __Pyx_GIVEREF(__pyx_tuple__238);
  __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__238, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_len_2, 137, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(0, 137, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":146
 *     h5loc = '/'
 *     dtype = np.dtype([
 *         ('dom_id', '<u4'),             # <<<<<<<<<<<<<<
 *         ('frame_id', '<u4'),
 *         ('n_hits', '<u4'),
 */
  __pyx_tuple__239 = PyTuple_Pack(2, __pyx_n_s_dom_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__239)) __PYX_ERR(0, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__239);
  __Pyx_GIVEREF(__pyx_tuple__239);

  /* "km3pipe/dataclasses.pyx":147
 *     dtype = np.dtype([
 *         ('dom_id', '<u4'),
 *         ('frame_id', '<u4'),             # <<<<<<<<<<<<<<
 *         ('n_hits', '<u4'),
 *         ('slice_id', '<u4'),
 */
  __pyx_tuple__240 = PyTuple_Pack(2, __pyx_n_s_frame_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__240)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__240);
  __Pyx_GIVEREF(__pyx_tuple__240);

  /* "km3pipe/dataclasses.pyx":148
 *         ('dom_id', '<u4'),
 *         ('frame_id', '<u4'),
 *         ('n_hits', '<u4'),             # <<<<<<<<<<<<<<
 *         ('slice_id', '<u4'),
 *     ])
 */
  __pyx_tuple__241 = PyTuple_Pack(2, __pyx_n_s_n_hits, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__241)) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__241);
  __Pyx_GIVEREF(__pyx_tuple__241);

  /* "km3pipe/dataclasses.pyx":149
 *         ('frame_id', '<u4'),
 *         ('n_hits', '<u4'),
 *         ('slice_id', '<u4'),             # <<<<<<<<<<<<<<
 *     ])
 * 
 */
  __pyx_tuple__242 = PyTuple_Pack(2, __pyx_n_s_slice_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__242)) __PYX_ERR(0, 149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__242);
  __Pyx_GIVEREF(__pyx_tuple__242);

  /* "km3pipe/dataclasses.pyx":153
 * 
 *     @classmethod
 *     def from_table(cls, row):             # <<<<<<<<<<<<<<
 *         args = []
 *         for col in cls.dtype.names:
 */
  __pyx_tuple__243 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_row, __pyx_n_s_args, __pyx_n_s_col); if (unlikely(!__pyx_tuple__243)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__243);
  __Pyx_GIVEREF(__pyx_tuple__243);
  __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__243, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_from_table, 153, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 153, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":163
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __pyx_tuple__244 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__244)) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__244);
  __Pyx_GIVEREF(__pyx_tuple__244);
  __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__244, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_deserialise, 163, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) __PYX_ERR(0, 163, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":166
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __pyx_tuple__245 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__245)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__245);
  __Pyx_GIVEREF(__pyx_tuple__245);
  __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__245, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_serialise, 166, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 166, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":170
 * 
 *     @classmethod
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])
 */
  __pyx_tuple__246 = PyTuple_Pack(5, __pyx_n_s_cls, __pyx_n_s_data, __pyx_n_s_frame_id, __pyx_n_s_fmt, __pyx_n_s_h5loc); if (unlikely(!__pyx_tuple__246)) __PYX_ERR(0, 170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__246);
  __Pyx_GIVEREF(__pyx_tuple__246);
  __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__246, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_conv_from, 170, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) __PYX_ERR(0, 170, __pyx_L1_error)
  __pyx_tuple__247 = PyTuple_Pack(2, ((PyObject*)__pyx_n_s_numpy), ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__247)) __PYX_ERR(0, 170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__247);
  __Pyx_GIVEREF(__pyx_tuple__247);

  /* "km3pipe/dataclasses.pyx":174
 *             return cls.from_table(data[0])
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 */
  __pyx_tuple__248 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_to); if (unlikely(!__pyx_tuple__248)) __PYX_ERR(0, 174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__248);
  __Pyx_GIVEREF(__pyx_tuple__248);
  __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__248, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_conv_to, 174, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(0, 174, __pyx_L1_error)
  __pyx_tuple__249 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_numpy)); if (unlikely(!__pyx_tuple__249)) __PYX_ERR(0, 174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__249);
  __Pyx_GIVEREF(__pyx_tuple__249);

  /* "km3pipe/dataclasses.pyx":181
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return [(
 *             self.dom_id, self.frame_id, self.n_hits, self.slice_id,
 */
  __pyx_tuple__250 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__250)) __PYX_ERR(0, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__250);
  __Pyx_GIVEREF(__pyx_tuple__250);
  __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__250, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_array_2, 181, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(0, 181, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":186
 *         ), ]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Timeslice frame:\n" \
 *                "    slice id: {0}\n" \
 */
  __pyx_tuple__251 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__251)) __PYX_ERR(0, 186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__251);
  __Pyx_GIVEREF(__pyx_tuple__251);
  __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__251, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_str, 186, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 186, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":194
 *                .format(self.slice_id, self.frame_id, self.dom_id, self.n_hits)
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __pyx_tuple__252 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__252)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__252);
  __Pyx_GIVEREF(__pyx_tuple__252);
  __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__252, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_insp, 194, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(0, 194, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":197
 *         return self.__str__()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */
  __pyx_tuple__253 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__253)) __PYX_ERR(0, 197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__253);
  __Pyx_GIVEREF(__pyx_tuple__253);
  __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__253, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_len_2, 197, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 197, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":206
 *     h5loc = '/'
 *     dtype = np.dtype([
 *         ('dom_id', '<u4'),             # <<<<<<<<<<<<<<
 *         ('fifo_status', '<u4'),
 *         ('frame_id', '<u4'),
 */
  __pyx_tuple__254 = PyTuple_Pack(2, __pyx_n_s_dom_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__254)) __PYX_ERR(0, 206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__254);
  __Pyx_GIVEREF(__pyx_tuple__254);

  /* "km3pipe/dataclasses.pyx":207
 *     dtype = np.dtype([
 *         ('dom_id', '<u4'),
 *         ('fifo_status', '<u4'),             # <<<<<<<<<<<<<<
 *         ('frame_id', '<u4'),
 *         ('frame_index', '<u4'),
 */
  __pyx_tuple__255 = PyTuple_Pack(2, __pyx_n_s_fifo_status, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__255)) __PYX_ERR(0, 207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__255);
  __Pyx_GIVEREF(__pyx_tuple__255);

  /* "km3pipe/dataclasses.pyx":208
 *         ('dom_id', '<u4'),
 *         ('fifo_status', '<u4'),
 *         ('frame_id', '<u4'),             # <<<<<<<<<<<<<<
 *         ('frame_index', '<u4'),
 *         ('has_udp_trailer', '<u4'),
 */
  __pyx_tuple__256 = PyTuple_Pack(2, __pyx_n_s_frame_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__256)) __PYX_ERR(0, 208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__256);
  __Pyx_GIVEREF(__pyx_tuple__256);

  /* "km3pipe/dataclasses.pyx":209
 *         ('fifo_status', '<u4'),
 *         ('frame_id', '<u4'),
 *         ('frame_index', '<u4'),             # <<<<<<<<<<<<<<
 *         ('has_udp_trailer', '<u4'),
 *         ('high_rate_veto', '<u4'),
 */
  __pyx_tuple__257 = PyTuple_Pack(2, __pyx_n_s_frame_index, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__257)) __PYX_ERR(0, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__257);
  __Pyx_GIVEREF(__pyx_tuple__257);

  /* "km3pipe/dataclasses.pyx":210
 *         ('frame_id', '<u4'),
 *         ('frame_index', '<u4'),
 *         ('has_udp_trailer', '<u4'),             # <<<<<<<<<<<<<<
 *         ('high_rate_veto', '<u4'),
 *         ('max_sequence_number', '<u4'),
 */
  __pyx_tuple__258 = PyTuple_Pack(2, __pyx_n_s_has_udp_trailer, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__258)) __PYX_ERR(0, 210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__258);
  __Pyx_GIVEREF(__pyx_tuple__258);

  /* "km3pipe/dataclasses.pyx":211
 *         ('frame_index', '<u4'),
 *         ('has_udp_trailer', '<u4'),
 *         ('high_rate_veto', '<u4'),             # <<<<<<<<<<<<<<
 *         ('max_sequence_number', '<u4'),
 *         ('n_packets', '<u4'),
 */
  __pyx_tuple__259 = PyTuple_Pack(2, __pyx_n_s_high_rate_veto, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__259)) __PYX_ERR(0, 211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__259);
  __Pyx_GIVEREF(__pyx_tuple__259);

  /* "km3pipe/dataclasses.pyx":212
 *         ('has_udp_trailer', '<u4'),
 *         ('high_rate_veto', '<u4'),
 *         ('max_sequence_number', '<u4'),             # <<<<<<<<<<<<<<
 *         ('n_packets', '<u4'),
 *         ('slice_id', '<u4'),
 */
  __pyx_tuple__260 = PyTuple_Pack(2, __pyx_n_s_max_sequence_number, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__260)) __PYX_ERR(0, 212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__260);
  __Pyx_GIVEREF(__pyx_tuple__260);

  /* "km3pipe/dataclasses.pyx":213
 *         ('high_rate_veto', '<u4'),
 *         ('max_sequence_number', '<u4'),
 *         ('n_packets', '<u4'),             # <<<<<<<<<<<<<<
 *         ('slice_id', '<u4'),
 *         ('utc_nanoseconds', '<u4'),
 */
  __pyx_tuple__261 = PyTuple_Pack(2, __pyx_n_s_n_packets, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__261)) __PYX_ERR(0, 213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__261);
  __Pyx_GIVEREF(__pyx_tuple__261);

  /* "km3pipe/dataclasses.pyx":214
 *         ('max_sequence_number', '<u4'),
 *         ('n_packets', '<u4'),
 *         ('slice_id', '<u4'),             # <<<<<<<<<<<<<<
 *         ('utc_nanoseconds', '<u4'),
 *         ('utc_seconds', '<u4'),
 */
  __pyx_tuple__262 = PyTuple_Pack(2, __pyx_n_s_slice_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__262)) __PYX_ERR(0, 214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__262);
  __Pyx_GIVEREF(__pyx_tuple__262);

  /* "km3pipe/dataclasses.pyx":215
 *         ('n_packets', '<u4'),
 *         ('slice_id', '<u4'),
 *         ('utc_nanoseconds', '<u4'),             # <<<<<<<<<<<<<<
 *         ('utc_seconds', '<u4'),
 *         ('white_rabbit_status', '<u4'),
 */
  __pyx_tuple__263 = PyTuple_Pack(2, __pyx_n_s_utc_nanoseconds, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__263)) __PYX_ERR(0, 215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__263);
  __Pyx_GIVEREF(__pyx_tuple__263);

  /* "km3pipe/dataclasses.pyx":216
 *         ('slice_id', '<u4'),
 *         ('utc_nanoseconds', '<u4'),
 *         ('utc_seconds', '<u4'),             # <<<<<<<<<<<<<<
 *         ('white_rabbit_status', '<u4'),
 *     ])
 */
  __pyx_tuple__264 = PyTuple_Pack(2, __pyx_n_s_utc_seconds, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__264)) __PYX_ERR(0, 216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__264);
  __Pyx_GIVEREF(__pyx_tuple__264);

  /* "km3pipe/dataclasses.pyx":217
 *         ('utc_nanoseconds', '<u4'),
 *         ('utc_seconds', '<u4'),
 *         ('white_rabbit_status', '<u4'),             # <<<<<<<<<<<<<<
 *     ])
 * 
 */
  __pyx_tuple__265 = PyTuple_Pack(2, __pyx_n_s_white_rabbit_status, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__265)) __PYX_ERR(0, 217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__265);
  __Pyx_GIVEREF(__pyx_tuple__265);

  /* "km3pipe/dataclasses.pyx":221
 * 
 *     @classmethod
 *     def from_table(cls, row):             # <<<<<<<<<<<<<<
 *         args = []
 *         for col in cls.dtype.names:
 */
  __pyx_tuple__266 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_row, __pyx_n_s_args, __pyx_n_s_col); if (unlikely(!__pyx_tuple__266)) __PYX_ERR(0, 221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__266);
  __Pyx_GIVEREF(__pyx_tuple__266);
  __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__266, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_from_table, 221, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(0, 221, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":231
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __pyx_tuple__267 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__267)) __PYX_ERR(0, 231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__267);
  __Pyx_GIVEREF(__pyx_tuple__267);
  __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__267, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_deserialise, 231, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 231, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":234
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __pyx_tuple__268 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__268)) __PYX_ERR(0, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__268);
  __Pyx_GIVEREF(__pyx_tuple__268);
  __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__268, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_serialise, 234, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) __PYX_ERR(0, 234, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":238
 * 
 *     @classmethod
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])
 */
  __pyx_tuple__269 = PyTuple_Pack(5, __pyx_n_s_cls, __pyx_n_s_data, __pyx_n_s_frame_id, __pyx_n_s_fmt, __pyx_n_s_h5loc); if (unlikely(!__pyx_tuple__269)) __PYX_ERR(0, 238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__269);
  __Pyx_GIVEREF(__pyx_tuple__269);
  __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__269, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_conv_from, 238, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 238, __pyx_L1_error)
  __pyx_tuple__270 = PyTuple_Pack(2, ((PyObject*)__pyx_n_s_numpy), ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__270)) __PYX_ERR(0, 238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__270);
  __Pyx_GIVEREF(__pyx_tuple__270);

  /* "km3pipe/dataclasses.pyx":242
 *             return cls.from_table(data[0])
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 */
  __pyx_tuple__271 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_to); if (unlikely(!__pyx_tuple__271)) __PYX_ERR(0, 242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__271);
  __Pyx_GIVEREF(__pyx_tuple__271);
  __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__271, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_conv_to, 242, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(0, 242, __pyx_L1_error)
  __pyx_tuple__272 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_numpy)); if (unlikely(!__pyx_tuple__272)) __PYX_ERR(0, 242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__272);
  __Pyx_GIVEREF(__pyx_tuple__272);

  /* "km3pipe/dataclasses.pyx":249
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return [(
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,
 */
  __pyx_tuple__273 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__273)) __PYX_ERR(0, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__273);
  __Pyx_GIVEREF(__pyx_tuple__273);
  __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__273, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_array_2, 249, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 249, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":257
 *         ), ]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Timeslice frame:\n" \
 *                "    slice id: {0}\n" \
 */
  __pyx_tuple__274 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__274)) __PYX_ERR(0, 257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__274);
  __Pyx_GIVEREF(__pyx_tuple__274);
  __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__274, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_str, 257, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 257, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":267
 *                        self.max_sequence_number)
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __pyx_tuple__275 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__275)) __PYX_ERR(0, 267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__275);
  __Pyx_GIVEREF(__pyx_tuple__275);
  __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__275, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_insp, 267, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 267, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":270
 *         return self.__str__()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */
  __pyx_tuple__276 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__276)) __PYX_ERR(0, 270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__276);
  __Pyx_GIVEREF(__pyx_tuple__276);
  __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__276, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_len_2, 270, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 270, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":279
 *     h5loc = '/'
 *     dtype = np.dtype([
 *         ('dom_id', '<u4'),             # <<<<<<<<<<<<<<
 *         ('fifo_status', '<u4'),
 *         ('frame_id', '<u4'),
 */
  __pyx_tuple__277 = PyTuple_Pack(2, __pyx_n_s_dom_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__277)) __PYX_ERR(0, 279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__277);
  __Pyx_GIVEREF(__pyx_tuple__277);

  /* "km3pipe/dataclasses.pyx":280
 *     dtype = np.dtype([
 *         ('dom_id', '<u4'),
 *         ('fifo_status', '<u4'),             # <<<<<<<<<<<<<<
 *         ('frame_id', '<u4'),
 *         ('frame_index', '<u4'),
 */
  __pyx_tuple__278 = PyTuple_Pack(2, __pyx_n_s_fifo_status, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__278)) __PYX_ERR(0, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__278);
  __Pyx_GIVEREF(__pyx_tuple__278);

  /* "km3pipe/dataclasses.pyx":281
 *         ('dom_id', '<u4'),
 *         ('fifo_status', '<u4'),
 *         ('frame_id', '<u4'),             # <<<<<<<<<<<<<<
 *         ('frame_index', '<u4'),
 *         ('has_udp_trailer', '<u4'),
 */
  __pyx_tuple__279 = PyTuple_Pack(2, __pyx_n_s_frame_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__279)) __PYX_ERR(0, 281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__279);
  __Pyx_GIVEREF(__pyx_tuple__279);

  /* "km3pipe/dataclasses.pyx":282
 *         ('fifo_status', '<u4'),
 *         ('frame_id', '<u4'),
 *         ('frame_index', '<u4'),             # <<<<<<<<<<<<<<
 *         ('has_udp_trailer', '<u4'),
 *         ('high_rate_veto', '<u4'),
 */
  __pyx_tuple__280 = PyTuple_Pack(2, __pyx_n_s_frame_index, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__280)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__280);
  __Pyx_GIVEREF(__pyx_tuple__280);

  /* "km3pipe/dataclasses.pyx":283
 *         ('frame_id', '<u4'),
 *         ('frame_index', '<u4'),
 *         ('has_udp_trailer', '<u4'),             # <<<<<<<<<<<<<<
 *         ('high_rate_veto', '<u4'),
 *         ('max_sequence_number', '<u4'),
 */
  __pyx_tuple__281 = PyTuple_Pack(2, __pyx_n_s_has_udp_trailer, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__281)) __PYX_ERR(0, 283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__281);
  __Pyx_GIVEREF(__pyx_tuple__281);

  /* "km3pipe/dataclasses.pyx":284
 *         ('frame_index', '<u4'),
 *         ('has_udp_trailer', '<u4'),
 *         ('high_rate_veto', '<u4'),             # <<<<<<<<<<<<<<
 *         ('max_sequence_number', '<u4'),
 *         ('n_packets', '<u4'),
 */
  __pyx_tuple__282 = PyTuple_Pack(2, __pyx_n_s_high_rate_veto, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__282)) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__282);
  __Pyx_GIVEREF(__pyx_tuple__282);

  /* "km3pipe/dataclasses.pyx":285
 *         ('has_udp_trailer', '<u4'),
 *         ('high_rate_veto', '<u4'),
 *         ('max_sequence_number', '<u4'),             # <<<<<<<<<<<<<<
 *         ('n_packets', '<u4'),
 *         ('slice_id', '<u4'),
 */
  __pyx_tuple__283 = PyTuple_Pack(2, __pyx_n_s_max_sequence_number, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__283)) __PYX_ERR(0, 285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__283);
  __Pyx_GIVEREF(__pyx_tuple__283);

  /* "km3pipe/dataclasses.pyx":286
 *         ('high_rate_veto', '<u4'),
 *         ('max_sequence_number', '<u4'),
 *         ('n_packets', '<u4'),             # <<<<<<<<<<<<<<
 *         ('slice_id', '<u4'),
 *         ('utc_nanoseconds', '<u4'),
 */
  __pyx_tuple__284 = PyTuple_Pack(2, __pyx_n_s_n_packets, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__284)) __PYX_ERR(0, 286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__284);
  __Pyx_GIVEREF(__pyx_tuple__284);

  /* "km3pipe/dataclasses.pyx":287
 *         ('max_sequence_number', '<u4'),
 *         ('n_packets', '<u4'),
 *         ('slice_id', '<u4'),             # <<<<<<<<<<<<<<
 *         ('utc_nanoseconds', '<u4'),
 *         ('utc_seconds', '<u4'),
 */
  __pyx_tuple__285 = PyTuple_Pack(2, __pyx_n_s_slice_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__285)) __PYX_ERR(0, 287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__285);
  __Pyx_GIVEREF(__pyx_tuple__285);

  /* "km3pipe/dataclasses.pyx":288
 *         ('n_packets', '<u4'),
 *         ('slice_id', '<u4'),
 *         ('utc_nanoseconds', '<u4'),             # <<<<<<<<<<<<<<
 *         ('utc_seconds', '<u4'),
 *         ('white_rabbit_status', '<u4'),
 */
  __pyx_tuple__286 = PyTuple_Pack(2, __pyx_n_s_utc_nanoseconds, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__286)) __PYX_ERR(0, 288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__286);
  __Pyx_GIVEREF(__pyx_tuple__286);

  /* "km3pipe/dataclasses.pyx":289
 *         ('slice_id', '<u4'),
 *         ('utc_nanoseconds', '<u4'),
 *         ('utc_seconds', '<u4'),             # <<<<<<<<<<<<<<
 *         ('white_rabbit_status', '<u4'),
 *     ])
 */
  __pyx_tuple__287 = PyTuple_Pack(2, __pyx_n_s_utc_seconds, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__287)) __PYX_ERR(0, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__287);
  __Pyx_GIVEREF(__pyx_tuple__287);

  /* "km3pipe/dataclasses.pyx":290
 *         ('utc_nanoseconds', '<u4'),
 *         ('utc_seconds', '<u4'),
 *         ('white_rabbit_status', '<u4'),             # <<<<<<<<<<<<<<
 *     ])
 * 
 */
  __pyx_tuple__288 = PyTuple_Pack(2, __pyx_n_s_white_rabbit_status, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__288)) __PYX_ERR(0, 290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__288);
  __Pyx_GIVEREF(__pyx_tuple__288);

  /* "km3pipe/dataclasses.pyx":294
 * 
 *     @classmethod
 *     def from_table(cls, row):             # <<<<<<<<<<<<<<
 *         args = []
 *         for col in cls.dtype.names:
 */
  __pyx_tuple__289 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_row, __pyx_n_s_args, __pyx_n_s_col); if (unlikely(!__pyx_tuple__289)) __PYX_ERR(0, 294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__289);
  __Pyx_GIVEREF(__pyx_tuple__289);
  __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__289, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_from_table, 294, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(0, 294, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":304
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __pyx_tuple__290 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__290)) __PYX_ERR(0, 304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__290);
  __Pyx_GIVEREF(__pyx_tuple__290);
  __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__290, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_deserialise, 304, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 304, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":307
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __pyx_tuple__291 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__291)) __PYX_ERR(0, 307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__291);
  __Pyx_GIVEREF(__pyx_tuple__291);
  __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__291, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_serialise, 307, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 307, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":311
 * 
 *     @classmethod
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])
 */
  __pyx_tuple__292 = PyTuple_Pack(5, __pyx_n_s_cls, __pyx_n_s_data, __pyx_n_s_frame_id, __pyx_n_s_fmt, __pyx_n_s_h5loc); if (unlikely(!__pyx_tuple__292)) __PYX_ERR(0, 311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__292);
  __Pyx_GIVEREF(__pyx_tuple__292);
  __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__292, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_conv_from, 311, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 311, __pyx_L1_error)
  __pyx_tuple__293 = PyTuple_Pack(2, ((PyObject*)__pyx_n_s_numpy), ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__293)) __PYX_ERR(0, 311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__293);
  __Pyx_GIVEREF(__pyx_tuple__293);

  /* "km3pipe/dataclasses.pyx":315
 *             return cls.from_table(data[0])
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 */
  __pyx_tuple__294 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_to); if (unlikely(!__pyx_tuple__294)) __PYX_ERR(0, 315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__294);
  __Pyx_GIVEREF(__pyx_tuple__294);
  __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__294, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_conv_to, 315, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 315, __pyx_L1_error)
  __pyx_tuple__295 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_numpy)); if (unlikely(!__pyx_tuple__295)) __PYX_ERR(0, 315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__295);
  __Pyx_GIVEREF(__pyx_tuple__295);

  /* "km3pipe/dataclasses.pyx":322
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return [(
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,
 */
  __pyx_tuple__296 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__296)) __PYX_ERR(0, 322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__296);
  __Pyx_GIVEREF(__pyx_tuple__296);
  __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__296, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_array_2, 322, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 322, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":330
 *         ), ]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Summaryslice frame #{0}:\n" \
 *                "    slice id:    {1}\n" \
 */
  __pyx_tuple__297 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__297)) __PYX_ERR(0, 330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__297);
  __Pyx_GIVEREF(__pyx_tuple__297);
  __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__297, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_str, 330, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 330, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":339
 *                        self.max_sequence_number)
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __pyx_tuple__298 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__298)) __PYX_ERR(0, 339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__298);
  __Pyx_GIVEREF(__pyx_tuple__298);
  __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__298, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_insp, 339, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 339, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":342
 *         return self.__str__()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */
  __pyx_tuple__299 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__299)) __PYX_ERR(0, 342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__299);
  __Pyx_GIVEREF(__pyx_tuple__299);
  __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__299, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_len_2, 342, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 342, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":350
 *     """
 *     dtype = np.dtype([
 *         ('det_id', '<i4'),             # <<<<<<<<<<<<<<
 *         ('frame_index', '<u4'),
 *         ('livetime_sec', '<u8'),
 */
  __pyx_tuple__300 = PyTuple_Pack(2, __pyx_n_s_det_id, __pyx_kp_s_i4); if (unlikely(!__pyx_tuple__300)) __PYX_ERR(0, 350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__300);
  __Pyx_GIVEREF(__pyx_tuple__300);

  /* "km3pipe/dataclasses.pyx":351
 *     dtype = np.dtype([
 *         ('det_id', '<i4'),
 *         ('frame_index', '<u4'),             # <<<<<<<<<<<<<<
 *         ('livetime_sec', '<u8'),
 *         ('mc_id', '<i4'),
 */
  __pyx_tuple__301 = PyTuple_Pack(2, __pyx_n_s_frame_index, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__301)) __PYX_ERR(0, 351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__301);
  __Pyx_GIVEREF(__pyx_tuple__301);

  /* "km3pipe/dataclasses.pyx":352
 *         ('det_id', '<i4'),
 *         ('frame_index', '<u4'),
 *         ('livetime_sec', '<u8'),             # <<<<<<<<<<<<<<
 *         ('mc_id', '<i4'),
 *         ('mc_t', '<f8'),
 */
  __pyx_tuple__302 = PyTuple_Pack(2, __pyx_n_s_livetime_sec, __pyx_kp_s_u8); if (unlikely(!__pyx_tuple__302)) __PYX_ERR(0, 352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__302);
  __Pyx_GIVEREF(__pyx_tuple__302);

  /* "km3pipe/dataclasses.pyx":353
 *         ('frame_index', '<u4'),
 *         ('livetime_sec', '<u8'),
 *         ('mc_id', '<i4'),             # <<<<<<<<<<<<<<
 *         ('mc_t', '<f8'),
 *         ('n_events_gen', '<u8'),
 */
  __pyx_tuple__303 = PyTuple_Pack(2, __pyx_n_s_mc_id, __pyx_kp_s_i4); if (unlikely(!__pyx_tuple__303)) __PYX_ERR(0, 353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__303);
  __Pyx_GIVEREF(__pyx_tuple__303);

  /* "km3pipe/dataclasses.pyx":354
 *         ('livetime_sec', '<u8'),
 *         ('mc_id', '<i4'),
 *         ('mc_t', '<f8'),             # <<<<<<<<<<<<<<
 *         ('n_events_gen', '<u8'),
 *         ('n_files_gen', '<u8'),
 */
  __pyx_tuple__304 = PyTuple_Pack(2, __pyx_n_s_mc_t, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__304)) __PYX_ERR(0, 354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__304);
  __Pyx_GIVEREF(__pyx_tuple__304);

  /* "km3pipe/dataclasses.pyx":355
 *         ('mc_id', '<i4'),
 *         ('mc_t', '<f8'),
 *         ('n_events_gen', '<u8'),             # <<<<<<<<<<<<<<
 *         ('n_files_gen', '<u8'),
 *         ('overlays', '<u4'),
 */
  __pyx_tuple__305 = PyTuple_Pack(2, __pyx_n_s_n_events_gen, __pyx_kp_s_u8); if (unlikely(!__pyx_tuple__305)) __PYX_ERR(0, 355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__305);
  __Pyx_GIVEREF(__pyx_tuple__305);

  /* "km3pipe/dataclasses.pyx":356
 *         ('mc_t', '<f8'),
 *         ('n_events_gen', '<u8'),
 *         ('n_files_gen', '<u8'),             # <<<<<<<<<<<<<<
 *         ('overlays', '<u4'),
 *         # ('run_id', '<u4'),
 */
  __pyx_tuple__306 = PyTuple_Pack(2, __pyx_n_s_n_files_gen, __pyx_kp_s_u8); if (unlikely(!__pyx_tuple__306)) __PYX_ERR(0, 356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__306);
  __Pyx_GIVEREF(__pyx_tuple__306);

  /* "km3pipe/dataclasses.pyx":357
 *         ('n_events_gen', '<u8'),
 *         ('n_files_gen', '<u8'),
 *         ('overlays', '<u4'),             # <<<<<<<<<<<<<<
 *         # ('run_id', '<u4'),
 *         ('trigger_counter', '<u8'),
 */
  __pyx_tuple__307 = PyTuple_Pack(2, __pyx_n_s_overlays, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__307)) __PYX_ERR(0, 357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__307);
  __Pyx_GIVEREF(__pyx_tuple__307);

  /* "km3pipe/dataclasses.pyx":359
 *         ('overlays', '<u4'),
 *         # ('run_id', '<u4'),
 *         ('trigger_counter', '<u8'),             # <<<<<<<<<<<<<<
 *         ('trigger_mask', '<u8'),
 *         ('utc_nanoseconds', '<u8'),
 */
  __pyx_tuple__308 = PyTuple_Pack(2, __pyx_n_s_trigger_counter, __pyx_kp_s_u8); if (unlikely(!__pyx_tuple__308)) __PYX_ERR(0, 359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__308);
  __Pyx_GIVEREF(__pyx_tuple__308);

  /* "km3pipe/dataclasses.pyx":360
 *         # ('run_id', '<u4'),
 *         ('trigger_counter', '<u8'),
 *         ('trigger_mask', '<u8'),             # <<<<<<<<<<<<<<
 *         ('utc_nanoseconds', '<u8'),
 *         ('utc_seconds', '<u8'),
 */
  __pyx_tuple__309 = PyTuple_Pack(2, __pyx_n_s_trigger_mask, __pyx_kp_s_u8); if (unlikely(!__pyx_tuple__309)) __PYX_ERR(0, 360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__309);
  __Pyx_GIVEREF(__pyx_tuple__309);

  /* "km3pipe/dataclasses.pyx":361
 *         ('trigger_counter', '<u8'),
 *         ('trigger_mask', '<u8'),
 *         ('utc_nanoseconds', '<u8'),             # <<<<<<<<<<<<<<
 *         ('utc_seconds', '<u8'),
 *         ('weight_w1', '<f8'),
 */
  __pyx_tuple__310 = PyTuple_Pack(2, __pyx_n_s_utc_nanoseconds, __pyx_kp_s_u8); if (unlikely(!__pyx_tuple__310)) __PYX_ERR(0, 361, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__310);
  __Pyx_GIVEREF(__pyx_tuple__310);

  /* "km3pipe/dataclasses.pyx":362
 *         ('trigger_mask', '<u8'),
 *         ('utc_nanoseconds', '<u8'),
 *         ('utc_seconds', '<u8'),             # <<<<<<<<<<<<<<
 *         ('weight_w1', '<f8'),
 *         ('weight_w2', '<f8'),
 */
  __pyx_tuple__311 = PyTuple_Pack(2, __pyx_n_s_utc_seconds, __pyx_kp_s_u8); if (unlikely(!__pyx_tuple__311)) __PYX_ERR(0, 362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__311);
  __Pyx_GIVEREF(__pyx_tuple__311);

  /* "km3pipe/dataclasses.pyx":363
 *         ('utc_nanoseconds', '<u8'),
 *         ('utc_seconds', '<u8'),
 *         ('weight_w1', '<f8'),             # <<<<<<<<<<<<<<
 *         ('weight_w2', '<f8'),
 *         ('weight_w3', '<f8'),
 */
  __pyx_tuple__312 = PyTuple_Pack(2, __pyx_n_s_weight_w1, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__312)) __PYX_ERR(0, 363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__312);
  __Pyx_GIVEREF(__pyx_tuple__312);

  /* "km3pipe/dataclasses.pyx":364
 *         ('utc_seconds', '<u8'),
 *         ('weight_w1', '<f8'),
 *         ('weight_w2', '<f8'),             # <<<<<<<<<<<<<<
 *         ('weight_w3', '<f8'),
 *         ('event_id', '<u4'),
 */
  __pyx_tuple__313 = PyTuple_Pack(2, __pyx_n_s_weight_w2, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__313)) __PYX_ERR(0, 364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__313);
  __Pyx_GIVEREF(__pyx_tuple__313);

  /* "km3pipe/dataclasses.pyx":365
 *         ('weight_w1', '<f8'),
 *         ('weight_w2', '<f8'),
 *         ('weight_w3', '<f8'),             # <<<<<<<<<<<<<<
 *         ('event_id', '<u4'),
 *     ])
 */
  __pyx_tuple__314 = PyTuple_Pack(2, __pyx_n_s_weight_w3, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__314)) __PYX_ERR(0, 365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__314);
  __Pyx_GIVEREF(__pyx_tuple__314);

  /* "km3pipe/dataclasses.pyx":366
 *         ('weight_w2', '<f8'),
 *         ('weight_w3', '<f8'),
 *         ('event_id', '<u4'),             # <<<<<<<<<<<<<<
 *     ])
 * 
 */
  __pyx_tuple__315 = PyTuple_Pack(2, __pyx_n_s_event_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__315)) __PYX_ERR(0, 366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__315);
  __Pyx_GIVEREF(__pyx_tuple__315);

  /* "km3pipe/dataclasses.pyx":369
 *     ])
 * 
 *     def __init__(self, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._arr = np.array(arr, dtype=self.dtype).reshape(1)
 *         for col in self.dtype.names:
 */
  __pyx_tuple__316 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_arr, __pyx_n_s_h5loc, __pyx_n_s_col); if (unlikely(!__pyx_tuple__316)) __PYX_ERR(0, 369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__316);
  __Pyx_GIVEREF(__pyx_tuple__316);
  __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__316, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_init, 369, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 369, __pyx_L1_error)
  __pyx_tuple__317 = PyTuple_Pack(1, ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__317)) __PYX_ERR(0, 369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__317);
  __Pyx_GIVEREF(__pyx_tuple__317);

  /* "km3pipe/dataclasses.pyx":376
 * 
 *     @classmethod
 *     def from_row(cls, row, **kwargs):             # <<<<<<<<<<<<<<
 *         args = tuple((row[col] for col in cls.dtype.names))
 *         return cls(np.array(args, dtype=cls.dtype), **kwargs)
 */
  __pyx_tuple__318 = PyTuple_Pack(6, __pyx_n_s_cls, __pyx_n_s_row, __pyx_n_s_kwargs, __pyx_n_s_args, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__318)) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__318);
  __Pyx_GIVEREF(__pyx_tuple__318);
  __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__318, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_from_row, 376, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 376, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":381
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __pyx_tuple__319 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__319)) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__319);
  __Pyx_GIVEREF(__pyx_tuple__319);
  __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__319, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_deserialise, 381, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 381, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":384
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __pyx_tuple__320 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__320)) __PYX_ERR(0, 384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__320);
  __Pyx_GIVEREF(__pyx_tuple__320);
  __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__320, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_serialise, 384, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 384, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":388
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/', **kwargs):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_row(data, **kwargs)
 */
  __pyx_tuple__321 = PyTuple_Pack(6, __pyx_n_s_cls, __pyx_n_s_data, __pyx_n_s_event_id, __pyx_n_s_fmt, __pyx_n_s_h5loc, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__321)) __PYX_ERR(0, 388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__321);
  __Pyx_GIVEREF(__pyx_tuple__321);
  __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(5, 0, 6, 0, CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__321, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_conv_from, 388, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 388, __pyx_L1_error)
  __pyx_tuple__322 = PyTuple_Pack(2, ((PyObject*)__pyx_n_s_numpy), ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__322)) __PYX_ERR(0, 388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__322);
  __Pyx_GIVEREF(__pyx_tuple__322);

  /* "km3pipe/dataclasses.pyx":392
 *             return cls.from_row(data, **kwargs)
 * 
 *     def conv_to(self, to='numpy', **kwargs):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 */
  __pyx_tuple__323 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_to, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__323)) __PYX_ERR(0, 392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__323);
  __Pyx_GIVEREF(__pyx_tuple__323);
  __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__323, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_conv_to, 392, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(0, 392, __pyx_L1_error)
  __pyx_tuple__324 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_numpy)); if (unlikely(!__pyx_tuple__324)) __PYX_ERR(0, 392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__324);
  __Pyx_GIVEREF(__pyx_tuple__324);

  /* "km3pipe/dataclasses.pyx":400
 *                                 **kwargs)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */
  __pyx_tuple__325 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__325)) __PYX_ERR(0, 400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__325);
  __Pyx_GIVEREF(__pyx_tuple__325);
  __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__325, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_array_2, 400, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 400, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":403
 *         return self._arr
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Event #{0}:\n" \
 *                "    detector id:     {1}\n" \
 */
  __pyx_tuple__326 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__326)) __PYX_ERR(0, 403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__326);
  __Pyx_GIVEREF(__pyx_tuple__326);
  __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__326, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_str, 403, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(0, 403, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":421
 *                        )
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __pyx_tuple__327 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__327)) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__327);
  __Pyx_GIVEREF(__pyx_tuple__327);
  __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__327, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_repr, 421, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(0, 421, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":424
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __pyx_tuple__328 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__328)) __PYX_ERR(0, 424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__328);
  __Pyx_GIVEREF(__pyx_tuple__328);
  __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__328, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_insp, 424, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(0, 424, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":427
 *         return self.__str__()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */
  __pyx_tuple__329 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__329)) __PYX_ERR(0, 427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__329);
  __Pyx_GIVEREF(__pyx_tuple__329);
  __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__329, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_len_2, 427, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 427, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":433
 * class Point(np.ndarray):
 *     """Represents a point in a 3D space"""
 *     def __new__(cls, input_array=(np.nan, np.nan, np.nan)):             # <<<<<<<<<<<<<<
 *         """Add x, y and z to the ndarray"""
 *         obj = np.asarray(input_array).view(cls)
 */
  __pyx_tuple__330 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_input_array, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__330)) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__330);
  __Pyx_GIVEREF(__pyx_tuple__330);
  __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__330, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_new, 433, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(0, 433, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":439
 * 
 *     @property
 *     def x(self):             # <<<<<<<<<<<<<<
 *         return self[0]
 * 
 */
  __pyx_tuple__331 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__331)) __PYX_ERR(0, 439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__331);
  __Pyx_GIVEREF(__pyx_tuple__331);
  __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__331, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_x, 439, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 439, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":443
 * 
 *     @x.setter
 *     def x(self, value):             # <<<<<<<<<<<<<<
 *         self[0] = value
 * 
 */
  __pyx_tuple__332 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__332)) __PYX_ERR(0, 443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__332);
  __Pyx_GIVEREF(__pyx_tuple__332);
  __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__332, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_x, 443, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(0, 443, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":447
 * 
 *     @property
 *     def y(self):             # <<<<<<<<<<<<<<
 *         return self[1]
 * 
 */
  __pyx_tuple__333 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__333)) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__333);
  __Pyx_GIVEREF(__pyx_tuple__333);
  __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__333, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_y, 447, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 447, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":451
 * 
 *     @y.setter
 *     def y(self, value):             # <<<<<<<<<<<<<<
 *         self[1] = value
 * 
 */
  __pyx_tuple__334 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__334)) __PYX_ERR(0, 451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__334);
  __Pyx_GIVEREF(__pyx_tuple__334);
  __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__334, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_y, 451, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(0, 451, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":455
 * 
 *     @property
 *     def z(self):             # <<<<<<<<<<<<<<
 *         return self[2]
 * 
 */
  __pyx_tuple__335 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__335)) __PYX_ERR(0, 455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__335);
  __Pyx_GIVEREF(__pyx_tuple__335);
  __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__335, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_z, 455, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 455, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":459
 * 
 *     @z.setter
 *     def z(self, value):             # <<<<<<<<<<<<<<
 *         self[2] = value
 * 
 */
  __pyx_tuple__336 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__336)) __PYX_ERR(0, 459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__336);
  __Pyx_GIVEREF(__pyx_tuple__336);
  __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__336, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_z, 459, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(0, 459, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":472
 * 
 *     """
 *     def __new__(cls, input_array=(1, 0, 0)):             # <<<<<<<<<<<<<<
 *         """Add x, y and z to the ndarray"""
 *         normed_array = np.array(input_array) / np.linalg.norm(input_array)
 */
  __pyx_tuple__337 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_input_array, __pyx_n_s_normed_array, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__337)) __PYX_ERR(0, 472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__337);
  __Pyx_GIVEREF(__pyx_tuple__337);
  __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__337, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_new, 472, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(0, 472, __pyx_L1_error)
  __pyx_tuple__338 = PyTuple_Pack(1, ((PyObject*)__pyx_tuple__60)); if (unlikely(!__pyx_tuple__338)) __PYX_ERR(0, 472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__338);
  __Pyx_GIVEREF(__pyx_tuple__338);

  /* "km3pipe/dataclasses.pyx":478
 *         return obj
 * 
 *     def _normalise(self):             # <<<<<<<<<<<<<<
 *         normed_array = self / np.linalg.norm(self)
 *         self[0] = normed_array[0]
 */
  __pyx_tuple__339 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_normed_array); if (unlikely(!__pyx_tuple__339)) __PYX_ERR(0, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__339);
  __Pyx_GIVEREF(__pyx_tuple__339);
  __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__339, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_normalise, 478, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 478, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":485
 * 
 *     @property
 *     def x(self):             # <<<<<<<<<<<<<<
 *         return self[0]
 * 
 */
  __pyx_tuple__340 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__340)) __PYX_ERR(0, 485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__340);
  __Pyx_GIVEREF(__pyx_tuple__340);
  __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__340, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_x, 485, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 485, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":489
 * 
 *     @x.setter
 *     def x(self, value):             # <<<<<<<<<<<<<<
 *         self[0] = value
 *         self._normalise()
 */
  __pyx_tuple__341 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__341)) __PYX_ERR(0, 489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__341);
  __Pyx_GIVEREF(__pyx_tuple__341);
  __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__341, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_x, 489, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 489, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":494
 * 
 *     @property
 *     def y(self):             # <<<<<<<<<<<<<<
 *         return self[1]
 * 
 */
  __pyx_tuple__342 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__342)) __PYX_ERR(0, 494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__342);
  __Pyx_GIVEREF(__pyx_tuple__342);
  __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__342, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_y, 494, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(0, 494, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":498
 * 
 *     @y.setter
 *     def y(self, value):             # <<<<<<<<<<<<<<
 *         self[1] = value
 *         self._normalise()
 */
  __pyx_tuple__343 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__343)) __PYX_ERR(0, 498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__343);
  __Pyx_GIVEREF(__pyx_tuple__343);
  __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__343, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_y, 498, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(0, 498, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":503
 * 
 *     @property
 *     def z(self):             # <<<<<<<<<<<<<<
 *         return self[2]
 * 
 */
  __pyx_tuple__344 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__344)) __PYX_ERR(0, 503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__344);
  __Pyx_GIVEREF(__pyx_tuple__344);
  __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__344, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_z, 503, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 503, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":507
 * 
 *     @z.setter
 *     def z(self, value):             # <<<<<<<<<<<<<<
 *         self[2] = value
 *         self._normalise()
 */
  __pyx_tuple__345 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__345)) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__345);
  __Pyx_GIVEREF(__pyx_tuple__345);
  __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__345, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_z, 507, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(0, 507, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":512
 * 
 *     @property
 *     def zenith(self):             # <<<<<<<<<<<<<<
 *         return angle_between(self, (0, 0, -1))
 * 
 */
  __pyx_tuple__346 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__346)) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__346);
  __Pyx_GIVEREF(__pyx_tuple__346);
  __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__346, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_zenith, 512, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 512, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":515
 *         return angle_between(self, (0, 0, -1))
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "({0:.4}, {1:.4}, {2:.4})".format(self.x, self.y, self.z)
 * 
 */
  __pyx_tuple__347 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__347)) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__347);
  __Pyx_GIVEREF(__pyx_tuple__347);
  __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__347, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_str, 515, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(0, 515, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":593
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __pyx_tuple__348 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__348)) __PYX_ERR(0, 593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__348);
  __Pyx_GIVEREF(__pyx_tuple__348);
  __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__348, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_insp, 593, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(0, 593, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":632
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __pyx_tuple__349 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__349)) __PYX_ERR(0, 632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__349);
  __Pyx_GIVEREF(__pyx_tuple__349);
  __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__349, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_insp, 632, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(0, 632, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":683
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __pyx_tuple__350 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__350)) __PYX_ERR(0, 683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__350);
  __Pyx_GIVEREF(__pyx_tuple__350);
  __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__350, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_insp, 683, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(0, 683, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":740
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __pyx_tuple__351 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__351)) __PYX_ERR(0, 740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__351);
  __Pyx_GIVEREF(__pyx_tuple__351);
  __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__351, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_insp, 740, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) __PYX_ERR(0, 740, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":748
 *     """
 *     dtype = np.dtype([
 *         ('channel_id', 'u1'),             # <<<<<<<<<<<<<<
 *         ('dir_x', '<f8'),
 *         ('dir_y', '<f8'),
 */
  __pyx_tuple__352 = PyTuple_Pack(2, __pyx_n_s_channel_id, __pyx_n_s_u1); if (unlikely(!__pyx_tuple__352)) __PYX_ERR(0, 748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__352);
  __Pyx_GIVEREF(__pyx_tuple__352);

  /* "km3pipe/dataclasses.pyx":749
 *     dtype = np.dtype([
 *         ('channel_id', 'u1'),
 *         ('dir_x', '<f8'),             # <<<<<<<<<<<<<<
 *         ('dir_y', '<f8'),
 *         ('dir_z', '<f8'),
 */
  __pyx_tuple__353 = PyTuple_Pack(2, __pyx_n_s_dir_x, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__353)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__353);
  __Pyx_GIVEREF(__pyx_tuple__353);

  /* "km3pipe/dataclasses.pyx":750
 *         ('channel_id', 'u1'),
 *         ('dir_x', '<f8'),
 *         ('dir_y', '<f8'),             # <<<<<<<<<<<<<<
 *         ('dir_z', '<f8'),
 *         ('dom_id', '<u4'),
 */
  __pyx_tuple__354 = PyTuple_Pack(2, __pyx_n_s_dir_y, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__354)) __PYX_ERR(0, 750, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__354);
  __Pyx_GIVEREF(__pyx_tuple__354);

  /* "km3pipe/dataclasses.pyx":751
 *         ('dir_x', '<f8'),
 *         ('dir_y', '<f8'),
 *         ('dir_z', '<f8'),             # <<<<<<<<<<<<<<
 *         ('dom_id', '<u4'),
 *         ('id', '<u4'),
 */
  __pyx_tuple__355 = PyTuple_Pack(2, __pyx_n_s_dir_z, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__355)) __PYX_ERR(0, 751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__355);
  __Pyx_GIVEREF(__pyx_tuple__355);

  /* "km3pipe/dataclasses.pyx":752
 *         ('dir_y', '<f8'),
 *         ('dir_z', '<f8'),
 *         ('dom_id', '<u4'),             # <<<<<<<<<<<<<<
 *         ('id', '<u4'),
 *         ('pmt_id', '<u4'),
 */
  __pyx_tuple__356 = PyTuple_Pack(2, __pyx_n_s_dom_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__356)) __PYX_ERR(0, 752, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__356);
  __Pyx_GIVEREF(__pyx_tuple__356);

  /* "km3pipe/dataclasses.pyx":753
 *         ('dir_z', '<f8'),
 *         ('dom_id', '<u4'),
 *         ('id', '<u4'),             # <<<<<<<<<<<<<<
 *         ('pmt_id', '<u4'),
 *         ('pos_x', '<f8'),
 */
  __pyx_tuple__357 = PyTuple_Pack(2, __pyx_n_s_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__357)) __PYX_ERR(0, 753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__357);
  __Pyx_GIVEREF(__pyx_tuple__357);

  /* "km3pipe/dataclasses.pyx":754
 *         ('dom_id', '<u4'),
 *         ('id', '<u4'),
 *         ('pmt_id', '<u4'),             # <<<<<<<<<<<<<<
 *         ('pos_x', '<f8'),
 *         ('pos_y', '<f8'),
 */
  __pyx_tuple__358 = PyTuple_Pack(2, __pyx_n_s_pmt_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__358)) __PYX_ERR(0, 754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__358);
  __Pyx_GIVEREF(__pyx_tuple__358);

  /* "km3pipe/dataclasses.pyx":755
 *         ('id', '<u4'),
 *         ('pmt_id', '<u4'),
 *         ('pos_x', '<f8'),             # <<<<<<<<<<<<<<
 *         ('pos_y', '<f8'),
 *         ('pos_z', '<f8'),
 */
  __pyx_tuple__359 = PyTuple_Pack(2, __pyx_n_s_pos_x, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__359)) __PYX_ERR(0, 755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__359);
  __Pyx_GIVEREF(__pyx_tuple__359);

  /* "km3pipe/dataclasses.pyx":756
 *         ('pmt_id', '<u4'),
 *         ('pos_x', '<f8'),
 *         ('pos_y', '<f8'),             # <<<<<<<<<<<<<<
 *         ('pos_z', '<f8'),
 *         # ('run_id', '<u4'),
 */
  __pyx_tuple__360 = PyTuple_Pack(2, __pyx_n_s_pos_y, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__360)) __PYX_ERR(0, 756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__360);
  __Pyx_GIVEREF(__pyx_tuple__360);

  /* "km3pipe/dataclasses.pyx":757
 *         ('pos_x', '<f8'),
 *         ('pos_y', '<f8'),
 *         ('pos_z', '<f8'),             # <<<<<<<<<<<<<<
 *         # ('run_id', '<u4'),
 *         ('t0', '<i4'),
 */
  __pyx_tuple__361 = PyTuple_Pack(2, __pyx_n_s_pos_z, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__361)) __PYX_ERR(0, 757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__361);
  __Pyx_GIVEREF(__pyx_tuple__361);

  /* "km3pipe/dataclasses.pyx":759
 *         ('pos_z', '<f8'),
 *         # ('run_id', '<u4'),
 *         ('t0', '<i4'),             # <<<<<<<<<<<<<<
 *         ('time', '<i4'),
 *         ('tot', 'u1'),
 */
  __pyx_tuple__362 = PyTuple_Pack(2, __pyx_n_s_t0, __pyx_kp_s_i4); if (unlikely(!__pyx_tuple__362)) __PYX_ERR(0, 759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__362);
  __Pyx_GIVEREF(__pyx_tuple__362);

  /* "km3pipe/dataclasses.pyx":760
 *         # ('run_id', '<u4'),
 *         ('t0', '<i4'),
 *         ('time', '<i4'),             # <<<<<<<<<<<<<<
 *         ('tot', 'u1'),
 *         ('triggered', 'u1'),
 */
  __pyx_tuple__363 = PyTuple_Pack(2, __pyx_n_s_time, __pyx_kp_s_i4); if (unlikely(!__pyx_tuple__363)) __PYX_ERR(0, 760, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__363);
  __Pyx_GIVEREF(__pyx_tuple__363);

  /* "km3pipe/dataclasses.pyx":761
 *         ('t0', '<i4'),
 *         ('time', '<i4'),
 *         ('tot', 'u1'),             # <<<<<<<<<<<<<<
 *         ('triggered', 'u1'),
 *         ('event_id', '<u4'),
 */
  __pyx_tuple__364 = PyTuple_Pack(2, __pyx_n_s_tot, __pyx_n_s_u1); if (unlikely(!__pyx_tuple__364)) __PYX_ERR(0, 761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__364);
  __Pyx_GIVEREF(__pyx_tuple__364);

  /* "km3pipe/dataclasses.pyx":762
 *         ('time', '<i4'),
 *         ('tot', 'u1'),
 *         ('triggered', 'u1'),             # <<<<<<<<<<<<<<
 *         ('event_id', '<u4'),
 *     ])
 */
  __pyx_tuple__365 = PyTuple_Pack(2, __pyx_n_s_triggered, __pyx_n_s_u1); if (unlikely(!__pyx_tuple__365)) __PYX_ERR(0, 762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__365);
  __Pyx_GIVEREF(__pyx_tuple__365);

  /* "km3pipe/dataclasses.pyx":763
 *         ('tot', 'u1'),
 *         ('triggered', 'u1'),
 *         ('event_id', '<u4'),             # <<<<<<<<<<<<<<
 *     ])
 * 
 */
  __pyx_tuple__366 = PyTuple_Pack(2, __pyx_n_s_event_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__366)) __PYX_ERR(0, 763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__366);
  __Pyx_GIVEREF(__pyx_tuple__366);

  /* "km3pipe/dataclasses.pyx":766
 *     ])
 * 
 *     def __init__(self, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */
  __pyx_tuple__367 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_arr, __pyx_n_s_h5loc); if (unlikely(!__pyx_tuple__367)) __PYX_ERR(0, 766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__367);
  __Pyx_GIVEREF(__pyx_tuple__367);
  __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__367, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_init, 766, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(0, 766, __pyx_L1_error)
  __pyx_tuple__368 = PyTuple_Pack(1, ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__368)) __PYX_ERR(0, 766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__368);
  __Pyx_GIVEREF(__pyx_tuple__368);

  /* "km3pipe/dataclasses.pyx":773
 * 
 *     @classmethod
 *     def from_aanet(cls, hits, event_id):             # <<<<<<<<<<<<<<
 *         try:
 *             return cls(np.array([(
 */
  __pyx_tuple__369 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_hits_2, __pyx_n_s_event_id, __pyx_n_s_h); if (unlikely(!__pyx_tuple__369)) __PYX_ERR(0, 773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__369);
  __Pyx_GIVEREF(__pyx_tuple__369);
  __pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__369, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_from_aanet, 773, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__77)) __PYX_ERR(0, 773, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":813
 * 
 *     @classmethod
 *     def from_evt(cls, hits, event_id):             # <<<<<<<<<<<<<<
 *         return cls(np.array([(
 *             0,     # channel_id
 */
  __pyx_tuple__370 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_hits_2, __pyx_n_s_event_id, __pyx_n_s_h); if (unlikely(!__pyx_tuple__370)) __PYX_ERR(0, 813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__370);
  __Pyx_GIVEREF(__pyx_tuple__370);
  __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__370, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_from_evt, 813, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(0, 813, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":833
 * 
 *     @classmethod
 *     def from_arrays(cls, channel_ids, dir_xs, dir_ys, dir_zs, dom_ids, ids,             # <<<<<<<<<<<<<<
 *                     pmt_ids, pos_xs, pos_ys, pos_zs, t0s, times, tots,
 *                     triggereds, event_id):
 */
  __pyx_tuple__371 = PyTuple_Pack(18, __pyx_n_s_cls, __pyx_n_s_channel_ids, __pyx_n_s_dir_xs, __pyx_n_s_dir_ys, __pyx_n_s_dir_zs, __pyx_n_s_dom_ids, __pyx_n_s_ids, __pyx_n_s_pmt_ids, __pyx_n_s_pos_xs, __pyx_n_s_pos_ys, __pyx_n_s_pos_zs, __pyx_n_s_t0s, __pyx_n_s_times, __pyx_n_s_tots, __pyx_n_s_triggereds, __pyx_n_s_event_id, __pyx_n_s_length, __pyx_n_s_hits_2); if (unlikely(!__pyx_tuple__371)) __PYX_ERR(0, 833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__371);
  __Pyx_GIVEREF(__pyx_tuple__371);
  __pyx_codeobj__79 = (PyObject*)__Pyx_PyCode_New(16, 0, 18, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__371, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_from_arrays, 833, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__79)) __PYX_ERR(0, 833, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":860
 * 
 *     @classmethod
 *     def from_dict(cls, map, event_id):             # <<<<<<<<<<<<<<
 *         if event_id is None:
 *             event_id = map['event_id']
 */
  __pyx_tuple__372 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_map, __pyx_n_s_event_id); if (unlikely(!__pyx_tuple__372)) __PYX_ERR(0, 860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__372);
  __Pyx_GIVEREF(__pyx_tuple__372);
  __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__372, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_from_dict, 860, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 860, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":882
 * 
 *     @classmethod
 *     def from_table(cls, table, event_id):             # <<<<<<<<<<<<<<
 *         if event_id is None:
 *             event_id = table[0]['event_id']
 */
  __pyx_tuple__373 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_table, __pyx_n_s_event_id, __pyx_n_s_row); if (unlikely(!__pyx_tuple__373)) __PYX_ERR(0, 882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__373);
  __Pyx_GIVEREF(__pyx_tuple__373);
  __pyx_codeobj__81 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__373, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_from_table, 882, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__81)) __PYX_ERR(0, 882, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":903
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __pyx_tuple__374 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__374)) __PYX_ERR(0, 903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__374);
  __Pyx_GIVEREF(__pyx_tuple__374);
  __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__374, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_deserialise, 903, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 903, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":906
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __pyx_tuple__375 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__375)) __PYX_ERR(0, 906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__375);
  __Pyx_GIVEREF(__pyx_tuple__375);
  __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__375, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_serialise, 906, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) __PYX_ERR(0, 906, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":910
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         # what is event_id doing here?
 *         if fmt == 'numpy':
 */
  __pyx_tuple__376 = PyTuple_Pack(5, __pyx_n_s_cls, __pyx_n_s_data, __pyx_n_s_event_id, __pyx_n_s_fmt, __pyx_n_s_h5loc); if (unlikely(!__pyx_tuple__376)) __PYX_ERR(0, 910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__376);
  __Pyx_GIVEREF(__pyx_tuple__376);
  __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__376, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_conv_from, 910, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(0, 910, __pyx_L1_error)
  __pyx_tuple__377 = PyTuple_Pack(3, ((PyObject *)Py_None), ((PyObject*)__pyx_n_s_numpy), ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__377)) __PYX_ERR(0, 910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__377);
  __Pyx_GIVEREF(__pyx_tuple__377);

  /* "km3pipe/dataclasses.pyx":917
 *             return cls(data.to_records(index=False))
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 */
  __pyx_tuple__378 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_to); if (unlikely(!__pyx_tuple__378)) __PYX_ERR(0, 917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__378);
  __Pyx_GIVEREF(__pyx_tuple__378);
  __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__378, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_conv_to, 917, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) __PYX_ERR(0, 917, __pyx_L1_error)
  __pyx_tuple__379 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_numpy)); if (unlikely(!__pyx_tuple__379)) __PYX_ERR(0, 917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__379);
  __Pyx_GIVEREF(__pyx_tuple__379);

  /* "km3pipe/dataclasses.pyx":924
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */
  __pyx_tuple__380 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__380)) __PYX_ERR(0, 924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__380);
  __Pyx_GIVEREF(__pyx_tuple__380);
  __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__380, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_array_2, 924, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(0, 924, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":927
 *         return self._arr
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_tuple__381 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__381)) __PYX_ERR(0, 927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__381);
  __Pyx_GIVEREF(__pyx_tuple__381);
  __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__381, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_iter, 927, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(0, 927, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":931
 * 
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         return self._arr['id']
 * 
 */
  __pyx_tuple__382 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__382)) __PYX_ERR(0, 931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__382);
  __Pyx_GIVEREF(__pyx_tuple__382);
  __pyx_codeobj__88 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__382, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_id, 931, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__88)) __PYX_ERR(0, 931, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":935
 * 
 *     @property
 *     def time(self):             # <<<<<<<<<<<<<<
 *         return self._arr['time']
 * 
 */
  __pyx_tuple__383 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__383)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__383);
  __Pyx_GIVEREF(__pyx_tuple__383);
  __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__383, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_time, 935, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(0, 935, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":939
 * 
 *     @property
 *     def triggered_hits(self):             # <<<<<<<<<<<<<<
 *         return HitSeries(self._arr[self._arr['triggered'] == True])     # noqa
 * 
 */
  __pyx_tuple__384 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__384)) __PYX_ERR(0, 939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__384);
  __Pyx_GIVEREF(__pyx_tuple__384);
  __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__384, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_triggered_hits, 939, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) __PYX_ERR(0, 939, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":943
 * 
 *     @property
 *     def first_hits(self):             # <<<<<<<<<<<<<<
 *         h = self.conv_to(to='pandas')
 *         h.sort_values('time', inplace=True)
 */
  __pyx_tuple__385 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_h); if (unlikely(!__pyx_tuple__385)) __PYX_ERR(0, 943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__385);
  __Pyx_GIVEREF(__pyx_tuple__385);
  __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__385, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_first_hits, 943, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) __PYX_ERR(0, 943, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":950
 * 
 *     @property
 *     def triggered(self):             # <<<<<<<<<<<<<<
 *         return self._arr['triggered']
 * 
 */
  __pyx_tuple__386 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__386)) __PYX_ERR(0, 950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__386);
  __Pyx_GIVEREF(__pyx_tuple__386);
  __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__386, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_triggered, 950, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) __PYX_ERR(0, 950, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":954
 * 
 *     @property
 *     def tot(self):             # <<<<<<<<<<<<<<
 *         return self._arr['tot']
 * 
 */
  __pyx_tuple__387 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__387)) __PYX_ERR(0, 954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__387);
  __Pyx_GIVEREF(__pyx_tuple__387);
  __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__387, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_tot, 954, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) __PYX_ERR(0, 954, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":958
 * 
 *     @property
 *     def dom_id(self):             # <<<<<<<<<<<<<<
 *         return self._arr['dom_id']
 * 
 */
  __pyx_tuple__388 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__388)) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__388);
  __Pyx_GIVEREF(__pyx_tuple__388);
  __pyx_codeobj__95 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__388, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_dom_id, 958, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) __PYX_ERR(0, 958, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":962
 * 
 *     @property
 *     def pmt_id(self):             # <<<<<<<<<<<<<<
 *         return self._arr['pmt_id']
 * 
 */
  __pyx_tuple__389 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__389)) __PYX_ERR(0, 962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__389);
  __Pyx_GIVEREF(__pyx_tuple__389);
  __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__389, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_pmt_id, 962, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(0, 962, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":966
 * 
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         return self._arr['id']
 * 
 */
  __pyx_tuple__390 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__390)) __PYX_ERR(0, 966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__390);
  __Pyx_GIVEREF(__pyx_tuple__390);
  __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__390, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_id, 966, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) __PYX_ERR(0, 966, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":970
 * 
 *     @property
 *     def channel_id(self):             # <<<<<<<<<<<<<<
 *         return self._arr['channel_id']
 * 
 */
  __pyx_tuple__391 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__391)) __PYX_ERR(0, 970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__391);
  __Pyx_GIVEREF(__pyx_tuple__391);
  __pyx_codeobj__98 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__391, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_channel_id, 970, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__98)) __PYX_ERR(0, 970, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":974
 * 
 *     @property
 *     def pos_x(self):             # <<<<<<<<<<<<<<
 *         return self._arr['pos_x']
 * 
 */
  __pyx_tuple__392 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__392)) __PYX_ERR(0, 974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__392);
  __Pyx_GIVEREF(__pyx_tuple__392);
  __pyx_codeobj__99 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__392, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_pos_x, 974, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__99)) __PYX_ERR(0, 974, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":978
 * 
 *     @property
 *     def pos_y(self):             # <<<<<<<<<<<<<<
 *         return self._arr['pos_y']
 * 
 */
  __pyx_tuple__393 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__393)) __PYX_ERR(0, 978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__393);
  __Pyx_GIVEREF(__pyx_tuple__393);
  __pyx_codeobj__100 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__393, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_pos_y, 978, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__100)) __PYX_ERR(0, 978, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":982
 * 
 *     @property
 *     def pos_z(self):             # <<<<<<<<<<<<<<
 *         return self._arr['pos_z']
 * 
 */
  __pyx_tuple__394 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__394)) __PYX_ERR(0, 982, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__394);
  __Pyx_GIVEREF(__pyx_tuple__394);
  __pyx_codeobj__101 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__394, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_pos_z, 982, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__101)) __PYX_ERR(0, 982, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":986
 * 
 *     @property
 *     def dir_x(self):             # <<<<<<<<<<<<<<
 *         return self._arr['dir_x']
 * 
 */
  __pyx_tuple__395 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__395)) __PYX_ERR(0, 986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__395);
  __Pyx_GIVEREF(__pyx_tuple__395);
  __pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__395, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_dir_x, 986, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(0, 986, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":990
 * 
 *     @property
 *     def dir_y(self):             # <<<<<<<<<<<<<<
 *         return self._arr['dir_y']
 * 
 */
  __pyx_tuple__396 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__396)) __PYX_ERR(0, 990, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__396);
  __Pyx_GIVEREF(__pyx_tuple__396);
  __pyx_codeobj__103 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__396, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_dir_y, 990, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__103)) __PYX_ERR(0, 990, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":994
 * 
 *     @property
 *     def dir_z(self):             # <<<<<<<<<<<<<<
 *         return self._arr['dir_z']
 * 
 */
  __pyx_tuple__397 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__397)) __PYX_ERR(0, 994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__397);
  __Pyx_GIVEREF(__pyx_tuple__397);
  __pyx_codeobj__104 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__397, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_dir_z, 994, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__104)) __PYX_ERR(0, 994, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":998
 * 
 *     @property
 *     def t0(self):             # <<<<<<<<<<<<<<
 *         return self._arr['t0']
 * 
 */
  __pyx_tuple__398 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__398)) __PYX_ERR(0, 998, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__398);
  __Pyx_GIVEREF(__pyx_tuple__398);
  __pyx_codeobj__105 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__398, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_t0, 998, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__105)) __PYX_ERR(0, 998, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1001
 *         return self._arr['t0']
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */
  __pyx_tuple__399 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__399)) __PYX_ERR(0, 1001, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__399);
  __Pyx_GIVEREF(__pyx_tuple__399);
  __pyx_codeobj__106 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__399, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_next_2, 1001, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__106)) __PYX_ERR(0, 1001, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1005
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */
  __pyx_tuple__400 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_hit); if (unlikely(!__pyx_tuple__400)) __PYX_ERR(0, 1005, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__400);
  __Pyx_GIVEREF(__pyx_tuple__400);
  __pyx_codeobj__107 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__400, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_next, 1005, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__107)) __PYX_ERR(0, 1005, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1013
 *         return hit
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */
  __pyx_tuple__401 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__401)) __PYX_ERR(0, 1013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__401);
  __Pyx_GIVEREF(__pyx_tuple__401);
  __pyx_codeobj__108 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__401, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_len_2, 1013, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__108)) __PYX_ERR(0, 1013, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1016
 *         return self._arr.shape[0]
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             hit = Hit(*self._arr[index])
 */
  __pyx_tuple__402 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_index_2, __pyx_n_s_hit); if (unlikely(!__pyx_tuple__402)) __PYX_ERR(0, 1016, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__402);
  __Pyx_GIVEREF(__pyx_tuple__402);
  __pyx_codeobj__109 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__402, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_getitem, 1016, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__109)) __PYX_ERR(0, 1016, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1025
 *             raise TypeError("index must be int or slice")
 * 
 *     def _slice_generator(self, index):             # <<<<<<<<<<<<<<
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 */
  __pyx_tuple__403 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_index_2, __pyx_n_s_start, __pyx_n_s_stop, __pyx_n_s_step, __pyx_n_s_i); if (unlikely(!__pyx_tuple__403)) __PYX_ERR(0, 1025, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__403);
  __Pyx_GIVEREF(__pyx_tuple__403);
  __pyx_codeobj__111 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__403, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_slice_generator, 1025, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__111)) __PYX_ERR(0, 1025, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1031
 *             yield Hit(*self._arr[i])
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 */
  __pyx_tuple__404 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_n_hits, __pyx_n_s_plural); if (unlikely(!__pyx_tuple__404)) __PYX_ERR(0, 1031, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__404);
  __Pyx_GIVEREF(__pyx_tuple__404);
  __pyx_codeobj__112 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__404, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_str, 1031, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__112)) __PYX_ERR(0, 1031, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1036
 *         return("HitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __pyx_tuple__405 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__405)) __PYX_ERR(0, 1036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__405);
  __Pyx_GIVEREF(__pyx_tuple__405);
  __pyx_codeobj__114 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__405, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_repr, 1036, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__114)) __PYX_ERR(0, 1036, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1039
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return '\n'.join([str(hit) for hit in self._hits])
 * 
 */
  __pyx_tuple__406 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_hit); if (unlikely(!__pyx_tuple__406)) __PYX_ERR(0, 1039, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__406);
  __Pyx_GIVEREF(__pyx_tuple__406);
  __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__406, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_insp, 1039, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) __PYX_ERR(0, 1039, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1047
 *     """
 *     dtype = np.dtype([
 *         ('channel_id', 'u1'),             # <<<<<<<<<<<<<<
 *         ('dom_id', '<u4'),
 *         ('time', '<i4'),
 */
  __pyx_tuple__407 = PyTuple_Pack(2, __pyx_n_s_channel_id, __pyx_n_s_u1); if (unlikely(!__pyx_tuple__407)) __PYX_ERR(0, 1047, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__407);
  __Pyx_GIVEREF(__pyx_tuple__407);

  /* "km3pipe/dataclasses.pyx":1048
 *     dtype = np.dtype([
 *         ('channel_id', 'u1'),
 *         ('dom_id', '<u4'),             # <<<<<<<<<<<<<<
 *         ('time', '<i4'),
 *         ('tot', 'u1'),
 */
  __pyx_tuple__408 = PyTuple_Pack(2, __pyx_n_s_dom_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__408)) __PYX_ERR(0, 1048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__408);
  __Pyx_GIVEREF(__pyx_tuple__408);

  /* "km3pipe/dataclasses.pyx":1049
 *         ('channel_id', 'u1'),
 *         ('dom_id', '<u4'),
 *         ('time', '<i4'),             # <<<<<<<<<<<<<<
 *         ('tot', 'u1'),
 *     ])
 */
  __pyx_tuple__409 = PyTuple_Pack(2, __pyx_n_s_time, __pyx_kp_s_i4); if (unlikely(!__pyx_tuple__409)) __PYX_ERR(0, 1049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__409);
  __Pyx_GIVEREF(__pyx_tuple__409);

  /* "km3pipe/dataclasses.pyx":1050
 *         ('dom_id', '<u4'),
 *         ('time', '<i4'),
 *         ('tot', 'u1'),             # <<<<<<<<<<<<<<
 *     ])
 * 
 */
  __pyx_tuple__410 = PyTuple_Pack(2, __pyx_n_s_tot, __pyx_n_s_u1); if (unlikely(!__pyx_tuple__410)) __PYX_ERR(0, 1050, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__410);
  __Pyx_GIVEREF(__pyx_tuple__410);

  /* "km3pipe/dataclasses.pyx":1053
 *     ])
 * 
 *     def __init__(self, arr, slice_id, frame_id):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */
  __pyx_tuple__411 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_arr, __pyx_n_s_slice_id, __pyx_n_s_frame_id); if (unlikely(!__pyx_tuple__411)) __PYX_ERR(0, 1053, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__411);
  __Pyx_GIVEREF(__pyx_tuple__411);
  __pyx_codeobj__117 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__411, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_init, 1053, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__117)) __PYX_ERR(0, 1053, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1061
 * 
 *     @property
 *     def h5loc(self):             # <<<<<<<<<<<<<<
 *         return "/timeslices/slice_{0}".format(self.slice_id)
 * 
 */
  __pyx_tuple__412 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__412)) __PYX_ERR(0, 1061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__412);
  __Pyx_GIVEREF(__pyx_tuple__412);
  __pyx_codeobj__118 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__412, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_h5loc, 1061, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__118)) __PYX_ERR(0, 1061, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1065
 * 
 *     @property
 *     def tabname(self):             # <<<<<<<<<<<<<<
 *         return "frame_{0}".format(self.frame_id)
 * 
 */
  __pyx_tuple__413 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__413)) __PYX_ERR(0, 1065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__413);
  __Pyx_GIVEREF(__pyx_tuple__413);
  __pyx_codeobj__119 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__413, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_tabname, 1065, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__119)) __PYX_ERR(0, 1065, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1069
 * 
 *     @classmethod
 *     def from_arrays(cls, channel_ids, dom_ids, times, tots, slice_id,             # <<<<<<<<<<<<<<
 *                     frame_id):
 *         len = channel_ids.shape[0]
 */
  __pyx_tuple__414 = PyTuple_Pack(9, __pyx_n_s_cls, __pyx_n_s_channel_ids, __pyx_n_s_dom_ids, __pyx_n_s_times, __pyx_n_s_tots, __pyx_n_s_slice_id, __pyx_n_s_frame_id, __pyx_n_s_len, __pyx_n_s_hits_2); if (unlikely(!__pyx_tuple__414)) __PYX_ERR(0, 1069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__414);
  __Pyx_GIVEREF(__pyx_tuple__414);
  __pyx_codeobj__120 = (PyObject*)__Pyx_PyCode_New(7, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__414, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_from_arrays, 1069, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__120)) __PYX_ERR(0, 1069, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1080
 * 
 *     @classmethod
 *     def from_dict(cls, map, slice_id, frame_id):             # <<<<<<<<<<<<<<
 *         return cls.from_arrays(
 *             map['channel_id'],
 */
  __pyx_tuple__415 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_map, __pyx_n_s_slice_id, __pyx_n_s_frame_id); if (unlikely(!__pyx_tuple__415)) __PYX_ERR(0, 1080, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__415);
  __Pyx_GIVEREF(__pyx_tuple__415);
  __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__415, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_from_dict, 1080, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) __PYX_ERR(0, 1080, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1090
 *         )
 * 
 *     def from_table(cls, table, slice_id, frame_id):             # <<<<<<<<<<<<<<
 *         return cls(np.array([(
 *             row['channel_id'],
 */
  __pyx_tuple__416 = PyTuple_Pack(5, __pyx_n_s_cls, __pyx_n_s_table, __pyx_n_s_slice_id, __pyx_n_s_frame_id, __pyx_n_s_row); if (unlikely(!__pyx_tuple__416)) __PYX_ERR(0, 1090, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__416);
  __Pyx_GIVEREF(__pyx_tuple__416);
  __pyx_codeobj__122 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__416, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_from_table, 1090, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__122)) __PYX_ERR(0, 1090, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1099
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __pyx_tuple__417 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__417)) __PYX_ERR(0, 1099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__417);
  __Pyx_GIVEREF(__pyx_tuple__417);
  __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__417, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_deserialise, 1099, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) __PYX_ERR(0, 1099, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1102
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __pyx_tuple__418 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__418)) __PYX_ERR(0, 1102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__418);
  __Pyx_GIVEREF(__pyx_tuple__418);
  __pyx_codeobj__124 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__418, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_serialise, 1102, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__124)) __PYX_ERR(0, 1102, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1106
 * 
 *     @classmethod
 *     def conv_from(cls, data, slice_id, frame_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             # return cls.from_table(data, frame_id)
 */
  __pyx_tuple__419 = PyTuple_Pack(6, __pyx_n_s_cls, __pyx_n_s_data, __pyx_n_s_slice_id, __pyx_n_s_frame_id, __pyx_n_s_fmt, __pyx_n_s_h5loc); if (unlikely(!__pyx_tuple__419)) __PYX_ERR(0, 1106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__419);
  __Pyx_GIVEREF(__pyx_tuple__419);
  __pyx_codeobj__125 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__419, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_conv_from, 1106, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__125)) __PYX_ERR(0, 1106, __pyx_L1_error)
  __pyx_tuple__420 = PyTuple_Pack(2, ((PyObject*)__pyx_n_s_numpy), ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__420)) __PYX_ERR(0, 1106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__420);
  __Pyx_GIVEREF(__pyx_tuple__420);

  /* "km3pipe/dataclasses.pyx":1111
 *             return cls(data, slice_id, frame_id)
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 */
  __pyx_tuple__421 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_to); if (unlikely(!__pyx_tuple__421)) __PYX_ERR(0, 1111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__421);
  __Pyx_GIVEREF(__pyx_tuple__421);
  __pyx_codeobj__126 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__421, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_conv_to, 1111, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__126)) __PYX_ERR(0, 1111, __pyx_L1_error)
  __pyx_tuple__422 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_numpy)); if (unlikely(!__pyx_tuple__422)) __PYX_ERR(0, 1111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__422);
  __Pyx_GIVEREF(__pyx_tuple__422);

  /* "km3pipe/dataclasses.pyx":1118
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */
  __pyx_tuple__423 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__423)) __PYX_ERR(0, 1118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__423);
  __Pyx_GIVEREF(__pyx_tuple__423);
  __pyx_codeobj__127 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__423, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_array_2, 1118, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__127)) __PYX_ERR(0, 1118, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1121
 *         return self._arr
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_tuple__424 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__424)) __PYX_ERR(0, 1121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__424);
  __Pyx_GIVEREF(__pyx_tuple__424);
  __pyx_codeobj__128 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__424, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_iter, 1121, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__128)) __PYX_ERR(0, 1121, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1125
 * 
 *     @property
 *     def time(self):             # <<<<<<<<<<<<<<
 *         return self._arr['time']
 * 
 */
  __pyx_tuple__425 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__425)) __PYX_ERR(0, 1125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__425);
  __Pyx_GIVEREF(__pyx_tuple__425);
  __pyx_codeobj__129 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__425, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_time, 1125, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__129)) __PYX_ERR(0, 1125, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1129
 * 
 *     @property
 *     def tot(self):             # <<<<<<<<<<<<<<
 *         return self._arr['tot']
 * 
 */
  __pyx_tuple__426 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__426)) __PYX_ERR(0, 1129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__426);
  __Pyx_GIVEREF(__pyx_tuple__426);
  __pyx_codeobj__130 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__426, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_tot, 1129, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__130)) __PYX_ERR(0, 1129, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1133
 * 
 *     @property
 *     def dom_id(self):             # <<<<<<<<<<<<<<
 *         return self._arr['dom_id']
 * 
 */
  __pyx_tuple__427 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__427)) __PYX_ERR(0, 1133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__427);
  __Pyx_GIVEREF(__pyx_tuple__427);
  __pyx_codeobj__131 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__427, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_dom_id, 1133, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__131)) __PYX_ERR(0, 1133, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1137
 * 
 *     @property
 *     def channel_id(self):             # <<<<<<<<<<<<<<
 *         return self._arr['channel_id']
 * 
 */
  __pyx_tuple__428 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__428)) __PYX_ERR(0, 1137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__428);
  __Pyx_GIVEREF(__pyx_tuple__428);
  __pyx_codeobj__132 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__428, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_channel_id, 1137, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__132)) __PYX_ERR(0, 1137, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1140
 *         return self._arr['channel_id']
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */
  __pyx_tuple__429 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__429)) __PYX_ERR(0, 1140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__429);
  __Pyx_GIVEREF(__pyx_tuple__429);
  __pyx_codeobj__133 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__429, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_next_2, 1140, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__133)) __PYX_ERR(0, 1140, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1144
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */
  __pyx_tuple__430 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_hits_2); if (unlikely(!__pyx_tuple__430)) __PYX_ERR(0, 1144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__430);
  __Pyx_GIVEREF(__pyx_tuple__430);
  __pyx_codeobj__134 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__430, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_next, 1144, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__134)) __PYX_ERR(0, 1144, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1152
 *         return hits
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */
  __pyx_tuple__431 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__431)) __PYX_ERR(0, 1152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__431);
  __Pyx_GIVEREF(__pyx_tuple__431);
  __pyx_codeobj__135 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__431, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_len_2, 1152, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__135)) __PYX_ERR(0, 1152, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1155
 *         return self._arr.shape[0]
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             return TimesliceHit(*self._arr[index])
 */
  __pyx_tuple__432 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_index_2); if (unlikely(!__pyx_tuple__432)) __PYX_ERR(0, 1155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__432);
  __Pyx_GIVEREF(__pyx_tuple__432);
  __pyx_codeobj__136 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__432, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_getitem, 1155, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__136)) __PYX_ERR(0, 1155, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1163
 *             raise TypeError("index must be int or slice")
 * 
 *     def _slice_generator(self, index):             # <<<<<<<<<<<<<<
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 */
  __pyx_tuple__433 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_index_2, __pyx_n_s_start, __pyx_n_s_stop, __pyx_n_s_step, __pyx_n_s_i); if (unlikely(!__pyx_tuple__433)) __PYX_ERR(0, 1163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__433);
  __Pyx_GIVEREF(__pyx_tuple__433);
  __pyx_codeobj__138 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__433, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_slice_generator, 1163, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__138)) __PYX_ERR(0, 1163, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1169
 *             yield TimesliceHit(*self._arr[i])
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 */
  __pyx_tuple__434 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_n_hits, __pyx_n_s_plural); if (unlikely(!__pyx_tuple__434)) __PYX_ERR(0, 1169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__434);
  __Pyx_GIVEREF(__pyx_tuple__434);
  __pyx_codeobj__139 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__434, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_str, 1169, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__139)) __PYX_ERR(0, 1169, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1174
 *         return("TimesliceHitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __pyx_tuple__435 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__435)) __PYX_ERR(0, 1174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__435);
  __Pyx_GIVEREF(__pyx_tuple__435);
  __pyx_codeobj__140 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__435, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_repr, 1174, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__140)) __PYX_ERR(0, 1174, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1177
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return '\n'.join([str(hit) for hit in self._hits])
 * 
 */
  __pyx_tuple__436 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_hit); if (unlikely(!__pyx_tuple__436)) __PYX_ERR(0, 1177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__436);
  __Pyx_GIVEREF(__pyx_tuple__436);
  __pyx_codeobj__141 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__436, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_insp, 1177, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__141)) __PYX_ERR(0, 1177, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1189
 *     """
 *     dtype = np.dtype([
 *         ('bjorkeny', '<f8'),             # <<<<<<<<<<<<<<
 *         ('dir_x', '<f8'),
 *         ('dir_y', '<f8'),
 */
  __pyx_tuple__437 = PyTuple_Pack(2, __pyx_n_s_bjorkeny, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__437)) __PYX_ERR(0, 1189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__437);
  __Pyx_GIVEREF(__pyx_tuple__437);

  /* "km3pipe/dataclasses.pyx":1190
 *     dtype = np.dtype([
 *         ('bjorkeny', '<f8'),
 *         ('dir_x', '<f8'),             # <<<<<<<<<<<<<<
 *         ('dir_y', '<f8'),
 *         ('dir_z', '<f8'),
 */
  __pyx_tuple__438 = PyTuple_Pack(2, __pyx_n_s_dir_x, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__438)) __PYX_ERR(0, 1190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__438);
  __Pyx_GIVEREF(__pyx_tuple__438);

  /* "km3pipe/dataclasses.pyx":1191
 *         ('bjorkeny', '<f8'),
 *         ('dir_x', '<f8'),
 *         ('dir_y', '<f8'),             # <<<<<<<<<<<<<<
 *         ('dir_z', '<f8'),
 *         ('energy', '<f8'),
 */
  __pyx_tuple__439 = PyTuple_Pack(2, __pyx_n_s_dir_y, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__439)) __PYX_ERR(0, 1191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__439);
  __Pyx_GIVEREF(__pyx_tuple__439);

  /* "km3pipe/dataclasses.pyx":1192
 *         ('dir_x', '<f8'),
 *         ('dir_y', '<f8'),
 *         ('dir_z', '<f8'),             # <<<<<<<<<<<<<<
 *         ('energy', '<f8'),
 *         ('id', '<u4'),
 */
  __pyx_tuple__440 = PyTuple_Pack(2, __pyx_n_s_dir_z, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__440)) __PYX_ERR(0, 1192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__440);
  __Pyx_GIVEREF(__pyx_tuple__440);

  /* "km3pipe/dataclasses.pyx":1193
 *         ('dir_y', '<f8'),
 *         ('dir_z', '<f8'),
 *         ('energy', '<f8'),             # <<<<<<<<<<<<<<
 *         ('id', '<u4'),
 *         ('interaction_channel', '<u4'),
 */
  __pyx_tuple__441 = PyTuple_Pack(2, __pyx_n_s_energy, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__441)) __PYX_ERR(0, 1193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__441);
  __Pyx_GIVEREF(__pyx_tuple__441);

  /* "km3pipe/dataclasses.pyx":1194
 *         ('dir_z', '<f8'),
 *         ('energy', '<f8'),
 *         ('id', '<u4'),             # <<<<<<<<<<<<<<
 *         ('interaction_channel', '<u4'),
 *         ('is_cc', '<u4'),
 */
  __pyx_tuple__442 = PyTuple_Pack(2, __pyx_n_s_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__442)) __PYX_ERR(0, 1194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__442);
  __Pyx_GIVEREF(__pyx_tuple__442);

  /* "km3pipe/dataclasses.pyx":1195
 *         ('energy', '<f8'),
 *         ('id', '<u4'),
 *         ('interaction_channel', '<u4'),             # <<<<<<<<<<<<<<
 *         ('is_cc', '<u4'),
 *         ('length', '<f8'),
 */
  __pyx_tuple__443 = PyTuple_Pack(2, __pyx_n_s_interaction_channel, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__443)) __PYX_ERR(0, 1195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__443);
  __Pyx_GIVEREF(__pyx_tuple__443);

  /* "km3pipe/dataclasses.pyx":1196
 *         ('id', '<u4'),
 *         ('interaction_channel', '<u4'),
 *         ('is_cc', '<u4'),             # <<<<<<<<<<<<<<
 *         ('length', '<f8'),
 *         ('pos_x', '<f8'),
 */
  __pyx_tuple__444 = PyTuple_Pack(2, __pyx_n_s_is_cc, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__444)) __PYX_ERR(0, 1196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__444);
  __Pyx_GIVEREF(__pyx_tuple__444);

  /* "km3pipe/dataclasses.pyx":1197
 *         ('interaction_channel', '<u4'),
 *         ('is_cc', '<u4'),
 *         ('length', '<f8'),             # <<<<<<<<<<<<<<
 *         ('pos_x', '<f8'),
 *         ('pos_y', '<f8'),
 */
  __pyx_tuple__445 = PyTuple_Pack(2, __pyx_n_s_length, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__445)) __PYX_ERR(0, 1197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__445);
  __Pyx_GIVEREF(__pyx_tuple__445);

  /* "km3pipe/dataclasses.pyx":1198
 *         ('is_cc', '<u4'),
 *         ('length', '<f8'),
 *         ('pos_x', '<f8'),             # <<<<<<<<<<<<<<
 *         ('pos_y', '<f8'),
 *         ('pos_z', '<f8'),
 */
  __pyx_tuple__446 = PyTuple_Pack(2, __pyx_n_s_pos_x, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__446)) __PYX_ERR(0, 1198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__446);
  __Pyx_GIVEREF(__pyx_tuple__446);

  /* "km3pipe/dataclasses.pyx":1199
 *         ('length', '<f8'),
 *         ('pos_x', '<f8'),
 *         ('pos_y', '<f8'),             # <<<<<<<<<<<<<<
 *         ('pos_z', '<f8'),
 *         # ('run_id', '<u4'),
 */
  __pyx_tuple__447 = PyTuple_Pack(2, __pyx_n_s_pos_y, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__447)) __PYX_ERR(0, 1199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__447);
  __Pyx_GIVEREF(__pyx_tuple__447);

  /* "km3pipe/dataclasses.pyx":1200
 *         ('pos_x', '<f8'),
 *         ('pos_y', '<f8'),
 *         ('pos_z', '<f8'),             # <<<<<<<<<<<<<<
 *         # ('run_id', '<u4'),
 *         ('time', '<i4'),
 */
  __pyx_tuple__448 = PyTuple_Pack(2, __pyx_n_s_pos_z, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__448)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__448);
  __Pyx_GIVEREF(__pyx_tuple__448);

  /* "km3pipe/dataclasses.pyx":1202
 *         ('pos_z', '<f8'),
 *         # ('run_id', '<u4'),
 *         ('time', '<i4'),             # <<<<<<<<<<<<<<
 *         ('type', '<i4'),
 *         ('event_id', '<u4'),
 */
  __pyx_tuple__449 = PyTuple_Pack(2, __pyx_n_s_time, __pyx_kp_s_i4); if (unlikely(!__pyx_tuple__449)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__449);
  __Pyx_GIVEREF(__pyx_tuple__449);

  /* "km3pipe/dataclasses.pyx":1203
 *         # ('run_id', '<u4'),
 *         ('time', '<i4'),
 *         ('type', '<i4'),             # <<<<<<<<<<<<<<
 *         ('event_id', '<u4'),
 *     ])
 */
  __pyx_tuple__450 = PyTuple_Pack(2, __pyx_n_s_type, __pyx_kp_s_i4); if (unlikely(!__pyx_tuple__450)) __PYX_ERR(0, 1203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__450);
  __Pyx_GIVEREF(__pyx_tuple__450);

  /* "km3pipe/dataclasses.pyx":1204
 *         ('time', '<i4'),
 *         ('type', '<i4'),
 *         ('event_id', '<u4'),             # <<<<<<<<<<<<<<
 *     ])
 * 
 */
  __pyx_tuple__451 = PyTuple_Pack(2, __pyx_n_s_event_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__451)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__451);
  __Pyx_GIVEREF(__pyx_tuple__451);

  /* "km3pipe/dataclasses.pyx":1207
 *     ])
 * 
 *     def __init__(self, tracks, event_id, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._bjorkeny = None
 *         self._dir = None
 */
  __pyx_tuple__452 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_tracks, __pyx_n_s_event_id, __pyx_n_s_h5loc); if (unlikely(!__pyx_tuple__452)) __PYX_ERR(0, 1207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__452);
  __Pyx_GIVEREF(__pyx_tuple__452);
  __pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__452, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_init, 1207, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) __PYX_ERR(0, 1207, __pyx_L1_error)
  __pyx_tuple__453 = PyTuple_Pack(1, ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__453)) __PYX_ERR(0, 1207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__453);
  __Pyx_GIVEREF(__pyx_tuple__453);

  /* "km3pipe/dataclasses.pyx":1225
 * 
 *     @classmethod
 *     def from_aanet(cls, tracks, event_id):             # <<<<<<<<<<<<<<
 *         return cls([Track(cls.get_usr_item(t, 1),               # bjorkeny
 *                           Direction((t.dir.x, t.dir.y, t.dir.z)),
 */
  __pyx_tuple__454 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_tracks, __pyx_n_s_event_id, __pyx_n_s_t); if (unlikely(!__pyx_tuple__454)) __PYX_ERR(0, 1225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__454);
  __Pyx_GIVEREF(__pyx_tuple__454);
  __pyx_codeobj__143 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__454, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_from_aanet, 1225, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__143)) __PYX_ERR(0, 1225, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1248
 * 
 *     @classmethod
 *     def from_arrays(cls,             # <<<<<<<<<<<<<<
 *                     bjorkenys,
 *                     directions_x,
 */
  __pyx_tuple__455 = PyTuple_Pack(21, __pyx_n_s_cls, __pyx_n_s_bjorkenys, __pyx_n_s_directions_x, __pyx_n_s_directions_y, __pyx_n_s_directions_z, __pyx_n_s_energies, __pyx_n_s_ids, __pyx_n_s_interaction_channels, __pyx_n_s_is_ccs, __pyx_n_s_lengths, __pyx_n_s_positions_x, __pyx_n_s_positions_y, __pyx_n_s_positions_z, __pyx_n_s_times, __pyx_n_s_types, __pyx_n_s_event_id, __pyx_n_s_directions, __pyx_n_s_positions, __pyx_n_s_args, __pyx_n_s_tracks, __pyx_n_s_track_args); if (unlikely(!__pyx_tuple__455)) __PYX_ERR(0, 1248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__455);
  __Pyx_GIVEREF(__pyx_tuple__455);
  __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(16, 0, 21, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__455, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_from_arrays, 1248, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) __PYX_ERR(0, 1248, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1287
 * 
 *     @classmethod
 *     def from_km3df(cls, km3df):             # <<<<<<<<<<<<<<
 *         return cls.from_table(km3df.conv_to(to='numpy'),
 *                               event_id=int(km3df['event_id']))
 */
  __pyx_tuple__456 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_km3df); if (unlikely(!__pyx_tuple__456)) __PYX_ERR(0, 1287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__456);
  __Pyx_GIVEREF(__pyx_tuple__456);
  __pyx_codeobj__145 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__456, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_from_km3df, 1287, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__145)) __PYX_ERR(0, 1287, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1292
 * 
 *     @classmethod
 *     def from_table(cls, table, event_id):             # <<<<<<<<<<<<<<
 *         return cls([Track(
 *             row['bjorkeny'],
 */
  __pyx_tuple__457 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_table, __pyx_n_s_event_id, __pyx_n_s_row); if (unlikely(!__pyx_tuple__457)) __PYX_ERR(0, 1292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__457);
  __Pyx_GIVEREF(__pyx_tuple__457);
  __pyx_codeobj__146 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__457, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_from_table, 1292, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) __PYX_ERR(0, 1292, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1307
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __pyx_tuple__458 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__458)) __PYX_ERR(0, 1307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__458);
  __Pyx_GIVEREF(__pyx_tuple__458);
  __pyx_codeobj__147 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__458, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_deserialise, 1307, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__147)) __PYX_ERR(0, 1307, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1310
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __pyx_tuple__459 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__459)) __PYX_ERR(0, 1310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__459);
  __Pyx_GIVEREF(__pyx_tuple__459);
  __pyx_codeobj__148 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__459, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_serialise, 1310, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) __PYX_ERR(0, 1310, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1314
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data, event_id)
 */
  __pyx_tuple__460 = PyTuple_Pack(5, __pyx_n_s_cls, __pyx_n_s_data, __pyx_n_s_event_id, __pyx_n_s_fmt, __pyx_n_s_h5loc); if (unlikely(!__pyx_tuple__460)) __PYX_ERR(0, 1314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__460);
  __Pyx_GIVEREF(__pyx_tuple__460);
  __pyx_codeobj__149 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__460, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_conv_from, 1314, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__149)) __PYX_ERR(0, 1314, __pyx_L1_error)
  __pyx_tuple__461 = PyTuple_Pack(2, ((PyObject*)__pyx_n_s_numpy), ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__461)) __PYX_ERR(0, 1314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__461);
  __Pyx_GIVEREF(__pyx_tuple__461);

  /* "km3pipe/dataclasses.pyx":1318
 *             return cls.from_table(data, event_id)
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 */
  __pyx_tuple__462 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_to); if (unlikely(!__pyx_tuple__462)) __PYX_ERR(0, 1318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__462);
  __Pyx_GIVEREF(__pyx_tuple__462);
  __pyx_codeobj__150 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__462, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_conv_to, 1318, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__150)) __PYX_ERR(0, 1318, __pyx_L1_error)
  __pyx_tuple__463 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_numpy)); if (unlikely(!__pyx_tuple__463)) __PYX_ERR(0, 1318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__463);
  __Pyx_GIVEREF(__pyx_tuple__463);

  /* "km3pipe/dataclasses.pyx":1325
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return [(
 *             t.bjorkeny, t.dir[0], t.dir[1], t.dir[2], t.energy,
 */
  __pyx_tuple__464 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_t); if (unlikely(!__pyx_tuple__464)) __PYX_ERR(0, 1325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__464);
  __Pyx_GIVEREF(__pyx_tuple__464);
  __pyx_codeobj__151 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__464, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_array_2, 1325, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__151)) __PYX_ERR(0, 1325, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1334
 * 
 *     @classmethod
 *     def get_len(cls, track):             # <<<<<<<<<<<<<<
 *         try:
 *             return track.len
 */
  __pyx_tuple__465 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_track); if (unlikely(!__pyx_tuple__465)) __PYX_ERR(0, 1334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__465);
  __Pyx_GIVEREF(__pyx_tuple__465);
  __pyx_codeobj__152 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__465, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_get_len, 1334, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__152)) __PYX_ERR(0, 1334, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1341
 * 
 *     @classmethod
 *     def get_usr_item(cls, track, index):             # <<<<<<<<<<<<<<
 *         try:
 *             item = track.usr[index]
 */
  __pyx_tuple__466 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_track, __pyx_n_s_index_2, __pyx_n_s_item); if (unlikely(!__pyx_tuple__466)) __PYX_ERR(0, 1341, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__466);
  __Pyx_GIVEREF(__pyx_tuple__466);
  __pyx_codeobj__153 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__466, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_get_usr_item, 1341, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__153)) __PYX_ERR(0, 1341, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1349
 * 
 *     @property
 *     def highest_energetic_muon(self):             # <<<<<<<<<<<<<<
 *         if self._highest_energetic_muon is None:
 *             muons = [track for track in self if abs(track.type) == 13]
 */
  __pyx_tuple__467 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_muons, __pyx_n_s_track); if (unlikely(!__pyx_tuple__467)) __PYX_ERR(0, 1349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__467);
  __Pyx_GIVEREF(__pyx_tuple__467);
  __pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__467, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_highest_energetic_muon_2, 1349, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) __PYX_ERR(0, 1349, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1357
 *         return self._highest_energetic_muon
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_tuple__468 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__468)) __PYX_ERR(0, 1357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__468);
  __Pyx_GIVEREF(__pyx_tuple__468);
  __pyx_codeobj__156 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__468, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_iter, 1357, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__156)) __PYX_ERR(0, 1357, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1360
 *         return self
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_tuple__469 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__469)) __PYX_ERR(0, 1360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__469);
  __Pyx_GIVEREF(__pyx_tuple__469);
  __pyx_codeobj__157 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__469, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_iter, 1360, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__157)) __PYX_ERR(0, 1360, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1364
 * 
 *     @property
 *     def bjorkeny(self):             # <<<<<<<<<<<<<<
 *         if self._bjorkeny is None:
 *             self._bjorkeny = np.array([t.bjorkeny for t in self._tracks])
 */
  __pyx_tuple__470 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_t); if (unlikely(!__pyx_tuple__470)) __PYX_ERR(0, 1364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__470);
  __Pyx_GIVEREF(__pyx_tuple__470);
  __pyx_codeobj__158 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__470, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_bjorkeny, 1364, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__158)) __PYX_ERR(0, 1364, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1370
 * 
 *     @property
 *     def is_cc(self):             # <<<<<<<<<<<<<<
 *         if self._is_cc is None:
 *             self._is_cc = np.array([t.is_cc for t in self._tracks])
 */
  __pyx_tuple__471 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_t); if (unlikely(!__pyx_tuple__471)) __PYX_ERR(0, 1370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__471);
  __Pyx_GIVEREF(__pyx_tuple__471);
  __pyx_codeobj__159 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__471, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_is_cc, 1370, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__159)) __PYX_ERR(0, 1370, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1376
 * 
 *     @property
 *     def interaction_channel(self):             # <<<<<<<<<<<<<<
 *         if self._interaction_channel is None:
 *             self._interaction_channel = np.array([t.interaction_channel for
 */
  __pyx_tuple__472 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_t); if (unlikely(!__pyx_tuple__472)) __PYX_ERR(0, 1376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__472);
  __Pyx_GIVEREF(__pyx_tuple__472);
  __pyx_codeobj__160 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__472, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_interaction_channel, 1376, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) __PYX_ERR(0, 1376, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1383
 * 
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         if self._id is None:
 *             self._id = np.array([t.id for t in self._tracks])
 */
  __pyx_tuple__473 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_t); if (unlikely(!__pyx_tuple__473)) __PYX_ERR(0, 1383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__473);
  __Pyx_GIVEREF(__pyx_tuple__473);
  __pyx_codeobj__161 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__473, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_id, 1383, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__161)) __PYX_ERR(0, 1383, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1389
 * 
 *     @property
 *     def time(self):             # <<<<<<<<<<<<<<
 *         if self._time is None:
 *             self._time = np.array([t.time for t in self._tracks])
 */
  __pyx_tuple__474 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_t); if (unlikely(!__pyx_tuple__474)) __PYX_ERR(0, 1389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__474);
  __Pyx_GIVEREF(__pyx_tuple__474);
  __pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__474, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_time, 1389, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) __PYX_ERR(0, 1389, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1395
 * 
 *     @property
 *     def energy(self):             # <<<<<<<<<<<<<<
 *         if self._energy is None:
 *             self._energy = np.array([t.energy for t in self._tracks])
 */
  __pyx_tuple__475 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_t); if (unlikely(!__pyx_tuple__475)) __PYX_ERR(0, 1395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__475);
  __Pyx_GIVEREF(__pyx_tuple__475);
  __pyx_codeobj__163 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__475, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_energy, 1395, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__163)) __PYX_ERR(0, 1395, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1401
 * 
 *     @property
 *     def length(self):             # <<<<<<<<<<<<<<
 *         if self._length is None:
 *             self._length = np.array([t.length for t in self._tracks])
 */
  __pyx_tuple__476 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_t); if (unlikely(!__pyx_tuple__476)) __PYX_ERR(0, 1401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__476);
  __Pyx_GIVEREF(__pyx_tuple__476);
  __pyx_codeobj__164 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__476, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_length, 1401, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__164)) __PYX_ERR(0, 1401, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1407
 * 
 *     @property
 *     def type(self):             # <<<<<<<<<<<<<<
 *         if self._type is None:
 *             self._type = np.array([t.type for t in self._tracks])
 */
  __pyx_tuple__477 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_t); if (unlikely(!__pyx_tuple__477)) __PYX_ERR(0, 1407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__477);
  __Pyx_GIVEREF(__pyx_tuple__477);
  __pyx_codeobj__165 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__477, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_type, 1407, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__165)) __PYX_ERR(0, 1407, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1413
 * 
 *     @property
 *     def pos(self):             # <<<<<<<<<<<<<<
 *         if self._pos is None:
 *             self._pos = np.array([t.pos for t in self._tracks])
 */
  __pyx_tuple__478 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_t); if (unlikely(!__pyx_tuple__478)) __PYX_ERR(0, 1413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__478);
  __Pyx_GIVEREF(__pyx_tuple__478);
  __pyx_codeobj__166 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__478, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_pos, 1413, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__166)) __PYX_ERR(0, 1413, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1419
 * 
 *     @property
 *     def dir(self):             # <<<<<<<<<<<<<<
 *         if self._dir is None:
 *             self._dir = np.array([t.dir for t in self._tracks])
 */
  __pyx_tuple__479 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_t); if (unlikely(!__pyx_tuple__479)) __PYX_ERR(0, 1419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__479);
  __Pyx_GIVEREF(__pyx_tuple__479);
  __pyx_codeobj__167 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__479, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_dir, 1419, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__167)) __PYX_ERR(0, 1419, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1424
 *         return self._dir
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */
  __pyx_tuple__480 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__480)) __PYX_ERR(0, 1424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__480);
  __Pyx_GIVEREF(__pyx_tuple__480);
  __pyx_codeobj__168 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__480, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_next_2, 1424, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__168)) __PYX_ERR(0, 1424, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1428
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */
  __pyx_tuple__481 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_item); if (unlikely(!__pyx_tuple__481)) __PYX_ERR(0, 1428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__481);
  __Pyx_GIVEREF(__pyx_tuple__481);
  __pyx_codeobj__169 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__481, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_next, 1428, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__169)) __PYX_ERR(0, 1428, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1436
 *         return item
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return len(self._tracks)
 * 
 */
  __pyx_tuple__482 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__482)) __PYX_ERR(0, 1436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__482);
  __Pyx_GIVEREF(__pyx_tuple__482);
  __pyx_codeobj__170 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__482, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_len_2, 1436, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__170)) __PYX_ERR(0, 1436, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1439
 *         return len(self._tracks)
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             return self._tracks[index]
 */
  __pyx_tuple__483 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_index_2); if (unlikely(!__pyx_tuple__483)) __PYX_ERR(0, 1439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__483);
  __Pyx_GIVEREF(__pyx_tuple__483);
  __pyx_codeobj__171 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__483, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_getitem, 1439, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__171)) __PYX_ERR(0, 1439, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1447
 *             raise TypeError("index must be int or slice")
 * 
 *     def _slice_generator(self, index):             # <<<<<<<<<<<<<<
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 */
  __pyx_tuple__484 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_index_2, __pyx_n_s_start, __pyx_n_s_stop, __pyx_n_s_step, __pyx_n_s_i); if (unlikely(!__pyx_tuple__484)) __PYX_ERR(0, 1447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__484);
  __Pyx_GIVEREF(__pyx_tuple__484);
  __pyx_codeobj__173 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__484, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_slice_generator, 1447, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__173)) __PYX_ERR(0, 1447, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1453
 *             yield self._tracks[i]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_tracks = len(self)
 *         plural = 's' if n_tracks > 1 or n_tracks == 0 else ''
 */
  __pyx_tuple__485 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_n_tracks, __pyx_n_s_plural); if (unlikely(!__pyx_tuple__485)) __PYX_ERR(0, 1453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__485);
  __Pyx_GIVEREF(__pyx_tuple__485);
  __pyx_codeobj__174 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__485, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_str, 1453, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__174)) __PYX_ERR(0, 1453, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1458
 *         return("TrackSeries with {0} track{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __pyx_tuple__486 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__486)) __PYX_ERR(0, 1458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__486);
  __Pyx_GIVEREF(__pyx_tuple__486);
  __pyx_codeobj__175 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__486, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_repr, 1458, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__175)) __PYX_ERR(0, 1458, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1461
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return '\n'.join([str(track) for track in self._tracks])
 * 
 */
  __pyx_tuple__487 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_track); if (unlikely(!__pyx_tuple__487)) __PYX_ERR(0, 1461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__487);
  __Pyx_GIVEREF(__pyx_tuple__487);
  __pyx_codeobj__176 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__487, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_insp, 1461, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__176)) __PYX_ERR(0, 1461, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1469
 *     """
 *     dtype = np.dtype([
 *         ('dom_id', '<u4'),             # <<<<<<<<<<<<<<
 *         ('max_sequence_number', '<u4'),
 *         ('n_received_packets', '<u4'),
 */
  __pyx_tuple__488 = PyTuple_Pack(2, __pyx_n_s_dom_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__488)) __PYX_ERR(0, 1469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__488);
  __Pyx_GIVEREF(__pyx_tuple__488);

  /* "km3pipe/dataclasses.pyx":1470
 *     dtype = np.dtype([
 *         ('dom_id', '<u4'),
 *         ('max_sequence_number', '<u4'),             # <<<<<<<<<<<<<<
 *         ('n_received_packets', '<u4'),
 *         ('slice_id', '<u4'),
 */
  __pyx_tuple__489 = PyTuple_Pack(2, __pyx_n_s_max_sequence_number, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__489)) __PYX_ERR(0, 1470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__489);
  __Pyx_GIVEREF(__pyx_tuple__489);

  /* "km3pipe/dataclasses.pyx":1471
 *         ('dom_id', '<u4'),
 *         ('max_sequence_number', '<u4'),
 *         ('n_received_packets', '<u4'),             # <<<<<<<<<<<<<<
 *         ('slice_id', '<u4'),
 *         ])
 */
  __pyx_tuple__490 = PyTuple_Pack(2, __pyx_n_s_n_received_packets, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__490)) __PYX_ERR(0, 1471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__490);
  __Pyx_GIVEREF(__pyx_tuple__490);

  /* "km3pipe/dataclasses.pyx":1472
 *         ('max_sequence_number', '<u4'),
 *         ('n_received_packets', '<u4'),
 *         ('slice_id', '<u4'),             # <<<<<<<<<<<<<<
 *         ])
 *     h5loc = '/'
 */
  __pyx_tuple__491 = PyTuple_Pack(2, __pyx_n_s_slice_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__491)) __PYX_ERR(0, 1472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__491);
  __Pyx_GIVEREF(__pyx_tuple__491);

  /* "km3pipe/dataclasses.pyx":1476
 *     h5loc = '/'
 * 
 *     def __init__(self, arr):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */
  __pyx_tuple__492 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_arr); if (unlikely(!__pyx_tuple__492)) __PYX_ERR(0, 1476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__492);
  __Pyx_GIVEREF(__pyx_tuple__492);
  __pyx_codeobj__177 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__492, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_init, 1476, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__177)) __PYX_ERR(0, 1476, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1482
 * 
 *     @classmethod
 *     def from_arrays(cls, dom_ids, max_sequence_numbers, n_received_packets,             # <<<<<<<<<<<<<<
 *                     slice_id):
 *         length = dom_ids.shape[0]
 */
  __pyx_tuple__493 = PyTuple_Pack(7, __pyx_n_s_cls, __pyx_n_s_dom_ids, __pyx_n_s_max_sequence_numbers, __pyx_n_s_n_received_packets, __pyx_n_s_slice_id, __pyx_n_s_length, __pyx_n_s_frames_2); if (unlikely(!__pyx_tuple__493)) __PYX_ERR(0, 1482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__493);
  __Pyx_GIVEREF(__pyx_tuple__493);
  __pyx_codeobj__178 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__493, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_from_arrays, 1482, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__178)) __PYX_ERR(0, 1482, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1492
 *         return cls(frames)
 * 
 *     def from_table(cls, table, slice_id):             # <<<<<<<<<<<<<<
 *         if slice_id is None:
 *             slice_id = table[0]['slice_id']
 */
  __pyx_tuple__494 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_table, __pyx_n_s_slice_id, __pyx_n_s_row); if (unlikely(!__pyx_tuple__494)) __PYX_ERR(0, 1492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__494);
  __Pyx_GIVEREF(__pyx_tuple__494);
  __pyx_codeobj__179 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__494, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_from_table, 1492, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__179)) __PYX_ERR(0, 1492, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1502
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __pyx_tuple__495 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__495)) __PYX_ERR(0, 1502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__495);
  __Pyx_GIVEREF(__pyx_tuple__495);
  __pyx_codeobj__180 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__495, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_deserialise, 1502, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__180)) __PYX_ERR(0, 1502, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1505
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __pyx_tuple__496 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__496)) __PYX_ERR(0, 1505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__496);
  __Pyx_GIVEREF(__pyx_tuple__496);
  __pyx_codeobj__181 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__496, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_serialise, 1505, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__181)) __PYX_ERR(0, 1505, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1509
 * 
 *     @classmethod
 *     def conv_from(cls, data, slice_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             # return cls.from_table(data, event_id)
 */
  __pyx_tuple__497 = PyTuple_Pack(5, __pyx_n_s_cls, __pyx_n_s_data, __pyx_n_s_slice_id, __pyx_n_s_fmt, __pyx_n_s_h5loc); if (unlikely(!__pyx_tuple__497)) __PYX_ERR(0, 1509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__497);
  __Pyx_GIVEREF(__pyx_tuple__497);
  __pyx_codeobj__182 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__497, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_conv_from, 1509, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__182)) __PYX_ERR(0, 1509, __pyx_L1_error)
  __pyx_tuple__498 = PyTuple_Pack(2, ((PyObject*)__pyx_n_s_numpy), ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__498)) __PYX_ERR(0, 1509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__498);
  __Pyx_GIVEREF(__pyx_tuple__498);

  /* "km3pipe/dataclasses.pyx":1514
 *             return cls(data)
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 */
  __pyx_tuple__499 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_to); if (unlikely(!__pyx_tuple__499)) __PYX_ERR(0, 1514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__499);
  __Pyx_GIVEREF(__pyx_tuple__499);
  __pyx_codeobj__183 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__499, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_conv_to, 1514, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__183)) __PYX_ERR(0, 1514, __pyx_L1_error)
  __pyx_tuple__500 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_numpy)); if (unlikely(!__pyx_tuple__500)) __PYX_ERR(0, 1514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__500);
  __Pyx_GIVEREF(__pyx_tuple__500);

  /* "km3pipe/dataclasses.pyx":1522
 * 
 *     @property
 *     def n_received_packets(self):             # <<<<<<<<<<<<<<
 *         return self._arr['n_received_packets']
 * 
 */
  __pyx_tuple__501 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__501)) __PYX_ERR(0, 1522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__501);
  __Pyx_GIVEREF(__pyx_tuple__501);
  __pyx_codeobj__184 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__501, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_n_received_packets, 1522, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__184)) __PYX_ERR(0, 1522, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1526
 * 
 *     @property
 *     def dom_ids(self):             # <<<<<<<<<<<<<<
 *         return self._arr['dom_ids']
 * 
 */
  __pyx_tuple__502 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__502)) __PYX_ERR(0, 1526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__502);
  __Pyx_GIVEREF(__pyx_tuple__502);
  __pyx_codeobj__185 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__502, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_dom_ids, 1526, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__185)) __PYX_ERR(0, 1526, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1530
 * 
 *     @property
 *     def max_sequence_numbers(self):             # <<<<<<<<<<<<<<
 *         return self._arr['max_sequence_numbers']
 * 
 */
  __pyx_tuple__503 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__503)) __PYX_ERR(0, 1530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__503);
  __Pyx_GIVEREF(__pyx_tuple__503);
  __pyx_codeobj__186 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__503, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_max_sequence_numbers, 1530, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__186)) __PYX_ERR(0, 1530, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1533
 *         return self._arr['max_sequence_numbers']
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */
  __pyx_tuple__504 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__504)) __PYX_ERR(0, 1533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__504);
  __Pyx_GIVEREF(__pyx_tuple__504);
  __pyx_codeobj__187 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__504, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_array_2, 1533, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__187)) __PYX_ERR(0, 1533, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1536
 *         return self._arr
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_tuple__505 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__505)) __PYX_ERR(0, 1536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__505);
  __Pyx_GIVEREF(__pyx_tuple__505);
  __pyx_codeobj__188 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__505, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_iter, 1536, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__188)) __PYX_ERR(0, 1536, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1539
 *         return self
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */
  __pyx_tuple__506 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__506)) __PYX_ERR(0, 1539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__506);
  __Pyx_GIVEREF(__pyx_tuple__506);
  __pyx_codeobj__189 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__506, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_next_2, 1539, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__189)) __PYX_ERR(0, 1539, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1543
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */
  __pyx_tuple__507 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_data); if (unlikely(!__pyx_tuple__507)) __PYX_ERR(0, 1543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__507);
  __Pyx_GIVEREF(__pyx_tuple__507);
  __pyx_codeobj__190 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__507, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_next, 1543, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__190)) __PYX_ERR(0, 1543, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1551
 *         return data
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */
  __pyx_tuple__508 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__508)) __PYX_ERR(0, 1551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__508);
  __Pyx_GIVEREF(__pyx_tuple__508);
  __pyx_codeobj__191 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__508, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_len_2, 1551, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__191)) __PYX_ERR(0, 1551, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1554
 *         return self._arr.shape[0]
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             return self._arr[index]
 */
  __pyx_tuple__509 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_index_2); if (unlikely(!__pyx_tuple__509)) __PYX_ERR(0, 1554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__509);
  __Pyx_GIVEREF(__pyx_tuple__509);
  __pyx_codeobj__192 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__509, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_getitem, 1554, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__192)) __PYX_ERR(0, 1554, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1562
 *             raise TypeError("index must be int or slice")
 * 
 *     def _slice_generator(self, index):             # <<<<<<<<<<<<<<
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 */
  __pyx_tuple__510 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_index_2, __pyx_n_s_start, __pyx_n_s_stop, __pyx_n_s_step, __pyx_n_s_i); if (unlikely(!__pyx_tuple__510)) __PYX_ERR(0, 1562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__510);
  __Pyx_GIVEREF(__pyx_tuple__510);
  __pyx_codeobj__194 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__510, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_slice_generator, 1562, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__194)) __PYX_ERR(0, 1562, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1586
 *         Convert for storage.
 *     """
 *     def __new__(cls, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         obj = np.asarray(arr).view(cls)
 *         obj.h5loc = h5loc
 */
  __pyx_tuple__511 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_arr, __pyx_n_s_h5loc, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__511)) __PYX_ERR(0, 1586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__511);
  __Pyx_GIVEREF(__pyx_tuple__511);
  __pyx_codeobj__195 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__511, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_new, 1586, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__195)) __PYX_ERR(0, 1586, __pyx_L1_error)
  __pyx_tuple__512 = PyTuple_Pack(1, ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__512)) __PYX_ERR(0, 1586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__512);
  __Pyx_GIVEREF(__pyx_tuple__512);

  /* "km3pipe/dataclasses.pyx":1591
 *         return obj
 * 
 *     def __init__(self, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self.array = arr
 *         self.h5loc = h5loc
 */
  __pyx_tuple__513 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_arr, __pyx_n_s_h5loc); if (unlikely(!__pyx_tuple__513)) __PYX_ERR(0, 1591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__513);
  __Pyx_GIVEREF(__pyx_tuple__513);
  __pyx_codeobj__196 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__513, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_init, 1591, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__196)) __PYX_ERR(0, 1591, __pyx_L1_error)
  __pyx_tuple__514 = PyTuple_Pack(1, ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__514)) __PYX_ERR(0, 1591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__514);
  __Pyx_GIVEREF(__pyx_tuple__514);

  /* "km3pipe/dataclasses.pyx":1595
 *         self.h5loc = h5loc
 * 
 *     def __array_finalize__(self, obj):             # <<<<<<<<<<<<<<
 *         if obj is None:
 *             return
 */
  __pyx_tuple__515 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__515)) __PYX_ERR(0, 1595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__515);
  __Pyx_GIVEREF(__pyx_tuple__515);
  __pyx_codeobj__197 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__515, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_array_finalize, 1595, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__197)) __PYX_ERR(0, 1595, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1601
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __pyx_tuple__516 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__516)) __PYX_ERR(0, 1601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__516);
  __Pyx_GIVEREF(__pyx_tuple__516);
  __pyx_codeobj__198 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__516, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_deserialise, 1601, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__198)) __PYX_ERR(0, 1601, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1604
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __pyx_tuple__517 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__517)) __PYX_ERR(0, 1604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__517);
  __Pyx_GIVEREF(__pyx_tuple__517);
  __pyx_codeobj__199 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__517, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_serialise, 1604, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__199)) __PYX_ERR(0, 1604, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1608
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, h5loc='/', fmt='numpy', **kwargs):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             arr = cls(data, h5loc, **kwargs)
 */
  __pyx_tuple__518 = PyTuple_Pack(7, __pyx_n_s_cls, __pyx_n_s_data, __pyx_n_s_event_id, __pyx_n_s_h5loc, __pyx_n_s_fmt, __pyx_n_s_kwargs, __pyx_n_s_arr); if (unlikely(!__pyx_tuple__518)) __PYX_ERR(0, 1608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__518);
  __Pyx_GIVEREF(__pyx_tuple__518);
  __pyx_codeobj__200 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__518, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_conv_from, 1608, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__200)) __PYX_ERR(0, 1608, __pyx_L1_error)
  __pyx_tuple__519 = PyTuple_Pack(3, ((PyObject *)Py_None), ((PyObject*)__pyx_kp_s__2), ((PyObject*)__pyx_n_s_numpy)); if (unlikely(!__pyx_tuple__519)) __PYX_ERR(0, 1608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__519);
  __Pyx_GIVEREF(__pyx_tuple__519);

  /* "km3pipe/dataclasses.pyx":1613
 *             return arr
 * 
 *     def conv_to(self, to='numpy', **kwargs):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self
 */
  __pyx_tuple__520 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_to, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__520)) __PYX_ERR(0, 1613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__520);
  __Pyx_GIVEREF(__pyx_tuple__520);
  __pyx_codeobj__201 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__520, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_conv_to, 1613, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__201)) __PYX_ERR(0, 1613, __pyx_L1_error)
  __pyx_tuple__521 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_numpy)); if (unlikely(!__pyx_tuple__521)) __PYX_ERR(0, 1613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__521);
  __Pyx_GIVEREF(__pyx_tuple__521);

  /* "km3pipe/dataclasses.pyx":1620
 * 
 *     @classmethod
 *     def from_dict(cls, map, dtype=None, **kwargs):             # <<<<<<<<<<<<<<
 *         if dtype is None:
 *             dtype = np.dtype([(key, float) for key in sorted(map.keys())])
 */
  __pyx_tuple__522 = PyTuple_Pack(7, __pyx_n_s_cls, __pyx_n_s_map, __pyx_n_s_dtype, __pyx_n_s_kwargs, __pyx_n_s_key, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__522)) __PYX_ERR(0, 1620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__522);
  __Pyx_GIVEREF(__pyx_tuple__522);
  __pyx_codeobj__202 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__522, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_from_dict, 1620, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__202)) __PYX_ERR(0, 1620, __pyx_L1_error)
  __pyx_tuple__523 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__523)) __PYX_ERR(0, 1620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__523);
  __Pyx_GIVEREF(__pyx_tuple__523);

  /* "km3pipe/dataclasses.pyx":1654
 * 
 *     @property
 *     def _constructor(self):             # <<<<<<<<<<<<<<
 *         return KM3DataFrame
 * 
 */
  __pyx_tuple__524 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__524)) __PYX_ERR(0, 1654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__524);
  __Pyx_GIVEREF(__pyx_tuple__524);
  __pyx_codeobj__203 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__524, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_constructor, 1654, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__203)) __PYX_ERR(0, 1654, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1657
 *         return KM3DataFrame
 * 
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         h5loc = kwargs.pop('h5loc', '/')
 *         super(KM3DataFrame, self).__init__(*args, **kwargs)
 */
  __pyx_tuple__525 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs, __pyx_n_s_h5loc); if (unlikely(!__pyx_tuple__525)) __PYX_ERR(0, 1657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__525);
  __Pyx_GIVEREF(__pyx_tuple__525);
  __pyx_codeobj__204 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__525, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_init, 1657, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__204)) __PYX_ERR(0, 1657, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1663
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __pyx_tuple__526 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__526)) __PYX_ERR(0, 1663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__526);
  __Pyx_GIVEREF(__pyx_tuple__526);
  __pyx_codeobj__206 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__526, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_deserialise, 1663, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__206)) __PYX_ERR(0, 1663, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1666
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __pyx_tuple__527 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__527)) __PYX_ERR(0, 1666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__527);
  __Pyx_GIVEREF(__pyx_tuple__527);
  __pyx_codeobj__207 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__527, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_serialise, 1666, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__207)) __PYX_ERR(0, 1666, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1670
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, h5loc='/', fmt='pandas', **kwargs):             # <<<<<<<<<<<<<<
 *         if fmt in {'numpy', 'pandas'}:
 *             return cls(data, h5loc=h5loc, **kwargs)
 */
  __pyx_tuple__528 = PyTuple_Pack(6, __pyx_n_s_cls, __pyx_n_s_data, __pyx_n_s_event_id, __pyx_n_s_h5loc, __pyx_n_s_fmt, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__528)) __PYX_ERR(0, 1670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__528);
  __Pyx_GIVEREF(__pyx_tuple__528);
  __pyx_codeobj__208 = (PyObject*)__Pyx_PyCode_New(5, 0, 6, 0, CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__528, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_conv_from, 1670, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__208)) __PYX_ERR(0, 1670, __pyx_L1_error)
  __pyx_tuple__529 = PyTuple_Pack(3, ((PyObject *)Py_None), ((PyObject*)__pyx_kp_s__2), ((PyObject*)__pyx_n_s_pandas)); if (unlikely(!__pyx_tuple__529)) __PYX_ERR(0, 1670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__529);
  __Pyx_GIVEREF(__pyx_tuple__529);

  /* "km3pipe/dataclasses.pyx":1676
 *             return cls(data, index=[0], h5loc=h5loc, **kwargs)
 * 
 *     def conv_to(self, to='numpy', **kwargs):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(self.to_records(index=False), h5loc=self.h5loc,
 */
  __pyx_tuple__530 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_to, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__530)) __PYX_ERR(0, 1676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__530);
  __Pyx_GIVEREF(__pyx_tuple__530);
  __pyx_codeobj__209 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__530, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_conv_to, 1676, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__209)) __PYX_ERR(0, 1676, __pyx_L1_error)
  __pyx_tuple__531 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_numpy)); if (unlikely(!__pyx_tuple__531)) __PYX_ERR(0, 1676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__531);
  __Pyx_GIVEREF(__pyx_tuple__531);

  /* "km3pipe/dataclasses.pyx":1713
 *     _fields = ()
 * 
 *     def __init__(self, stream):             # <<<<<<<<<<<<<<
 *         data = Struct(self._structure).unpack_from(stream.read(self._size))
 *         for attr, value in zip(self._fields, data):
 */
  __pyx_tuple__532 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_stream, __pyx_n_s_data, __pyx_n_s_attr, __pyx_n_s_value); if (unlikely(!__pyx_tuple__532)) __PYX_ERR(0, 1713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__532);
  __Pyx_GIVEREF(__pyx_tuple__532);
  __pyx_codeobj__210 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__532, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_init, 1713, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__210)) __PYX_ERR(0, 1713, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1719
 * 
 *     @property
 *     def _size(self):             # <<<<<<<<<<<<<<
 *         return calcsize(self._structure)
 */
  __pyx_tuple__533 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__533)) __PYX_ERR(0, 1719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__533);
  __Pyx_GIVEREF(__pyx_tuple__533);
  __pyx_codeobj__211 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__533, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_moritz_pkg_km3pipe_km3pipe, __pyx_n_s_size, 1719, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__211)) __PYX_ERR(0, 1719, __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_ERR(0, 1, __pyx_L1_error);
  __pyx_float_0_ = PyFloat_FromDouble(0.); if (unlikely(!__pyx_float_0_)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_13 = PyInt_FromLong(13); if (unlikely(!__pyx_int_13)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

#if PY_MAJOR_VERSION < 3
PyMODINIT_FUNC initdataclasses(void); /*proto*/
PyMODINIT_FUNC initdataclasses(void)
#else
PyMODINIT_FUNC PyInit_dataclasses(void); /*proto*/
PyMODINIT_FUNC PyInit_dataclasses(void)
#endif
{
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __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;
  __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_dataclasses(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __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("dataclasses", __pyx_methods, __pyx_k__221, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  #if CYTHON_COMPILING_IN_PYPY
  Py_INCREF(__pyx_b);
  #endif
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __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_ERR(0, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_km3pipe__dataclasses) {
    if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "km3pipe.dataclasses")) {
      if (unlikely(PyDict_SetItemString(modules, "km3pipe.dataclasses", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global init code ---*/
  /*--- Variable export code ---*/
  /*--- Function export code ---*/
  /*--- Type init code ---*/
  if (PyType_Ready(&__pyx_type_7km3pipe_11dataclasses_Hit) < 0) __PYX_ERR(0, 519, __pyx_L1_error)
  __pyx_type_7km3pipe_11dataclasses_Hit.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "Hit", (PyObject *)&__pyx_type_7km3pipe_11dataclasses_Hit) < 0) __PYX_ERR(0, 519, __pyx_L1_error)
  __pyx_ptype_7km3pipe_11dataclasses_Hit = &__pyx_type_7km3pipe_11dataclasses_Hit;
  if (PyType_Ready(&__pyx_type_7km3pipe_11dataclasses_TimesliceHit) < 0) __PYX_ERR(0, 597, __pyx_L1_error)
  __pyx_type_7km3pipe_11dataclasses_TimesliceHit.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "TimesliceHit", (PyObject *)&__pyx_type_7km3pipe_11dataclasses_TimesliceHit) < 0) __PYX_ERR(0, 597, __pyx_L1_error)
  __pyx_ptype_7km3pipe_11dataclasses_TimesliceHit = &__pyx_type_7km3pipe_11dataclasses_TimesliceHit;
  if (PyType_Ready(&__pyx_type_7km3pipe_11dataclasses_MCHit) < 0) __PYX_ERR(0, 636, __pyx_L1_error)
  __pyx_type_7km3pipe_11dataclasses_MCHit.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "MCHit", (PyObject *)&__pyx_type_7km3pipe_11dataclasses_MCHit) < 0) __PYX_ERR(0, 636, __pyx_L1_error)
  __pyx_ptype_7km3pipe_11dataclasses_MCHit = &__pyx_type_7km3pipe_11dataclasses_MCHit;
  if (PyType_Ready(&__pyx_type_7km3pipe_11dataclasses_Track) < 0) __PYX_ERR(0, 687, __pyx_L1_error)
  __pyx_type_7km3pipe_11dataclasses_Track.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "Track", (PyObject *)&__pyx_type_7km3pipe_11dataclasses_Track) < 0) __PYX_ERR(0, 687, __pyx_L1_error)
  __pyx_ptype_7km3pipe_11dataclasses_Track = &__pyx_type_7km3pipe_11dataclasses_Track;
  if (PyType_Ready(&__pyx_type_7km3pipe_11dataclasses___pyx_scope_struct__from_row) < 0) __PYX_ERR(0, 376, __pyx_L1_error)
  __pyx_type_7km3pipe_11dataclasses___pyx_scope_struct__from_row.tp_print = 0;
  __pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct__from_row = &__pyx_type_7km3pipe_11dataclasses___pyx_scope_struct__from_row;
  if (PyType_Ready(&__pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr) < 0) __PYX_ERR(0, 377, __pyx_L1_error)
  __pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr.tp_print = 0;
  __pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr = &__pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr;
  if (PyType_Ready(&__pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator) < 0) __PYX_ERR(0, 1025, __pyx_L1_error)
  __pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator.tp_print = 0;
  __pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator = &__pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator;
  if (PyType_Ready(&__pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator) < 0) __PYX_ERR(0, 1163, __pyx_L1_error)
  __pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator.tp_print = 0;
  __pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator = &__pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator;
  if (PyType_Ready(&__pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator) < 0) __PYX_ERR(0, 1447, __pyx_L1_error)
  __pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator.tp_print = 0;
  __pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator = &__pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator;
  if (PyType_Ready(&__pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator) < 0) __PYX_ERR(0, 1562, __pyx_L1_error)
  __pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator.tp_print = 0;
  __pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator = &__pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_5__slice_generator;
  if (PyType_Ready(&__pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict) < 0) __PYX_ERR(0, 1620, __pyx_L1_error)
  __pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict.tp_print = 0;
  __pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict = &__pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_6_from_dict;
  if (PyType_Ready(&__pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr) < 0) __PYX_ERR(0, 1623, __pyx_L1_error)
  __pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr.tp_print = 0;
  __pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr = &__pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_7_genexpr;
  /*--- 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_ERR(2, 9, __pyx_L1_error)
  __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) __PYX_ERR(1, 155, __pyx_L1_error)
  __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) __PYX_ERR(1, 168, __pyx_L1_error)
  __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) __PYX_ERR(1, 172, __pyx_L1_error)
  __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) __PYX_ERR(1, 181, __pyx_L1_error)
  __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) __PYX_ERR(1, 861, __pyx_L1_error)
  /*--- Variable import code ---*/
  /*--- Function import code ---*/
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  __Pyx_TraceCall("PyMODINIT_FUNC PyInit_dataclasses(void)", __pyx_f[0], 1, 0, __PYX_ERR(0, 1, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":12
 * from __future__ import division, absolute_import, print_function
 * 
 * import ctypes             # <<<<<<<<<<<<<<
 * from libcpp cimport bool as c_bool  # noqa
 * from six import with_metaclass
 */
  __Pyx_TraceLine(12,0,__PYX_ERR(0, 12, __pyx_L1_error))
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_ctypes, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ctypes, __pyx_t_1) < 0) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":14
 * import ctypes
 * from libcpp cimport bool as c_bool  # noqa
 * from six import with_metaclass             # <<<<<<<<<<<<<<
 * from struct import Struct, calcsize
 * 
 */
  __Pyx_TraceLine(14,0,__PYX_ERR(0, 14, __pyx_L1_error))
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_with_metaclass);
  __Pyx_GIVEREF(__pyx_n_s_with_metaclass);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_with_metaclass);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_six, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __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_with_metaclass); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_with_metaclass, __pyx_t_1) < 0) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":15
 * from libcpp cimport bool as c_bool  # noqa
 * from six import with_metaclass
 * from struct import Struct, calcsize             # <<<<<<<<<<<<<<
 * 
 * import numpy as np
 */
  __Pyx_TraceLine(15,0,__PYX_ERR(0, 15, __pyx_L1_error))
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_Struct);
  __Pyx_GIVEREF(__pyx_n_s_Struct);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Struct);
  __Pyx_INCREF(__pyx_n_s_calcsize);
  __Pyx_GIVEREF(__pyx_n_s_calcsize);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_calcsize);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __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_Struct); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Struct, __pyx_t_2) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_calcsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calcsize, __pyx_t_2) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":17
 * from struct import Struct, calcsize
 * 
 * import numpy as np             # <<<<<<<<<<<<<<
 * cimport numpy as np
 * cimport cython
 */
  __Pyx_TraceLine(17,0,__PYX_ERR(0, 17, __pyx_L1_error))
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 17, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":20
 * cimport numpy as np
 * cimport cython
 * import pandas as pd             # <<<<<<<<<<<<<<
 * 
 * np.import_array()
 */
  __Pyx_TraceLine(20,0,__PYX_ERR(0, 20, __pyx_L1_error))
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_pandas, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pd, __pyx_t_1) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":22
 * import pandas as pd
 * 
 * np.import_array()             # <<<<<<<<<<<<<<
 * 
 * from .tools import angle_between, geant2pdg, pdg2name
 */
  __Pyx_TraceLine(22,0,__PYX_ERR(0, 22, __pyx_L1_error))
  __pyx_t_3 = __pyx_f_5numpy_import_array(); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 22, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":24
 * np.import_array()
 * 
 * from .tools import angle_between, geant2pdg, pdg2name             # <<<<<<<<<<<<<<
 * 
 * __author__ = "Tamas Gal and Moritz Lotze"
 */
  __Pyx_TraceLine(24,0,__PYX_ERR(0, 24, __pyx_L1_error))
  __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_angle_between);
  __Pyx_GIVEREF(__pyx_n_s_angle_between);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_angle_between);
  __Pyx_INCREF(__pyx_n_s_geant2pdg);
  __Pyx_GIVEREF(__pyx_n_s_geant2pdg);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_geant2pdg);
  __Pyx_INCREF(__pyx_n_s_pdg2name);
  __Pyx_GIVEREF(__pyx_n_s_pdg2name);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_pdg2name);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_tools, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 24, __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_angle_between); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_angle_between, __pyx_t_1) < 0) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_geant2pdg); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_geant2pdg, __pyx_t_1) < 0) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_pdg2name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pdg2name, __pyx_t_1) < 0) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":26
 * from .tools import angle_between, geant2pdg, pdg2name
 * 
 * __author__ = "Tamas Gal and Moritz Lotze"             # <<<<<<<<<<<<<<
 * __copyright__ = "Copyright 2016, Tamas Gal and the KM3NeT collaboration."
 * __credits__ = []
 */
  __Pyx_TraceLine(26,0,__PYX_ERR(0, 26, __pyx_L1_error))
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_author, __pyx_kp_s_Tamas_Gal_and_Moritz_Lotze) < 0) __PYX_ERR(0, 26, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":27
 * 
 * __author__ = "Tamas Gal and Moritz Lotze"
 * __copyright__ = "Copyright 2016, Tamas Gal and the KM3NeT collaboration."             # <<<<<<<<<<<<<<
 * __credits__ = []
 * __license__ = "MIT"
 */
  __Pyx_TraceLine(27,0,__PYX_ERR(0, 27, __pyx_L1_error))
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_copyright, __pyx_kp_s_Copyright_2016_Tamas_Gal_and_the) < 0) __PYX_ERR(0, 27, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":28
 * __author__ = "Tamas Gal and Moritz Lotze"
 * __copyright__ = "Copyright 2016, Tamas Gal and the KM3NeT collaboration."
 * __credits__ = []             # <<<<<<<<<<<<<<
 * __license__ = "MIT"
 * __maintainer__ = "Tamas Gal and Moritz Lotze"
 */
  __Pyx_TraceLine(28,0,__PYX_ERR(0, 28, __pyx_L1_error))
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_credits, __pyx_t_2) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":29
 * __copyright__ = "Copyright 2016, Tamas Gal and the KM3NeT collaboration."
 * __credits__ = []
 * __license__ = "MIT"             # <<<<<<<<<<<<<<
 * __maintainer__ = "Tamas Gal and Moritz Lotze"
 * __email__ = "tgal@km3net.de"
 */
  __Pyx_TraceLine(29,0,__PYX_ERR(0, 29, __pyx_L1_error))
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_license, __pyx_n_s_MIT) < 0) __PYX_ERR(0, 29, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":30
 * __credits__ = []
 * __license__ = "MIT"
 * __maintainer__ = "Tamas Gal and Moritz Lotze"             # <<<<<<<<<<<<<<
 * __email__ = "tgal@km3net.de"
 * __status__ = "Development"
 */
  __Pyx_TraceLine(30,0,__PYX_ERR(0, 30, __pyx_L1_error))
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_maintainer, __pyx_kp_s_Tamas_Gal_and_Moritz_Lotze) < 0) __PYX_ERR(0, 30, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":31
 * __license__ = "MIT"
 * __maintainer__ = "Tamas Gal and Moritz Lotze"
 * __email__ = "tgal@km3net.de"             # <<<<<<<<<<<<<<
 * __status__ = "Development"
 * __all__ = ('EventInfo', 'Point', 'Position', 'Direction', 'HitSeries',
 */
  __Pyx_TraceLine(31,0,__PYX_ERR(0, 31, __pyx_L1_error))
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_email, __pyx_kp_s_tgal_km3net_de) < 0) __PYX_ERR(0, 31, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":32
 * __maintainer__ = "Tamas Gal and Moritz Lotze"
 * __email__ = "tgal@km3net.de"
 * __status__ = "Development"             # <<<<<<<<<<<<<<
 * __all__ = ('EventInfo', 'Point', 'Position', 'Direction', 'HitSeries',
 *            'TimesliceHitSeries', 'Hit',
 */
  __Pyx_TraceLine(32,0,__PYX_ERR(0, 32, __pyx_L1_error))
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_status, __pyx_n_s_Development) < 0) __PYX_ERR(0, 32, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":33
 * __email__ = "tgal@km3net.de"
 * __status__ = "Development"
 * __all__ = ('EventInfo', 'Point', 'Position', 'Direction', 'HitSeries',             # <<<<<<<<<<<<<<
 *            'TimesliceHitSeries', 'Hit',
 *            'Track', 'TrackSeries', 'Serialisable', 'SummaryframeInfo',
 */
  __Pyx_TraceLine(33,0,__PYX_ERR(0, 33, __pyx_L1_error))
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_tuple__222) < 0) __PYX_ERR(0, 33, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":40
 * 
 * IS_CC = {
 *     3: 0,         # False,             # <<<<<<<<<<<<<<
 *     2: 1,         # True,
 *     1: 0,         # False,
 */
  __Pyx_TraceLine(40,0,__PYX_ERR(0, 40, __pyx_L1_error))
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_int_3, __pyx_int_0) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_int_2, __pyx_int_1) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_int_1, __pyx_int_0) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_int_0, __pyx_int_1) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_IS_CC, __pyx_t_2) < 0) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":47
 * 
 * 
 * class Serialisable(type):             # <<<<<<<<<<<<<<
 *     """A metaclass for serialisable classes.
 * 
 */
  __Pyx_TraceLine(47,0,__PYX_ERR(0, 47, __pyx_L1_error))
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)(&PyType_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyType_Type)));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)(&PyType_Type)));
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_Serialisable, __pyx_n_s_Serialisable, (PyObject *) NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_kp_s_A_metaclass_for_serialisable_cla); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "km3pipe/dataclasses.pyx":60
 * 
 *     """
 *     def __new__(metaclass, class_name, class_parents, class_attr):             # <<<<<<<<<<<<<<
 *         attr = {'h5loc': '/'}
 *         for name, val in class_attr.items():
 */
  __Pyx_TraceLine(60,0,__PYX_ERR(0, 60, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12Serialisable_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_Serialisable___new, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj_)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_new, __pyx_t_5) < 0) __PYX_ERR(0, 60, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":47
 * 
 * 
 * class Serialisable(type):             # <<<<<<<<<<<<<<
 *     """A metaclass for serialisable classes.
 * 
 */
  __Pyx_TraceLine(47,0,__PYX_ERR(0, 47, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_Serialisable, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Serialisable, __pyx_t_5) < 0) __PYX_ERR(0, 47, __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;

  /* "km3pipe/dataclasses.pyx":80
 * 
 * 
 * class SummarysliceInfo(with_metaclass(Serialisable)):             # <<<<<<<<<<<<<<
 *     """JDAQSummaryslice Metadata.
 *     """
 */
  __Pyx_TraceLine(80,0,__PYX_ERR(0, 80, __pyx_L1_error))
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_with_metaclass); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Serialisable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 80, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_SummarysliceInfo, __pyx_n_s_SummarysliceInfo, (PyObject *) NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_kp_s_JDAQSummaryslice_Metadata); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":83
 *     """JDAQSummaryslice Metadata.
 *     """
 *     h5loc = '/'             # <<<<<<<<<<<<<<
 *     dtype = np.dtype([
 *         ('det_id', '<i4'),
 */
  __Pyx_TraceLine(83,0,__PYX_ERR(0, 83, __pyx_L1_error))
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_h5loc, __pyx_kp_s__2) < 0) __PYX_ERR(0, 83, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":84
 *     """
 *     h5loc = '/'
 *     dtype = np.dtype([             # <<<<<<<<<<<<<<
 *         ('det_id', '<i4'),
 *         ('frame_index', '<u4'),
 */
  __Pyx_TraceLine(84,0,__PYX_ERR(0, 84, __pyx_L1_error))
  __pyx_t_4 = PyList_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_tuple__224);
  __Pyx_GIVEREF(__pyx_tuple__224);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_tuple__224);
  __Pyx_INCREF(__pyx_tuple__225);
  __Pyx_GIVEREF(__pyx_tuple__225);
  PyList_SET_ITEM(__pyx_t_4, 1, __pyx_tuple__225);
  __Pyx_INCREF(__pyx_tuple__226);
  __Pyx_GIVEREF(__pyx_tuple__226);
  PyList_SET_ITEM(__pyx_t_4, 2, __pyx_tuple__226);
  __Pyx_INCREF(__pyx_tuple__227);
  __Pyx_GIVEREF(__pyx_tuple__227);
  PyList_SET_ITEM(__pyx_t_4, 3, __pyx_tuple__227);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_dtype), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 84, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":92
 * 
 *     @classmethod
 *     def from_table(cls, row):             # <<<<<<<<<<<<<<
 *         args = []
 *         for col in cls.dtype.names:
 */
  __Pyx_TraceLine(92,0,__PYX_ERR(0, 92, __pyx_L1_error))
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_16SummarysliceInfo_1from_table, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_SummarysliceInfo_from_table, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__5)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "km3pipe/dataclasses.pyx":91
 *     ])
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_table(cls, row):
 *         args = []
 */
  __Pyx_TraceLine(91,0,__PYX_ERR(0, 91, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_from_table, __pyx_t_5) < 0) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":102
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(102,0,__PYX_ERR(0, 102, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_16SummarysliceInfo_3deserialise, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_SummarysliceInfo_deserialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__6)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":101
 *         return cls(*args)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)
 */
  __Pyx_TraceLine(101,0,__PYX_ERR(0, 101, __pyx_L1_error))
  __pyx_t_4 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_deserialise, __pyx_t_4) < 0) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":105
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(105,0,__PYX_ERR(0, 105, __pyx_L1_error))
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_16SummarysliceInfo_5serialise, 0, __pyx_n_s_SummarysliceInfo_serialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__7)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_serialise, __pyx_t_4) < 0) __PYX_ERR(0, 105, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":109
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])
 */
  __Pyx_TraceLine(109,0,__PYX_ERR(0, 109, __pyx_L1_error))
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_16SummarysliceInfo_7conv_from, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_SummarysliceInfo_conv_from, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__8)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__232);

  /* "km3pipe/dataclasses.pyx":108
 *         return self.conv_to(*args, **kwargs)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':
 */
  __Pyx_TraceLine(108,0,__PYX_ERR(0, 108, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_conv_from, __pyx_t_5) < 0) __PYX_ERR(0, 109, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":113
 *             return cls.from_table(data[0])
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 */
  __Pyx_TraceLine(113,0,__PYX_ERR(0, 113, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_16SummarysliceInfo_9conv_to, 0, __pyx_n_s_SummarysliceInfo_conv_to, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__9)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__234);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_conv_to, __pyx_t_5) < 0) __PYX_ERR(0, 113, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":120
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return [(
 *             self.det_id, self.frame_index, self.run_id, self.slice_id,
 */
  __Pyx_TraceLine(120,0,__PYX_ERR(0, 120, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_16SummarysliceInfo_11__array__, 0, __pyx_n_s_SummarysliceInfo___array, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__10)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_array_2, __pyx_t_5) < 0) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":125
 *         ), ]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Summaryslice #{0}:\n" \
 *                "    detector id:     {1}\n" \
 */
  __Pyx_TraceLine(125,0,__PYX_ERR(0, 125, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_16SummarysliceInfo_13__str__, 0, __pyx_n_s_SummarysliceInfo___str, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__11)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_str, __pyx_t_5) < 0) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":134
 *                        )
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __Pyx_TraceLine(134,0,__PYX_ERR(0, 134, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_16SummarysliceInfo_15__insp__, 0, __pyx_n_s_SummarysliceInfo___insp, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__12)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_insp, __pyx_t_5) < 0) __PYX_ERR(0, 134, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":137
 *         return self.__str__()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */
  __Pyx_TraceLine(137,0,__PYX_ERR(0, 137, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_16SummarysliceInfo_17__len__, 0, __pyx_n_s_SummarysliceInfo___len, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__13)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_len_2, __pyx_t_5) < 0) __PYX_ERR(0, 137, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":80
 * 
 * 
 * class SummarysliceInfo(with_metaclass(Serialisable)):             # <<<<<<<<<<<<<<
 *     """JDAQSummaryslice Metadata.
 *     """
 */
  __Pyx_TraceLine(80,0,__PYX_ERR(0, 80, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_SummarysliceInfo, __pyx_t_1, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SummarysliceInfo, __pyx_t_5) < 0) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":141
 * 
 * 
 * class TimesliceInfo(with_metaclass(Serialisable)):             # <<<<<<<<<<<<<<
 *     """JDAQTimeslice metadata.
 *     """
 */
  __Pyx_TraceLine(141,0,__PYX_ERR(0, 141, __pyx_L1_error))
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_with_metaclass); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_Serialisable); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 141, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_TimesliceInfo, __pyx_n_s_TimesliceInfo, (PyObject *) NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_kp_s_JDAQTimeslice_metadata); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "km3pipe/dataclasses.pyx":144
 *     """JDAQTimeslice metadata.
 *     """
 *     h5loc = '/'             # <<<<<<<<<<<<<<
 *     dtype = np.dtype([
 *         ('dom_id', '<u4'),
 */
  __Pyx_TraceLine(144,0,__PYX_ERR(0, 144, __pyx_L1_error))
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_h5loc, __pyx_kp_s__2) < 0) __PYX_ERR(0, 144, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":145
 *     """
 *     h5loc = '/'
 *     dtype = np.dtype([             # <<<<<<<<<<<<<<
 *         ('dom_id', '<u4'),
 *         ('frame_id', '<u4'),
 */
  __Pyx_TraceLine(145,0,__PYX_ERR(0, 145, __pyx_L1_error))
  __pyx_t_6 = PyList_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_tuple__239);
  __Pyx_GIVEREF(__pyx_tuple__239);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_tuple__239);
  __Pyx_INCREF(__pyx_tuple__240);
  __Pyx_GIVEREF(__pyx_tuple__240);
  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_tuple__240);
  __Pyx_INCREF(__pyx_tuple__241);
  __Pyx_GIVEREF(__pyx_tuple__241);
  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_tuple__241);
  __Pyx_INCREF(__pyx_tuple__242);
  __Pyx_GIVEREF(__pyx_tuple__242);
  PyList_SET_ITEM(__pyx_t_6, 3, __pyx_tuple__242);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_dtype), __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":153
 * 
 *     @classmethod
 *     def from_table(cls, row):             # <<<<<<<<<<<<<<
 *         args = []
 *         for col in cls.dtype.names:
 */
  __Pyx_TraceLine(153,0,__PYX_ERR(0, 153, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13TimesliceInfo_1from_table, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_TimesliceInfo_from_table, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__14)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":152
 *     ])
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_table(cls, row):
 *         args = []
 */
  __Pyx_TraceLine(152,0,__PYX_ERR(0, 152, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_from_table, __pyx_t_5) < 0) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":163
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(163,0,__PYX_ERR(0, 163, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13TimesliceInfo_3deserialise, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_TimesliceInfo_deserialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__15)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":162
 *         return cls(*args)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)
 */
  __Pyx_TraceLine(162,0,__PYX_ERR(0, 162, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_deserialise, __pyx_t_6) < 0) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":166
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(166,0,__PYX_ERR(0, 166, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13TimesliceInfo_5serialise, 0, __pyx_n_s_TimesliceInfo_serialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__16)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_serialise, __pyx_t_6) < 0) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":170
 * 
 *     @classmethod
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])
 */
  __Pyx_TraceLine(170,0,__PYX_ERR(0, 170, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13TimesliceInfo_7conv_from, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_TimesliceInfo_conv_from, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__17)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__247);

  /* "km3pipe/dataclasses.pyx":169
 *         return self.conv_to(*args, **kwargs)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':
 */
  __Pyx_TraceLine(169,0,__PYX_ERR(0, 169, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_conv_from, __pyx_t_5) < 0) __PYX_ERR(0, 170, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":174
 *             return cls.from_table(data[0])
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 */
  __Pyx_TraceLine(174,0,__PYX_ERR(0, 174, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13TimesliceInfo_9conv_to, 0, __pyx_n_s_TimesliceInfo_conv_to, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__18)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__249);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_conv_to, __pyx_t_5) < 0) __PYX_ERR(0, 174, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":181
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return [(
 *             self.dom_id, self.frame_id, self.n_hits, self.slice_id,
 */
  __Pyx_TraceLine(181,0,__PYX_ERR(0, 181, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13TimesliceInfo_11__array__, 0, __pyx_n_s_TimesliceInfo___array, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__19)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_array_2, __pyx_t_5) < 0) __PYX_ERR(0, 181, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":186
 *         ), ]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Timeslice frame:\n" \
 *                "    slice id: {0}\n" \
 */
  __Pyx_TraceLine(186,0,__PYX_ERR(0, 186, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13TimesliceInfo_13__str__, 0, __pyx_n_s_TimesliceInfo___str, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__20)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_str, __pyx_t_5) < 0) __PYX_ERR(0, 186, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":194
 *                .format(self.slice_id, self.frame_id, self.dom_id, self.n_hits)
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __Pyx_TraceLine(194,0,__PYX_ERR(0, 194, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13TimesliceInfo_15__insp__, 0, __pyx_n_s_TimesliceInfo___insp, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__21)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_insp, __pyx_t_5) < 0) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":197
 *         return self.__str__()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */
  __Pyx_TraceLine(197,0,__PYX_ERR(0, 197, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13TimesliceInfo_17__len__, 0, __pyx_n_s_TimesliceInfo___len, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__22)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_len_2, __pyx_t_5) < 0) __PYX_ERR(0, 197, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":141
 * 
 * 
 * class TimesliceInfo(with_metaclass(Serialisable)):             # <<<<<<<<<<<<<<
 *     """JDAQTimeslice metadata.
 *     """
 */
  __Pyx_TraceLine(141,0,__PYX_ERR(0, 141, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_TimesliceInfo, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TimesliceInfo, __pyx_t_5) < 0) __PYX_ERR(0, 141, __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;

  /* "km3pipe/dataclasses.pyx":201
 * 
 * 
 * class TimesliceFrameInfo(with_metaclass(Serialisable)):             # <<<<<<<<<<<<<<
 *     """JDAQTimeslice frame metadata.
 *     """
 */
  __Pyx_TraceLine(201,0,__PYX_ERR(0, 201, __pyx_L1_error))
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_with_metaclass); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Serialisable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 201, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_TimesliceFrameInfo, __pyx_n_s_TimesliceFrameInfo, (PyObject *) NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_kp_s_JDAQTimeslice_frame_metadata); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":204
 *     """JDAQTimeslice frame metadata.
 *     """
 *     h5loc = '/'             # <<<<<<<<<<<<<<
 *     dtype = np.dtype([
 *         ('dom_id', '<u4'),
 */
  __Pyx_TraceLine(204,0,__PYX_ERR(0, 204, __pyx_L1_error))
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_h5loc, __pyx_kp_s__2) < 0) __PYX_ERR(0, 204, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":205
 *     """
 *     h5loc = '/'
 *     dtype = np.dtype([             # <<<<<<<<<<<<<<
 *         ('dom_id', '<u4'),
 *         ('fifo_status', '<u4'),
 */
  __Pyx_TraceLine(205,0,__PYX_ERR(0, 205, __pyx_L1_error))
  __pyx_t_4 = PyList_New(12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_tuple__254);
  __Pyx_GIVEREF(__pyx_tuple__254);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_tuple__254);
  __Pyx_INCREF(__pyx_tuple__255);
  __Pyx_GIVEREF(__pyx_tuple__255);
  PyList_SET_ITEM(__pyx_t_4, 1, __pyx_tuple__255);
  __Pyx_INCREF(__pyx_tuple__256);
  __Pyx_GIVEREF(__pyx_tuple__256);
  PyList_SET_ITEM(__pyx_t_4, 2, __pyx_tuple__256);
  __Pyx_INCREF(__pyx_tuple__257);
  __Pyx_GIVEREF(__pyx_tuple__257);
  PyList_SET_ITEM(__pyx_t_4, 3, __pyx_tuple__257);
  __Pyx_INCREF(__pyx_tuple__258);
  __Pyx_GIVEREF(__pyx_tuple__258);
  PyList_SET_ITEM(__pyx_t_4, 4, __pyx_tuple__258);
  __Pyx_INCREF(__pyx_tuple__259);
  __Pyx_GIVEREF(__pyx_tuple__259);
  PyList_SET_ITEM(__pyx_t_4, 5, __pyx_tuple__259);
  __Pyx_INCREF(__pyx_tuple__260);
  __Pyx_GIVEREF(__pyx_tuple__260);
  PyList_SET_ITEM(__pyx_t_4, 6, __pyx_tuple__260);
  __Pyx_INCREF(__pyx_tuple__261);
  __Pyx_GIVEREF(__pyx_tuple__261);
  PyList_SET_ITEM(__pyx_t_4, 7, __pyx_tuple__261);
  __Pyx_INCREF(__pyx_tuple__262);
  __Pyx_GIVEREF(__pyx_tuple__262);
  PyList_SET_ITEM(__pyx_t_4, 8, __pyx_tuple__262);
  __Pyx_INCREF(__pyx_tuple__263);
  __Pyx_GIVEREF(__pyx_tuple__263);
  PyList_SET_ITEM(__pyx_t_4, 9, __pyx_tuple__263);
  __Pyx_INCREF(__pyx_tuple__264);
  __Pyx_GIVEREF(__pyx_tuple__264);
  PyList_SET_ITEM(__pyx_t_4, 10, __pyx_tuple__264);
  __Pyx_INCREF(__pyx_tuple__265);
  __Pyx_GIVEREF(__pyx_tuple__265);
  PyList_SET_ITEM(__pyx_t_4, 11, __pyx_tuple__265);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_dtype), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 205, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":221
 * 
 *     @classmethod
 *     def from_table(cls, row):             # <<<<<<<<<<<<<<
 *         args = []
 *         for col in cls.dtype.names:
 */
  __Pyx_TraceLine(221,0,__PYX_ERR(0, 221, __pyx_L1_error))
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceFrameInfo_1from_table, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_TimesliceFrameInfo_from_table, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__23)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "km3pipe/dataclasses.pyx":220
 *     ])
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_table(cls, row):
 *         args = []
 */
  __Pyx_TraceLine(220,0,__PYX_ERR(0, 220, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_from_table, __pyx_t_5) < 0) __PYX_ERR(0, 221, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":231
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(231,0,__PYX_ERR(0, 231, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceFrameInfo_3deserialise, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_TimesliceFrameInfo_deserialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__24)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":230
 *         return cls(*args)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)
 */
  __Pyx_TraceLine(230,0,__PYX_ERR(0, 230, __pyx_L1_error))
  __pyx_t_4 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_deserialise, __pyx_t_4) < 0) __PYX_ERR(0, 231, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":234
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(234,0,__PYX_ERR(0, 234, __pyx_L1_error))
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceFrameInfo_5serialise, 0, __pyx_n_s_TimesliceFrameInfo_serialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__25)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_serialise, __pyx_t_4) < 0) __PYX_ERR(0, 234, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":238
 * 
 *     @classmethod
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])
 */
  __Pyx_TraceLine(238,0,__PYX_ERR(0, 238, __pyx_L1_error))
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceFrameInfo_7conv_from, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_TimesliceFrameInfo_conv_from, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__26)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__270);

  /* "km3pipe/dataclasses.pyx":237
 *         return self.conv_to(*args, **kwargs)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':
 */
  __Pyx_TraceLine(237,0,__PYX_ERR(0, 237, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_conv_from, __pyx_t_5) < 0) __PYX_ERR(0, 238, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":242
 *             return cls.from_table(data[0])
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 */
  __Pyx_TraceLine(242,0,__PYX_ERR(0, 242, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceFrameInfo_9conv_to, 0, __pyx_n_s_TimesliceFrameInfo_conv_to, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__27)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__272);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_conv_to, __pyx_t_5) < 0) __PYX_ERR(0, 242, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":249
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return [(
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,
 */
  __Pyx_TraceLine(249,0,__PYX_ERR(0, 249, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceFrameInfo_11__array__, 0, __pyx_n_s_TimesliceFrameInfo___array, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_array_2, __pyx_t_5) < 0) __PYX_ERR(0, 249, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":257
 *         ), ]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Timeslice frame:\n" \
 *                "    slice id: {0}\n" \
 */
  __Pyx_TraceLine(257,0,__PYX_ERR(0, 257, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceFrameInfo_13__str__, 0, __pyx_n_s_TimesliceFrameInfo___str, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_str, __pyx_t_5) < 0) __PYX_ERR(0, 257, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":267
 *                        self.max_sequence_number)
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __Pyx_TraceLine(267,0,__PYX_ERR(0, 267, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceFrameInfo_15__insp__, 0, __pyx_n_s_TimesliceFrameInfo___insp, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_insp, __pyx_t_5) < 0) __PYX_ERR(0, 267, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":270
 *         return self.__str__()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */
  __Pyx_TraceLine(270,0,__PYX_ERR(0, 270, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceFrameInfo_17__len__, 0, __pyx_n_s_TimesliceFrameInfo___len, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_len_2, __pyx_t_5) < 0) __PYX_ERR(0, 270, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":201
 * 
 * 
 * class TimesliceFrameInfo(with_metaclass(Serialisable)):             # <<<<<<<<<<<<<<
 *     """JDAQTimeslice frame metadata.
 *     """
 */
  __Pyx_TraceLine(201,0,__PYX_ERR(0, 201, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_TimesliceFrameInfo, __pyx_t_1, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TimesliceFrameInfo, __pyx_t_5) < 0) __PYX_ERR(0, 201, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":274
 * 
 * 
 * class SummaryframeInfo(with_metaclass(Serialisable)):             # <<<<<<<<<<<<<<
 *     """JDAQSummaryslice frame metadata.
 *     """
 */
  __Pyx_TraceLine(274,0,__PYX_ERR(0, 274, __pyx_L1_error))
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_with_metaclass); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_Serialisable); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 274, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 274, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 274, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 274, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 274, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_SummaryframeInfo, __pyx_n_s_SummaryframeInfo, (PyObject *) NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_kp_s_JDAQSummaryslice_frame_metadata); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "km3pipe/dataclasses.pyx":277
 *     """JDAQSummaryslice frame metadata.
 *     """
 *     h5loc = '/'             # <<<<<<<<<<<<<<
 *     dtype = np.dtype([
 *         ('dom_id', '<u4'),
 */
  __Pyx_TraceLine(277,0,__PYX_ERR(0, 277, __pyx_L1_error))
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_h5loc, __pyx_kp_s__2) < 0) __PYX_ERR(0, 277, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":278
 *     """
 *     h5loc = '/'
 *     dtype = np.dtype([             # <<<<<<<<<<<<<<
 *         ('dom_id', '<u4'),
 *         ('fifo_status', '<u4'),
 */
  __Pyx_TraceLine(278,0,__PYX_ERR(0, 278, __pyx_L1_error))
  __pyx_t_6 = PyList_New(12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_tuple__277);
  __Pyx_GIVEREF(__pyx_tuple__277);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_tuple__277);
  __Pyx_INCREF(__pyx_tuple__278);
  __Pyx_GIVEREF(__pyx_tuple__278);
  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_tuple__278);
  __Pyx_INCREF(__pyx_tuple__279);
  __Pyx_GIVEREF(__pyx_tuple__279);
  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_tuple__279);
  __Pyx_INCREF(__pyx_tuple__280);
  __Pyx_GIVEREF(__pyx_tuple__280);
  PyList_SET_ITEM(__pyx_t_6, 3, __pyx_tuple__280);
  __Pyx_INCREF(__pyx_tuple__281);
  __Pyx_GIVEREF(__pyx_tuple__281);
  PyList_SET_ITEM(__pyx_t_6, 4, __pyx_tuple__281);
  __Pyx_INCREF(__pyx_tuple__282);
  __Pyx_GIVEREF(__pyx_tuple__282);
  PyList_SET_ITEM(__pyx_t_6, 5, __pyx_tuple__282);
  __Pyx_INCREF(__pyx_tuple__283);
  __Pyx_GIVEREF(__pyx_tuple__283);
  PyList_SET_ITEM(__pyx_t_6, 6, __pyx_tuple__283);
  __Pyx_INCREF(__pyx_tuple__284);
  __Pyx_GIVEREF(__pyx_tuple__284);
  PyList_SET_ITEM(__pyx_t_6, 7, __pyx_tuple__284);
  __Pyx_INCREF(__pyx_tuple__285);
  __Pyx_GIVEREF(__pyx_tuple__285);
  PyList_SET_ITEM(__pyx_t_6, 8, __pyx_tuple__285);
  __Pyx_INCREF(__pyx_tuple__286);
  __Pyx_GIVEREF(__pyx_tuple__286);
  PyList_SET_ITEM(__pyx_t_6, 9, __pyx_tuple__286);
  __Pyx_INCREF(__pyx_tuple__287);
  __Pyx_GIVEREF(__pyx_tuple__287);
  PyList_SET_ITEM(__pyx_t_6, 10, __pyx_tuple__287);
  __Pyx_INCREF(__pyx_tuple__288);
  __Pyx_GIVEREF(__pyx_tuple__288);
  PyList_SET_ITEM(__pyx_t_6, 11, __pyx_tuple__288);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_dtype), __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 278, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":294
 * 
 *     @classmethod
 *     def from_table(cls, row):             # <<<<<<<<<<<<<<
 *         args = []
 *         for col in cls.dtype.names:
 */
  __Pyx_TraceLine(294,0,__PYX_ERR(0, 294, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_16SummaryframeInfo_1from_table, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_SummaryframeInfo_from_table, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__32)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":293
 *     ])
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_table(cls, row):
 *         args = []
 */
  __Pyx_TraceLine(293,0,__PYX_ERR(0, 293, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_from_table, __pyx_t_5) < 0) __PYX_ERR(0, 294, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":304
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(304,0,__PYX_ERR(0, 304, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_16SummaryframeInfo_3deserialise, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_SummaryframeInfo_deserialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":303
 *         return cls(*args)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)
 */
  __Pyx_TraceLine(303,0,__PYX_ERR(0, 303, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_deserialise, __pyx_t_6) < 0) __PYX_ERR(0, 304, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":307
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(307,0,__PYX_ERR(0, 307, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_16SummaryframeInfo_5serialise, 0, __pyx_n_s_SummaryframeInfo_serialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__34)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_serialise, __pyx_t_6) < 0) __PYX_ERR(0, 307, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":311
 * 
 *     @classmethod
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])
 */
  __Pyx_TraceLine(311,0,__PYX_ERR(0, 311, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_16SummaryframeInfo_7conv_from, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_SummaryframeInfo_conv_from, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__293);

  /* "km3pipe/dataclasses.pyx":310
 *         return self.conv_to(*args, **kwargs)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':
 */
  __Pyx_TraceLine(310,0,__PYX_ERR(0, 310, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_conv_from, __pyx_t_5) < 0) __PYX_ERR(0, 311, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":315
 *             return cls.from_table(data[0])
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 */
  __Pyx_TraceLine(315,0,__PYX_ERR(0, 315, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_16SummaryframeInfo_9conv_to, 0, __pyx_n_s_SummaryframeInfo_conv_to, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__295);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_conv_to, __pyx_t_5) < 0) __PYX_ERR(0, 315, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":322
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return [(
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,
 */
  __Pyx_TraceLine(322,0,__PYX_ERR(0, 322, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_16SummaryframeInfo_11__array__, 0, __pyx_n_s_SummaryframeInfo___array, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_array_2, __pyx_t_5) < 0) __PYX_ERR(0, 322, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":330
 *         ), ]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Summaryslice frame #{0}:\n" \
 *                "    slice id:    {1}\n" \
 */
  __Pyx_TraceLine(330,0,__PYX_ERR(0, 330, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_16SummaryframeInfo_13__str__, 0, __pyx_n_s_SummaryframeInfo___str, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__38)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_str, __pyx_t_5) < 0) __PYX_ERR(0, 330, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":339
 *                        self.max_sequence_number)
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __Pyx_TraceLine(339,0,__PYX_ERR(0, 339, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_16SummaryframeInfo_15__insp__, 0, __pyx_n_s_SummaryframeInfo___insp, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_insp, __pyx_t_5) < 0) __PYX_ERR(0, 339, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":342
 *         return self.__str__()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */
  __Pyx_TraceLine(342,0,__PYX_ERR(0, 342, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_16SummaryframeInfo_17__len__, 0, __pyx_n_s_SummaryframeInfo___len, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_len_2, __pyx_t_5) < 0) __PYX_ERR(0, 342, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":274
 * 
 * 
 * class SummaryframeInfo(with_metaclass(Serialisable)):             # <<<<<<<<<<<<<<
 *     """JDAQSummaryslice frame metadata.
 *     """
 */
  __Pyx_TraceLine(274,0,__PYX_ERR(0, 274, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_SummaryframeInfo, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SummaryframeInfo, __pyx_t_5) < 0) __PYX_ERR(0, 274, __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;

  /* "km3pipe/dataclasses.pyx":346
 * 
 * 
 * class EventInfo(object):             # <<<<<<<<<<<<<<
 *     """Event Metadata.
 *     """
 */
  __Pyx_TraceLine(346,0,__PYX_ERR(0, 346, __pyx_L1_error))
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_EventInfo, __pyx_n_s_EventInfo, (PyObject *) NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_kp_s_Event_Metadata); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "km3pipe/dataclasses.pyx":349
 *     """Event Metadata.
 *     """
 *     dtype = np.dtype([             # <<<<<<<<<<<<<<
 *         ('det_id', '<i4'),
 *         ('frame_index', '<u4'),
 */
  __Pyx_TraceLine(349,0,__PYX_ERR(0, 349, __pyx_L1_error))
  __pyx_t_5 = PyList_New(16); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_tuple__300);
  __Pyx_GIVEREF(__pyx_tuple__300);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_tuple__300);
  __Pyx_INCREF(__pyx_tuple__301);
  __Pyx_GIVEREF(__pyx_tuple__301);
  PyList_SET_ITEM(__pyx_t_5, 1, __pyx_tuple__301);
  __Pyx_INCREF(__pyx_tuple__302);
  __Pyx_GIVEREF(__pyx_tuple__302);
  PyList_SET_ITEM(__pyx_t_5, 2, __pyx_tuple__302);
  __Pyx_INCREF(__pyx_tuple__303);
  __Pyx_GIVEREF(__pyx_tuple__303);
  PyList_SET_ITEM(__pyx_t_5, 3, __pyx_tuple__303);
  __Pyx_INCREF(__pyx_tuple__304);
  __Pyx_GIVEREF(__pyx_tuple__304);
  PyList_SET_ITEM(__pyx_t_5, 4, __pyx_tuple__304);
  __Pyx_INCREF(__pyx_tuple__305);
  __Pyx_GIVEREF(__pyx_tuple__305);
  PyList_SET_ITEM(__pyx_t_5, 5, __pyx_tuple__305);
  __Pyx_INCREF(__pyx_tuple__306);
  __Pyx_GIVEREF(__pyx_tuple__306);
  PyList_SET_ITEM(__pyx_t_5, 6, __pyx_tuple__306);
  __Pyx_INCREF(__pyx_tuple__307);
  __Pyx_GIVEREF(__pyx_tuple__307);
  PyList_SET_ITEM(__pyx_t_5, 7, __pyx_tuple__307);
  __Pyx_INCREF(__pyx_tuple__308);
  __Pyx_GIVEREF(__pyx_tuple__308);
  PyList_SET_ITEM(__pyx_t_5, 8, __pyx_tuple__308);
  __Pyx_INCREF(__pyx_tuple__309);
  __Pyx_GIVEREF(__pyx_tuple__309);
  PyList_SET_ITEM(__pyx_t_5, 9, __pyx_tuple__309);
  __Pyx_INCREF(__pyx_tuple__310);
  __Pyx_GIVEREF(__pyx_tuple__310);
  PyList_SET_ITEM(__pyx_t_5, 10, __pyx_tuple__310);
  __Pyx_INCREF(__pyx_tuple__311);
  __Pyx_GIVEREF(__pyx_tuple__311);
  PyList_SET_ITEM(__pyx_t_5, 11, __pyx_tuple__311);
  __Pyx_INCREF(__pyx_tuple__312);
  __Pyx_GIVEREF(__pyx_tuple__312);
  PyList_SET_ITEM(__pyx_t_5, 12, __pyx_tuple__312);
  __Pyx_INCREF(__pyx_tuple__313);
  __Pyx_GIVEREF(__pyx_tuple__313);
  PyList_SET_ITEM(__pyx_t_5, 13, __pyx_tuple__313);
  __Pyx_INCREF(__pyx_tuple__314);
  __Pyx_GIVEREF(__pyx_tuple__314);
  PyList_SET_ITEM(__pyx_t_5, 14, __pyx_tuple__314);
  __Pyx_INCREF(__pyx_tuple__315);
  __Pyx_GIVEREF(__pyx_tuple__315);
  PyList_SET_ITEM(__pyx_t_5, 15, __pyx_tuple__315);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_dtype), __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 349, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":369
 *     ])
 * 
 *     def __init__(self, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._arr = np.array(arr, dtype=self.dtype).reshape(1)
 *         for col in self.dtype.names:
 */
  __Pyx_TraceLine(369,0,__PYX_ERR(0, 369, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9EventInfo_1__init__, 0, __pyx_n_s_EventInfo___init, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__317);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 369, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":376
 * 
 *     @classmethod
 *     def from_row(cls, row, **kwargs):             # <<<<<<<<<<<<<<
 *         args = tuple((row[col] for col in cls.dtype.names))
 *         return cls(np.array(args, dtype=cls.dtype), **kwargs)
 */
  __Pyx_TraceLine(376,0,__PYX_ERR(0, 376, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9EventInfo_3from_row, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_EventInfo_from_row, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":375
 *         self.h5loc = h5loc
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_row(cls, row, **kwargs):
 *         args = tuple((row[col] for col in cls.dtype.names))
 */
  __Pyx_TraceLine(375,0,__PYX_ERR(0, 375, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_from_row, __pyx_t_6) < 0) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":381
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(381,0,__PYX_ERR(0, 381, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9EventInfo_5deserialise, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_EventInfo_deserialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":380
 *         return cls(np.array(args, dtype=cls.dtype), **kwargs)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)
 */
  __Pyx_TraceLine(380,0,__PYX_ERR(0, 380, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_deserialise, __pyx_t_5) < 0) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":384
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(384,0,__PYX_ERR(0, 384, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9EventInfo_7serialise, 0, __pyx_n_s_EventInfo_serialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_serialise, __pyx_t_5) < 0) __PYX_ERR(0, 384, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":388
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/', **kwargs):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_row(data, **kwargs)
 */
  __Pyx_TraceLine(388,0,__PYX_ERR(0, 388, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9EventInfo_9conv_from, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_EventInfo_conv_from, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__322);

  /* "km3pipe/dataclasses.pyx":387
 *         return self.conv_to(*args, **kwargs)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/', **kwargs):
 *         if fmt == 'numpy':
 */
  __Pyx_TraceLine(387,0,__PYX_ERR(0, 387, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_conv_from, __pyx_t_6) < 0) __PYX_ERR(0, 388, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":392
 *             return cls.from_row(data, **kwargs)
 * 
 *     def conv_to(self, to='numpy', **kwargs):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 */
  __Pyx_TraceLine(392,0,__PYX_ERR(0, 392, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9EventInfo_11conv_to, 0, __pyx_n_s_EventInfo_conv_to, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__47)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__324);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_conv_to, __pyx_t_6) < 0) __PYX_ERR(0, 392, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":400
 *                                 **kwargs)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */
  __Pyx_TraceLine(400,0,__PYX_ERR(0, 400, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9EventInfo_13__array__, 0, __pyx_n_s_EventInfo___array, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__48)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_array_2, __pyx_t_6) < 0) __PYX_ERR(0, 400, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":403
 *         return self._arr
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Event #{0}:\n" \
 *                "    detector id:     {1}\n" \
 */
  __Pyx_TraceLine(403,0,__PYX_ERR(0, 403, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9EventInfo_15__str__, 0, __pyx_n_s_EventInfo___str, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__49)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_str, __pyx_t_6) < 0) __PYX_ERR(0, 403, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":421
 *                        )
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __Pyx_TraceLine(421,0,__PYX_ERR(0, 421, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9EventInfo_17__repr__, 0, __pyx_n_s_EventInfo___repr, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__50)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_repr, __pyx_t_6) < 0) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":424
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __Pyx_TraceLine(424,0,__PYX_ERR(0, 424, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9EventInfo_19__insp__, 0, __pyx_n_s_EventInfo___insp, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__51)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_insp, __pyx_t_6) < 0) __PYX_ERR(0, 424, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":427
 *         return self.__str__()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */
  __Pyx_TraceLine(427,0,__PYX_ERR(0, 427, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9EventInfo_21__len__, 0, __pyx_n_s_EventInfo___len, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__52)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_len_2, __pyx_t_6) < 0) __PYX_ERR(0, 427, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":346
 * 
 * 
 * class EventInfo(object):             # <<<<<<<<<<<<<<
 *     """Event Metadata.
 *     """
 */
  __Pyx_TraceLine(346,0,__PYX_ERR(0, 346, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_EventInfo, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_EventInfo, __pyx_t_6) < 0) __PYX_ERR(0, 346, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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;

  /* "km3pipe/dataclasses.pyx":431
 * 
 * 
 * class Point(np.ndarray):             # <<<<<<<<<<<<<<
 *     """Represents a point in a 3D space"""
 *     def __new__(cls, input_array=(np.nan, np.nan, np.nan)):
 */
  __Pyx_TraceLine(431,0,__PYX_ERR(0, 431, __pyx_L1_error))
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_5numpy_ndarray));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_5numpy_ndarray));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_5numpy_ndarray));
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_Point, __pyx_n_s_Point, (PyObject *) NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_kp_s_Represents_a_point_in_a_3D_space); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "km3pipe/dataclasses.pyx":433
 * class Point(np.ndarray):
 *     """Represents a point in a 3D space"""
 *     def __new__(cls, input_array=(np.nan, np.nan, np.nan)):             # <<<<<<<<<<<<<<
 *         """Add x, y and z to the ndarray"""
 *         obj = np.asarray(input_array).view(cls)
 */
  __Pyx_TraceLine(433,0,__PYX_ERR(0, 433, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_5Point_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_Point___new, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__53)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_6, sizeof(__pyx_defaults), 1)) __PYX_ERR(0, 433, __pyx_L1_error)
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_nan); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_nan); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_nan); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9);
  __pyx_t_7 = 0;
  __pyx_t_8 = 0;
  __pyx_t_9 = 0;
  __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_6)->__pyx_arg_input_array = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_6, __pyx_pf_7km3pipe_11dataclasses___defaults__);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_new, __pyx_t_6) < 0) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":439
 * 
 *     @property
 *     def x(self):             # <<<<<<<<<<<<<<
 *         return self[0]
 * 
 */
  __Pyx_TraceLine(439,0,__PYX_ERR(0, 439, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_5Point_3x, 0, __pyx_n_s_Point_x, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__54)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":438
 *         return obj
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def x(self):
 *         return self[0]
 */
  __Pyx_TraceLine(438,0,__PYX_ERR(0, 438, __pyx_L1_error))
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_x, __pyx_t_6) < 0) __PYX_ERR(0, 439, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":442
 *         return self[0]
 * 
 *     @x.setter             # <<<<<<<<<<<<<<
 *     def x(self, value):
 *         self[0] = value
 */
  __Pyx_TraceLine(442,0,__PYX_ERR(0, 442, __pyx_L1_error))
  __pyx_t_5 = PyObject_GetItem(__pyx_t_4, __pyx_n_s_x);
  if (unlikely(!__pyx_t_5)) {
    PyErr_Clear();
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_x);
  }
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_setter); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":443
 * 
 *     @x.setter
 *     def x(self, value):             # <<<<<<<<<<<<<<
 *         self[0] = value
 * 
 */
  __Pyx_TraceLine(443,0,__PYX_ERR(0, 443, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_5Point_5x, 0, __pyx_n_s_Point_x, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__55)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
    }
  }
  if (!__pyx_t_8) {
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 442, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_6);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_9)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_5};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 442, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_5};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 442, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 442, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __pyx_t_8 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 442, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_x, __pyx_t_6) < 0) __PYX_ERR(0, 443, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":447
 * 
 *     @property
 *     def y(self):             # <<<<<<<<<<<<<<
 *         return self[1]
 * 
 */
  __Pyx_TraceLine(447,0,__PYX_ERR(0, 447, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_5Point_7y, 0, __pyx_n_s_Point_y, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__56)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":446
 *         self[0] = value
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def y(self):
 *         return self[1]
 */
  __Pyx_TraceLine(446,0,__PYX_ERR(0, 446, __pyx_L1_error))
  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_y, __pyx_t_6) < 0) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":450
 *         return self[1]
 * 
 *     @y.setter             # <<<<<<<<<<<<<<
 *     def y(self, value):
 *         self[1] = value
 */
  __Pyx_TraceLine(450,0,__PYX_ERR(0, 450, __pyx_L1_error))
  __pyx_t_9 = PyObject_GetItem(__pyx_t_4, __pyx_n_s_y);
  if (unlikely(!__pyx_t_9)) {
    PyErr_Clear();
    __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_y);
  }
  if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_setter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "km3pipe/dataclasses.pyx":451
 * 
 *     @y.setter
 *     def y(self, value):             # <<<<<<<<<<<<<<
 *         self[1] = value
 * 
 */
  __Pyx_TraceLine(451,0,__PYX_ERR(0, 451, __pyx_L1_error))
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_5Point_9y, 0, __pyx_n_s_Point_y, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__57)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 450, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_6);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_9};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 450, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_9};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 450, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 450, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_9);
      __pyx_t_9 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 450, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_y, __pyx_t_6) < 0) __PYX_ERR(0, 451, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":455
 * 
 *     @property
 *     def z(self):             # <<<<<<<<<<<<<<
 *         return self[2]
 * 
 */
  __Pyx_TraceLine(455,0,__PYX_ERR(0, 455, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_5Point_11z, 0, __pyx_n_s_Point_z, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":454
 *         self[1] = value
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def z(self):
 *         return self[2]
 */
  __Pyx_TraceLine(454,0,__PYX_ERR(0, 454, __pyx_L1_error))
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_z, __pyx_t_6) < 0) __PYX_ERR(0, 455, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":458
 *         return self[2]
 * 
 *     @z.setter             # <<<<<<<<<<<<<<
 *     def z(self, value):
 *         self[2] = value
 */
  __Pyx_TraceLine(458,0,__PYX_ERR(0, 458, __pyx_L1_error))
  __pyx_t_7 = PyObject_GetItem(__pyx_t_4, __pyx_n_s_z);
  if (unlikely(!__pyx_t_7)) {
    PyErr_Clear();
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_z);
  }
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_setter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":459
 * 
 *     @z.setter
 *     def z(self, value):             # <<<<<<<<<<<<<<
 *         self[2] = value
 * 
 */
  __Pyx_TraceLine(459,0,__PYX_ERR(0, 459, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_5Point_13z, 0, __pyx_n_s_Point_z, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__59)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  if (!__pyx_t_9) {
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 458, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_6);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_7};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 458, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_7};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 458, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 458, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_9); __pyx_t_9 = NULL;
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 458, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_z, __pyx_t_6) < 0) __PYX_ERR(0, 459, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":431
 * 
 * 
 * class Point(np.ndarray):             # <<<<<<<<<<<<<<
 *     """Represents a point in a 3D space"""
 *     def __new__(cls, input_array=(np.nan, np.nan, np.nan)):
 */
  __Pyx_TraceLine(431,0,__PYX_ERR(0, 431, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_Point, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Point, __pyx_t_6) < 0) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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;

  /* "km3pipe/dataclasses.pyx":463
 * 
 * 
 * Position = Direction = Point  # Backwards compatibility             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(463,0,__PYX_ERR(0, 463, __pyx_L1_error))
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Point); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Position, __pyx_t_2) < 0) __PYX_ERR(0, 463, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Direction, __pyx_t_2) < 0) __PYX_ERR(0, 463, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":466
 * 
 * 
 * class Direction_(Point):             # <<<<<<<<<<<<<<
 *     """Represents a direction in a 3D space
 * 
 */
  __Pyx_TraceLine(466,0,__PYX_ERR(0, 466, __pyx_L1_error))
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Point); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_Direction_2, __pyx_n_s_Direction_2, (PyObject *) NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_kp_s_Represents_a_direction_in_a_3D_s); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "km3pipe/dataclasses.pyx":472
 * 
 *     """
 *     def __new__(cls, input_array=(1, 0, 0)):             # <<<<<<<<<<<<<<
 *         """Add x, y and z to the ndarray"""
 *         normed_array = np.array(input_array) / np.linalg.norm(input_array)
 */
  __Pyx_TraceLine(472,0,__PYX_ERR(0, 472, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_10Direction__1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_Direction____new, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__61)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__338);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_new, __pyx_t_6) < 0) __PYX_ERR(0, 472, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":478
 *         return obj
 * 
 *     def _normalise(self):             # <<<<<<<<<<<<<<
 *         normed_array = self / np.linalg.norm(self)
 *         self[0] = normed_array[0]
 */
  __Pyx_TraceLine(478,0,__PYX_ERR(0, 478, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_10Direction__3_normalise, 0, __pyx_n_s_Direction___normalise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__62)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_normalise, __pyx_t_6) < 0) __PYX_ERR(0, 478, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":485
 * 
 *     @property
 *     def x(self):             # <<<<<<<<<<<<<<
 *         return self[0]
 * 
 */
  __Pyx_TraceLine(485,0,__PYX_ERR(0, 485, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_10Direction__5x, 0, __pyx_n_s_Direction__x, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__63)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":484
 *         self[2] = normed_array[2]
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def x(self):
 *         return self[0]
 */
  __Pyx_TraceLine(484,0,__PYX_ERR(0, 484, __pyx_L1_error))
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_x, __pyx_t_6) < 0) __PYX_ERR(0, 485, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":488
 *         return self[0]
 * 
 *     @x.setter             # <<<<<<<<<<<<<<
 *     def x(self, value):
 *         self[0] = value
 */
  __Pyx_TraceLine(488,0,__PYX_ERR(0, 488, __pyx_L1_error))
  __pyx_t_8 = PyObject_GetItem(__pyx_t_4, __pyx_n_s_x);
  if (unlikely(!__pyx_t_8)) {
    PyErr_Clear();
    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_x);
  }
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_setter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":489
 * 
 *     @x.setter
 *     def x(self, value):             # <<<<<<<<<<<<<<
 *         self[0] = value
 *         self._normalise()
 */
  __Pyx_TraceLine(489,0,__PYX_ERR(0, 489, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_10Direction__7x, 0, __pyx_n_s_Direction__x, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__64)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 488, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_6);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_8};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 488, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_8};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 488, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 488, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 488, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_x, __pyx_t_6) < 0) __PYX_ERR(0, 489, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":494
 * 
 *     @property
 *     def y(self):             # <<<<<<<<<<<<<<
 *         return self[1]
 * 
 */
  __Pyx_TraceLine(494,0,__PYX_ERR(0, 494, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_10Direction__9y, 0, __pyx_n_s_Direction__y, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__65)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":493
 *         self._normalise()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def y(self):
 *         return self[1]
 */
  __Pyx_TraceLine(493,0,__PYX_ERR(0, 493, __pyx_L1_error))
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_y, __pyx_t_6) < 0) __PYX_ERR(0, 494, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":497
 *         return self[1]
 * 
 *     @y.setter             # <<<<<<<<<<<<<<
 *     def y(self, value):
 *         self[1] = value
 */
  __Pyx_TraceLine(497,0,__PYX_ERR(0, 497, __pyx_L1_error))
  __pyx_t_5 = PyObject_GetItem(__pyx_t_4, __pyx_n_s_y);
  if (unlikely(!__pyx_t_5)) {
    PyErr_Clear();
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_y);
  }
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_setter); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":498
 * 
 *     @y.setter
 *     def y(self, value):             # <<<<<<<<<<<<<<
 *         self[1] = value
 *         self._normalise()
 */
  __Pyx_TraceLine(498,0,__PYX_ERR(0, 498, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_10Direction__11y, 0, __pyx_n_s_Direction__y, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
    }
  }
  if (!__pyx_t_8) {
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 497, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_6);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_9)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_5};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 497, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_5};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 497, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 497, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __pyx_t_8 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 497, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_y, __pyx_t_6) < 0) __PYX_ERR(0, 498, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":503
 * 
 *     @property
 *     def z(self):             # <<<<<<<<<<<<<<
 *         return self[2]
 * 
 */
  __Pyx_TraceLine(503,0,__PYX_ERR(0, 503, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_10Direction__13z, 0, __pyx_n_s_Direction__z, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":502
 *         self._normalise()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def z(self):
 *         return self[2]
 */
  __Pyx_TraceLine(502,0,__PYX_ERR(0, 502, __pyx_L1_error))
  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_z, __pyx_t_6) < 0) __PYX_ERR(0, 503, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":506
 *         return self[2]
 * 
 *     @z.setter             # <<<<<<<<<<<<<<
 *     def z(self, value):
 *         self[2] = value
 */
  __Pyx_TraceLine(506,0,__PYX_ERR(0, 506, __pyx_L1_error))
  __pyx_t_9 = PyObject_GetItem(__pyx_t_4, __pyx_n_s_z);
  if (unlikely(!__pyx_t_9)) {
    PyErr_Clear();
    __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_z);
  }
  if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_setter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "km3pipe/dataclasses.pyx":507
 * 
 *     @z.setter
 *     def z(self, value):             # <<<<<<<<<<<<<<
 *         self[2] = value
 *         self._normalise()
 */
  __Pyx_TraceLine(507,0,__PYX_ERR(0, 507, __pyx_L1_error))
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_10Direction__15z, 0, __pyx_n_s_Direction__z, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 506, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_6);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_9};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 506, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_9};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 506, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 506, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_9);
      __pyx_t_9 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 506, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_z, __pyx_t_6) < 0) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":512
 * 
 *     @property
 *     def zenith(self):             # <<<<<<<<<<<<<<
 *         return angle_between(self, (0, 0, -1))
 * 
 */
  __Pyx_TraceLine(512,0,__PYX_ERR(0, 512, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_10Direction__17zenith, 0, __pyx_n_s_Direction__zenith, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":511
 *         self._normalise()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def zenith(self):
 *         return angle_between(self, (0, 0, -1))
 */
  __Pyx_TraceLine(511,0,__PYX_ERR(0, 511, __pyx_L1_error))
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_zenith, __pyx_t_6) < 0) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":515
 *         return angle_between(self, (0, 0, -1))
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "({0:.4}, {1:.4}, {2:.4})".format(self.x, self.y, self.z)
 * 
 */
  __Pyx_TraceLine(515,0,__PYX_ERR(0, 515, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_10Direction__19__str__, 0, __pyx_n_s_Direction____str, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__71)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_str, __pyx_t_6) < 0) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":466
 * 
 * 
 * class Direction_(Point):             # <<<<<<<<<<<<<<
 *     """Represents a direction in a 3D space
 * 
 */
  __Pyx_TraceLine(466,0,__PYX_ERR(0, 466, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_Direction_2, __pyx_t_1, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Direction_2, __pyx_t_6) < 0) __PYX_ERR(0, 466, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":593
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __Pyx_TraceLine(593,0,__PYX_ERR(0, 593, __pyx_L1_error))
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_3Hit_7__insp__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Hit___insp, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__72)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_7km3pipe_11dataclasses_Hit->tp_dict, __pyx_n_s_insp, __pyx_t_1) < 0) __PYX_ERR(0, 593, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_7km3pipe_11dataclasses_Hit);

  /* "km3pipe/dataclasses.pyx":632
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __Pyx_TraceLine(632,0,__PYX_ERR(0, 632, __pyx_L1_error))
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12TimesliceHit_7__insp__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimesliceHit___insp, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__73)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_7km3pipe_11dataclasses_TimesliceHit->tp_dict, __pyx_n_s_insp, __pyx_t_1) < 0) __PYX_ERR(0, 632, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_7km3pipe_11dataclasses_TimesliceHit);

  /* "km3pipe/dataclasses.pyx":683
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __Pyx_TraceLine(683,0,__PYX_ERR(0, 683, __pyx_L1_error))
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_5MCHit_7__insp__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MCHit___insp, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__74)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_7km3pipe_11dataclasses_MCHit->tp_dict, __pyx_n_s_insp, __pyx_t_1) < 0) __PYX_ERR(0, 683, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_7km3pipe_11dataclasses_MCHit);

  /* "km3pipe/dataclasses.pyx":740
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __Pyx_TraceLine(740,0,__PYX_ERR(0, 740, __pyx_L1_error))
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_5Track_7__insp__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Track___insp, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__75)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_7km3pipe_11dataclasses_Track->tp_dict, __pyx_n_s_insp, __pyx_t_1) < 0) __PYX_ERR(0, 740, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_7km3pipe_11dataclasses_Track);

  /* "km3pipe/dataclasses.pyx":744
 * 
 * 
 * class HitSeries(object):             # <<<<<<<<<<<<<<
 *     """Collection of multiple Hits.
 *     """
 */
  __Pyx_TraceLine(744,0,__PYX_ERR(0, 744, __pyx_L1_error))
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 744, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_object);
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 744, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_HitSeries, __pyx_n_s_HitSeries, (PyObject *) NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_kp_s_Collection_of_multiple_Hits); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 744, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "km3pipe/dataclasses.pyx":747
 *     """Collection of multiple Hits.
 *     """
 *     dtype = np.dtype([             # <<<<<<<<<<<<<<
 *         ('channel_id', 'u1'),
 *         ('dir_x', '<f8'),
 */
  __Pyx_TraceLine(747,0,__PYX_ERR(0, 747, __pyx_L1_error))
  __pyx_t_6 = PyList_New(15); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_tuple__352);
  __Pyx_GIVEREF(__pyx_tuple__352);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_tuple__352);
  __Pyx_INCREF(__pyx_tuple__353);
  __Pyx_GIVEREF(__pyx_tuple__353);
  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_tuple__353);
  __Pyx_INCREF(__pyx_tuple__354);
  __Pyx_GIVEREF(__pyx_tuple__354);
  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_tuple__354);
  __Pyx_INCREF(__pyx_tuple__355);
  __Pyx_GIVEREF(__pyx_tuple__355);
  PyList_SET_ITEM(__pyx_t_6, 3, __pyx_tuple__355);
  __Pyx_INCREF(__pyx_tuple__356);
  __Pyx_GIVEREF(__pyx_tuple__356);
  PyList_SET_ITEM(__pyx_t_6, 4, __pyx_tuple__356);
  __Pyx_INCREF(__pyx_tuple__357);
  __Pyx_GIVEREF(__pyx_tuple__357);
  PyList_SET_ITEM(__pyx_t_6, 5, __pyx_tuple__357);
  __Pyx_INCREF(__pyx_tuple__358);
  __Pyx_GIVEREF(__pyx_tuple__358);
  PyList_SET_ITEM(__pyx_t_6, 6, __pyx_tuple__358);
  __Pyx_INCREF(__pyx_tuple__359);
  __Pyx_GIVEREF(__pyx_tuple__359);
  PyList_SET_ITEM(__pyx_t_6, 7, __pyx_tuple__359);
  __Pyx_INCREF(__pyx_tuple__360);
  __Pyx_GIVEREF(__pyx_tuple__360);
  PyList_SET_ITEM(__pyx_t_6, 8, __pyx_tuple__360);
  __Pyx_INCREF(__pyx_tuple__361);
  __Pyx_GIVEREF(__pyx_tuple__361);
  PyList_SET_ITEM(__pyx_t_6, 9, __pyx_tuple__361);
  __Pyx_INCREF(__pyx_tuple__362);
  __Pyx_GIVEREF(__pyx_tuple__362);
  PyList_SET_ITEM(__pyx_t_6, 10, __pyx_tuple__362);
  __Pyx_INCREF(__pyx_tuple__363);
  __Pyx_GIVEREF(__pyx_tuple__363);
  PyList_SET_ITEM(__pyx_t_6, 11, __pyx_tuple__363);
  __Pyx_INCREF(__pyx_tuple__364);
  __Pyx_GIVEREF(__pyx_tuple__364);
  PyList_SET_ITEM(__pyx_t_6, 12, __pyx_tuple__364);
  __Pyx_INCREF(__pyx_tuple__365);
  __Pyx_GIVEREF(__pyx_tuple__365);
  PyList_SET_ITEM(__pyx_t_6, 13, __pyx_tuple__365);
  __Pyx_INCREF(__pyx_tuple__366);
  __Pyx_GIVEREF(__pyx_tuple__366);
  PyList_SET_ITEM(__pyx_t_6, 14, __pyx_tuple__366);
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_dtype), __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 747, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":766
 *     ])
 * 
 *     def __init__(self, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */
  __Pyx_TraceLine(766,0,__PYX_ERR(0, 766, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_1__init__, 0, __pyx_n_s_HitSeries___init, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__76)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__368);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_init, __pyx_t_6) < 0) __PYX_ERR(0, 766, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":773
 * 
 *     @classmethod
 *     def from_aanet(cls, hits, event_id):             # <<<<<<<<<<<<<<
 *         try:
 *             return cls(np.array([(
 */
  __Pyx_TraceLine(773,0,__PYX_ERR(0, 773, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_3from_aanet, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_HitSeries_from_aanet, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__77)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":772
 *         self.h5loc = h5loc
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_aanet(cls, hits, event_id):
 *         try:
 */
  __Pyx_TraceLine(772,0,__PYX_ERR(0, 772, __pyx_L1_error))
  __pyx_t_7 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_from_aanet, __pyx_t_7) < 0) __PYX_ERR(0, 773, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":813
 * 
 *     @classmethod
 *     def from_evt(cls, hits, event_id):             # <<<<<<<<<<<<<<
 *         return cls(np.array([(
 *             0,     # channel_id
 */
  __Pyx_TraceLine(813,0,__PYX_ERR(0, 813, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_5from_evt, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_HitSeries_from_evt, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__78)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":812
 *             ) for h in hits], dtype=cls.dtype))
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_evt(cls, hits, event_id):
 *         return cls(np.array([(
 */
  __Pyx_TraceLine(812,0,__PYX_ERR(0, 812, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_from_evt, __pyx_t_6) < 0) __PYX_ERR(0, 813, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":833
 * 
 *     @classmethod
 *     def from_arrays(cls, channel_ids, dir_xs, dir_ys, dir_zs, dom_ids, ids,             # <<<<<<<<<<<<<<
 *                     pmt_ids, pos_xs, pos_ys, pos_zs, t0s, times, tots,
 *                     triggereds, event_id):
 */
  __Pyx_TraceLine(833,0,__PYX_ERR(0, 833, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_7from_arrays, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_HitSeries_from_arrays, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__79)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":832
 *         ) for h in hits], dtype=cls.dtype))
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(cls, channel_ids, dir_xs, dir_ys, dir_zs, dom_ids, ids,
 *                     pmt_ids, pos_xs, pos_ys, pos_zs, t0s, times, tots,
 */
  __Pyx_TraceLine(832,0,__PYX_ERR(0, 832, __pyx_L1_error))
  __pyx_t_7 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_from_arrays, __pyx_t_7) < 0) __PYX_ERR(0, 833, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":860
 * 
 *     @classmethod
 *     def from_dict(cls, map, event_id):             # <<<<<<<<<<<<<<
 *         if event_id is None:
 *             event_id = map['event_id']
 */
  __Pyx_TraceLine(860,0,__PYX_ERR(0, 860, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_9from_dict, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_HitSeries_from_dict, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":859
 *         return cls(hits)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_dict(cls, map, event_id):
 *         if event_id is None:
 */
  __Pyx_TraceLine(859,0,__PYX_ERR(0, 859, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_from_dict, __pyx_t_6) < 0) __PYX_ERR(0, 860, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":882
 * 
 *     @classmethod
 *     def from_table(cls, table, event_id):             # <<<<<<<<<<<<<<
 *         if event_id is None:
 *             event_id = table[0]['event_id']
 */
  __Pyx_TraceLine(882,0,__PYX_ERR(0, 882, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_11from_table, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_HitSeries_from_table, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__81)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":881
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_table(cls, table, event_id):
 *         if event_id is None:
 */
  __Pyx_TraceLine(881,0,__PYX_ERR(0, 881, __pyx_L1_error))
  __pyx_t_7 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 881, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_from_table, __pyx_t_7) < 0) __PYX_ERR(0, 882, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":903
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(903,0,__PYX_ERR(0, 903, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_13deserialise, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_HitSeries_deserialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":902
 *         ) for row in table], dtype=cls.dtype), event_id)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)
 */
  __Pyx_TraceLine(902,0,__PYX_ERR(0, 902, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_deserialise, __pyx_t_6) < 0) __PYX_ERR(0, 903, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":906
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(906,0,__PYX_ERR(0, 906, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_15serialise, 0, __pyx_n_s_HitSeries_serialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__83)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_serialise, __pyx_t_6) < 0) __PYX_ERR(0, 906, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":910
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         # what is event_id doing here?
 *         if fmt == 'numpy':
 */
  __Pyx_TraceLine(910,0,__PYX_ERR(0, 910, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_17conv_from, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_HitSeries_conv_from, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__84)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__377);

  /* "km3pipe/dataclasses.pyx":909
 *         return self.conv_to(*args, **kwargs)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):
 *         # what is event_id doing here?
 */
  __Pyx_TraceLine(909,0,__PYX_ERR(0, 909, __pyx_L1_error))
  __pyx_t_7 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_conv_from, __pyx_t_7) < 0) __PYX_ERR(0, 910, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":917
 *             return cls(data.to_records(index=False))
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 */
  __Pyx_TraceLine(917,0,__PYX_ERR(0, 917, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_19conv_to, 0, __pyx_n_s_HitSeries_conv_to, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__85)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_tuple__379);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_conv_to, __pyx_t_7) < 0) __PYX_ERR(0, 917, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":924
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */
  __Pyx_TraceLine(924,0,__PYX_ERR(0, 924, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_21__array__, 0, __pyx_n_s_HitSeries___array, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__86)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_array_2, __pyx_t_7) < 0) __PYX_ERR(0, 924, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":927
 *         return self._arr
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __Pyx_TraceLine(927,0,__PYX_ERR(0, 927, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_23__iter__, 0, __pyx_n_s_HitSeries___iter, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__87)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_iter, __pyx_t_7) < 0) __PYX_ERR(0, 927, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":931
 * 
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         return self._arr['id']
 * 
 */
  __Pyx_TraceLine(931,0,__PYX_ERR(0, 931, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_25id, 0, __pyx_n_s_HitSeries_id, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__88)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":930
 *         return self
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def id(self):
 *         return self._arr['id']
 */
  __Pyx_TraceLine(930,0,__PYX_ERR(0, 930, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_id, __pyx_t_7) < 0) __PYX_ERR(0, 931, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":935
 * 
 *     @property
 *     def time(self):             # <<<<<<<<<<<<<<
 *         return self._arr['time']
 * 
 */
  __Pyx_TraceLine(935,0,__PYX_ERR(0, 935, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_27time, 0, __pyx_n_s_HitSeries_time, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__89)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":934
 *         return self._arr['id']
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def time(self):
 *         return self._arr['time']
 */
  __Pyx_TraceLine(934,0,__PYX_ERR(0, 934, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_time, __pyx_t_7) < 0) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":939
 * 
 *     @property
 *     def triggered_hits(self):             # <<<<<<<<<<<<<<
 *         return HitSeries(self._arr[self._arr['triggered'] == True])     # noqa
 * 
 */
  __Pyx_TraceLine(939,0,__PYX_ERR(0, 939, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_29triggered_hits, 0, __pyx_n_s_HitSeries_triggered_hits, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__90)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":938
 *         return self._arr['time']
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def triggered_hits(self):
 *         return HitSeries(self._arr[self._arr['triggered'] == True])     # noqa
 */
  __Pyx_TraceLine(938,0,__PYX_ERR(0, 938, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_triggered_hits, __pyx_t_7) < 0) __PYX_ERR(0, 939, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":943
 * 
 *     @property
 *     def first_hits(self):             # <<<<<<<<<<<<<<
 *         h = self.conv_to(to='pandas')
 *         h.sort_values('time', inplace=True)
 */
  __Pyx_TraceLine(943,0,__PYX_ERR(0, 943, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_31first_hits, 0, __pyx_n_s_HitSeries_first_hits, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__91)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":942
 *         return HitSeries(self._arr[self._arr['triggered'] == True])     # noqa
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def first_hits(self):
 *         h = self.conv_to(to='pandas')
 */
  __Pyx_TraceLine(942,0,__PYX_ERR(0, 942, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_first_hits, __pyx_t_7) < 0) __PYX_ERR(0, 943, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":950
 * 
 *     @property
 *     def triggered(self):             # <<<<<<<<<<<<<<
 *         return self._arr['triggered']
 * 
 */
  __Pyx_TraceLine(950,0,__PYX_ERR(0, 950, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_33triggered, 0, __pyx_n_s_HitSeries_triggered, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__93)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":949
 *         return HitSeries(h.to_records(index=False))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def triggered(self):
 *         return self._arr['triggered']
 */
  __Pyx_TraceLine(949,0,__PYX_ERR(0, 949, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_triggered, __pyx_t_7) < 0) __PYX_ERR(0, 950, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":954
 * 
 *     @property
 *     def tot(self):             # <<<<<<<<<<<<<<
 *         return self._arr['tot']
 * 
 */
  __Pyx_TraceLine(954,0,__PYX_ERR(0, 954, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_35tot, 0, __pyx_n_s_HitSeries_tot, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__94)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":953
 *         return self._arr['triggered']
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def tot(self):
 *         return self._arr['tot']
 */
  __Pyx_TraceLine(953,0,__PYX_ERR(0, 953, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_tot, __pyx_t_7) < 0) __PYX_ERR(0, 954, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":958
 * 
 *     @property
 *     def dom_id(self):             # <<<<<<<<<<<<<<
 *         return self._arr['dom_id']
 * 
 */
  __Pyx_TraceLine(958,0,__PYX_ERR(0, 958, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_37dom_id, 0, __pyx_n_s_HitSeries_dom_id, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__95)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":957
 *         return self._arr['tot']
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def dom_id(self):
 *         return self._arr['dom_id']
 */
  __Pyx_TraceLine(957,0,__PYX_ERR(0, 957, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_dom_id, __pyx_t_7) < 0) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":962
 * 
 *     @property
 *     def pmt_id(self):             # <<<<<<<<<<<<<<
 *         return self._arr['pmt_id']
 * 
 */
  __Pyx_TraceLine(962,0,__PYX_ERR(0, 962, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_39pmt_id, 0, __pyx_n_s_HitSeries_pmt_id, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__96)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":961
 *         return self._arr['dom_id']
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def pmt_id(self):
 *         return self._arr['pmt_id']
 */
  __Pyx_TraceLine(961,0,__PYX_ERR(0, 961, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_pmt_id, __pyx_t_7) < 0) __PYX_ERR(0, 962, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":966
 * 
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         return self._arr['id']
 * 
 */
  __Pyx_TraceLine(966,0,__PYX_ERR(0, 966, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_41id, 0, __pyx_n_s_HitSeries_id, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__97)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":965
 *         return self._arr['pmt_id']
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def id(self):
 *         return self._arr['id']
 */
  __Pyx_TraceLine(965,0,__PYX_ERR(0, 965, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_id, __pyx_t_7) < 0) __PYX_ERR(0, 966, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":970
 * 
 *     @property
 *     def channel_id(self):             # <<<<<<<<<<<<<<
 *         return self._arr['channel_id']
 * 
 */
  __Pyx_TraceLine(970,0,__PYX_ERR(0, 970, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_43channel_id, 0, __pyx_n_s_HitSeries_channel_id, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__98)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":969
 *         return self._arr['id']
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def channel_id(self):
 *         return self._arr['channel_id']
 */
  __Pyx_TraceLine(969,0,__PYX_ERR(0, 969, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_channel_id, __pyx_t_7) < 0) __PYX_ERR(0, 970, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":974
 * 
 *     @property
 *     def pos_x(self):             # <<<<<<<<<<<<<<
 *         return self._arr['pos_x']
 * 
 */
  __Pyx_TraceLine(974,0,__PYX_ERR(0, 974, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_45pos_x, 0, __pyx_n_s_HitSeries_pos_x, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__99)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":973
 *         return self._arr['channel_id']
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def pos_x(self):
 *         return self._arr['pos_x']
 */
  __Pyx_TraceLine(973,0,__PYX_ERR(0, 973, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_pos_x, __pyx_t_7) < 0) __PYX_ERR(0, 974, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":978
 * 
 *     @property
 *     def pos_y(self):             # <<<<<<<<<<<<<<
 *         return self._arr['pos_y']
 * 
 */
  __Pyx_TraceLine(978,0,__PYX_ERR(0, 978, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_47pos_y, 0, __pyx_n_s_HitSeries_pos_y, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__100)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":977
 *         return self._arr['pos_x']
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def pos_y(self):
 *         return self._arr['pos_y']
 */
  __Pyx_TraceLine(977,0,__PYX_ERR(0, 977, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_pos_y, __pyx_t_7) < 0) __PYX_ERR(0, 978, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":982
 * 
 *     @property
 *     def pos_z(self):             # <<<<<<<<<<<<<<
 *         return self._arr['pos_z']
 * 
 */
  __Pyx_TraceLine(982,0,__PYX_ERR(0, 982, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_49pos_z, 0, __pyx_n_s_HitSeries_pos_z, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__101)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 982, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":981
 *         return self._arr['pos_y']
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def pos_z(self):
 *         return self._arr['pos_z']
 */
  __Pyx_TraceLine(981,0,__PYX_ERR(0, 981, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 981, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 981, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_pos_z, __pyx_t_7) < 0) __PYX_ERR(0, 982, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":986
 * 
 *     @property
 *     def dir_x(self):             # <<<<<<<<<<<<<<
 *         return self._arr['dir_x']
 * 
 */
  __Pyx_TraceLine(986,0,__PYX_ERR(0, 986, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_51dir_x, 0, __pyx_n_s_HitSeries_dir_x, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__102)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":985
 *         return self._arr['pos_z']
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def dir_x(self):
 *         return self._arr['dir_x']
 */
  __Pyx_TraceLine(985,0,__PYX_ERR(0, 985, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_dir_x, __pyx_t_7) < 0) __PYX_ERR(0, 986, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":990
 * 
 *     @property
 *     def dir_y(self):             # <<<<<<<<<<<<<<
 *         return self._arr['dir_y']
 * 
 */
  __Pyx_TraceLine(990,0,__PYX_ERR(0, 990, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_53dir_y, 0, __pyx_n_s_HitSeries_dir_y, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__103)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 990, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":989
 *         return self._arr['dir_x']
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def dir_y(self):
 *         return self._arr['dir_y']
 */
  __Pyx_TraceLine(989,0,__PYX_ERR(0, 989, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_dir_y, __pyx_t_7) < 0) __PYX_ERR(0, 990, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":994
 * 
 *     @property
 *     def dir_z(self):             # <<<<<<<<<<<<<<
 *         return self._arr['dir_z']
 * 
 */
  __Pyx_TraceLine(994,0,__PYX_ERR(0, 994, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_55dir_z, 0, __pyx_n_s_HitSeries_dir_z, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__104)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":993
 *         return self._arr['dir_y']
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def dir_z(self):
 *         return self._arr['dir_z']
 */
  __Pyx_TraceLine(993,0,__PYX_ERR(0, 993, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_dir_z, __pyx_t_7) < 0) __PYX_ERR(0, 994, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":998
 * 
 *     @property
 *     def t0(self):             # <<<<<<<<<<<<<<
 *         return self._arr['t0']
 * 
 */
  __Pyx_TraceLine(998,0,__PYX_ERR(0, 998, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_57t0, 0, __pyx_n_s_HitSeries_t0, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__105)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 998, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":997
 *         return self._arr['dir_z']
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def t0(self):
 *         return self._arr['t0']
 */
  __Pyx_TraceLine(997,0,__PYX_ERR(0, 997, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 997, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 997, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_t0, __pyx_t_7) < 0) __PYX_ERR(0, 998, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1001
 *         return self._arr['t0']
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */
  __Pyx_TraceLine(1001,0,__PYX_ERR(0, 1001, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_59next, 0, __pyx_n_s_HitSeries_next, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__106)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1001, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_next_2, __pyx_t_7) < 0) __PYX_ERR(0, 1001, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1005
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */
  __Pyx_TraceLine(1005,0,__PYX_ERR(0, 1005, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_61__next__, 0, __pyx_n_s_HitSeries___next, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__107)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1005, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_next, __pyx_t_7) < 0) __PYX_ERR(0, 1005, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1013
 *         return hit
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */
  __Pyx_TraceLine(1013,0,__PYX_ERR(0, 1013, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_63__len__, 0, __pyx_n_s_HitSeries___len, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__108)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_len_2, __pyx_t_7) < 0) __PYX_ERR(0, 1013, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1016
 *         return self._arr.shape[0]
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             hit = Hit(*self._arr[index])
 */
  __Pyx_TraceLine(1016,0,__PYX_ERR(0, 1016, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_65__getitem__, 0, __pyx_n_s_HitSeries___getitem, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__109)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1016, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_getitem, __pyx_t_7) < 0) __PYX_ERR(0, 1016, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1025
 *             raise TypeError("index must be int or slice")
 * 
 *     def _slice_generator(self, index):             # <<<<<<<<<<<<<<
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 */
  __Pyx_TraceLine(1025,0,__PYX_ERR(0, 1025, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_67_slice_generator, 0, __pyx_n_s_HitSeries__slice_generator, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__111)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1025, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_slice_generator, __pyx_t_7) < 0) __PYX_ERR(0, 1025, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1031
 *             yield Hit(*self._arr[i])
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 */
  __Pyx_TraceLine(1031,0,__PYX_ERR(0, 1031, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_70__str__, 0, __pyx_n_s_HitSeries___str, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__112)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1031, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_str, __pyx_t_7) < 0) __PYX_ERR(0, 1031, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1036
 *         return("HitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __Pyx_TraceLine(1036,0,__PYX_ERR(0, 1036, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_72__repr__, 0, __pyx_n_s_HitSeries___repr, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__114)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_repr, __pyx_t_7) < 0) __PYX_ERR(0, 1036, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1039
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return '\n'.join([str(hit) for hit in self._hits])
 * 
 */
  __Pyx_TraceLine(1039,0,__PYX_ERR(0, 1039, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_74__insp__, 0, __pyx_n_s_HitSeries___insp, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__115)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1039, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_insp, __pyx_t_7) < 0) __PYX_ERR(0, 1039, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":744
 * 
 * 
 * class HitSeries(object):             # <<<<<<<<<<<<<<
 *     """Collection of multiple Hits.
 *     """
 */
  __Pyx_TraceLine(744,0,__PYX_ERR(0, 744, __pyx_L1_error))
  __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_HitSeries, __pyx_t_1, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 744, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_HitSeries, __pyx_t_7) < 0) __PYX_ERR(0, 744, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":1043
 * 
 * 
 * class TimesliceHitSeries(object):             # <<<<<<<<<<<<<<
 *     """Collection of multiple timeslice hits.
 *     """
 */
  __Pyx_TraceLine(1043,0,__PYX_ERR(0, 1043, __pyx_L1_error))
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_object);
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_TimesliceHitSeries, __pyx_n_s_TimesliceHitSeries, (PyObject *) NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_kp_s_Collection_of_multiple_timeslice); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "km3pipe/dataclasses.pyx":1046
 *     """Collection of multiple timeslice hits.
 *     """
 *     dtype = np.dtype([             # <<<<<<<<<<<<<<
 *         ('channel_id', 'u1'),
 *         ('dom_id', '<u4'),
 */
  __Pyx_TraceLine(1046,0,__PYX_ERR(0, 1046, __pyx_L1_error))
  __pyx_t_7 = PyList_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_tuple__407);
  __Pyx_GIVEREF(__pyx_tuple__407);
  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_tuple__407);
  __Pyx_INCREF(__pyx_tuple__408);
  __Pyx_GIVEREF(__pyx_tuple__408);
  PyList_SET_ITEM(__pyx_t_7, 1, __pyx_tuple__408);
  __Pyx_INCREF(__pyx_tuple__409);
  __Pyx_GIVEREF(__pyx_tuple__409);
  PyList_SET_ITEM(__pyx_t_7, 2, __pyx_tuple__409);
  __Pyx_INCREF(__pyx_tuple__410);
  __Pyx_GIVEREF(__pyx_tuple__410);
  PyList_SET_ITEM(__pyx_t_7, 3, __pyx_tuple__410);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_dtype), __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1053
 *     ])
 * 
 *     def __init__(self, arr, slice_id, frame_id):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */
  __Pyx_TraceLine(1053,0,__PYX_ERR(0, 1053, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_1__init__, 0, __pyx_n_s_TimesliceHitSeries___init, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__117)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1053, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_init, __pyx_t_7) < 0) __PYX_ERR(0, 1053, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1061
 * 
 *     @property
 *     def h5loc(self):             # <<<<<<<<<<<<<<
 *         return "/timeslices/slice_{0}".format(self.slice_id)
 * 
 */
  __Pyx_TraceLine(1061,0,__PYX_ERR(0, 1061, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_3h5loc, 0, __pyx_n_s_TimesliceHitSeries_h5loc, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__118)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":1060
 *         self.frame_id = frame_id
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def h5loc(self):
 *         return "/timeslices/slice_{0}".format(self.slice_id)
 */
  __Pyx_TraceLine(1060,0,__PYX_ERR(0, 1060, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_h5loc, __pyx_t_7) < 0) __PYX_ERR(0, 1061, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1065
 * 
 *     @property
 *     def tabname(self):             # <<<<<<<<<<<<<<
 *         return "frame_{0}".format(self.frame_id)
 * 
 */
  __Pyx_TraceLine(1065,0,__PYX_ERR(0, 1065, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_5tabname, 0, __pyx_n_s_TimesliceHitSeries_tabname, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__119)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":1064
 *         return "/timeslices/slice_{0}".format(self.slice_id)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def tabname(self):
 *         return "frame_{0}".format(self.frame_id)
 */
  __Pyx_TraceLine(1064,0,__PYX_ERR(0, 1064, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_tabname, __pyx_t_7) < 0) __PYX_ERR(0, 1065, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1069
 * 
 *     @classmethod
 *     def from_arrays(cls, channel_ids, dom_ids, times, tots, slice_id,             # <<<<<<<<<<<<<<
 *                     frame_id):
 *         len = channel_ids.shape[0]
 */
  __Pyx_TraceLine(1069,0,__PYX_ERR(0, 1069, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_7from_arrays, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_TimesliceHitSeries_from_arrays, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__120)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":1068
 *         return "frame_{0}".format(self.frame_id)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(cls, channel_ids, dom_ids, times, tots, slice_id,
 *                     frame_id):
 */
  __Pyx_TraceLine(1068,0,__PYX_ERR(0, 1068, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1068, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_from_arrays, __pyx_t_6) < 0) __PYX_ERR(0, 1069, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1080
 * 
 *     @classmethod
 *     def from_dict(cls, map, slice_id, frame_id):             # <<<<<<<<<<<<<<
 *         return cls.from_arrays(
 *             map['channel_id'],
 */
  __Pyx_TraceLine(1080,0,__PYX_ERR(0, 1080, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_9from_dict, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_TimesliceHitSeries_from_dict, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__121)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1080, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1079
 *         return cls(hits, slice_id, frame_id)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_dict(cls, map, slice_id, frame_id):
 *         return cls.from_arrays(
 */
  __Pyx_TraceLine(1079,0,__PYX_ERR(0, 1079, __pyx_L1_error))
  __pyx_t_7 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_from_dict, __pyx_t_7) < 0) __PYX_ERR(0, 1080, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1090
 *         )
 * 
 *     def from_table(cls, table, slice_id, frame_id):             # <<<<<<<<<<<<<<
 *         return cls(np.array([(
 *             row['channel_id'],
 */
  __Pyx_TraceLine(1090,0,__PYX_ERR(0, 1090, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_11from_table, 0, __pyx_n_s_TimesliceHitSeries_from_table, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__122)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1090, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_from_table, __pyx_t_7) < 0) __PYX_ERR(0, 1090, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1099
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(1099,0,__PYX_ERR(0, 1099, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_13deserialise, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_TimesliceHitSeries_deserialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__123)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":1098
 *         ) for row in table], dtype=cls.dtype), slice_id, frame_id)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)
 */
  __Pyx_TraceLine(1098,0,__PYX_ERR(0, 1098, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_deserialise, __pyx_t_6) < 0) __PYX_ERR(0, 1099, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1102
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(1102,0,__PYX_ERR(0, 1102, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_15serialise, 0, __pyx_n_s_TimesliceHitSeries_serialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__124)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_serialise, __pyx_t_6) < 0) __PYX_ERR(0, 1102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1106
 * 
 *     @classmethod
 *     def conv_from(cls, data, slice_id, frame_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             # return cls.from_table(data, frame_id)
 */
  __Pyx_TraceLine(1106,0,__PYX_ERR(0, 1106, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_17conv_from, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_TimesliceHitSeries_conv_from, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__125)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__420);

  /* "km3pipe/dataclasses.pyx":1105
 *         return self.conv_to(*args, **kwargs)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def conv_from(cls, data, slice_id, frame_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':
 */
  __Pyx_TraceLine(1105,0,__PYX_ERR(0, 1105, __pyx_L1_error))
  __pyx_t_7 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_conv_from, __pyx_t_7) < 0) __PYX_ERR(0, 1106, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1111
 *             return cls(data, slice_id, frame_id)
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 */
  __Pyx_TraceLine(1111,0,__PYX_ERR(0, 1111, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_19conv_to, 0, __pyx_n_s_TimesliceHitSeries_conv_to, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__126)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_tuple__422);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_conv_to, __pyx_t_7) < 0) __PYX_ERR(0, 1111, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1118
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */
  __Pyx_TraceLine(1118,0,__PYX_ERR(0, 1118, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_21__array__, 0, __pyx_n_s_TimesliceHitSeries___array, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__127)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_array_2, __pyx_t_7) < 0) __PYX_ERR(0, 1118, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1121
 *         return self._arr
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __Pyx_TraceLine(1121,0,__PYX_ERR(0, 1121, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_23__iter__, 0, __pyx_n_s_TimesliceHitSeries___iter, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__128)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_iter, __pyx_t_7) < 0) __PYX_ERR(0, 1121, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1125
 * 
 *     @property
 *     def time(self):             # <<<<<<<<<<<<<<
 *         return self._arr['time']
 * 
 */
  __Pyx_TraceLine(1125,0,__PYX_ERR(0, 1125, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_25time, 0, __pyx_n_s_TimesliceHitSeries_time, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__129)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":1124
 *         return self
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def time(self):
 *         return self._arr['time']
 */
  __Pyx_TraceLine(1124,0,__PYX_ERR(0, 1124, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_time, __pyx_t_7) < 0) __PYX_ERR(0, 1125, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1129
 * 
 *     @property
 *     def tot(self):             # <<<<<<<<<<<<<<
 *         return self._arr['tot']
 * 
 */
  __Pyx_TraceLine(1129,0,__PYX_ERR(0, 1129, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_27tot, 0, __pyx_n_s_TimesliceHitSeries_tot, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__130)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":1128
 *         return self._arr['time']
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def tot(self):
 *         return self._arr['tot']
 */
  __Pyx_TraceLine(1128,0,__PYX_ERR(0, 1128, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_tot, __pyx_t_7) < 0) __PYX_ERR(0, 1129, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1133
 * 
 *     @property
 *     def dom_id(self):             # <<<<<<<<<<<<<<
 *         return self._arr['dom_id']
 * 
 */
  __Pyx_TraceLine(1133,0,__PYX_ERR(0, 1133, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_29dom_id, 0, __pyx_n_s_TimesliceHitSeries_dom_id, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__131)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":1132
 *         return self._arr['tot']
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def dom_id(self):
 *         return self._arr['dom_id']
 */
  __Pyx_TraceLine(1132,0,__PYX_ERR(0, 1132, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_dom_id, __pyx_t_7) < 0) __PYX_ERR(0, 1133, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1137
 * 
 *     @property
 *     def channel_id(self):             # <<<<<<<<<<<<<<
 *         return self._arr['channel_id']
 * 
 */
  __Pyx_TraceLine(1137,0,__PYX_ERR(0, 1137, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_31channel_id, 0, __pyx_n_s_TimesliceHitSeries_channel_id, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__132)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":1136
 *         return self._arr['dom_id']
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def channel_id(self):
 *         return self._arr['channel_id']
 */
  __Pyx_TraceLine(1136,0,__PYX_ERR(0, 1136, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_channel_id, __pyx_t_7) < 0) __PYX_ERR(0, 1137, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1140
 *         return self._arr['channel_id']
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */
  __Pyx_TraceLine(1140,0,__PYX_ERR(0, 1140, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_33next, 0, __pyx_n_s_TimesliceHitSeries_next, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__133)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_next_2, __pyx_t_7) < 0) __PYX_ERR(0, 1140, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1144
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */
  __Pyx_TraceLine(1144,0,__PYX_ERR(0, 1144, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_35__next__, 0, __pyx_n_s_TimesliceHitSeries___next, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__134)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_next, __pyx_t_7) < 0) __PYX_ERR(0, 1144, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1152
 *         return hits
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */
  __Pyx_TraceLine(1152,0,__PYX_ERR(0, 1152, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_37__len__, 0, __pyx_n_s_TimesliceHitSeries___len, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__135)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_len_2, __pyx_t_7) < 0) __PYX_ERR(0, 1152, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1155
 *         return self._arr.shape[0]
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             return TimesliceHit(*self._arr[index])
 */
  __Pyx_TraceLine(1155,0,__PYX_ERR(0, 1155, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_39__getitem__, 0, __pyx_n_s_TimesliceHitSeries___getitem, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__136)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_getitem, __pyx_t_7) < 0) __PYX_ERR(0, 1155, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1163
 *             raise TypeError("index must be int or slice")
 * 
 *     def _slice_generator(self, index):             # <<<<<<<<<<<<<<
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 */
  __Pyx_TraceLine(1163,0,__PYX_ERR(0, 1163, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_41_slice_generator, 0, __pyx_n_s_TimesliceHitSeries__slice_genera, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__138)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_slice_generator, __pyx_t_7) < 0) __PYX_ERR(0, 1163, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1169
 *             yield TimesliceHit(*self._arr[i])
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 */
  __Pyx_TraceLine(1169,0,__PYX_ERR(0, 1169, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_44__str__, 0, __pyx_n_s_TimesliceHitSeries___str, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__139)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_str, __pyx_t_7) < 0) __PYX_ERR(0, 1169, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1174
 *         return("TimesliceHitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __Pyx_TraceLine(1174,0,__PYX_ERR(0, 1174, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_46__repr__, 0, __pyx_n_s_TimesliceHitSeries___repr, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__140)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_repr, __pyx_t_7) < 0) __PYX_ERR(0, 1174, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1177
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return '\n'.join([str(hit) for hit in self._hits])
 * 
 */
  __Pyx_TraceLine(1177,0,__PYX_ERR(0, 1177, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_48__insp__, 0, __pyx_n_s_TimesliceHitSeries___insp, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__141)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_insp, __pyx_t_7) < 0) __PYX_ERR(0, 1177, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1043
 * 
 * 
 * class TimesliceHitSeries(object):             # <<<<<<<<<<<<<<
 *     """Collection of multiple timeslice hits.
 *     """
 */
  __Pyx_TraceLine(1043,0,__PYX_ERR(0, 1043, __pyx_L1_error))
  __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_TimesliceHitSeries, __pyx_t_1, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TimesliceHitSeries, __pyx_t_7) < 0) __PYX_ERR(0, 1043, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":1181
 * 
 * 
 * class TrackSeries(object):             # <<<<<<<<<<<<<<
 *     """Collection of multiple Tracks.
 * 
 */
  __Pyx_TraceLine(1181,0,__PYX_ERR(0, 1181, __pyx_L1_error))
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_object);
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_TrackSeries, __pyx_n_s_TrackSeries, (PyObject *) NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_kp_s_Collection_of_multiple_Tracks_At); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "km3pipe/dataclasses.pyx":1188
 *     dtype: datatype of array representation
 *     """
 *     dtype = np.dtype([             # <<<<<<<<<<<<<<
 *         ('bjorkeny', '<f8'),
 *         ('dir_x', '<f8'),
 */
  __Pyx_TraceLine(1188,0,__PYX_ERR(0, 1188, __pyx_L1_error))
  __pyx_t_7 = PyList_New(15); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_tuple__437);
  __Pyx_GIVEREF(__pyx_tuple__437);
  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_tuple__437);
  __Pyx_INCREF(__pyx_tuple__438);
  __Pyx_GIVEREF(__pyx_tuple__438);
  PyList_SET_ITEM(__pyx_t_7, 1, __pyx_tuple__438);
  __Pyx_INCREF(__pyx_tuple__439);
  __Pyx_GIVEREF(__pyx_tuple__439);
  PyList_SET_ITEM(__pyx_t_7, 2, __pyx_tuple__439);
  __Pyx_INCREF(__pyx_tuple__440);
  __Pyx_GIVEREF(__pyx_tuple__440);
  PyList_SET_ITEM(__pyx_t_7, 3, __pyx_tuple__440);
  __Pyx_INCREF(__pyx_tuple__441);
  __Pyx_GIVEREF(__pyx_tuple__441);
  PyList_SET_ITEM(__pyx_t_7, 4, __pyx_tuple__441);
  __Pyx_INCREF(__pyx_tuple__442);
  __Pyx_GIVEREF(__pyx_tuple__442);
  PyList_SET_ITEM(__pyx_t_7, 5, __pyx_tuple__442);
  __Pyx_INCREF(__pyx_tuple__443);
  __Pyx_GIVEREF(__pyx_tuple__443);
  PyList_SET_ITEM(__pyx_t_7, 6, __pyx_tuple__443);
  __Pyx_INCREF(__pyx_tuple__444);
  __Pyx_GIVEREF(__pyx_tuple__444);
  PyList_SET_ITEM(__pyx_t_7, 7, __pyx_tuple__444);
  __Pyx_INCREF(__pyx_tuple__445);
  __Pyx_GIVEREF(__pyx_tuple__445);
  PyList_SET_ITEM(__pyx_t_7, 8, __pyx_tuple__445);
  __Pyx_INCREF(__pyx_tuple__446);
  __Pyx_GIVEREF(__pyx_tuple__446);
  PyList_SET_ITEM(__pyx_t_7, 9, __pyx_tuple__446);
  __Pyx_INCREF(__pyx_tuple__447);
  __Pyx_GIVEREF(__pyx_tuple__447);
  PyList_SET_ITEM(__pyx_t_7, 10, __pyx_tuple__447);
  __Pyx_INCREF(__pyx_tuple__448);
  __Pyx_GIVEREF(__pyx_tuple__448);
  PyList_SET_ITEM(__pyx_t_7, 11, __pyx_tuple__448);
  __Pyx_INCREF(__pyx_tuple__449);
  __Pyx_GIVEREF(__pyx_tuple__449);
  PyList_SET_ITEM(__pyx_t_7, 12, __pyx_tuple__449);
  __Pyx_INCREF(__pyx_tuple__450);
  __Pyx_GIVEREF(__pyx_tuple__450);
  PyList_SET_ITEM(__pyx_t_7, 13, __pyx_tuple__450);
  __Pyx_INCREF(__pyx_tuple__451);
  __Pyx_GIVEREF(__pyx_tuple__451);
  PyList_SET_ITEM(__pyx_t_7, 14, __pyx_tuple__451);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_dtype), __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1207
 *     ])
 * 
 *     def __init__(self, tracks, event_id, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._bjorkeny = None
 *         self._dir = None
 */
  __Pyx_TraceLine(1207,0,__PYX_ERR(0, 1207, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_1__init__, 0, __pyx_n_s_TrackSeries___init, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__142)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_tuple__453);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_init, __pyx_t_7) < 0) __PYX_ERR(0, 1207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1225
 * 
 *     @classmethod
 *     def from_aanet(cls, tracks, event_id):             # <<<<<<<<<<<<<<
 *         return cls([Track(cls.get_usr_item(t, 1),               # bjorkeny
 *                           Direction((t.dir.x, t.dir.y, t.dir.z)),
 */
  __Pyx_TraceLine(1225,0,__PYX_ERR(0, 1225, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_3from_aanet, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_TrackSeries_from_aanet, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__143)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":1224
 *         self.h5loc = h5loc
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_aanet(cls, tracks, event_id):
 *         return cls([Track(cls.get_usr_item(t, 1),               # bjorkeny
 */
  __Pyx_TraceLine(1224,0,__PYX_ERR(0, 1224, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_from_aanet, __pyx_t_6) < 0) __PYX_ERR(0, 1225, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1248
 * 
 *     @classmethod
 *     def from_arrays(cls,             # <<<<<<<<<<<<<<
 *                     bjorkenys,
 *                     directions_x,
 */
  __Pyx_TraceLine(1248,0,__PYX_ERR(0, 1248, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_5from_arrays, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_TrackSeries_from_arrays, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__144)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1247
 *                     for t in tracks], event_id)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(cls,
 *                     bjorkenys,
 */
  __Pyx_TraceLine(1247,0,__PYX_ERR(0, 1247, __pyx_L1_error))
  __pyx_t_7 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_from_arrays, __pyx_t_7) < 0) __PYX_ERR(0, 1248, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1287
 * 
 *     @classmethod
 *     def from_km3df(cls, km3df):             # <<<<<<<<<<<<<<
 *         return cls.from_table(km3df.conv_to(to='numpy'),
 *                               event_id=int(km3df['event_id']))
 */
  __Pyx_TraceLine(1287,0,__PYX_ERR(0, 1287, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_7from_km3df, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_TrackSeries_from_km3df, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__145)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":1286
 *         return tracks
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_km3df(cls, km3df):
 *         return cls.from_table(km3df.conv_to(to='numpy'),
 */
  __Pyx_TraceLine(1286,0,__PYX_ERR(0, 1286, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_from_km3df, __pyx_t_6) < 0) __PYX_ERR(0, 1287, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1292
 * 
 *     @classmethod
 *     def from_table(cls, table, event_id):             # <<<<<<<<<<<<<<
 *         return cls([Track(
 *             row['bjorkeny'],
 */
  __Pyx_TraceLine(1292,0,__PYX_ERR(0, 1292, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_9from_table, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_TrackSeries_from_table, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__146)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1291
 *                               event_id=int(km3df['event_id']))
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_table(cls, table, event_id):
 *         return cls([Track(
 */
  __Pyx_TraceLine(1291,0,__PYX_ERR(0, 1291, __pyx_L1_error))
  __pyx_t_7 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_from_table, __pyx_t_7) < 0) __PYX_ERR(0, 1292, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1307
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(1307,0,__PYX_ERR(0, 1307, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_11deserialise, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_TrackSeries_deserialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__147)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":1306
 *         ) for row in table], event_id)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)
 */
  __Pyx_TraceLine(1306,0,__PYX_ERR(0, 1306, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_deserialise, __pyx_t_6) < 0) __PYX_ERR(0, 1307, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1310
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(1310,0,__PYX_ERR(0, 1310, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_13serialise, 0, __pyx_n_s_TrackSeries_serialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__148)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_serialise, __pyx_t_6) < 0) __PYX_ERR(0, 1310, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1314
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data, event_id)
 */
  __Pyx_TraceLine(1314,0,__PYX_ERR(0, 1314, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_15conv_from, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_TrackSeries_conv_from, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__149)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__461);

  /* "km3pipe/dataclasses.pyx":1313
 *         return self.conv_to(*args, **kwargs)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':
 */
  __Pyx_TraceLine(1313,0,__PYX_ERR(0, 1313, __pyx_L1_error))
  __pyx_t_7 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_conv_from, __pyx_t_7) < 0) __PYX_ERR(0, 1314, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1318
 *             return cls.from_table(data, event_id)
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 */
  __Pyx_TraceLine(1318,0,__PYX_ERR(0, 1318, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_17conv_to, 0, __pyx_n_s_TrackSeries_conv_to, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__150)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_tuple__463);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_conv_to, __pyx_t_7) < 0) __PYX_ERR(0, 1318, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1325
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return [(
 *             t.bjorkeny, t.dir[0], t.dir[1], t.dir[2], t.energy,
 */
  __Pyx_TraceLine(1325,0,__PYX_ERR(0, 1325, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_19__array__, 0, __pyx_n_s_TrackSeries___array, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__151)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_array_2, __pyx_t_7) < 0) __PYX_ERR(0, 1325, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1334
 * 
 *     @classmethod
 *     def get_len(cls, track):             # <<<<<<<<<<<<<<
 *         try:
 *             return track.len
 */
  __Pyx_TraceLine(1334,0,__PYX_ERR(0, 1334, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_21get_len, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_TrackSeries_get_len, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__152)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":1333
 *         ) for t in self._tracks]
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def get_len(cls, track):
 *         try:
 */
  __Pyx_TraceLine(1333,0,__PYX_ERR(0, 1333, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_get_len, __pyx_t_6) < 0) __PYX_ERR(0, 1334, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1341
 * 
 *     @classmethod
 *     def get_usr_item(cls, track, index):             # <<<<<<<<<<<<<<
 *         try:
 *             item = track.usr[index]
 */
  __Pyx_TraceLine(1341,0,__PYX_ERR(0, 1341, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_23get_usr_item, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_TrackSeries_get_usr_item, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__153)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1341, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1340
 *             return 0
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def get_usr_item(cls, track, index):
 *         try:
 */
  __Pyx_TraceLine(1340,0,__PYX_ERR(0, 1340, __pyx_L1_error))
  __pyx_t_7 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1340, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_get_usr_item, __pyx_t_7) < 0) __PYX_ERR(0, 1341, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1349
 * 
 *     @property
 *     def highest_energetic_muon(self):             # <<<<<<<<<<<<<<
 *         if self._highest_energetic_muon is None:
 *             muons = [track for track in self if abs(track.type) == 13]
 */
  __Pyx_TraceLine(1349,0,__PYX_ERR(0, 1349, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_25highest_energetic_muon, 0, __pyx_n_s_TrackSeries_highest_energetic_mu_2, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__154)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":1348
 *         return item
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def highest_energetic_muon(self):
 *         if self._highest_energetic_muon is None:
 */
  __Pyx_TraceLine(1348,0,__PYX_ERR(0, 1348, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_highest_energetic_muon_2, __pyx_t_7) < 0) __PYX_ERR(0, 1349, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1357
 *         return self._highest_energetic_muon
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __Pyx_TraceLine(1357,0,__PYX_ERR(0, 1357, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_27__iter__, 0, __pyx_n_s_TrackSeries___iter, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__156)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_iter, __pyx_t_7) < 0) __PYX_ERR(0, 1357, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1360
 *         return self
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __Pyx_TraceLine(1360,0,__PYX_ERR(0, 1360, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_29__iter__, 0, __pyx_n_s_TrackSeries___iter, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__157)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_iter, __pyx_t_7) < 0) __PYX_ERR(0, 1360, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1364
 * 
 *     @property
 *     def bjorkeny(self):             # <<<<<<<<<<<<<<
 *         if self._bjorkeny is None:
 *             self._bjorkeny = np.array([t.bjorkeny for t in self._tracks])
 */
  __Pyx_TraceLine(1364,0,__PYX_ERR(0, 1364, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_31bjorkeny, 0, __pyx_n_s_TrackSeries_bjorkeny, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__158)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":1363
 *         return self
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def bjorkeny(self):
 *         if self._bjorkeny is None:
 */
  __Pyx_TraceLine(1363,0,__PYX_ERR(0, 1363, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_bjorkeny, __pyx_t_7) < 0) __PYX_ERR(0, 1364, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1370
 * 
 *     @property
 *     def is_cc(self):             # <<<<<<<<<<<<<<
 *         if self._is_cc is None:
 *             self._is_cc = np.array([t.is_cc for t in self._tracks])
 */
  __Pyx_TraceLine(1370,0,__PYX_ERR(0, 1370, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_33is_cc, 0, __pyx_n_s_TrackSeries_is_cc, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__159)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":1369
 *         return self._bjorkeny
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_cc(self):
 *         if self._is_cc is None:
 */
  __Pyx_TraceLine(1369,0,__PYX_ERR(0, 1369, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_is_cc, __pyx_t_7) < 0) __PYX_ERR(0, 1370, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1376
 * 
 *     @property
 *     def interaction_channel(self):             # <<<<<<<<<<<<<<
 *         if self._interaction_channel is None:
 *             self._interaction_channel = np.array([t.interaction_channel for
 */
  __Pyx_TraceLine(1376,0,__PYX_ERR(0, 1376, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_35interaction_channel, 0, __pyx_n_s_TrackSeries_interaction_channel, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__160)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":1375
 *         return self._is_cc
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def interaction_channel(self):
 *         if self._interaction_channel is None:
 */
  __Pyx_TraceLine(1375,0,__PYX_ERR(0, 1375, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_interaction_channel, __pyx_t_7) < 0) __PYX_ERR(0, 1376, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1383
 * 
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         if self._id is None:
 *             self._id = np.array([t.id for t in self._tracks])
 */
  __Pyx_TraceLine(1383,0,__PYX_ERR(0, 1383, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_37id, 0, __pyx_n_s_TrackSeries_id, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__161)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":1382
 *         return self._interaction_channel
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def id(self):
 *         if self._id is None:
 */
  __Pyx_TraceLine(1382,0,__PYX_ERR(0, 1382, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_id, __pyx_t_7) < 0) __PYX_ERR(0, 1383, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1389
 * 
 *     @property
 *     def time(self):             # <<<<<<<<<<<<<<
 *         if self._time is None:
 *             self._time = np.array([t.time for t in self._tracks])
 */
  __Pyx_TraceLine(1389,0,__PYX_ERR(0, 1389, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_39time, 0, __pyx_n_s_TrackSeries_time, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__162)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":1388
 *         return self._id
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def time(self):
 *         if self._time is None:
 */
  __Pyx_TraceLine(1388,0,__PYX_ERR(0, 1388, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_time, __pyx_t_7) < 0) __PYX_ERR(0, 1389, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1395
 * 
 *     @property
 *     def energy(self):             # <<<<<<<<<<<<<<
 *         if self._energy is None:
 *             self._energy = np.array([t.energy for t in self._tracks])
 */
  __Pyx_TraceLine(1395,0,__PYX_ERR(0, 1395, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_41energy, 0, __pyx_n_s_TrackSeries_energy, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__163)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":1394
 *         return self._time
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def energy(self):
 *         if self._energy is None:
 */
  __Pyx_TraceLine(1394,0,__PYX_ERR(0, 1394, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_energy, __pyx_t_7) < 0) __PYX_ERR(0, 1395, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1401
 * 
 *     @property
 *     def length(self):             # <<<<<<<<<<<<<<
 *         if self._length is None:
 *             self._length = np.array([t.length for t in self._tracks])
 */
  __Pyx_TraceLine(1401,0,__PYX_ERR(0, 1401, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_43length, 0, __pyx_n_s_TrackSeries_length, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__164)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":1400
 *         return self._energy
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def length(self):
 *         if self._length is None:
 */
  __Pyx_TraceLine(1400,0,__PYX_ERR(0, 1400, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_length, __pyx_t_7) < 0) __PYX_ERR(0, 1401, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1407
 * 
 *     @property
 *     def type(self):             # <<<<<<<<<<<<<<
 *         if self._type is None:
 *             self._type = np.array([t.type for t in self._tracks])
 */
  __Pyx_TraceLine(1407,0,__PYX_ERR(0, 1407, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_45type, 0, __pyx_n_s_TrackSeries_type, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__165)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":1406
 *         return self._length
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def type(self):
 *         if self._type is None:
 */
  __Pyx_TraceLine(1406,0,__PYX_ERR(0, 1406, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_type, __pyx_t_7) < 0) __PYX_ERR(0, 1407, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1413
 * 
 *     @property
 *     def pos(self):             # <<<<<<<<<<<<<<
 *         if self._pos is None:
 *             self._pos = np.array([t.pos for t in self._tracks])
 */
  __Pyx_TraceLine(1413,0,__PYX_ERR(0, 1413, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_47pos, 0, __pyx_n_s_TrackSeries_pos, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__166)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":1412
 *         return self._type
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def pos(self):
 *         if self._pos is None:
 */
  __Pyx_TraceLine(1412,0,__PYX_ERR(0, 1412, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_pos, __pyx_t_7) < 0) __PYX_ERR(0, 1413, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1419
 * 
 *     @property
 *     def dir(self):             # <<<<<<<<<<<<<<
 *         if self._dir is None:
 *             self._dir = np.array([t.dir for t in self._tracks])
 */
  __Pyx_TraceLine(1419,0,__PYX_ERR(0, 1419, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_49dir, 0, __pyx_n_s_TrackSeries_dir, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__167)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":1418
 *         return self._pos
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def dir(self):
 *         if self._dir is None:
 */
  __Pyx_TraceLine(1418,0,__PYX_ERR(0, 1418, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_dir, __pyx_t_7) < 0) __PYX_ERR(0, 1419, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1424
 *         return self._dir
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */
  __Pyx_TraceLine(1424,0,__PYX_ERR(0, 1424, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_51next, 0, __pyx_n_s_TrackSeries_next, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__168)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_next_2, __pyx_t_7) < 0) __PYX_ERR(0, 1424, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1428
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */
  __Pyx_TraceLine(1428,0,__PYX_ERR(0, 1428, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_53__next__, 0, __pyx_n_s_TrackSeries___next, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__169)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_next, __pyx_t_7) < 0) __PYX_ERR(0, 1428, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1436
 *         return item
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return len(self._tracks)
 * 
 */
  __Pyx_TraceLine(1436,0,__PYX_ERR(0, 1436, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_55__len__, 0, __pyx_n_s_TrackSeries___len, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__170)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_len_2, __pyx_t_7) < 0) __PYX_ERR(0, 1436, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1439
 *         return len(self._tracks)
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             return self._tracks[index]
 */
  __Pyx_TraceLine(1439,0,__PYX_ERR(0, 1439, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_57__getitem__, 0, __pyx_n_s_TrackSeries___getitem, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__171)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_getitem, __pyx_t_7) < 0) __PYX_ERR(0, 1439, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1447
 *             raise TypeError("index must be int or slice")
 * 
 *     def _slice_generator(self, index):             # <<<<<<<<<<<<<<
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 */
  __Pyx_TraceLine(1447,0,__PYX_ERR(0, 1447, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_59_slice_generator, 0, __pyx_n_s_TrackSeries__slice_generator, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__173)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_slice_generator, __pyx_t_7) < 0) __PYX_ERR(0, 1447, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1453
 *             yield self._tracks[i]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_tracks = len(self)
 *         plural = 's' if n_tracks > 1 or n_tracks == 0 else ''
 */
  __Pyx_TraceLine(1453,0,__PYX_ERR(0, 1453, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_62__str__, 0, __pyx_n_s_TrackSeries___str, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__174)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_str, __pyx_t_7) < 0) __PYX_ERR(0, 1453, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1458
 *         return("TrackSeries with {0} track{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __Pyx_TraceLine(1458,0,__PYX_ERR(0, 1458, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_64__repr__, 0, __pyx_n_s_TrackSeries___repr, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__175)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_repr, __pyx_t_7) < 0) __PYX_ERR(0, 1458, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1461
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return '\n'.join([str(track) for track in self._tracks])
 * 
 */
  __Pyx_TraceLine(1461,0,__PYX_ERR(0, 1461, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_66__insp__, 0, __pyx_n_s_TrackSeries___insp, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__176)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_insp, __pyx_t_7) < 0) __PYX_ERR(0, 1461, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1181
 * 
 * 
 * class TrackSeries(object):             # <<<<<<<<<<<<<<
 *     """Collection of multiple Tracks.
 * 
 */
  __Pyx_TraceLine(1181,0,__PYX_ERR(0, 1181, __pyx_L1_error))
  __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_TrackSeries, __pyx_t_1, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TrackSeries, __pyx_t_7) < 0) __PYX_ERR(0, 1181, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":1465
 * 
 * 
 * class SummaryframeSeries(object):             # <<<<<<<<<<<<<<
 *     """Collection of summary frames.
 *     """
 */
  __Pyx_TraceLine(1465,0,__PYX_ERR(0, 1465, __pyx_L1_error))
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_object);
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_SummaryframeSeries, __pyx_n_s_SummaryframeSeries, (PyObject *) NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_kp_s_Collection_of_summary_frames); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "km3pipe/dataclasses.pyx":1468
 *     """Collection of summary frames.
 *     """
 *     dtype = np.dtype([             # <<<<<<<<<<<<<<
 *         ('dom_id', '<u4'),
 *         ('max_sequence_number', '<u4'),
 */
  __Pyx_TraceLine(1468,0,__PYX_ERR(0, 1468, __pyx_L1_error))
  __pyx_t_7 = PyList_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_tuple__488);
  __Pyx_GIVEREF(__pyx_tuple__488);
  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_tuple__488);
  __Pyx_INCREF(__pyx_tuple__489);
  __Pyx_GIVEREF(__pyx_tuple__489);
  PyList_SET_ITEM(__pyx_t_7, 1, __pyx_tuple__489);
  __Pyx_INCREF(__pyx_tuple__490);
  __Pyx_GIVEREF(__pyx_tuple__490);
  PyList_SET_ITEM(__pyx_t_7, 2, __pyx_tuple__490);
  __Pyx_INCREF(__pyx_tuple__491);
  __Pyx_GIVEREF(__pyx_tuple__491);
  PyList_SET_ITEM(__pyx_t_7, 3, __pyx_tuple__491);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_dtype), __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(0, 1468, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1474
 *         ('slice_id', '<u4'),
 *         ])
 *     h5loc = '/'             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, arr):
 */
  __Pyx_TraceLine(1474,0,__PYX_ERR(0, 1474, __pyx_L1_error))
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_h5loc, __pyx_kp_s__2) < 0) __PYX_ERR(0, 1474, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1476
 *     h5loc = '/'
 * 
 *     def __init__(self, arr):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */
  __Pyx_TraceLine(1476,0,__PYX_ERR(0, 1476, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_1__init__, 0, __pyx_n_s_SummaryframeSeries___init, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__177)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_init, __pyx_t_7) < 0) __PYX_ERR(0, 1476, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1482
 * 
 *     @classmethod
 *     def from_arrays(cls, dom_ids, max_sequence_numbers, n_received_packets,             # <<<<<<<<<<<<<<
 *                     slice_id):
 *         length = dom_ids.shape[0]
 */
  __Pyx_TraceLine(1482,0,__PYX_ERR(0, 1482, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_3from_arrays, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_SummaryframeSeries_from_arrays, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__178)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":1481
 *         self._frames = None
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(cls, dom_ids, max_sequence_numbers, n_received_packets,
 *                     slice_id):
 */
  __Pyx_TraceLine(1481,0,__PYX_ERR(0, 1481, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_from_arrays, __pyx_t_6) < 0) __PYX_ERR(0, 1482, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1492
 *         return cls(frames)
 * 
 *     def from_table(cls, table, slice_id):             # <<<<<<<<<<<<<<
 *         if slice_id is None:
 *             slice_id = table[0]['slice_id']
 */
  __Pyx_TraceLine(1492,0,__PYX_ERR(0, 1492, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_5from_table, 0, __pyx_n_s_SummaryframeSeries_from_table, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__179)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_from_table, __pyx_t_6) < 0) __PYX_ERR(0, 1492, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1502
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(1502,0,__PYX_ERR(0, 1502, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_7deserialise, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_SummaryframeSeries_deserialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__180)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1501
 *         ) for row in table], dtype=cls.dtype), slice_id)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)
 */
  __Pyx_TraceLine(1501,0,__PYX_ERR(0, 1501, __pyx_L1_error))
  __pyx_t_7 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_deserialise, __pyx_t_7) < 0) __PYX_ERR(0, 1502, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1505
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(1505,0,__PYX_ERR(0, 1505, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_9serialise, 0, __pyx_n_s_SummaryframeSeries_serialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__181)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_serialise, __pyx_t_7) < 0) __PYX_ERR(0, 1505, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1509
 * 
 *     @classmethod
 *     def conv_from(cls, data, slice_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             # return cls.from_table(data, event_id)
 */
  __Pyx_TraceLine(1509,0,__PYX_ERR(0, 1509, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_11conv_from, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_SummaryframeSeries_conv_from, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__182)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_tuple__498);

  /* "km3pipe/dataclasses.pyx":1508
 *         return self.conv_to(*args, **kwargs)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def conv_from(cls, data, slice_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':
 */
  __Pyx_TraceLine(1508,0,__PYX_ERR(0, 1508, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_conv_from, __pyx_t_6) < 0) __PYX_ERR(0, 1509, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1514
 *             return cls(data)
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(np.array(self.__array__(), dtype=self.dtype),
 */
  __Pyx_TraceLine(1514,0,__PYX_ERR(0, 1514, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_13conv_to, 0, __pyx_n_s_SummaryframeSeries_conv_to, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__183)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__500);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_conv_to, __pyx_t_6) < 0) __PYX_ERR(0, 1514, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1522
 * 
 *     @property
 *     def n_received_packets(self):             # <<<<<<<<<<<<<<
 *         return self._arr['n_received_packets']
 * 
 */
  __Pyx_TraceLine(1522,0,__PYX_ERR(0, 1522, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_15n_received_packets, 0, __pyx_n_s_SummaryframeSeries_n_received_pa, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__184)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1521
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def n_received_packets(self):
 *         return self._arr['n_received_packets']
 */
  __Pyx_TraceLine(1521,0,__PYX_ERR(0, 1521, __pyx_L1_error))
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_n_received_packets, __pyx_t_6) < 0) __PYX_ERR(0, 1522, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1526
 * 
 *     @property
 *     def dom_ids(self):             # <<<<<<<<<<<<<<
 *         return self._arr['dom_ids']
 * 
 */
  __Pyx_TraceLine(1526,0,__PYX_ERR(0, 1526, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_17dom_ids, 0, __pyx_n_s_SummaryframeSeries_dom_ids, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__185)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1525
 *         return self._arr['n_received_packets']
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def dom_ids(self):
 *         return self._arr['dom_ids']
 */
  __Pyx_TraceLine(1525,0,__PYX_ERR(0, 1525, __pyx_L1_error))
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_dom_ids, __pyx_t_6) < 0) __PYX_ERR(0, 1526, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1530
 * 
 *     @property
 *     def max_sequence_numbers(self):             # <<<<<<<<<<<<<<
 *         return self._arr['max_sequence_numbers']
 * 
 */
  __Pyx_TraceLine(1530,0,__PYX_ERR(0, 1530, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_19max_sequence_numbers, 0, __pyx_n_s_SummaryframeSeries_max_sequence, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__186)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1529
 *         return self._arr['dom_ids']
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def max_sequence_numbers(self):
 *         return self._arr['max_sequence_numbers']
 */
  __Pyx_TraceLine(1529,0,__PYX_ERR(0, 1529, __pyx_L1_error))
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_max_sequence_numbers, __pyx_t_6) < 0) __PYX_ERR(0, 1530, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1533
 *         return self._arr['max_sequence_numbers']
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */
  __Pyx_TraceLine(1533,0,__PYX_ERR(0, 1533, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_21__array__, 0, __pyx_n_s_SummaryframeSeries___array, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__187)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_array_2, __pyx_t_6) < 0) __PYX_ERR(0, 1533, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1536
 *         return self._arr
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __Pyx_TraceLine(1536,0,__PYX_ERR(0, 1536, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_23__iter__, 0, __pyx_n_s_SummaryframeSeries___iter, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__188)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_iter, __pyx_t_6) < 0) __PYX_ERR(0, 1536, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1539
 *         return self
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */
  __Pyx_TraceLine(1539,0,__PYX_ERR(0, 1539, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_25next, 0, __pyx_n_s_SummaryframeSeries_next, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__189)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_next_2, __pyx_t_6) < 0) __PYX_ERR(0, 1539, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1543
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */
  __Pyx_TraceLine(1543,0,__PYX_ERR(0, 1543, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_27__next__, 0, __pyx_n_s_SummaryframeSeries___next, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__190)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_next, __pyx_t_6) < 0) __PYX_ERR(0, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1551
 *         return data
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */
  __Pyx_TraceLine(1551,0,__PYX_ERR(0, 1551, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_29__len__, 0, __pyx_n_s_SummaryframeSeries___len, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__191)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_len_2, __pyx_t_6) < 0) __PYX_ERR(0, 1551, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1554
 *         return self._arr.shape[0]
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             return self._arr[index]
 */
  __Pyx_TraceLine(1554,0,__PYX_ERR(0, 1554, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_31__getitem__, 0, __pyx_n_s_SummaryframeSeries___getitem, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__192)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_getitem, __pyx_t_6) < 0) __PYX_ERR(0, 1554, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1562
 *             raise TypeError("index must be int or slice")
 * 
 *     def _slice_generator(self, index):             # <<<<<<<<<<<<<<
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 */
  __Pyx_TraceLine(1562,0,__PYX_ERR(0, 1562, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_33_slice_generator, 0, __pyx_n_s_SummaryframeSeries__slice_genera, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__194)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_slice_generator, __pyx_t_6) < 0) __PYX_ERR(0, 1562, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1465
 * 
 * 
 * class SummaryframeSeries(object):             # <<<<<<<<<<<<<<
 *     """Collection of summary frames.
 *     """
 */
  __Pyx_TraceLine(1465,0,__PYX_ERR(0, 1465, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_SummaryframeSeries, __pyx_t_1, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SummaryframeSeries, __pyx_t_6) < 0) __PYX_ERR(0, 1465, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":1569
 * 
 * 
 * class KM3Array(np.ndarray):             # <<<<<<<<<<<<<<
 *     """Numpy NDarray + metadata.
 * 
 */
  __Pyx_TraceLine(1569,0,__PYX_ERR(0, 1569, __pyx_L1_error))
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_5numpy_ndarray));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_5numpy_ndarray));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_ptype_5numpy_ndarray));
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_KM3Array, __pyx_n_s_KM3Array, (PyObject *) NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_kp_s_Numpy_NDarray_metadata_This_clas); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "km3pipe/dataclasses.pyx":1586
 *         Convert for storage.
 *     """
 *     def __new__(cls, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         obj = np.asarray(arr).view(cls)
 *         obj.h5loc = h5loc
 */
  __Pyx_TraceLine(1586,0,__PYX_ERR(0, 1586, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_8KM3Array_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_KM3Array___new, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__195)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__512);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_new, __pyx_t_6) < 0) __PYX_ERR(0, 1586, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1591
 *         return obj
 * 
 *     def __init__(self, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self.array = arr
 *         self.h5loc = h5loc
 */
  __Pyx_TraceLine(1591,0,__PYX_ERR(0, 1591, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_8KM3Array_3__init__, 0, __pyx_n_s_KM3Array___init, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__196)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__514);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_init, __pyx_t_6) < 0) __PYX_ERR(0, 1591, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1595
 *         self.h5loc = h5loc
 * 
 *     def __array_finalize__(self, obj):             # <<<<<<<<<<<<<<
 *         if obj is None:
 *             return
 */
  __Pyx_TraceLine(1595,0,__PYX_ERR(0, 1595, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_8KM3Array_5__array_finalize__, 0, __pyx_n_s_KM3Array___array_finalize, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__197)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_array_finalize, __pyx_t_6) < 0) __PYX_ERR(0, 1595, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1601
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(1601,0,__PYX_ERR(0, 1601, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_8KM3Array_7deserialise, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_KM3Array_deserialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__198)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1600
 *         self.h5loc = getattr(obj, 'h5loc', None)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)
 */
  __Pyx_TraceLine(1600,0,__PYX_ERR(0, 1600, __pyx_L1_error))
  __pyx_t_7 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_deserialise, __pyx_t_7) < 0) __PYX_ERR(0, 1601, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1604
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(1604,0,__PYX_ERR(0, 1604, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_8KM3Array_9serialise, 0, __pyx_n_s_KM3Array_serialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__199)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_serialise, __pyx_t_7) < 0) __PYX_ERR(0, 1604, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1608
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, h5loc='/', fmt='numpy', **kwargs):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             arr = cls(data, h5loc, **kwargs)
 */
  __Pyx_TraceLine(1608,0,__PYX_ERR(0, 1608, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_8KM3Array_11conv_from, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_KM3Array_conv_from, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__200)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_tuple__519);

  /* "km3pipe/dataclasses.pyx":1607
 *         return self.conv_to(*args, **kwargs)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def conv_from(cls, data, event_id=None, h5loc='/', fmt='numpy', **kwargs):
 *         if fmt == 'numpy':
 */
  __Pyx_TraceLine(1607,0,__PYX_ERR(0, 1607, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_conv_from, __pyx_t_6) < 0) __PYX_ERR(0, 1608, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1613
 *             return arr
 * 
 *     def conv_to(self, to='numpy', **kwargs):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self
 */
  __Pyx_TraceLine(1613,0,__PYX_ERR(0, 1613, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_8KM3Array_13conv_to, 0, __pyx_n_s_KM3Array_conv_to, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__201)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__521);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_conv_to, __pyx_t_6) < 0) __PYX_ERR(0, 1613, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1620
 * 
 *     @classmethod
 *     def from_dict(cls, map, dtype=None, **kwargs):             # <<<<<<<<<<<<<<
 *         if dtype is None:
 *             dtype = np.dtype([(key, float) for key in sorted(map.keys())])
 */
  __Pyx_TraceLine(1620,0,__PYX_ERR(0, 1620, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_8KM3Array_15from_dict, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_KM3Array_from_dict, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__202)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__523);

  /* "km3pipe/dataclasses.pyx":1619
 *             return KM3DataFrame.conv_from(self, fmt='numpy', **kwargs)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_dict(cls, map, dtype=None, **kwargs):
 *         if dtype is None:
 */
  __Pyx_TraceLine(1619,0,__PYX_ERR(0, 1619, __pyx_L1_error))
  __pyx_t_7 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_from_dict, __pyx_t_7) < 0) __PYX_ERR(0, 1620, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1569
 * 
 * 
 * class KM3Array(np.ndarray):             # <<<<<<<<<<<<<<
 *     """Numpy NDarray + metadata.
 * 
 */
  __Pyx_TraceLine(1569,0,__PYX_ERR(0, 1569, __pyx_L1_error))
  __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_KM3Array, __pyx_t_1, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KM3Array, __pyx_t_7) < 0) __PYX_ERR(0, 1569, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":1627
 * 
 * 
 * class KM3DataFrame(pd.DataFrame):             # <<<<<<<<<<<<<<
 *     """Pandas Dataframe + metadata.
 * 
 */
  __Pyx_TraceLine(1627,0,__PYX_ERR(0, 1627, __pyx_L1_error))
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_pd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_DataFrame); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1627, __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_ERR(0, 1627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_KM3DataFrame, __pyx_n_s_KM3DataFrame, (PyObject *) NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_kp_s_Pandas_Dataframe_metadata_This_c); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "km3pipe/dataclasses.pyx":1648
 *     # http://pandas.pydata.org/pandas-docs/stable/internals.html#define-original-properties
 *     # this is preserved over df manipulations
 *     _metadata = ['h5loc']             # <<<<<<<<<<<<<<
 * 
 *     # default value
 */
  __Pyx_TraceLine(1648,0,__PYX_ERR(0, 1648, __pyx_L1_error))
  __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_n_s_h5loc);
  __Pyx_GIVEREF(__pyx_n_s_h5loc);
  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_h5loc);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_metadata, __pyx_t_7) < 0) __PYX_ERR(0, 1648, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1651
 * 
 *     # default value
 *     h5loc = '/'             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(1651,0,__PYX_ERR(0, 1651, __pyx_L1_error))
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_h5loc, __pyx_kp_s__2) < 0) __PYX_ERR(0, 1651, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1654
 * 
 *     @property
 *     def _constructor(self):             # <<<<<<<<<<<<<<
 *         return KM3DataFrame
 * 
 */
  __Pyx_TraceLine(1654,0,__PYX_ERR(0, 1654, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12KM3DataFrame_1_constructor, 0, __pyx_n_s_KM3DataFrame__constructor, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__203)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":1653
 *     h5loc = '/'
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def _constructor(self):
 *         return KM3DataFrame
 */
  __Pyx_TraceLine(1653,0,__PYX_ERR(0, 1653, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_constructor, __pyx_t_7) < 0) __PYX_ERR(0, 1654, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1657
 *         return KM3DataFrame
 * 
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         h5loc = kwargs.pop('h5loc', '/')
 *         super(KM3DataFrame, self).__init__(*args, **kwargs)
 */
  __Pyx_TraceLine(1657,0,__PYX_ERR(0, 1657, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12KM3DataFrame_3__init__, 0, __pyx_n_s_KM3DataFrame___init, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__204)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_init, __pyx_t_7) < 0) __PYX_ERR(0, 1657, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1663
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(1663,0,__PYX_ERR(0, 1663, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12KM3DataFrame_5deserialise, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_KM3DataFrame_deserialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__206)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":1662
 *         self.h5loc = h5loc
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)
 */
  __Pyx_TraceLine(1662,0,__PYX_ERR(0, 1662, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_deserialise, __pyx_t_6) < 0) __PYX_ERR(0, 1663, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1666
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(1666,0,__PYX_ERR(0, 1666, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12KM3DataFrame_7serialise, 0, __pyx_n_s_KM3DataFrame_serialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__207)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_serialise, __pyx_t_6) < 0) __PYX_ERR(0, 1666, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1670
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, h5loc='/', fmt='pandas', **kwargs):             # <<<<<<<<<<<<<<
 *         if fmt in {'numpy', 'pandas'}:
 *             return cls(data, h5loc=h5loc, **kwargs)
 */
  __Pyx_TraceLine(1670,0,__PYX_ERR(0, 1670, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12KM3DataFrame_9conv_from, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_KM3DataFrame_conv_from, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__208)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__529);

  /* "km3pipe/dataclasses.pyx":1669
 *         return self.conv_to(*args, **kwargs)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def conv_from(cls, data, event_id=None, h5loc='/', fmt='pandas', **kwargs):
 *         if fmt in {'numpy', 'pandas'}:
 */
  __Pyx_TraceLine(1669,0,__PYX_ERR(0, 1669, __pyx_L1_error))
  __pyx_t_7 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_conv_from, __pyx_t_7) < 0) __PYX_ERR(0, 1670, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1676
 *             return cls(data, index=[0], h5loc=h5loc, **kwargs)
 * 
 *     def conv_to(self, to='numpy', **kwargs):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return KM3Array(self.to_records(index=False), h5loc=self.h5loc,
 */
  __Pyx_TraceLine(1676,0,__PYX_ERR(0, 1676, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12KM3DataFrame_11conv_to, 0, __pyx_n_s_KM3DataFrame_conv_to, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__209)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_tuple__531);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_conv_to, __pyx_t_7) < 0) __PYX_ERR(0, 1676, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1627
 * 
 * 
 * class KM3DataFrame(pd.DataFrame):             # <<<<<<<<<<<<<<
 *     """Pandas Dataframe + metadata.
 * 
 */
  __Pyx_TraceLine(1627,0,__PYX_ERR(0, 1627, __pyx_L1_error))
  __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_KM3DataFrame, __pyx_t_1, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KM3DataFrame, __pyx_t_7) < 0) __PYX_ERR(0, 1627, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":1685
 * 
 * deserialise_map = {
 *     'McHits': HitSeries,             # <<<<<<<<<<<<<<
 *     'Hits': HitSeries,
 *     'TimesliceHits': TimesliceHitSeries,
 */
  __Pyx_TraceLine(1685,0,__PYX_ERR(0, 1685, __pyx_L1_error))
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_HitSeries); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_McHits, __pyx_t_2) < 0) __PYX_ERR(0, 1685, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":1686
 * deserialise_map = {
 *     'McHits': HitSeries,
 *     'Hits': HitSeries,             # <<<<<<<<<<<<<<
 *     'TimesliceHits': TimesliceHitSeries,
 *     'McTracks': TrackSeries,
 */
  __Pyx_TraceLine(1686,0,__PYX_ERR(0, 1686, __pyx_L1_error))
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_HitSeries); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_Hits, __pyx_t_2) < 0) __PYX_ERR(0, 1685, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":1687
 *     'McHits': HitSeries,
 *     'Hits': HitSeries,
 *     'TimesliceHits': TimesliceHitSeries,             # <<<<<<<<<<<<<<
 *     'McTracks': TrackSeries,
 *     'EventInfo': EventInfo,
 */
  __Pyx_TraceLine(1687,0,__PYX_ERR(0, 1687, __pyx_L1_error))
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_TimesliceHitSeries); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_TimesliceHits, __pyx_t_2) < 0) __PYX_ERR(0, 1685, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":1688
 *     'Hits': HitSeries,
 *     'TimesliceHits': TimesliceHitSeries,
 *     'McTracks': TrackSeries,             # <<<<<<<<<<<<<<
 *     'EventInfo': EventInfo,
 *     'SummarysliceInfo': SummarysliceInfo,
 */
  __Pyx_TraceLine(1688,0,__PYX_ERR(0, 1688, __pyx_L1_error))
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_TrackSeries); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_McTracks, __pyx_t_2) < 0) __PYX_ERR(0, 1685, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":1689
 *     'TimesliceHits': TimesliceHitSeries,
 *     'McTracks': TrackSeries,
 *     'EventInfo': EventInfo,             # <<<<<<<<<<<<<<
 *     'SummarysliceInfo': SummarysliceInfo,
 *     'SummaryframeInfo': SummaryframeInfo,
 */
  __Pyx_TraceLine(1689,0,__PYX_ERR(0, 1689, __pyx_L1_error))
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_EventInfo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_EventInfo, __pyx_t_2) < 0) __PYX_ERR(0, 1685, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":1690
 *     'McTracks': TrackSeries,
 *     'EventInfo': EventInfo,
 *     'SummarysliceInfo': SummarysliceInfo,             # <<<<<<<<<<<<<<
 *     'SummaryframeInfo': SummaryframeInfo,
 *     'Tracks': TrackSeries,
 */
  __Pyx_TraceLine(1690,0,__PYX_ERR(0, 1690, __pyx_L1_error))
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_SummarysliceInfo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_SummarysliceInfo, __pyx_t_2) < 0) __PYX_ERR(0, 1685, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":1691
 *     'EventInfo': EventInfo,
 *     'SummarysliceInfo': SummarysliceInfo,
 *     'SummaryframeInfo': SummaryframeInfo,             # <<<<<<<<<<<<<<
 *     'Tracks': TrackSeries,
 * }
 */
  __Pyx_TraceLine(1691,0,__PYX_ERR(0, 1691, __pyx_L1_error))
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_SummaryframeInfo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_SummaryframeInfo, __pyx_t_2) < 0) __PYX_ERR(0, 1685, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":1692
 *     'SummarysliceInfo': SummarysliceInfo,
 *     'SummaryframeInfo': SummaryframeInfo,
 *     'Tracks': TrackSeries,             # <<<<<<<<<<<<<<
 * }
 * 
 */
  __Pyx_TraceLine(1692,0,__PYX_ERR(0, 1692, __pyx_L1_error))
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_TrackSeries); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_Tracks, __pyx_t_2) < 0) __PYX_ERR(0, 1685, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_deserialise_map, __pyx_t_1) < 0) __PYX_ERR(0, 1684, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":1696
 * 
 * 
 * class BinaryStruct(object):             # <<<<<<<<<<<<<<
 *     """A binary struct superclass which parses itself from a given stream.
 * 
 */
  __Pyx_TraceLine(1696,0,__PYX_ERR(0, 1696, __pyx_L1_error))
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_object);
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_BinaryStruct, __pyx_n_s_BinaryStruct, (PyObject *) NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_kp_s_A_binary_struct_superclass_which); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "km3pipe/dataclasses.pyx":1710
 * 
 *     """
 *     _structure = ''             # <<<<<<<<<<<<<<
 *     _fields = ()
 * 
 */
  __Pyx_TraceLine(1710,0,__PYX_ERR(0, 1710, __pyx_L1_error))
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_structure, __pyx_kp_s__113) < 0) __PYX_ERR(0, 1710, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1711
 *     """
 *     _structure = ''
 *     _fields = ()             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, stream):
 */
  __Pyx_TraceLine(1711,0,__PYX_ERR(0, 1711, __pyx_L1_error))
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_fields, __pyx_empty_tuple) < 0) __PYX_ERR(0, 1711, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1713
 *     _fields = ()
 * 
 *     def __init__(self, stream):             # <<<<<<<<<<<<<<
 *         data = Struct(self._structure).unpack_from(stream.read(self._size))
 *         for attr, value in zip(self._fields, data):
 */
  __Pyx_TraceLine(1713,0,__PYX_ERR(0, 1713, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12BinaryStruct_1__init__, 0, __pyx_n_s_BinaryStruct___init, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__210)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_init, __pyx_t_7) < 0) __PYX_ERR(0, 1713, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1719
 * 
 *     @property
 *     def _size(self):             # <<<<<<<<<<<<<<
 *         return calcsize(self._structure)
 */
  __Pyx_TraceLine(1719,0,__PYX_ERR(0, 1719, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12BinaryStruct_3_size, 0, __pyx_n_s_BinaryStruct__size, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__211)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":1718
 *             setattr(self, attr, value)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def _size(self):
 *         return calcsize(self._structure)
 */
  __Pyx_TraceLine(1718,0,__PYX_ERR(0, 1718, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_size, __pyx_t_7) < 0) __PYX_ERR(0, 1719, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1696
 * 
 * 
 * class BinaryStruct(object):             # <<<<<<<<<<<<<<
 *     """A binary struct superclass which parses itself from a given stream.
 * 
 */
  __Pyx_TraceLine(1696,0,__PYX_ERR(0, 1696, __pyx_L1_error))
  __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_BinaryStruct, __pyx_t_1, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BinaryStruct, __pyx_t_7) < 0) __PYX_ERR(0, 1696, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":1
 * # coding=utf-8             # <<<<<<<<<<<<<<
 * # cython: profile=True
 * # Filename: dataclasses.py
 */
  __Pyx_TraceLine(1,0,__PYX_ERR(0, 1, __pyx_L1_error))
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":997
 *         raise ImportError("numpy.core.umath failed to import")
 * 
 * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
 */
  __Pyx_TraceReturn(Py_None, 0);

  /*--- Wrapped vars code ---*/

  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);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init km3pipe.dataclasses", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_DECREF(__pyx_m); __pyx_m = 0;
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init km3pipe.dataclasses");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if PY_MAJOR_VERSION < 3
  return;
  #else
  return __pyx_m;
  #endif
}

/* --- Runtime support code --- */
/* Refnanny */
#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

/* GetBuiltinName */
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;
}

/* RaiseArgTupleInvalid */
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);
}

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

/* ParseKeywords */
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;
}

/* Profile */
#if CYTHON_PROFILE
static int __Pyx_TraceSetupAndCall(PyCodeObject** code,
                                   PyFrameObject** frame,
                                   const char *funcname,
                                   const char *srcfile,
                                   int firstlineno) {
    PyObject *type, *value, *traceback;
    int retval;
    PyThreadState* tstate = PyThreadState_GET();
    if (*frame == NULL || !CYTHON_PROFILE_REUSE_FRAME) {
        if (*code == NULL) {
            *code = __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno);
            if (*code == NULL) return 0;
        }
        *frame = PyFrame_New(
            tstate,                          /*PyThreadState *tstate*/
            *code,                           /*PyCodeObject *code*/
            __pyx_d,                  /*PyObject *globals*/
            0                                /*PyObject *locals*/
        );
        if (*frame == NULL) return 0;
        if (CYTHON_TRACE && (*frame)->f_trace == NULL) {
            Py_INCREF(Py_None);
            (*frame)->f_trace = Py_None;
        }
#if PY_VERSION_HEX < 0x030400B1
    } else {
        (*frame)->f_tstate = tstate;
#endif
    }
      __Pyx_PyFrame_SetLineNumber(*frame, firstlineno);
    retval = 1;
    tstate->tracing++;
    tstate->use_tracing = 0;
    PyErr_Fetch(&type, &value, &traceback);
    #if CYTHON_TRACE
    if (tstate->c_tracefunc)
        retval = tstate->c_tracefunc(tstate->c_traceobj, *frame, PyTrace_CALL, NULL) == 0;
    if (retval && tstate->c_profilefunc)
    #endif
        retval = tstate->c_profilefunc(tstate->c_profileobj, *frame, PyTrace_CALL, NULL) == 0;
    tstate->use_tracing = (tstate->c_profilefunc ||
                           (CYTHON_TRACE && tstate->c_tracefunc));
    tstate->tracing--;
    if (retval) {
        PyErr_Restore(type, value, traceback);
        return tstate->use_tracing && retval;
    } else {
        Py_XDECREF(type);
        Py_XDECREF(value);
        Py_XDECREF(traceback);
        return -1;
    }
}
static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno) {
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    PyCodeObject *py_code = 0;
    #if PY_MAJOR_VERSION < 3
    py_funcname = PyString_FromString(funcname);
    py_srcfile = PyString_FromString(srcfile);
    #else
    py_funcname = PyUnicode_FromString(funcname);
    py_srcfile = PyUnicode_FromString(srcfile);
    #endif
    if (!py_funcname | !py_srcfile) goto bad;
    py_code = PyCode_New(
        0,
        #if PY_MAJOR_VERSION >= 3
        0,
        #endif
        0,
        0,
        0,
        __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,*/
        firstlineno,
        __pyx_empty_bytes      /*PyObject *lnotab*/
    );
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    return py_code;
}
#endif

/* PyObjectCall */
#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 (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* RaiseTooManyValuesToUnpack */
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);
}

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

/* IterFinish */
static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_FAST_THREAD_STATE
    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
}

/* UnpackItemEndCheck */
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;
}

/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL
#include "frameobject.h"
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
                                               PyObject *globals) {
    PyFrameObject *f;
    PyThreadState *tstate = PyThreadState_GET();
    PyObject **fastlocals;
    Py_ssize_t i;
    PyObject *result;
    assert(globals != NULL);
    /* XXX Perhaps we should create a specialized
       PyFrame_New() that doesn't take locals, but does
       take builtins without sanity checking them.
       */
    assert(tstate != NULL);
    f = PyFrame_New(tstate, co, globals, NULL);
    if (f == NULL) {
        return NULL;
    }
    fastlocals = f->f_localsplus;
    for (i = 0; i < na; i++) {
        Py_INCREF(*args);
        fastlocals[i] = *args++;
    }
    result = PyEval_EvalFrameEx(f,0);
    ++tstate->recursion_depth;
    Py_DECREF(f);
    --tstate->recursion_depth;
    return result;
}
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) {
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
    PyObject *globals = PyFunction_GET_GLOBALS(func);
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
    PyObject *closure;
#if PY_MAJOR_VERSION >= 3
    PyObject *kwdefs;
#endif
    PyObject *kwtuple, **k;
    PyObject **d;
    Py_ssize_t nd;
    Py_ssize_t nk;
    PyObject *result;
    assert(kwargs == NULL || PyDict_Check(kwargs));
    nk = kwargs ? PyDict_Size(kwargs) : 0;
    if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
        return NULL;
    }
    if (
#if PY_MAJOR_VERSION >= 3
            co->co_kwonlyargcount == 0 &&
#endif
            likely(kwargs == NULL || nk == 0) &&
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
        if (argdefs == NULL && co->co_argcount == nargs) {
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
            goto done;
        }
        else if (nargs == 0 && argdefs != NULL
                 && co->co_argcount == Py_SIZE(argdefs)) {
            /* function called with no arguments, but all parameters have
               a default value: use default values as arguments .*/
            args = &PyTuple_GET_ITEM(argdefs, 0);
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
            goto done;
        }
    }
    if (kwargs != NULL) {
        Py_ssize_t pos, i;
        kwtuple = PyTuple_New(2 * nk);
        if (kwtuple == NULL) {
            result = NULL;
            goto done;
        }
        k = &PyTuple_GET_ITEM(kwtuple, 0);
        pos = i = 0;
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
            Py_INCREF(k[i]);
            Py_INCREF(k[i+1]);
            i += 2;
        }
        nk = i / 2;
    }
    else {
        kwtuple = NULL;
        k = NULL;
    }
    closure = PyFunction_GET_CLOSURE(func);
#if PY_MAJOR_VERSION >= 3
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
#endif
    if (argdefs != NULL) {
        d = &PyTuple_GET_ITEM(argdefs, 0);
        nd = Py_SIZE(argdefs);
    }
    else {
        d = NULL;
        nd = 0;
    }
#if PY_MAJOR_VERSION >= 3
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
                               args, nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif  // CPython < 3.6
#endif  // CYTHON_FAST_PYCALL

/* PyObjectCallMethO */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallNoArg */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, NULL, 0);
    }
#endif
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
#else
    if (likely(PyCFunction_Check(func))) {
#endif
        if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
            return __Pyx_PyObject_CallMethO(func, NULL);
        }
    }
    return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
}
#endif

/* PyCFunctionFastCall */
  #if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
    PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    assert(PyCFunction_Check(func));
    assert(METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)));
    assert(nargs >= 0);
    assert(nargs == 0 || args != NULL);
    /* _PyCFunction_FastCallDict() must not be called with an exception set,
       because it may clear it (directly or indirectly) and so the
       caller loses its exception */
    assert(!PyErr_Occurred());
    return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL);
}
#endif  // CYTHON_FAST_PYCCALL

/* PyObjectCallOneArg */
  #if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_New(1);
    if (unlikely(!args)) return NULL;
    Py_INCREF(arg);
    PyTuple_SET_ITEM(args, 0, arg);
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, &arg, 1);
    }
#endif
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
#else
    if (likely(PyCFunction_Check(func))) {
#endif
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
#if CYTHON_FAST_PYCCALL
        } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
            return __Pyx_PyCFunction_FastCall(func, &arg, 1);
#endif
        }
    }
    return __Pyx__PyObject_CallOneArg(func, arg);
}
#else
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_Pack(1, arg);
    if (unlikely(!args)) return NULL;
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
#endif

/* PyObjectCallMethod0 */
    static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
    PyObject *method, *result = NULL;
    method = __Pyx_PyObject_GetAttrStr(obj, method_name);
    if (unlikely(!method)) goto bad;
#if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(method))) {
        PyObject *self = PyMethod_GET_SELF(method);
        if (likely(self)) {
            PyObject *function = PyMethod_GET_FUNCTION(method);
            result = __Pyx_PyObject_CallOneArg(function, self);
            Py_DECREF(method);
            return result;
        }
    }
#endif
    result = __Pyx_PyObject_CallNoArg(method);
    Py_DECREF(method);
bad:
    return result;
}

/* RaiseNoneIterError */
    static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

/* UnpackTupleError */
    static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
    if (t == Py_None) {
      __Pyx_RaiseNoneNotIterableError();
    } else if (PyTuple_GET_SIZE(t) < index) {
      __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
    } else {
      __Pyx_RaiseTooManyValuesError(index);
    }
}

/* UnpackTuple2 */
    static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
                                             int is_tuple, int has_known_size, int decref_tuple) {
    Py_ssize_t index;
    PyObject *value1 = NULL, *value2 = NULL, *iter = NULL;
    if (!is_tuple && unlikely(!PyTuple_Check(tuple))) {
        iternextfunc iternext;
        iter = PyObject_GetIter(tuple);
        if (unlikely(!iter)) goto bad;
        if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
        iternext = Py_TYPE(iter)->tp_iternext;
        value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
        value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
        if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
        Py_DECREF(iter);
    } else {
        if (!has_known_size && unlikely(PyTuple_GET_SIZE(tuple) != 2)) {
            __Pyx_UnpackTupleError(tuple, 2);
            goto bad;
        }
#if CYTHON_COMPILING_IN_PYPY
        value1 = PySequence_ITEM(tuple, 0);
        if (unlikely(!value1)) goto bad;
        value2 = PySequence_ITEM(tuple, 1);
        if (unlikely(!value2)) goto bad;
#else
        value1 = PyTuple_GET_ITEM(tuple, 0);
        value2 = PyTuple_GET_ITEM(tuple, 1);
        Py_INCREF(value1);
        Py_INCREF(value2);
#endif
        if (decref_tuple) { Py_DECREF(tuple); }
    }
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
unpacking_failed:
    if (!has_known_size && __Pyx_IterFinish() == 0)
        __Pyx_RaiseNeedMoreValuesError(index);
bad:
    Py_XDECREF(iter);
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
}

/* dict_iter */
    static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_source_is_dict) {
    is_dict = is_dict || likely(PyDict_CheckExact(iterable));
    *p_source_is_dict = is_dict;
#if !CYTHON_COMPILING_IN_PYPY
    if (is_dict) {
        *p_orig_length = PyDict_Size(iterable);
        Py_INCREF(iterable);
        return iterable;
    }
#endif
    *p_orig_length = 0;
    if (method_name) {
        PyObject* iter;
        iterable = __Pyx_PyObject_CallMethod0(iterable, method_name);
        if (!iterable)
            return NULL;
#if !CYTHON_COMPILING_IN_PYPY
        if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable))
            return iterable;
#endif
        iter = PyObject_GetIter(iterable);
        Py_DECREF(iterable);
        return iter;
    }
    return PyObject_GetIter(iterable);
}
static CYTHON_INLINE int __Pyx_dict_iter_next(
        PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos,
        PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) {
    PyObject* next_item;
#if !CYTHON_COMPILING_IN_PYPY
    if (source_is_dict) {
        PyObject *key, *value;
        if (unlikely(orig_length != PyDict_Size(iter_obj))) {
            PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration");
            return -1;
        }
        if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) {
            return 0;
        }
        if (pitem) {
            PyObject* tuple = PyTuple_New(2);
            if (unlikely(!tuple)) {
                return -1;
            }
            Py_INCREF(key);
            Py_INCREF(value);
            PyTuple_SET_ITEM(tuple, 0, key);
            PyTuple_SET_ITEM(tuple, 1, value);
            *pitem = tuple;
        } else {
            if (pkey) {
                Py_INCREF(key);
                *pkey = key;
            }
            if (pvalue) {
                Py_INCREF(value);
                *pvalue = value;
            }
        }
        return 1;
    } else if (PyTuple_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyTuple_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else if (PyList_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyList_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else
#endif
    {
        next_item = PyIter_Next(iter_obj);
        if (unlikely(!next_item)) {
            return __Pyx_IterFinish();
        }
    }
    if (pitem) {
        *pitem = next_item;
    } else if (pkey && pvalue) {
        if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1))
            return -1;
    } else if (pkey) {
        *pkey = next_item;
    } else {
        *pvalue = next_item;
    }
    return 1;
}

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

/* UnicodeEquals */
    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 (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        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, (size_t)(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
}

/* FetchCommonType */
    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;
}

/* CythonFunction */
    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;
    }
    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) {
    int result = 0;
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    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);
    #else
    op->defaults_tuple = PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = PySequence_ITEM(res, 1);
        if (unlikely(!op->defaults_kwdict)) result = -1;
    }
    #endif
    Py_DECREF(res);
    return result;
}
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}
};
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[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if PY_VERSION_HEX < 0x030500A0
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
#endif
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;
    __Pyx_CyFunction_weakreflist(op) = 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]);
        PyObject_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    if (__Pyx_CyFunction_weakreflist(m) != 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 __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
    }
    if (obj == Py_None)
        obj = NULL;
    return __Pyx_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
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    Py_ssize_t size;
    switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
    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 (likely(size == 0))
                return (*meth)(self, NULL);
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d 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 (likely(size == 1)) {
                PyObject *result, *arg0 = PySequence_ITEM(arg, 0);
                if (unlikely(!arg0)) return NULL;
                result = (*meth)(self, arg0);
                Py_DECREF(arg0);
                return result;
            }
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d 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;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        Py_ssize_t argc;
        PyObject *new_args;
        PyObject *self;
        argc = PyTuple_GET_SIZE(args);
        new_args = PyTuple_GetSlice(args, 1, argc);
        if (unlikely(!new_args))
            return NULL;
        self = PyTuple_GetItem(args, 0);
        if (unlikely(!self)) {
            Py_DECREF(new_args);
            return NULL;
        }
        result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
        Py_DECREF(new_args);
    } else {
        result = __Pyx_CyFunction_Call(func, args, kw);
    }
    return result;
}
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
    (destructor) __Pyx_CyFunction_dealloc,
    0,
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    (reprfunc) __Pyx_CyFunction_repr,
    0,
    0,
    0,
    0,
    __Pyx_CyFunction_CallAsMethod,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
    0,
    (traverseproc) __Pyx_CyFunction_traverse,
    (inquiry) __Pyx_CyFunction_clear,
    0,
#if PY_VERSION_HEX < 0x030500A0
    offsetof(__pyx_CyFunctionObject, func_weakreflist),
#else
    offsetof(PyCFunctionObject, m_weakreflist),
#endif
    0,
    0,
    __pyx_CyFunction_methods,
    __pyx_CyFunction_members,
    __pyx_CyFunction_getsets,
    0,
    0,
    __Pyx_CyFunction_descr_get,
    0,
    offsetof(__pyx_CyFunctionObject, func_dict),
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#endif
};
static int __pyx_CyFunction_init(void) {
    __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 = PyObject_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);
}

/* SaveResetException */
        #if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    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;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
#endif

/* PyErrExceptionMatches */
        #if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    PyObject *exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
    return PyErr_GivenExceptionMatches(exc_type, err);
}
#endif

/* GetException */
        #if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
#endif
    PyObject *local_type, *local_value, *local_tb;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_FAST_THREAD_STATE
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_FAST_THREAD_STATE
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

/* GetModuleGlobalName */
          static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
    PyObject *result;
#if !CYTHON_AVOID_BORROWED_REFS
    result = PyDict_GetItem(__pyx_d, name);
    if (likely(result)) {
        Py_INCREF(result);
    } else {
#else
    result = PyObject_GetItem(__pyx_d, name);
    if (!result) {
        PyErr_Clear();
#endif
        result = __Pyx_GetBuiltinName(name);
    }
    return result;
}

/* GetItemInt */
            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,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    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,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    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,
                                                     CYTHON_NCP_UNUSED int wraparound,
                                                     CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    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))
                        return NULL;
                    PyErr_Clear();
                }
            }
            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));
}

/* None */
            static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
}

/* MergeKeywords */
            static int __Pyx_MergeKeywords(PyObject *kwdict, PyObject *source_mapping) {
    PyObject *iter, *key = NULL, *value = NULL;
    int source_is_dict, result;
    Py_ssize_t orig_length, ppos = 0;
    iter = __Pyx_dict_iterator(source_mapping, 0, __pyx_n_s_items, &orig_length, &source_is_dict);
    if (unlikely(!iter)) {
        PyObject *args;
        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
        PyErr_Clear();
        args = PyTuple_Pack(1, source_mapping);
        if (likely(args)) {
            PyObject *fallback = PyObject_Call((PyObject*)&PyDict_Type, args, NULL);
            Py_DECREF(args);
            if (likely(fallback)) {
                iter = __Pyx_dict_iterator(fallback, 1, __pyx_n_s_items, &orig_length, &source_is_dict);
                Py_DECREF(fallback);
            }
        }
        if (unlikely(!iter)) goto bad;
    }
    while (1) {
        result = __Pyx_dict_iter_next(iter, orig_length, &ppos, &key, &value, NULL, source_is_dict);
        if (unlikely(result < 0)) goto bad;
        if (!result) break;
        if (unlikely(PyDict_Contains(kwdict, key))) {
            __Pyx_RaiseDoubleKeywordsError("function", key);
            result = -1;
        } else {
            result = PyDict_SetItem(kwdict, key, value);
        }
        Py_DECREF(key);
        Py_DECREF(value);
        if (unlikely(result < 0)) goto bad;
    }
    Py_XDECREF(iter);
    return 0;
bad:
    Py_XDECREF(iter);
    return -1;
}

/* SetItemInt */
            static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
    int r;
    if (!j) return -1;
    r = PyObject_SetItem(o, j, v);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
                                               CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
        if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
            PyObject* old = PyList_GET_ITEM(o, n);
            Py_INCREF(v);
            PyList_SET_ITEM(o, n, v);
            Py_DECREF(old);
            return 1;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_ass_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))
                        return -1;
                    PyErr_Clear();
                }
            }
            return m->sq_ass_item(o, i, v);
        }
    }
#else
#if CYTHON_COMPILING_IN_PYPY
    if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) {
#else
    if (is_list || PySequence_Check(o)) {
#endif
        return PySequence_SetItem(o, i, v);
    }
#endif
    return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
}

/* ExtTypeTest */
              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;
}

/* UnicodeAsUCS4 */
              static CYTHON_INLINE Py_UCS4 __Pyx_PyUnicode_AsPy_UCS4(PyObject* x) {
   Py_ssize_t length;
   #if CYTHON_PEP393_ENABLED
   length = PyUnicode_GET_LENGTH(x);
   if (likely(length == 1)) {
       return PyUnicode_READ_CHAR(x, 0);
   }
   #else
   length = PyUnicode_GET_SIZE(x);
   if (likely(length == 1)) {
       return PyUnicode_AS_UNICODE(x)[0];
   }
   #if Py_UNICODE_SIZE == 2
   else if (PyUnicode_GET_SIZE(x) == 2) {
       Py_UCS4 high_val = PyUnicode_AS_UNICODE(x)[0];
       if (high_val >= 0xD800 && high_val <= 0xDBFF) {
           Py_UCS4 low_val = PyUnicode_AS_UNICODE(x)[1];
           if (low_val >= 0xDC00 && low_val <= 0xDFFF) {
               return 0x10000 + (((high_val & ((1<<10)-1)) << 10) | (low_val & ((1<<10)-1)));
           }
       }
   }
   #endif
   #endif
   PyErr_Format(PyExc_ValueError,
                "only single character unicode strings can be converted to Py_UCS4, "
                "got length %" CYTHON_FORMAT_SSIZE_T "d", length);
   return (Py_UCS4)-1;
}

/* object_ord */
              static long __Pyx__PyObject_Ord(PyObject* c) {
    Py_ssize_t size;
    if (PyBytes_Check(c)) {
        size = PyBytes_GET_SIZE(c);
        if (likely(size == 1)) {
            return (unsigned char) PyBytes_AS_STRING(c)[0];
        }
#if PY_MAJOR_VERSION < 3
    } else if (PyUnicode_Check(c)) {
        return (long)__Pyx_PyUnicode_AsPy_UCS4(c);
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    } else if (PyByteArray_Check(c)) {
        size = PyByteArray_GET_SIZE(c);
        if (likely(size == 1)) {
            return (unsigned char) PyByteArray_AS_STRING(c)[0];
        }
#endif
    } else {
        PyErr_Format(PyExc_TypeError,
            "ord() expected string of length 1, but %.200s found", c->ob_type->tp_name);
        return (long)(Py_UCS4)-1;
    }
    PyErr_Format(PyExc_TypeError,
        "ord() expected a character, but string of length %zd found", size);
    return (long)(Py_UCS4)-1;
}

/* PyErrFetchRestore */
              #if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    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);
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
}
#endif

/* RaiseException */
              #if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    __Pyx_PyThreadState_declare
    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 (PyType_Check(type)) {
#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;
        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;
        }
    }
    __Pyx_PyThreadState_assign
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
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) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        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) {
#if CYTHON_COMPILING_IN_PYPY
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#else
        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);
        }
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

/* PyIntBinop */
                #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            x = (long)((unsigned long)a + b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            double result;
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#endif

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

/* PyIntBinop */
                #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
    if (op1 == op2) {
        Py_RETURN_TRUE;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        if (a == b) {
            Py_RETURN_TRUE;
        } else {
            Py_RETURN_FALSE;
        }
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a;
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                #if PyLong_SHIFT < 30 && PyLong_SHIFT != 15
                default: return PyLong_Type.tp_richcompare(op1, op2, Py_EQ);
                #else
                default: Py_RETURN_FALSE;
                #endif
            }
        }
            if (a == b) {
                Py_RETURN_TRUE;
            } else {
                Py_RETURN_FALSE;
            }
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            if ((double)a == (double)b) {
                Py_RETURN_TRUE;
            } else {
                Py_RETURN_FALSE;
            }
    }
    return PyObject_RichCompare(op1, op2, Py_EQ);
}
#endif

/* GetAttr */
                static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_COMPILING_IN_CPYTHON
#if PY_MAJOR_VERSION >= 3
    if (likely(PyUnicode_Check(n)))
#else
    if (likely(PyString_Check(n)))
#endif
        return __Pyx_PyObject_GetAttrStr(o, n);
#endif
    return PyObject_GetAttr(o, n);
}

/* GetAttr3 */
                static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
    PyObject *r = __Pyx_GetAttr(o, n);
    if (unlikely(!r)) {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError))
            goto bad;
        PyErr_Clear();
        r = d;
        Py_INCREF(d);
    }
    return r;
bad:
    return NULL;
}

/* WriteUnraisableException */
                static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
                                  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
                                  int full_traceback, CYTHON_UNUSED int nogil) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_PyThreadState_declare
#ifdef WITH_THREAD
    PyGILState_STATE state;
    if (nogil)
        state = PyGILState_Ensure();
#ifdef _MSC_VER
    else state = (PyGILState_STATE)-1;
#endif
#endif
    __Pyx_PyThreadState_assign
    __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);
    }
#ifdef WITH_THREAD
    if (nogil)
        PyGILState_Release(state);
#endif
}

/* Import */
                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_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;
        }
        #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
        }
    }
bad:
    #if PY_VERSION_HEX < 0x03030000
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

/* ImportFrom */
                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;
}

/* CalculateMetaclass */
                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;
}

/* Py3ClassCreate */
                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_2);
        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;
}

/* ClassMethod */
                static PyObject* __Pyx_Method_ClassMethod(PyObject *method) {
#if CYTHON_COMPILING_IN_PYPY
    if (PyObject_TypeCheck(method, &PyWrapperDescr_Type)) {
        return PyClassMethod_New(method);
    }
#else
#if CYTHON_COMPILING_IN_PYSTON
    if (PyMethodDescr_Check(method)) {
#else
    static PyTypeObject *methoddescr_type = NULL;
    if (methoddescr_type == NULL) {
       PyObject *meth = PyObject_GetAttrString((PyObject*)&PyList_Type, "append");
       if (!meth) return NULL;
       methoddescr_type = Py_TYPE(meth);
       Py_DECREF(meth);
    }
    if (PyObject_TypeCheck(method, methoddescr_type)) {
#endif
        PyMethodDescrObject *descr = (PyMethodDescrObject *)method;
        #if PY_VERSION_HEX < 0x03020000
        PyTypeObject *d_type = descr->d_type;
        #else
        PyTypeObject *d_type = descr->d_common.d_type;
        #endif
        return PyDescr_NewClassMethod(d_type, descr->d_method);
    }
#endif
    else if (PyMethod_Check(method)) {
        return PyClassMethod_New(PyMethod_GET_FUNCTION(method));
    }
    else if (PyCFunction_Check(method)) {
        return PyClassMethod_New(method);
    }
#ifdef __Pyx_CyFunction_USED
    else if (PyObject_TypeCheck(method, __pyx_CyFunctionType)) {
        return PyClassMethod_New(method);
    }
#endif
    PyErr_SetString(PyExc_TypeError,
                   "Class-level classmethod() can only be called on "
                   "a method_descriptor or instance method.");
    return NULL;
}

/* CodeObjectCache */
                  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 - start) / 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, (size_t)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);
}

/* AddTraceback */
                  #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,
        0,
        0,
        0,
        0,
        __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,
        __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;
    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_frame = PyFrame_New(
        PyThreadState_GET(), /*PyThreadState *tstate,*/
        py_code,             /*PyCodeObject *code,*/
        __pyx_d,      /*PyObject *globals,*/
        0                    /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

/* CIntFromPyVerify */
                  #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

/* CIntToPy */
                  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
    const long neg_one = (long) -1, const_zero = (long) 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);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
                  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
    const int neg_one = (int) -1, const_zero = (int) 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);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
                  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_short(unsigned short value) {
    const unsigned short neg_one = (unsigned short) -1, const_zero = (unsigned short) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(unsigned short) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(unsigned short) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(unsigned short) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(unsigned short) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(unsigned short) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(unsigned short),
                                     little, !is_unsigned);
    }
}

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

/* Arithmetic */
                  #if CYTHON_CCOMPLEX
#else
    static CYTHON_INLINE int __Pyx_c_eq_float(__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_sum_float(__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_diff_float(__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_prod_float(__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;
    }
    #if 1
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        if (b.imag == 0) {
            return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else if (fabsf(b.real) >= fabsf(b.imag)) {
            if (b.real == 0 && b.imag == 0) {
                return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
            } else {
                float r = b.imag / b.real;
                float s = 1.0 / (b.real + b.imag * r);
                return __pyx_t_float_complex_from_parts(
                    (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
            }
        } else {
            float r = b.real / b.imag;
            float s = 1.0 / (b.imag + b.real * r);
            return __pyx_t_float_complex_from_parts(
                (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
        }
    }
    #else
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        if (b.imag == 0) {
            return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else {
            float denom = b.real * b.real + b.imag * b.imag;
            return __pyx_t_float_complex_from_parts(
                (a.real * b.real + a.imag * b.imag) / denom,
                (a.imag * b.real - a.real * b.imag) / denom);
        }
    }
    #endif
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__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_zero_float(__pyx_t_float_complex a) {
       return (a.real == 0) && (a.imag == 0);
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__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_abs_float(__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_pow_float(__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_prod_float(a, a);
                        return __Pyx_c_prod_float(a, a);
                    case 3:
                        z = __Pyx_c_prod_float(a, a);
                        return __Pyx_c_prod_float(z, a);
                    case 4:
                        z = __Pyx_c_prod_float(a, a);
                        return __Pyx_c_prod_float(z, z);
                }
            }
            if (a.imag == 0) {
                if (a.real == 0) {
                    return a;
                } else if (b.imag == 0) {
                    z.real = powf(a.real, b.real);
                    z.imag = 0;
                    return z;
                } else if (a.real > 0) {
                    r = a.real;
                    theta = 0;
                } else {
                    r = -a.real;
                    theta = atan2f(0, -1);
                }
            } else {
                r = __Pyx_c_abs_float(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

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

/* Arithmetic */
                  #if CYTHON_CCOMPLEX
#else
    static CYTHON_INLINE int __Pyx_c_eq_double(__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_double(__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_double(__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_double(__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;
    }
    #if 1
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        if (b.imag == 0) {
            return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else if (fabs(b.real) >= fabs(b.imag)) {
            if (b.real == 0 && b.imag == 0) {
                return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
            } else {
                double r = b.imag / b.real;
                double s = 1.0 / (b.real + b.imag * r);
                return __pyx_t_double_complex_from_parts(
                    (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
            }
        } else {
            double r = b.real / b.imag;
            double s = 1.0 / (b.imag + b.real * r);
            return __pyx_t_double_complex_from_parts(
                (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
        }
    }
    #else
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        if (b.imag == 0) {
            return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else {
            double denom = b.real * b.real + b.imag * b.imag;
            return __pyx_t_double_complex_from_parts(
                (a.real * b.real + a.imag * b.imag) / denom,
                (a.imag * b.real - a.real * b.imag) / denom);
        }
    }
    #endif
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__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_double(__pyx_t_double_complex a) {
       return (a.real == 0) && (a.imag == 0);
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__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_double(__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_double(__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_double(a, a);
                        return __Pyx_c_prod_double(a, a);
                    case 3:
                        z = __Pyx_c_prod_double(a, a);
                        return __Pyx_c_prod_double(z, a);
                    case 4:
                        z = __Pyx_c_prod_double(a, a);
                        return __Pyx_c_prod_double(z, z);
                }
            }
            if (a.imag == 0) {
                if (a.real == 0) {
                    return a;
                } else if (b.imag == 0) {
                    z.real = pow(a.real, b.real);
                    z.imag = 0;
                    return z;
                } else if (a.real > 0) {
                    r = a.real;
                    theta = 0;
                } else {
                    r = -a.real;
                    theta = atan2(0, -1);
                }
            } else {
                r = __Pyx_c_abs_double(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

/* CIntToPy */
                  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) {
    const enum NPY_TYPES neg_one = (enum NPY_TYPES) -1, const_zero = (enum NPY_TYPES) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum NPY_TYPES) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum NPY_TYPES) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
                  static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
    const int neg_one = (int) -1, const_zero = (int) 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(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#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_IntOrLong(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_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* CIntFromPy */
                  static CYTHON_INLINE unsigned short __Pyx_PyInt_As_unsigned_short(PyObject *x) {
    const unsigned short neg_one = (unsigned short) -1, const_zero = (unsigned short) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(unsigned short) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(unsigned short, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (unsigned short) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (unsigned short) 0;
                case  1: __PYX_VERIFY_RETURN_INT(unsigned short, digit, digits[0])
                case 2:
                    if (8 * sizeof(unsigned short) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned short, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned short) >= 2 * PyLong_SHIFT) {
                            return (unsigned short) (((((unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(unsigned short) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned short, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned short) >= 3 * PyLong_SHIFT) {
                            return (unsigned short) (((((((unsigned short)digits[2]) << PyLong_SHIFT) | (unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(unsigned short) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned short, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned short) >= 4 * PyLong_SHIFT) {
                            return (unsigned short) (((((((((unsigned short)digits[3]) << PyLong_SHIFT) | (unsigned short)digits[2]) << PyLong_SHIFT) | (unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (unsigned short) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(unsigned short) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned short, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(unsigned short) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned short, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (unsigned short) 0;
                case -1: __PYX_VERIFY_RETURN_INT(unsigned short, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(unsigned short,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(unsigned short) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned short, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned short) - 1 > 2 * PyLong_SHIFT) {
                            return (unsigned short) (((unsigned short)-1)*(((((unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(unsigned short) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned short, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned short) - 1 > 2 * PyLong_SHIFT) {
                            return (unsigned short) ((((((unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(unsigned short) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned short, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned short) - 1 > 3 * PyLong_SHIFT) {
                            return (unsigned short) (((unsigned short)-1)*(((((((unsigned short)digits[2]) << PyLong_SHIFT) | (unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(unsigned short) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned short, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned short) - 1 > 3 * PyLong_SHIFT) {
                            return (unsigned short) ((((((((unsigned short)digits[2]) << PyLong_SHIFT) | (unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(unsigned short) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned short, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned short) - 1 > 4 * PyLong_SHIFT) {
                            return (unsigned short) (((unsigned short)-1)*(((((((((unsigned short)digits[3]) << PyLong_SHIFT) | (unsigned short)digits[2]) << PyLong_SHIFT) | (unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(unsigned short) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned short, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned short) - 1 > 4 * PyLong_SHIFT) {
                            return (unsigned short) ((((((((((unsigned short)digits[3]) << PyLong_SHIFT) | (unsigned short)digits[2]) << PyLong_SHIFT) | (unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(unsigned short) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned short, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(unsigned short) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned short, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            unsigned short val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(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 (unsigned short) -1;
        }
    } else {
        unsigned short val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (unsigned short) -1;
        val = __Pyx_PyInt_As_unsigned_short(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to unsigned short");
    return (unsigned short) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to unsigned short");
    return (unsigned short) -1;
}

/* CIntFromPy */
                  static CYTHON_INLINE npy_int64 __Pyx_PyInt_As_npy_int64(PyObject *x) {
    const npy_int64 neg_one = (npy_int64) -1, const_zero = (npy_int64) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(npy_int64) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(npy_int64, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (npy_int64) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (npy_int64) 0;
                case  1: __PYX_VERIFY_RETURN_INT(npy_int64, digit, digits[0])
                case 2:
                    if (8 * sizeof(npy_int64) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(npy_int64) >= 2 * PyLong_SHIFT) {
                            return (npy_int64) (((((npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(npy_int64) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(npy_int64) >= 3 * PyLong_SHIFT) {
                            return (npy_int64) (((((((npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(npy_int64) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(npy_int64) >= 4 * PyLong_SHIFT) {
                            return (npy_int64) (((((((((npy_int64)digits[3]) << PyLong_SHIFT) | (npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (npy_int64) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(npy_int64) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(npy_int64, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(npy_int64) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(npy_int64, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (npy_int64) 0;
                case -1: __PYX_VERIFY_RETURN_INT(npy_int64, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(npy_int64,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(npy_int64) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(npy_int64, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(npy_int64) - 1 > 2 * PyLong_SHIFT) {
                            return (npy_int64) (((npy_int64)-1)*(((((npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(npy_int64) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(npy_int64) - 1 > 2 * PyLong_SHIFT) {
                            return (npy_int64) ((((((npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(npy_int64) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(npy_int64, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(npy_int64) - 1 > 3 * PyLong_SHIFT) {
                            return (npy_int64) (((npy_int64)-1)*(((((((npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(npy_int64) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(npy_int64) - 1 > 3 * PyLong_SHIFT) {
                            return (npy_int64) ((((((((npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(npy_int64) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(npy_int64, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(npy_int64) - 1 > 4 * PyLong_SHIFT) {
                            return (npy_int64) (((npy_int64)-1)*(((((((((npy_int64)digits[3]) << PyLong_SHIFT) | (npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(npy_int64) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(npy_int64) - 1 > 4 * PyLong_SHIFT) {
                            return (npy_int64) ((((((((((npy_int64)digits[3]) << PyLong_SHIFT) | (npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(npy_int64) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(npy_int64, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(npy_int64) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(npy_int64, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            npy_int64 val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(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 (npy_int64) -1;
        }
    } else {
        npy_int64 val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (npy_int64) -1;
        val = __Pyx_PyInt_As_npy_int64(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to npy_int64");
    return (npy_int64) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to npy_int64");
    return (npy_int64) -1;
}

/* CIntFromPy */
                  static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
    const long neg_one = (long) -1, const_zero = (long) 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(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (long) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(long) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(long) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#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_IntOrLong(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_IntOrLong(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* SwapException */
                  #if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    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;
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#endif

/* PyObjectCallMethod1 */
                  static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
    PyObject *method, *result = NULL;
    method = __Pyx_PyObject_GetAttrStr(obj, method_name);
    if (unlikely(!method)) goto done;
#if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(method))) {
        PyObject *self = PyMethod_GET_SELF(method);
        if (likely(self)) {
            PyObject *args;
            PyObject *function = PyMethod_GET_FUNCTION(method);
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(function)) {
                PyObject *args[2] = {self, arg};
                result = __Pyx_PyFunction_FastCall(function, args, 2);
                goto done;
            }
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(function)) {
                PyObject *args[2] = {self, arg};
                result = __Pyx_PyCFunction_FastCall(function, args, 2);
                goto done;
            }
            #endif
            args = PyTuple_New(2);
            if (unlikely(!args)) goto done;
            Py_INCREF(self);
            PyTuple_SET_ITEM(args, 0, self);
            Py_INCREF(arg);
            PyTuple_SET_ITEM(args, 1, arg);
            Py_INCREF(function);
            Py_DECREF(method); method = NULL;
            result = __Pyx_PyObject_Call(function, args, NULL);
            Py_DECREF(args);
            Py_DECREF(function);
            return result;
        }
    }
#endif
    result = __Pyx_PyObject_CallOneArg(method, arg);
done:
    Py_XDECREF(method);
    return result;
}

/* CoroutineBase */
                  #include <structmember.h>
#include <frameobject.h>
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
static PyObject *__Pyx_Coroutine_Close(PyObject *self);
static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
#define __Pyx_Coroutine_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_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&et, &ev, &tb);
    if (!et) {
        Py_XDECREF(tb);
        Py_XDECREF(ev);
        Py_INCREF(Py_None);
        *pvalue = Py_None;
        return 0;
    }
    if (likely(et == PyExc_StopIteration)) {
        if (!ev) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#if PY_VERSION_HEX >= 0x030300A0
        else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
            value = ((PyStopIterationObject *)ev)->value;
            Py_INCREF(value);
            Py_DECREF(ev);
        }
#endif
        else if (unlikely(PyTuple_Check(ev))) {
            if (PyTuple_GET_SIZE(ev) >= 1) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                value = PyTuple_GET_ITEM(ev, 0);
                Py_INCREF(value);
#else
                value = PySequence_ITEM(ev, 0);
#endif
            } else {
                Py_INCREF(Py_None);
                value = Py_None;
            }
            Py_DECREF(ev);
        }
        else if (!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
            value = ev;
        }
        if (likely(value)) {
            Py_XDECREF(tb);
            Py_DECREF(et);
            *pvalue = value;
            return 0;
        }
    } else if (!PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    PyErr_NormalizeException(&et, &ev, &tb);
    if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)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 = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
        Py_DECREF(ev);
        if (likely(args)) {
            value = PySequence_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_Coroutine_ExceptionClear(__pyx_CoroutineObject *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_Coroutine_CheckRunning(__pyx_CoroutineObject *gen) {
    if (unlikely(gen->is_running)) {
        PyErr_SetString(PyExc_ValueError,
                        "generator already executing");
        return 1;
    }
    return 0;
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value) {
    PyObject *retval;
    __Pyx_PyThreadState_declare
    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;
    }
    __Pyx_PyThreadState_assign
    if (value) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
#else
        if (self->exc_traceback) {
            PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
            PyFrameObject *f = tb->tb_frame;
            Py_XINCREF(__pyx_tstate->frame);
            assert(f->f_back == NULL);
            f->f_back = __pyx_tstate->frame;
        }
#endif
        __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
                            &self->exc_traceback);
    } else {
        __Pyx_Coroutine_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 || CYTHON_COMPILING_IN_PYSTON
#else
        if (self->exc_traceback) {
            PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
            PyFrameObject *f = tb->tb_frame;
            Py_CLEAR(f->f_back);
        }
#endif
    } else {
        __Pyx_Coroutine_ExceptionClear(self);
    }
    return retval;
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_MethodReturn(PyObject *retval) {
    if (unlikely(!retval && !PyErr_Occurred())) {
        PyErr_SetNone(PyExc_StopIteration);
    }
    return retval;
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
    PyObject *ret;
    PyObject *val = NULL;
    __Pyx_Coroutine_Undelegate(gen);
    __Pyx_PyGen_FetchStopIterationValue(&val);
    ret = __Pyx_Coroutine_SendEx(gen, val);
    Py_XDECREF(val);
    return ret;
}
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
    PyObject *retval;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(__Pyx_Coroutine_CheckRunning(gen)))
        return NULL;
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_CheckExact(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        {
            if (value == Py_None)
                ret = Py_TYPE(yf)->tp_iternext(yf);
            else
                ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
        }
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        retval = __Pyx_Coroutine_FinishDelegation(gen);
    } else {
        retval = __Pyx_Coroutine_SendEx(gen, value);
    }
    return __Pyx_Coroutine_MethodReturn(retval);
}
static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
    PyObject *retval = NULL;
    int err = 0;
    #ifdef __Pyx_Generator_USED
    if (__Pyx_Generator_CheckExact(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    #endif
    #ifdef __Pyx_Coroutine_USED
    if (__Pyx_Coroutine_CheckExact(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    #endif
    {
        PyObject *meth;
        gen->is_running = 1;
        meth = __Pyx_PyObject_GetAttrStr(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_Next(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(__Pyx_Coroutine_CheckRunning(gen)))
        return NULL;
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Generator_Next(yf);
        } else
        #endif
            ret = Py_TYPE(yf)->tp_iternext(yf);
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        return __Pyx_Coroutine_FinishDelegation(gen);
    }
    return __Pyx_Coroutine_SendEx(gen, Py_None);
}
static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *retval, *raised_exception;
    PyObject *yf = gen->yieldfrom;
    int err = 0;
    if (unlikely(__Pyx_Coroutine_CheckRunning(gen)))
        return NULL;
    if (yf) {
        Py_INCREF(yf);
        err = __Pyx_Coroutine_CloseIter(gen, yf);
        __Pyx_Coroutine_Undelegate(gen);
        Py_DECREF(yf);
    }
    if (err == 0)
        PyErr_SetNone(PyExc_GeneratorExit);
    retval = __Pyx_Coroutine_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
        || raised_exception == PyExc_GeneratorExit
        || PyErr_GivenExceptionMatches(raised_exception, PyExc_GeneratorExit)
        || PyErr_GivenExceptionMatches(raised_exception, PyExc_StopIteration))
    {
        if (raised_exception) PyErr_Clear();
        Py_INCREF(Py_None);
        return Py_None;
    }
    return NULL;
}
static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) 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_Coroutine_CheckRunning(gen)))
        return NULL;
    if (yf) {
        PyObject *ret;
        Py_INCREF(yf);
        if (PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit)) {
            int err = __Pyx_Coroutine_CloseIter(gen, yf);
            Py_DECREF(yf);
            __Pyx_Coroutine_Undelegate(gen);
            if (err < 0)
                return __Pyx_Coroutine_MethodReturn(__Pyx_Coroutine_SendEx(gen, NULL));
            goto throw_here;
        }
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Coroutine_Throw(yf, args);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_CheckExact(yf)) {
            ret = __Pyx_Coroutine_Throw(yf, args);
        } else
        #endif
        {
            PyObject *meth = __Pyx_PyObject_GetAttrStr(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_Coroutine_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_Coroutine_FinishDelegation(gen);
        }
        return __Pyx_Coroutine_MethodReturn(ret);
    }
throw_here:
    __Pyx_Raise(typ, val, tb, NULL);
    return __Pyx_Coroutine_MethodReturn(__Pyx_Coroutine_SendEx(gen, NULL));
}
static int __Pyx_Coroutine_traverse(PyObject *self, visitproc visit, void *arg) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) 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_Coroutine_clear(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) 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);
    Py_CLEAR(gen->gi_name);
    Py_CLEAR(gen->gi_qualname);
    return 0;
}
static void __Pyx_Coroutine_dealloc(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) 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;
        }
        PyObject_GC_UnTrack(self);
    }
    __Pyx_Coroutine_clear(self);
    PyObject_GC_Del(gen);
}
static void __Pyx_Coroutine_del(PyObject *self) {
    PyObject *res;
    PyObject *error_type, *error_value, *error_traceback;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    __Pyx_PyThreadState_declare
    if (gen->resume_label <= 0)
        return ;
#if PY_VERSION_HEX < 0x030400a1
    assert(self->ob_refcnt == 0);
    self->ob_refcnt = 1;
#endif
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
    res = __Pyx_Coroutine_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
    assert(self->ob_refcnt > 0);
    if (--self->ob_refcnt == 0) {
        return;
    }
    {
        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);
    _Py_DEC_REFTOTAL;
#endif
#ifdef COUNT_ALLOCS
    --Py_TYPE(self)->tp_frees;
    --Py_TYPE(self)->tp_allocs;
#endif
#endif
}
static PyObject *
__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self)
{
    PyObject *name = self->gi_name;
    if (unlikely(!name)) name = Py_None;
    Py_INCREF(name);
    return name;
}
static int
__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, 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 = self->gi_name;
    Py_INCREF(value);
    self->gi_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self)
{
    PyObject *name = self->gi_qualname;
    if (unlikely(!name)) name = Py_None;
    Py_INCREF(name);
    return name;
}
static int
__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, 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 = self->gi_qualname;
    Py_INCREF(value);
    self->gi_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static __pyx_CoroutineObject *__Pyx__Coroutine_New(
            PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name) {
    __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, 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;
    Py_XINCREF(qualname);
    gen->gi_qualname = qualname;
    Py_XINCREF(name);
    gen->gi_name = name;
    Py_XINCREF(module_name);
    gen->gi_modulename = module_name;
    PyObject_GC_Track(gen);
    return gen;
}

/* PatchModuleWithCoroutine */
                      static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    int result;
    PyObject *globals, *result_obj;
    globals = PyDict_New();  if (unlikely(!globals)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_coroutine_type",
    #ifdef __Pyx_Coroutine_USED
        (PyObject*)__pyx_CoroutineType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_generator_type",
    #ifdef __Pyx_Generator_USED
        (PyObject*)__pyx_GeneratorType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
    result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
    if (unlikely(!result_obj)) goto ignore;
    Py_DECREF(result_obj);
    Py_DECREF(globals);
    return module;
ignore:
    Py_XDECREF(globals);
    PyErr_WriteUnraisable(module);
    if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
        Py_DECREF(module);
        module = NULL;
    }
#else
    py_code++;
#endif
    return module;
}

/* PatchGeneratorABC */
                      #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
static PyObject* __Pyx_patch_abc_module(PyObject *module);
static PyObject* __Pyx_patch_abc_module(PyObject *module) {
    module = __Pyx_Coroutine_patch_module(
        module, ""
"if _cython_generator_type is not None:\n"
"    try: Generator = _module.Generator\n"
"    except AttributeError: pass\n"
"    else: Generator.register(_cython_generator_type)\n"
"if _cython_coroutine_type is not None:\n"
"    try: Coroutine = _module.Coroutine\n"
"    except AttributeError: pass\n"
"    else: Coroutine.register(_cython_coroutine_type)\n"
    );
    return module;
}
#endif
static int __Pyx_patch_abc(void) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    static int abc_patched = 0;
    if (!abc_patched) {
        PyObject *module;
        module = PyImport_ImportModule((PY_VERSION_HEX >= 0x03030000) ? "collections.abc" : "collections");
        if (!module) {
            PyErr_WriteUnraisable(NULL);
            if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
                    ((PY_VERSION_HEX >= 0x03030000) ?
                        "Cython module failed to register with collections.abc module" :
                        "Cython module failed to register with collections module"), 1) < 0)) {
                return -1;
            }
        } else {
            module = __Pyx_patch_abc_module(module);
            abc_patched = 1;
            if (unlikely(!module))
                return -1;
            Py_DECREF(module);
        }
        module = PyImport_ImportModule("backports_abc");
        if (module) {
            module = __Pyx_patch_abc_module(module);
            Py_XDECREF(module);
        }
        if (!module) {
            PyErr_Clear();
        }
    }
#else
    if (0) __Pyx_Coroutine_patch_module(NULL, NULL);
#endif
    return 0;
}

/* Generator */
                      static PyMethodDef __pyx_Generator_methods[] = {
    {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
     (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
    {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
     (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
    {"close", (PyCFunction) __Pyx_Coroutine_Close, METH_NOARGS,
     (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
    {0, 0, 0, 0}
};
static PyMemberDef __pyx_Generator_memberlist[] = {
    {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
    {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
     (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
    {0, 0, 0, 0, 0}
};
static PyGetSetDef __pyx_Generator_getsets[] = {
    {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
     (char*) PyDoc_STR("name of the generator"), 0},
    {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
     (char*) PyDoc_STR("qualified name of the generator"), 0},
    {0, 0, 0, 0, 0}
};
static PyTypeObject __pyx_GeneratorType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "generator",
    sizeof(__pyx_CoroutineObject),
    0,
    (destructor) __Pyx_Coroutine_dealloc,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
    0,
    (traverseproc) __Pyx_Coroutine_traverse,
    0,
    0,
    offsetof(__pyx_CoroutineObject, gi_weakreflist),
    0,
    (iternextfunc) __Pyx_Generator_Next,
    __pyx_Generator_methods,
    __pyx_Generator_memberlist,
    __pyx_Generator_getsets,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#else
    __Pyx_Coroutine_del,
#endif
    0,
#if PY_VERSION_HEX >= 0x030400a1
    __Pyx_Coroutine_del,
#endif
};
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 (unlikely(!__pyx_GeneratorType)) {
        return -1;
    }
    return 0;
}

/* CheckBinaryVersion */
                      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);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

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

/* TypeImport */
                      #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. Expected %zd, got %zd",
            module_name, class_name, basicsize, size);
        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
    }
    else if ((size_t)basicsize != size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s has the wrong size, try recompiling. Expected %zd, got %zd",
            module_name, class_name, basicsize, size);
        goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(py_module);
    Py_XDECREF(result);
    return NULL;
}
#endif

/* InitStrings */
                      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
        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(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)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 CYTHON_COMPILING_IN_CPYTHON && (__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
        *length = PyBytes_GET_SIZE(defenc);
        return defenc_c;
#else
        if (__Pyx_PyUnicode_READY(o) == -1) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        if (PyUnicode_IS_ASCII(o)) {
            *length = PyUnicode_GET_LENGTH(o);
            return PyUnicode_AsUTF8(o);
        } else {
            PyUnicode_AsASCIIString(o);
            return NULL;
        }
#else
        return PyUnicode_AsUTF8AndSize(o, length);
#endif
#endif
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#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_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  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 __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  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
#else
  res = PyNumber_Int(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;
}
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))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(x);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  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) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
