diff options
| author | Ben Green <ben@SEASITs-MacBook-Pro.local> | 2015-06-20 12:11:47 -0400 |
|---|---|---|
| committer | Ben Green <ben@SEASITs-MacBook-Pro.local> | 2015-06-20 12:11:47 -0400 |
| commit | aaa2f530675f9f76bcd48e9641354f7a0e043012 (patch) | |
| tree | 1da776ef59414233b80bc4e6afbc56bfd1e33dde /experiments | |
| parent | f2891c93b96388442d44512e6c43b092153f8c25 (diff) | |
| download | criminal_cascades-aaa2f530675f9f76bcd48e9641354f7a0e043012.tar.gz | |
added new model, ml2, which assumes all victims are infected by someone
else (unless they are root victims)
Diffstat (limited to 'experiments')
| -rw-r--r-- | experiments/build/temp.macosx-10.6-x86_64-2.7/ml.o | bin | 304076 -> 302088 bytes | |||
| -rw-r--r-- | experiments/build/temp.macosx-10.6-x86_64-2.7/ml2.o | bin | 0 -> 292208 bytes | |||
| -rw-r--r-- | experiments/ml.c | 449 | ||||
| -rw-r--r-- | experiments/ml.pyx | 14 | ||||
| -rwxr-xr-x | experiments/ml.so | bin | 109372 -> 108812 bytes | |||
| -rw-r--r-- | experiments/ml2.c | 8617 | ||||
| -rw-r--r-- | experiments/ml2.pyx | 86 | ||||
| -rwxr-xr-x | experiments/ml2.so | bin | 0 -> 104116 bytes | |||
| -rw-r--r-- | experiments/out.log | 2514 | ||||
| -rw-r--r-- | experiments/process.py | 9 | ||||
| -rw-r--r-- | experiments/setup2.py | 12 |
11 files changed, 8882 insertions, 2819 deletions
diff --git a/experiments/build/temp.macosx-10.6-x86_64-2.7/ml.o b/experiments/build/temp.macosx-10.6-x86_64-2.7/ml.o Binary files differindex 8b0e648..e626f4c 100644 --- a/experiments/build/temp.macosx-10.6-x86_64-2.7/ml.o +++ b/experiments/build/temp.macosx-10.6-x86_64-2.7/ml.o diff --git a/experiments/build/temp.macosx-10.6-x86_64-2.7/ml2.o b/experiments/build/temp.macosx-10.6-x86_64-2.7/ml2.o Binary files differnew file mode 100644 index 0000000..62313a2 --- /dev/null +++ b/experiments/build/temp.macosx-10.6-x86_64-2.7/ml2.o diff --git a/experiments/ml.c b/experiments/ml.c index 4c3f024..b350aaf 100644 --- a/experiments/ml.c +++ b/experiments/ml.c @@ -871,13 +871,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject static PyObject *__Pyx_GetBuiltinName(PyObject *name); -static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); -static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); - -static void __Pyx_WriteUnraisable(const char *name, int clineno, - int lineno, const char *filename, - int full_traceback); - 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); @@ -992,6 +985,9 @@ static double __Pyx__PyObject_AsDouble(PyObject* obj); static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname); +static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); + static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); #if PY_MAJOR_VERSION >= 3 @@ -1060,14 +1056,6 @@ static Py_ssize_t __Pyx_minusones[] = {-1, -1, -1, -1, -1, -1, -1, -1}; static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); -static int __Pyx_Print(PyObject*, PyObject *, int); -#if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3 -static PyObject* __pyx_print = 0; -static PyObject* __pyx_print_kwargs = 0; -#endif - -static int __Pyx_PrintOne(PyObject* stream, PyObject *o); - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); @@ -1303,14 +1291,12 @@ static char __pyx_k_w1[] = "w1"; static char __pyx_k_w2[] = "w2"; static char __pyx_k_w3[] = "w3"; static char __pyx_k_age[] = "age"; -static char __pyx_k_end[] = "end"; static char __pyx_k_inf[] = "-inf"; static char __pyx_k_max[] = "max"; static char __pyx_k_sum[] = "sum"; static char __pyx_k_args[] = "args"; static char __pyx_k_beta[] = "beta"; static char __pyx_k_dist[] = "dist"; -static char __pyx_k_file[] = "file"; static char __pyx_k_main[] = "__main__"; static char __pyx_k_send[] = "send"; static char __pyx_k_test[] = "__test__"; @@ -1320,12 +1306,12 @@ static char __pyx_k_close[] = "close"; static char __pyx_k_delta[] = "delta"; static char __pyx_k_dtype[] = "dtype"; static char __pyx_k_numpy[] = "numpy"; -static char __pyx_k_print[] = "print"; static char __pyx_k_probs[] = "probs"; static char __pyx_k_range[] = "range"; static char __pyx_k_roots[] = "roots"; static char __pyx_k_throw[] = "throw"; static char __pyx_k_zeros[] = "zeros"; +static char __pyx_k_arange[] = "arange"; static char __pyx_k_import[] = "__import__"; static char __pyx_k_thresh[] = "thresh"; static char __pyx_k_float64[] = "float64"; @@ -1349,7 +1335,6 @@ static char __pyx_k_non_victims[] = "non_victims"; static char __pyx_k_RuntimeError[] = "RuntimeError"; static char __pyx_k_max_beta_add[] = "max_beta_add"; static char __pyx_k_root_victims[] = "root_victims"; -static char __pyx_k_UNDERFLOW_ERROR[] = "UNDERFLOW ERROR"; static char __pyx_k_ml_locals_genexpr[] = "ml.<locals>.genexpr"; static char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; static char __pyx_k_Users_ben_Documents_Cascade_Pro[] = "/Users/ben/Documents/Cascade Project/criminal_cascades/experiments/ml.pyx"; @@ -1363,11 +1348,11 @@ static PyObject *__pyx_kp_u_Format_string_allocated_too_shor; static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2; static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; static PyObject *__pyx_n_s_RuntimeError; -static PyObject *__pyx_kp_s_UNDERFLOW_ERROR; static PyObject *__pyx_kp_s_Users_ben_Documents_Cascade_Pro; static PyObject *__pyx_n_s_ValueError; static PyObject *__pyx_n_s_age; static PyObject *__pyx_n_s_alpha; +static PyObject *__pyx_n_s_arange; static PyObject *__pyx_n_s_args; static PyObject *__pyx_n_s_beta; static PyObject *__pyx_n_s_beta_add; @@ -1376,10 +1361,8 @@ static PyObject *__pyx_n_s_delta; static PyObject *__pyx_n_s_dist; static PyObject *__pyx_n_s_dt; static PyObject *__pyx_n_s_dtype; -static PyObject *__pyx_n_s_end; static PyObject *__pyx_n_s_enumerate; static PyObject *__pyx_n_s_failures; -static PyObject *__pyx_n_s_file; static PyObject *__pyx_n_s_float64; static PyObject *__pyx_n_s_genexpr; static PyObject *__pyx_n_s_i; @@ -1404,7 +1387,6 @@ static PyObject *__pyx_n_s_non_victims; static PyObject *__pyx_n_s_np; static PyObject *__pyx_n_s_numpy; static PyObject *__pyx_n_s_parents; -static PyObject *__pyx_n_s_print; static PyObject *__pyx_n_s_probs; static PyObject *__pyx_n_s_probs_fail; static PyObject *__pyx_n_s_probs_nv; @@ -1424,7 +1406,9 @@ static PyObject *__pyx_n_s_w1; static PyObject *__pyx_n_s_w2; static PyObject *__pyx_n_s_w3; static PyObject *__pyx_n_s_zeros; -static PyObject *__pyx_float_0_13; +static PyObject *__pyx_float__2; +static PyObject *__pyx_float__002; +static PyObject *__pyx_float_0_001; static PyObject *__pyx_tuple_; static PyObject *__pyx_tuple__2; static PyObject *__pyx_tuple__3; @@ -1486,10 +1470,6 @@ static __pyx_t_2ml_DTYPE_t __pyx_f_2ml_weight_success(int __pyx_v_dist, int __py __pyx_t_2ml_DTYPE_t __pyx_v_result; __pyx_t_2ml_DTYPE_t __pyx_r; __Pyx_RefNannyDeclarations - int __pyx_t_1; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; __Pyx_RefNannySetupContext("weight_success", 0); /* "ml.pyx":16 @@ -1506,26 +1486,12 @@ static __pyx_t_2ml_DTYPE_t __pyx_f_2ml_weight_success(int __pyx_v_dist, int __py * # structural = plogis(w1,delta) * plogis(w2,delta) * plogis(w3,delta) * temporal = exp(-alpha*dt) * (exp(alpha)-1.) # <<<<<<<<<<<<<< * # temporal = 1 - exp(-alpha*dt) - * if exp(-alpha*dt)==0.: print 'UNDERFLOW ERROR' + * # if exp(-alpha*dt)==0.: print 'UNDERFLOW ERROR' */ __pyx_v_temporal = (exp(((-__pyx_v_alpha) * __pyx_v_dt)) * (exp(__pyx_v_alpha) - 1.)); - /* "ml.pyx":20 - * temporal = exp(-alpha*dt) * (exp(alpha)-1.) - * # temporal = 1 - exp(-alpha*dt) - * if exp(-alpha*dt)==0.: print 'UNDERFLOW ERROR' # <<<<<<<<<<<<<< - * # temporal = 1. / (1. + (dt - 1.)/alpha)**0.01 - 1. / (1. + dt/alpha)**0.01 - * result = log(structural * temporal) - */ - __pyx_t_1 = ((exp(((-__pyx_v_alpha) * __pyx_v_dt)) == 0.) != 0); - if (__pyx_t_1) { - if (__Pyx_PrintOne(0, __pyx_kp_s_UNDERFLOW_ERROR) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L3; - } - __pyx_L3:; - /* "ml.pyx":22 - * if exp(-alpha*dt)==0.: print 'UNDERFLOW ERROR' + * # if exp(-alpha*dt)==0.: print 'UNDERFLOW ERROR' * # temporal = 1. / (1. + (dt - 1.)/alpha)**0.01 - 1. / (1. + dt/alpha)**0.01 * result = log(structural * temporal) # <<<<<<<<<<<<<< * # print 'st', structural, temporal @@ -1552,9 +1518,6 @@ static __pyx_t_2ml_DTYPE_t __pyx_f_2ml_weight_success(int __pyx_v_dist, int __py */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("ml.weight_success", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); - __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; @@ -1935,7 +1898,8 @@ static PyObject *__pyx_pf_2ml_ml(CYTHON_UNUSED PyObject *__pyx_self, PyObject *_ int __pyx_t_25; int __pyx_t_26; double __pyx_t_27; - int __pyx_t_28; + PyObject *(*__pyx_t_28)(PyObject *); + int __pyx_t_29; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -1963,7 +1927,7 @@ static PyObject *__pyx_pf_2ml_ml(CYTHON_UNUSED PyObject *__pyx_self, PyObject *_ * DTYPE_t beta, ll * list parents, failures, successes * n_roots, n_victims = len(root_victims), len(victims) # <<<<<<<<<<<<<< - * n_nodes = 100 + * n_nodes = 148152 * cdef: */ if (unlikely(__pyx_v_root_victims == Py_None)) { @@ -1982,14 +1946,14 @@ static PyObject *__pyx_pf_2ml_ml(CYTHON_UNUSED PyObject *__pyx_self, PyObject *_ /* "ml.pyx":45 * list parents, failures, successes * n_roots, n_victims = len(root_victims), len(victims) - * n_nodes = 100 # <<<<<<<<<<<<<< + * n_nodes = 148152 # <<<<<<<<<<<<<< * cdef: * np.ndarray[DTYPE_t] probs = np.zeros(n_victims, dtype=DTYPE) */ - __pyx_v_n_nodes = 100; + __pyx_v_n_nodes = 148152; /* "ml.pyx":47 - * n_nodes = 100 + * n_nodes = 148152 * cdef: * np.ndarray[DTYPE_t] probs = np.zeros(n_victims, dtype=DTYPE) # <<<<<<<<<<<<<< * np.ndarray[DTYPE_t] probs_fail = np.zeros(n_victims, dtype=DTYPE) @@ -2736,7 +2700,7 @@ static PyObject *__pyx_pf_2ml_ml(CYTHON_UNUSED PyObject *__pyx_self, PyObject *_ * # print 'probs', probs * max_beta_add = float('-inf') # <<<<<<<<<<<<<< * # iterate over all victim nodes to find the optimal threshold - * for beta in [0.13]:#np.arange(0.001, .2, .002): + * for beta in np.arange(0.001, .2, .002): */ __pyx_t_27 = __Pyx_PyObject_AsDouble(__pyx_kp_s_inf); if (unlikely(__pyx_t_27 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyFloat_FromDouble(__pyx_t_27); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -2747,47 +2711,85 @@ static PyObject *__pyx_pf_2ml_ml(CYTHON_UNUSED PyObject *__pyx_self, PyObject *_ /* "ml.pyx":86 * max_beta_add = float('-inf') * # iterate over all victim nodes to find the optimal threshold - * for beta in [0.13]:#np.arange(0.001, .2, .002): # <<<<<<<<<<<<<< - * thresh = log(beta/(1.-beta)) + * for beta in np.arange(0.001, .2, .002): # <<<<<<<<<<<<<< + * thresh = log(beta/(3012*(1.-beta))) * # print 'beta:', beta, 'thresh:', thresh, 'infected:', len(probs[probs>=thresh]) */ - __pyx_t_5 = __pyx_tuple_; __Pyx_INCREF(__pyx_t_5); __pyx_t_2 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_arange); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { + __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_2 = 0; + __pyx_t_28 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_28 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { - if (__pyx_t_2 >= 1) break; - #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #endif - __pyx_t_24 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_24 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (likely(!__pyx_t_28)) { + if (likely(PyList_CheckExact(__pyx_t_4))) { + if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } else { + if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } + } else { + __pyx_t_5 = __pyx_t_28(__pyx_t_4); + if (unlikely(!__pyx_t_5)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + break; + } + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_t_24 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_24 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_beta = __pyx_t_24; /* "ml.pyx":87 * # iterate over all victim nodes to find the optimal threshold - * for beta in [0.13]:#np.arange(0.001, .2, .002): - * thresh = log(beta/(1.-beta)) # <<<<<<<<<<<<<< + * for beta in np.arange(0.001, .2, .002): + * thresh = log(beta/(3012*(1.-beta))) # <<<<<<<<<<<<<< * # print 'beta:', beta, 'thresh:', thresh, 'infected:', len(probs[probs>=thresh]) * roots = n_roots + len(probs[probs<thresh]) */ - __pyx_v_thresh = log((__pyx_v_beta / (1. - __pyx_v_beta))); + __pyx_v_thresh = log((__pyx_v_beta / (3012.0 * (1. - __pyx_v_beta)))); /* "ml.pyx":89 - * thresh = log(beta/(1.-beta)) + * thresh = log(beta/(3012*(1.-beta))) * # print 'beta:', beta, 'thresh:', thresh, 'infected:', len(probs[probs>=thresh]) * roots = n_roots + len(probs[probs<thresh]) # <<<<<<<<<<<<<< * * # add probability for realized edges and subtract probability these edges fail */ - __pyx_t_4 = PyFloat_FromDouble(__pyx_v_thresh); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_v_probs), __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyObject_GetItem(((PyObject *)__pyx_v_probs), __pyx_t_3); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyFloat_FromDouble(__pyx_v_thresh); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_v_probs), __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyObject_GetItem(((PyObject *)__pyx_v_probs), __pyx_t_3); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_1 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_roots = (__pyx_v_n_roots + __pyx_t_1); /* "ml.pyx":92 @@ -2818,15 +2820,15 @@ static PyObject *__pyx_pf_2ml_ml(CYTHON_UNUSED PyObject *__pyx_self, PyObject *_ } } if (__pyx_t_3) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __Pyx_GOTREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_XDECREF_SET(__pyx_v_beta_add, __pyx_t_4); - __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_v_beta_add, __pyx_t_5); + __pyx_t_5 = 0; /* "ml.pyx":94 * beta_add = (probs[probs>=thresh]).sum() @@ -2835,11 +2837,11 @@ static PyObject *__pyx_pf_2ml_ml(CYTHON_UNUSED PyObject *__pyx_self, PyObject *_ * * if beta_add > max_beta_add: */ - __pyx_t_4 = PyFloat_FromDouble(((__pyx_v_roots * log(__pyx_v_beta)) + ((__pyx_v_n_nodes - __pyx_v_roots) * log((1. - __pyx_v_beta))))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_beta_add, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyFloat_FromDouble(((__pyx_v_roots * log(__pyx_v_beta)) + ((__pyx_v_n_nodes - __pyx_v_roots) * log((1. - __pyx_v_beta))))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_beta_add, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_beta_add, __pyx_t_6); __pyx_t_6 = 0; @@ -2851,9 +2853,9 @@ static PyObject *__pyx_pf_2ml_ml(CYTHON_UNUSED PyObject *__pyx_self, PyObject *_ * max_roots = roots */ __pyx_t_6 = PyObject_RichCompare(__pyx_v_beta_add, __pyx_v_max_beta_add, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_28 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_28 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_29 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_29 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (__pyx_t_28) { + if (__pyx_t_29) { /* "ml.pyx":97 * @@ -2892,12 +2894,12 @@ static PyObject *__pyx_pf_2ml_ml(CYTHON_UNUSED PyObject *__pyx_self, PyObject *_ /* "ml.pyx":86 * max_beta_add = float('-inf') * # iterate over all victim nodes to find the optimal threshold - * for beta in [0.13]:#np.arange(0.001, .2, .002): # <<<<<<<<<<<<<< - * thresh = log(beta/(1.-beta)) + * for beta in np.arange(0.001, .2, .002): # <<<<<<<<<<<<<< + * thresh = log(beta/(3012*(1.-beta))) * # print 'beta:', beta, 'thresh:', thresh, 'infected:', len(probs[probs>=thresh]) */ } - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "ml.pyx":102 * # print 'beta:', max_beta, 'add:', max_beta_add, 'roots:', max_roots @@ -2906,11 +2908,11 @@ static PyObject *__pyx_pf_2ml_ml(CYTHON_UNUSED PyObject *__pyx_self, PyObject *_ * roots = max_roots * beta = max_beta */ - __pyx_t_5 = PyFloat_FromDouble(__pyx_v_ll); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_t_5, __pyx_v_max_beta_add); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyFloat_FromDouble(__pyx_v_ll); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_v_max_beta_add); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_24 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_24 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_ll = __pyx_t_24; @@ -2943,21 +2945,21 @@ static PyObject *__pyx_pf_2ml_ml(CYTHON_UNUSED PyObject *__pyx_self, PyObject *_ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = PyFloat_FromDouble(__pyx_v_beta); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_roots); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyFloat_FromDouble(__pyx_v_ll); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_roots); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyFloat_FromDouble(__pyx_v_ll); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5); - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); __pyx_t_6 = 0; - __pyx_t_5 = 0; __pyx_t_4 = 0; + __pyx_t_5 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; @@ -5269,11 +5271,11 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__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_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0}, {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, - {&__pyx_kp_s_UNDERFLOW_ERROR, __pyx_k_UNDERFLOW_ERROR, sizeof(__pyx_k_UNDERFLOW_ERROR), 0, 0, 1, 0}, {&__pyx_kp_s_Users_ben_Documents_Cascade_Pro, __pyx_k_Users_ben_Documents_Cascade_Pro, sizeof(__pyx_k_Users_ben_Documents_Cascade_Pro), 0, 0, 1, 0}, {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, {&__pyx_n_s_age, __pyx_k_age, sizeof(__pyx_k_age), 0, 0, 1, 1}, {&__pyx_n_s_alpha, __pyx_k_alpha, sizeof(__pyx_k_alpha), 0, 0, 1, 1}, + {&__pyx_n_s_arange, __pyx_k_arange, sizeof(__pyx_k_arange), 0, 0, 1, 1}, {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1}, {&__pyx_n_s_beta, __pyx_k_beta, sizeof(__pyx_k_beta), 0, 0, 1, 1}, {&__pyx_n_s_beta_add, __pyx_k_beta_add, sizeof(__pyx_k_beta_add), 0, 0, 1, 1}, @@ -5282,10 +5284,8 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_dist, __pyx_k_dist, sizeof(__pyx_k_dist), 0, 0, 1, 1}, {&__pyx_n_s_dt, __pyx_k_dt, sizeof(__pyx_k_dt), 0, 0, 1, 1}, {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1}, - {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1}, {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1}, {&__pyx_n_s_failures, __pyx_k_failures, sizeof(__pyx_k_failures), 0, 0, 1, 1}, - {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1}, {&__pyx_n_s_float64, __pyx_k_float64, sizeof(__pyx_k_float64), 0, 0, 1, 1}, {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 0, 1, 1}, {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1}, @@ -5310,7 +5310,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__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_n_s_parents, __pyx_k_parents, sizeof(__pyx_k_parents), 0, 0, 1, 1}, - {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1}, {&__pyx_n_s_probs, __pyx_k_probs, sizeof(__pyx_k_probs), 0, 0, 1, 1}, {&__pyx_n_s_probs_fail, __pyx_k_probs_fail, sizeof(__pyx_k_probs_fail), 0, 0, 1, 1}, {&__pyx_n_s_probs_nv, __pyx_k_probs_nv, sizeof(__pyx_k_probs_nv), 0, 0, 1, 1}, @@ -5351,11 +5350,11 @@ static int __Pyx_InitCachedConstants(void) { /* "ml.pyx":86 * max_beta_add = float('-inf') * # iterate over all victim nodes to find the optimal threshold - * for beta in [0.13]:#np.arange(0.001, .2, .002): # <<<<<<<<<<<<<< - * thresh = log(beta/(1.-beta)) + * for beta in np.arange(0.001, .2, .002): # <<<<<<<<<<<<<< + * thresh = log(beta/(3012*(1.-beta))) * # print 'beta:', beta, 'thresh:', thresh, 'infected:', len(probs[probs>=thresh]) */ - __pyx_tuple_ = PyTuple_Pack(1, __pyx_float_0_13); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple_ = PyTuple_Pack(3, __pyx_float_0_001, __pyx_float__2, __pyx_float__002); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); @@ -5445,7 +5444,9 @@ static int __Pyx_InitCachedConstants(void) { static int __Pyx_InitGlobals(void) { if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_float_0_13 = PyFloat_FromDouble(0.13); if (unlikely(!__pyx_float_0_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_float__2 = PyFloat_FromDouble(.2); if (unlikely(!__pyx_float__2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_float__002 = PyFloat_FromDouble(.002); if (unlikely(!__pyx_float__002)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_float_0_001 = PyFloat_FromDouble(0.001); if (unlikely(!__pyx_float_0_001)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; @@ -5664,64 +5665,6 @@ static PyObject *__Pyx_GetBuiltinName(PyObject *name) { return result; } -static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { -#if CYTHON_COMPILING_IN_CPYTHON - PyObject *tmp_type, *tmp_value, *tmp_tb; - PyThreadState *tstate = PyThreadState_GET(); - tmp_type = tstate->curexc_type; - tmp_value = tstate->curexc_value; - tmp_tb = tstate->curexc_traceback; - tstate->curexc_type = type; - tstate->curexc_value = value; - tstate->curexc_traceback = tb; - Py_XDECREF(tmp_type); - Py_XDECREF(tmp_value); - Py_XDECREF(tmp_tb); -#else - PyErr_Restore(type, value, tb); -#endif -} -static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { -#if CYTHON_COMPILING_IN_CPYTHON - PyThreadState *tstate = PyThreadState_GET(); - *type = tstate->curexc_type; - *value = tstate->curexc_value; - *tb = tstate->curexc_traceback; - tstate->curexc_type = 0; - tstate->curexc_value = 0; - tstate->curexc_traceback = 0; -#else - PyErr_Fetch(type, value, tb); -#endif -} - -static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, - CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, - int full_traceback) { - PyObject *old_exc, *old_val, *old_tb; - PyObject *ctx; - __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); - if (full_traceback) { - Py_XINCREF(old_exc); - Py_XINCREF(old_val); - Py_XINCREF(old_tb); - __Pyx_ErrRestore(old_exc, old_val, old_tb); - PyErr_PrintEx(1); - } - #if PY_MAJOR_VERSION < 3 - ctx = PyString_FromString(name); - #else - ctx = PyUnicode_FromString(name); - #endif - __Pyx_ErrRestore(old_exc, old_val, old_tb); - if (!ctx) { - PyErr_WriteUnraisable(Py_None); - } else { - PyErr_WriteUnraisable(ctx); - Py_DECREF(ctx); - } -} - static void __Pyx_RaiseArgtupleInvalid( const char* func_name, int exact, @@ -6904,6 +6847,37 @@ static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) { PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); } +static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { +#if CYTHON_COMPILING_IN_CPYTHON + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyThreadState *tstate = PyThreadState_GET(); + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#else + PyErr_Restore(type, value, tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { +#if CYTHON_COMPILING_IN_CPYTHON + PyThreadState *tstate = PyThreadState_GET(); + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#else + PyErr_Fetch(type, value, tb); +#endif +} + #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { @@ -7314,147 +7288,6 @@ bad: return module; } -#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 -static PyObject *__Pyx_GetStdout(void) { - PyObject *f = PySys_GetObject((char *)"stdout"); - if (!f) { - PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout"); - } - return f; -} -static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) { - int i; - if (!f) { - if (!(f = __Pyx_GetStdout())) - return -1; - } - Py_INCREF(f); - for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) { - PyObject* v; - if (PyFile_SoftSpace(f, 1)) { - if (PyFile_WriteString(" ", f) < 0) - goto error; - } - v = PyTuple_GET_ITEM(arg_tuple, i); - if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0) - goto error; - if (PyString_Check(v)) { - char *s = PyString_AsString(v); - Py_ssize_t len = PyString_Size(v); - if (len > 0) { - switch (s[len-1]) { - case ' ': break; - case '\f': case '\r': case '\n': case '\t': case '\v': - PyFile_SoftSpace(f, 0); - break; - default: break; - } - } - } - } - if (newline) { - if (PyFile_WriteString("\n", f) < 0) - goto error; - PyFile_SoftSpace(f, 0); - } - Py_DECREF(f); - return 0; -error: - Py_DECREF(f); - return -1; -} -#else -static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) { - PyObject* kwargs = 0; - PyObject* result = 0; - PyObject* end_string; - if (unlikely(!__pyx_print)) { - __pyx_print = PyObject_GetAttr(__pyx_b, __pyx_n_s_print); - if (!__pyx_print) - return -1; - } - if (stream) { - kwargs = PyDict_New(); - if (unlikely(!kwargs)) - return -1; - if (unlikely(PyDict_SetItem(kwargs, __pyx_n_s_file, stream) < 0)) - goto bad; - if (!newline) { - end_string = PyUnicode_FromStringAndSize(" ", 1); - if (unlikely(!end_string)) - goto bad; - if (PyDict_SetItem(kwargs, __pyx_n_s_end, end_string) < 0) { - Py_DECREF(end_string); - goto bad; - } - Py_DECREF(end_string); - } - } else if (!newline) { - if (unlikely(!__pyx_print_kwargs)) { - __pyx_print_kwargs = PyDict_New(); - if (unlikely(!__pyx_print_kwargs)) - return -1; - end_string = PyUnicode_FromStringAndSize(" ", 1); - if (unlikely(!end_string)) - return -1; - if (PyDict_SetItem(__pyx_print_kwargs, __pyx_n_s_end, end_string) < 0) { - Py_DECREF(end_string); - return -1; - } - Py_DECREF(end_string); - } - kwargs = __pyx_print_kwargs; - } - result = PyObject_Call(__pyx_print, arg_tuple, kwargs); - if (unlikely(kwargs) && (kwargs != __pyx_print_kwargs)) - Py_DECREF(kwargs); - if (!result) - return -1; - Py_DECREF(result); - return 0; -bad: - if (kwargs != __pyx_print_kwargs) - Py_XDECREF(kwargs); - return -1; -} -#endif - -#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 -static int __Pyx_PrintOne(PyObject* f, PyObject *o) { - if (!f) { - if (!(f = __Pyx_GetStdout())) - return -1; - } - Py_INCREF(f); - if (PyFile_SoftSpace(f, 0)) { - if (PyFile_WriteString(" ", f) < 0) - goto error; - } - if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0) - goto error; - if (PyFile_WriteString("\n", f) < 0) - goto error; - Py_DECREF(f); - return 0; -error: - Py_DECREF(f); - return -1; - /* the line below is just to avoid C compiler - * warnings about unused functions */ - return __Pyx_Print(f, NULL, 0); -} -#else -static int __Pyx_PrintOne(PyObject* stream, PyObject *o) { - int res; - PyObject* arg_tuple = PyTuple_Pack(1, o); - if (unlikely(!arg_tuple)) - return -1; - res = __Pyx_Print(stream, arg_tuple, 1); - Py_DECREF(arg_tuple); - return res; -} -#endif - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { const int neg_one = (int) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; diff --git a/experiments/ml.pyx b/experiments/ml.pyx index e1ce4cf..53e614b 100644 --- a/experiments/ml.pyx +++ b/experiments/ml.pyx @@ -13,13 +13,13 @@ cdef DTYPE_t weight_success(int dist, int dt, DTYPE_t alpha, DTYPE_t delta, DTYPE_t w1, DTYPE_t w2, DTYPE_t w3): """weight for successful infection, exponential time model""" cdef DTYPE_t structural, temporal, result - structural = delta ** dist + structural = dist * log(delta) # structural = plogis(w1,delta) * plogis(w2,delta) * plogis(w3,delta) - temporal = exp(-alpha*dt) * (exp(alpha)-1.) + temporal = log(exp(alpha)-1.) - alpha*dt # temporal = 1 - exp(-alpha*dt) - if exp(-alpha*dt)==0.: print 'UNDERFLOW ERROR' + # if exp(-alpha*dt)==0.: print 'UNDERFLOW ERROR' # temporal = 1. / (1. + (dt - 1.)/alpha)**0.01 - 1. / (1. + dt/alpha)**0.01 - result = log(structural * temporal) + result = structural + temporal # print 'st', structural, temporal return result @@ -42,7 +42,7 @@ def ml(dict root_victims, dict victims, dict non_victims, DTYPE_t age, DTYPE_t beta, ll list parents, failures, successes n_roots, n_victims = len(root_victims), len(victims) - n_nodes = 100 + n_nodes = 148152 cdef: np.ndarray[DTYPE_t] probs = np.zeros(n_victims, dtype=DTYPE) np.ndarray[DTYPE_t] probs_fail = np.zeros(n_victims, dtype=DTYPE) @@ -83,8 +83,8 @@ def ml(dict root_victims, dict victims, dict non_victims, DTYPE_t age, # print 'probs', probs max_beta_add = float('-inf') # iterate over all victim nodes to find the optimal threshold - for beta in [0.13]:#np.arange(0.001, .2, .002): - thresh = log(beta/(1.-beta)) + for beta in np.arange(0.001, .2, .002): + thresh = log(beta/(3012*(1.-beta))) # print 'beta:', beta, 'thresh:', thresh, 'infected:', len(probs[probs>=thresh]) roots = n_roots + len(probs[probs<thresh]) diff --git a/experiments/ml.so b/experiments/ml.so Binary files differindex da6fb1f..167b2df 100755 --- a/experiments/ml.so +++ b/experiments/ml.so diff --git a/experiments/ml2.c b/experiments/ml2.c new file mode 100644 index 0000000..fe1b1f6 --- /dev/null +++ b/experiments/ml2.c @@ -0,0 +1,8617 @@ +/* Generated by Cython 0.22 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [] + } +} +END: Cython Metadata */ + +#define PY_SSIZE_T_CLEAN +#ifndef CYTHON_USE_PYLONG_INTERNALS +#ifdef PYLONG_BITS_IN_DIGIT +#define CYTHON_USE_PYLONG_INTERNALS 0 +#else +#include "pyconfig.h" +#ifdef PYLONG_BITS_IN_DIGIT +#define CYTHON_USE_PYLONG_INTERNALS 1 +#else +#define CYTHON_USE_PYLONG_INTERNALS 0 +#endif +#endif +#endif +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000) + #error Cython requires Python 2.6+ or Python 3.2+. +#else +#define CYTHON_ABI "0_22" +#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 PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#ifdef PYPY_VERSION +#define CYTHON_COMPILING_IN_PYPY 1 +#define CYTHON_COMPILING_IN_CPYTHON 0 +#else +#define CYTHON_COMPILING_IN_PYPY 0 +#define CYTHON_COMPILING_IN_CPYTHON 1 +#endif +#if CYTHON_COMPILING_IN_PYPY && 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 +#if PY_MAJOR_VERSION >= 3 + #define Py_TPFLAGS_CHECKTYPES 0 + #define Py_TPFLAGS_HAVE_INDEX 0 + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#if PY_VERSION_HEX < 0x030400a1 && !defined(Py_TPFLAGS_HAVE_FINALIZE) + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) + #define CYTHON_PEP393_ENABLED 1 + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ? \ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) +#else + #define CYTHON_PEP393_ENABLED 0 + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) + #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) + #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) + #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) + #define __Pyx_PyFrozenSet_Size(s) PyObject_Size(s) +#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)) + #define __Pyx_PyFrozenSet_Size(s) PySet_Size(s) +#endif +#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) +#else + #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyBaseString_Type PyUnicode_Type + #define PyStringObject PyUnicodeObject + #define PyString_Type PyUnicode_Type + #define PyString_Check PyUnicode_Check + #define PyString_CheckExact PyUnicode_CheckExact +#endif +#if PY_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) +#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 +#ifndef CYTHON_INLINE + #if defined(__GNUC__) + #define CYTHON_INLINE __inline__ + #elif defined(_MSC_VER) + #define CYTHON_INLINE __inline + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_INLINE inline + #else + #define CYTHON_INLINE + #endif +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifdef NAN +#define __PYX_NAN() ((float) NAN) +#else +static CYTHON_INLINE float __PYX_NAN() { + /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and + a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is + a quiet NaN. */ + float value; + memset(&value, 0xFF, sizeof(value)); + return value; +} +#endif +#define __Pyx_void_to_None(void_result) (void_result, Py_INCREF(Py_None), Py_None) +#ifdef __cplusplus +template<typename T> +void __Pyx_call_destructor(T* x) { + x->~T(); +} +template<typename T> +class __Pyx_FakeReference { + public: + __Pyx_FakeReference() : ptr(NULL) { } + __Pyx_FakeReference(T& ref) : ptr(&ref) { } + T *operator->() { return ptr; } + operator T&() { return *ptr; } + private: + T *ptr; +}; +#endif + + +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#else + #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) +#endif + +#ifndef __PYX_EXTERN_C + #ifdef __cplusplus + #define __PYX_EXTERN_C extern "C" + #else + #define __PYX_EXTERN_C extern + #endif +#endif + +#if defined(WIN32) || defined(MS_WINDOWS) +#define _USE_MATH_DEFINES +#endif +#include <math.h> +#define __PYX_HAVE__ml2 +#define __PYX_HAVE_API__ml2 +#include "string.h" +#include "stdio.h" +#include "stdlib.h" +#include "numpy/arrayobject.h" +#include "numpy/ufuncobject.h" +#include "math.h" +#ifdef _OPENMP +#include <omp.h> +#endif /* _OPENMP */ + +#ifdef PYREX_WITHOUT_ASSERTIONS +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; + const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; + +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0 +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) ( \ + (sizeof(type) < sizeof(Py_ssize_t)) || \ + (sizeof(type) > sizeof(Py_ssize_t) && \ + likely(v < (type)PY_SSIZE_T_MAX || \ + v == (type)PY_SSIZE_T_MAX) && \ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN || \ + v == (type)PY_SSIZE_T_MIN))) || \ + (sizeof(type) == sizeof(Py_ssize_t) && \ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX || \ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(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_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None) +#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); +#if CYTHON_COMPILING_IN_CPYTHON +#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#else +#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#endif +#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) +#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII +static int __Pyx_sys_getdefaultencoding_not_ascii; +static int __Pyx_init_sys_getdefaultencoding_params(void) { + PyObject* sys; + 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 int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * __pyx_cfilenm= __FILE__; +static const char *__pyx_filename; + +#if !defined(CYTHON_CCOMPLEX) + #if defined(__cplusplus) + #define CYTHON_CCOMPLEX 1 + #elif defined(_Complex_I) + #define CYTHON_CCOMPLEX 1 + #else + #define CYTHON_CCOMPLEX 0 + #endif +#endif +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + #include <complex> + #else + #include <complex.h> + #endif +#endif +#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__) + #undef _Complex_I + #define _Complex_I 1.0fj +#endif + + +static const char *__pyx_f[] = { + "ml2.pyx", + "__init__.pxd", + "type.pxd", +}; +#define IS_UNSIGNED(type) (((type) -1) > 0) +struct __Pyx_StructField_; +#define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0) +typedef struct { + const char* name; + struct __Pyx_StructField_* fields; + size_t size; + size_t arraysize[8]; + int ndim; + char typegroup; + char is_unsigned; + int flags; +} __Pyx_TypeInfo; +typedef struct __Pyx_StructField_ { + __Pyx_TypeInfo* type; + const char* name; + size_t offset; +} __Pyx_StructField; +typedef struct { + __Pyx_StructField* field; + size_t parent_offset; +} __Pyx_BufFmt_StackElem; +typedef struct { + __Pyx_StructField root; + __Pyx_BufFmt_StackElem* head; + size_t fmt_offset; + size_t new_count, enc_count; + size_t struct_alignment; + int is_complex; + char enc_type; + char new_packmode; + char enc_packmode; + char is_valid_array; +} __Pyx_BufFmt_Context; + + +/* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":726 + * # 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; + +/* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/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 + */ +typedef npy_int16 __pyx_t_5numpy_int16_t; + +/* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":728 + * 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; + +/* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":729 + * 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; + +/* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":733 + * #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; + +/* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/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 + */ +typedef npy_uint16 __pyx_t_5numpy_uint16_t; + +/* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":735 + * 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; + +/* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":736 + * 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; + +/* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":740 + * #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; + +/* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":741 + * + * 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; + +/* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":750 + * # 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; + +/* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":751 + * # 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; + +/* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":752 + * 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; + +/* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":754 + * 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; + +/* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":755 + * + * ctypedef npy_ulong uint_t + * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< + * ctypedef npy_ulonglong ulonglong_t + * + */ +typedef npy_ulonglong __pyx_t_5numpy_ulong_t; + +/* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":756 + * 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; + +/* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":758 + * ctypedef npy_ulonglong ulonglong_t + * + * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< + * ctypedef npy_uintp uintp_t + * + */ +typedef npy_intp __pyx_t_5numpy_intp_t; + +/* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":759 + * + * ctypedef npy_intp intp_t + * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< + * + * ctypedef npy_double float_t + */ +typedef npy_uintp __pyx_t_5numpy_uintp_t; + +/* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":761 + * 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; + +/* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":762 + * + * ctypedef npy_double float_t + * ctypedef npy_double double_t # <<<<<<<<<<<<<< + * ctypedef npy_longdouble longdouble_t + * + */ +typedef npy_double __pyx_t_5numpy_double_t; + +/* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":763 + * 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; + +/* "ml2.pyx":7 + * + * DTYPE = np.float64 + * ctypedef np.float_t DTYPE_t # <<<<<<<<<<<<<< + * + * cdef DTYPE_t plogis(DTYPE_t weight, DTYPE_t delta): + */ +typedef __pyx_t_5numpy_float_t __pyx_t_3ml2_DTYPE_t; +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + typedef ::std::complex< float > __pyx_t_float_complex; + #else + typedef float _Complex __pyx_t_float_complex; + #endif +#else + typedef struct { float real, imag; } __pyx_t_float_complex; +#endif + +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + typedef ::std::complex< double > __pyx_t_double_complex; + #else + typedef double _Complex __pyx_t_double_complex; + #endif +#else + typedef struct { double real, imag; } __pyx_t_double_complex; +#endif + + +/*--- Type declarations ---*/ +struct __pyx_obj_3ml2___pyx_scope_struct__ml2; +struct __pyx_obj_3ml2___pyx_scope_struct_1_genexpr; + +/* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":765 + * 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; + +/* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":766 + * + * ctypedef npy_cfloat cfloat_t + * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< + * ctypedef npy_clongdouble clongdouble_t + * + */ +typedef npy_cdouble __pyx_t_5numpy_cdouble_t; + +/* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":767 + * 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; + +/* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":769 + * ctypedef npy_clongdouble clongdouble_t + * + * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew1(a): + */ +typedef npy_cdouble __pyx_t_5numpy_complex_t; + +/* "ml2.pyx":38 + * return result + * + * def ml2(dict root_victims, dict victims, dict non_victims, DTYPE_t age, # <<<<<<<<<<<<<< + * DTYPE_t alpha, DTYPE_t delta): + * cdef: + */ +struct __pyx_obj_3ml2___pyx_scope_struct__ml2 { + PyObject_HEAD + PyObject *__pyx_v_failures; + PyObject *__pyx_v_successes; +}; + + +/* "ml2.pyx":62 + * for (dist, dt, w1, w2, w3) in parents] + * # find parent that maximizes log(p) - log(\tilde{p}) + * probs[i] = max(s - failures[l] for l, s in enumerate(successes)) # <<<<<<<<<<<<<< + * + * # loop through non-victims + */ +struct __pyx_obj_3ml2___pyx_scope_struct_1_genexpr { + PyObject_HEAD + struct __pyx_obj_3ml2___pyx_scope_struct__ml2 *__pyx_outer_scope; + Py_ssize_t __pyx_v_l; + PyObject *__pyx_v_s; + Py_ssize_t __pyx_t_0; + PyObject *__pyx_t_1; + Py_ssize_t __pyx_t_2; +}; + + +/* --- Runtime support code (head) --- */ +#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) + +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); +#if PY_MAJOR_VERSION < 3 + if (likely(tp->tp_getattr)) + return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); +#endif + return PyObject_GetAttr(obj, attr_name); +} +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); + +static void __Pyx_WriteUnraisable(const char *name, int clineno, + int lineno, const char *filename, + int full_traceback); + +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); + +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \ + PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \ + const char* function_name); + +static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, + const char *name, int exact); + +static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname); + +#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); + +static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); + +#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 + +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); + +static CYTHON_INLINE int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj, + __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); +static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); + +static CYTHON_INLINE int __Pyx_IterFinish(void); + +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +#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 + +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); + +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); + +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); + +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); + +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); + +static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); + +static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** value1, PyObject** value2, + int is_tuple, int has_known_size, int decref_tuple); + +static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name, + Py_ssize_t* p_orig_length, int* p_is_dict); +static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict); + +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { + PyListObject* L = (PyListObject*) list; + Py_ssize_t len = Py_SIZE(list); + if (likely(L->allocated > len)) { + Py_INCREF(x); + PyList_SET_ITEM(list, len, x); + Py_SIZE(list) = len+1; + return 0; + } + return PyList_Append(list, x); +} +#else +#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) +#endif + +#define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0) +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +#if PY_MAJOR_VERSION >= 3 +static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { + PyObject *value; + value = PyDict_GetItemWithError(d, key); + if (unlikely(!value)) { + if (!PyErr_Occurred()) { + PyObject* args = PyTuple_Pack(1, key); + if (likely(args)) + PyErr_SetObject(PyExc_KeyError, args); + Py_XDECREF(args); + } + return NULL; + } + Py_INCREF(value); + return value; +} +#else + #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) +#endif + +#include <string.h> + +typedef struct { + int code_line; + PyCodeObject* code_object; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; +}; +static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static PyCodeObject *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); + +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +typedef struct { + Py_ssize_t shape, strides, suboffsets; +} __Pyx_Buf_DimInfo; +typedef struct { + size_t refcount; + Py_buffer pybuffer; +} __Pyx_Buffer; +typedef struct { + __Pyx_Buffer *rcbuffer; + char *data; + __Pyx_Buf_DimInfo diminfo[8]; +} __Pyx_LocalBuf_ND; + +#if PY_MAJOR_VERSION < 3 + static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags); + static void __Pyx_ReleaseBuffer(Py_buffer *view); +#else + #define __Pyx_GetBuffer PyObject_GetBuffer + #define __Pyx_ReleaseBuffer PyBuffer_Release +#endif + + +static Py_ssize_t __Pyx_zeros[] = {0, 0, 0, 0, 0, 0, 0, 0}; +static Py_ssize_t __Pyx_minusones[] = {-1, -1, -1, -1, -1, -1, -1, -1}; + +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); + +static int __Pyx_Print(PyObject*, PyObject *, int); +#if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3 +static PyObject* __pyx_print = 0; +static PyObject* __pyx_print_kwargs = 0; +#endif + +static int __Pyx_PrintOne(PyObject* stream, PyObject *o); + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); + +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); + +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + #define __Pyx_CREAL(z) ((z).real()) + #define __Pyx_CIMAG(z) ((z).imag()) + #else + #define __Pyx_CREAL(z) (__real__(z)) + #define __Pyx_CIMAG(z) (__imag__(z)) + #endif +#else + #define __Pyx_CREAL(z) ((z).real) + #define __Pyx_CIMAG(z) ((z).imag) +#endif +#if (defined(_WIN32) || defined(__clang__)) && defined(__cplusplus) && CYTHON_CCOMPLEX + #define __Pyx_SET_CREAL(z,x) ((z).real(x)) + #define __Pyx_SET_CIMAG(z,y) ((z).imag(y)) +#else + #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x) + #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y) +#endif + +static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); + +#if CYTHON_CCOMPLEX + #define __Pyx_c_eqf(a, b) ((a)==(b)) + #define __Pyx_c_sumf(a, b) ((a)+(b)) + #define __Pyx_c_difff(a, b) ((a)-(b)) + #define __Pyx_c_prodf(a, b) ((a)*(b)) + #define __Pyx_c_quotf(a, b) ((a)/(b)) + #define __Pyx_c_negf(a) (-(a)) + #ifdef __cplusplus + #define __Pyx_c_is_zerof(z) ((z)==(float)0) + #define __Pyx_c_conjf(z) (::std::conj(z)) + #if 1 + #define __Pyx_c_absf(z) (::std::abs(z)) + #define __Pyx_c_powf(a, b) (::std::pow(a, b)) + #endif + #else + #define __Pyx_c_is_zerof(z) ((z)==0) + #define __Pyx_c_conjf(z) (conjf(z)) + #if 1 + #define __Pyx_c_absf(z) (cabsf(z)) + #define __Pyx_c_powf(a, b) (cpowf(a, b)) + #endif + #endif +#else + static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex); + static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex); + #if 1 + static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex, __pyx_t_float_complex); + #endif +#endif + +static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); + +#if CYTHON_CCOMPLEX + #define __Pyx_c_eq(a, b) ((a)==(b)) + #define __Pyx_c_sum(a, b) ((a)+(b)) + #define __Pyx_c_diff(a, b) ((a)-(b)) + #define __Pyx_c_prod(a, b) ((a)*(b)) + #define __Pyx_c_quot(a, b) ((a)/(b)) + #define __Pyx_c_neg(a) (-(a)) + #ifdef __cplusplus + #define __Pyx_c_is_zero(z) ((z)==(double)0) + #define __Pyx_c_conj(z) (::std::conj(z)) + #if 1 + #define __Pyx_c_abs(z) (::std::abs(z)) + #define __Pyx_c_pow(a, b) (::std::pow(a, b)) + #endif + #else + #define __Pyx_c_is_zero(z) ((z)==0) + #define __Pyx_c_conj(z) (conj(z)) + #if 1 + #define __Pyx_c_abs(z) (cabs(z)) + #define __Pyx_c_pow(a, b) (cpow(a, b)) + #endif + #endif +#else + static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex); + static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex); + #if 1 + static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex, __pyx_t_double_complex); + #endif +#endif + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); + +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); + +static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); + +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); + +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); + +#define __Pyx_Generator_USED +#include <structmember.h> +#include <frameobject.h> +typedef PyObject *(*__pyx_generator_body_t)(PyObject *, PyObject *); +typedef struct { + PyObject_HEAD + __pyx_generator_body_t body; + PyObject *closure; + PyObject *exc_type; + PyObject *exc_value; + PyObject *exc_traceback; + PyObject *gi_weakreflist; + PyObject *classobj; + PyObject *yieldfrom; + PyObject *gi_name; + PyObject *gi_qualname; + int resume_label; + char is_running; +} __pyx_GeneratorObject; +static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body, + PyObject *closure, PyObject *name, PyObject *qualname); +static int __pyx_Generator_init(void); +static int __Pyx_Generator_clear(PyObject* self); +#if 1 || PY_VERSION_HEX < 0x030300B0 +static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue); +#else +#define __Pyx_PyGen_FetchStopIterationValue(pvalue) PyGen_FetchStopIterationValue(pvalue) +#endif + +static int __Pyx_check_binary_version(void); + +#if !defined(__Pyx_PyIdentifier_FromString) +#if PY_MAJOR_VERSION < 3 + #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s) +#else + #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s) +#endif +#endif + +static PyObject *__Pyx_ImportModule(const char *name); + +static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); + +static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); + + +/* Module declarations from 'cpython.buffer' */ + +/* Module declarations from 'cpython.ref' */ + +/* Module declarations from 'libc.string' */ + +/* Module declarations from 'libc.stdio' */ + +/* Module declarations from 'cpython.object' */ + +/* Module declarations from '__builtin__' */ + +/* Module declarations from 'cpython.type' */ +static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0; + +/* Module declarations from 'libc.stdlib' */ + +/* Module declarations from 'numpy' */ + +/* Module declarations from 'numpy' */ +static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; +static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; +static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; +static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; +static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; +static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ + +/* Module declarations from 'libc.math' */ + +/* Module declarations from 'ml2' */ +static PyTypeObject *__pyx_ptype_3ml2___pyx_scope_struct__ml2 = 0; +static PyTypeObject *__pyx_ptype_3ml2___pyx_scope_struct_1_genexpr = 0; +static __pyx_t_3ml2_DTYPE_t __pyx_f_3ml2_weight_success(int, int, __pyx_t_3ml2_DTYPE_t, __pyx_t_3ml2_DTYPE_t, __pyx_t_3ml2_DTYPE_t, __pyx_t_3ml2_DTYPE_t, __pyx_t_3ml2_DTYPE_t); /*proto*/ +static __pyx_t_3ml2_DTYPE_t __pyx_f_3ml2_weight_failure(int, int, __pyx_t_3ml2_DTYPE_t, __pyx_t_3ml2_DTYPE_t, __pyx_t_3ml2_DTYPE_t, __pyx_t_3ml2_DTYPE_t, __pyx_t_3ml2_DTYPE_t); /*proto*/ +static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_3ml2_DTYPE_t = { "DTYPE_t", NULL, sizeof(__pyx_t_3ml2_DTYPE_t), { 0 }, 0, 'R', 0, 0 }; +#define __Pyx_MODULE_NAME "ml2" +int __pyx_module_is_main_ml2 = 0; + +/* Implementation of 'ml2' */ +static PyObject *__pyx_builtin_enumerate; +static PyObject *__pyx_builtin_sum; +static PyObject *__pyx_builtin_max; +static PyObject *__pyx_builtin_ValueError; +static PyObject *__pyx_builtin_range; +static PyObject *__pyx_builtin_RuntimeError; +static PyObject *__pyx_pf_3ml2_3ml2_genexpr(PyObject *__pyx_self); /* proto */ +static PyObject *__pyx_pf_3ml2_ml2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_root_victims, PyObject *__pyx_v_victims, PyObject *__pyx_v_non_victims, CYTHON_UNUSED __pyx_t_3ml2_DTYPE_t __pyx_v_age, __pyx_t_3ml2_DTYPE_t __pyx_v_alpha, __pyx_t_3ml2_DTYPE_t __pyx_v_delta); /* 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_3ml2___pyx_scope_struct__ml2(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_3ml2___pyx_scope_struct_1_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static char __pyx_k_B[] = "B"; +static char __pyx_k_H[] = "H"; +static char __pyx_k_I[] = "I"; +static char __pyx_k_L[] = "L"; +static char __pyx_k_O[] = "O"; +static char __pyx_k_Q[] = "Q"; +static char __pyx_k_b[] = "b"; +static char __pyx_k_d[] = "d"; +static char __pyx_k_f[] = "f"; +static char __pyx_k_g[] = "g"; +static char __pyx_k_h[] = "h"; +static char __pyx_k_i[] = "i"; +static char __pyx_k_l[] = "l"; +static char __pyx_k_q[] = "q"; +static char __pyx_k_t[] = "t"; +static char __pyx_k_Zd[] = "Zd"; +static char __pyx_k_Zf[] = "Zf"; +static char __pyx_k_Zg[] = "Zg"; +static char __pyx_k_dt[] = "dt"; +static char __pyx_k_ll[] = "ll"; +static char __pyx_k_np[] = "np"; +static char __pyx_k_w1[] = "w1"; +static char __pyx_k_w2[] = "w2"; +static char __pyx_k_w3[] = "w3"; +static char __pyx_k_age[] = "age"; +static char __pyx_k_end[] = "end"; +static char __pyx_k_max[] = "max"; +static char __pyx_k_ml2[] = "ml2"; +static char __pyx_k_sum[] = "sum"; +static char __pyx_k_args[] = "args"; +static char __pyx_k_beta[] = "beta"; +static char __pyx_k_dist[] = "dist"; +static char __pyx_k_file[] = "file"; +static char __pyx_k_main[] = "__main__"; +static char __pyx_k_send[] = "send"; +static char __pyx_k_test[] = "__test__"; +static char __pyx_k_DTYPE[] = "DTYPE"; +static char __pyx_k_alpha[] = "alpha"; +static char __pyx_k_close[] = "close"; +static char __pyx_k_delta[] = "delta"; +static char __pyx_k_dtype[] = "dtype"; +static char __pyx_k_numpy[] = "numpy"; +static char __pyx_k_print[] = "print"; +static char __pyx_k_probs[] = "probs"; +static char __pyx_k_range[] = "range"; +static char __pyx_k_roots[] = "roots"; +static char __pyx_k_throw[] = "throw"; +static char __pyx_k_zeros[] = "zeros"; +static char __pyx_k_import[] = "__import__"; +static char __pyx_k_float64[] = "float64"; +static char __pyx_k_genexpr[] = "genexpr"; +static char __pyx_k_n_nodes[] = "n_nodes"; +static char __pyx_k_n_roots[] = "n_roots"; +static char __pyx_k_parents[] = "parents"; +static char __pyx_k_victims[] = "victims"; +static char __pyx_k_failures[] = "failures"; +static char __pyx_k_probs_nv[] = "probs_nv"; +static char __pyx_k_enumerate[] = "enumerate"; +static char __pyx_k_n_victims[] = "n_victims"; +static char __pyx_k_successes[] = "successes"; +static char __pyx_k_ValueError[] = "ValueError"; +static char __pyx_k_itervalues[] = "itervalues"; +static char __pyx_k_probs_fail[] = "probs_fail"; +static char __pyx_k_non_victims[] = "non_victims"; +static char __pyx_k_RuntimeError[] = "RuntimeError"; +static char __pyx_k_root_victims[] = "root_victims"; +static char __pyx_k_UNDERFLOW_ERROR[] = "UNDERFLOW ERROR"; +static char __pyx_k_ml2_locals_genexpr[] = "ml2.<locals>.genexpr"; +static char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; +static char __pyx_k_Users_ben_Documents_Cascade_Pro[] = "/Users/ben/Documents/Cascade Project/criminal_cascades/experiments/ml2.pyx"; +static char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)"; +static char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd"; +static char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported"; +static char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous"; +static char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short."; +static PyObject *__pyx_n_s_DTYPE; +static PyObject *__pyx_kp_u_Format_string_allocated_too_shor; +static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2; +static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; +static PyObject *__pyx_n_s_RuntimeError; +static PyObject *__pyx_kp_s_UNDERFLOW_ERROR; +static PyObject *__pyx_kp_s_Users_ben_Documents_Cascade_Pro; +static PyObject *__pyx_n_s_ValueError; +static PyObject *__pyx_n_s_age; +static PyObject *__pyx_n_s_alpha; +static PyObject *__pyx_n_s_args; +static PyObject *__pyx_n_s_beta; +static PyObject *__pyx_n_s_close; +static PyObject *__pyx_n_s_delta; +static PyObject *__pyx_n_s_dist; +static PyObject *__pyx_n_s_dt; +static PyObject *__pyx_n_s_dtype; +static PyObject *__pyx_n_s_end; +static PyObject *__pyx_n_s_enumerate; +static PyObject *__pyx_n_s_failures; +static PyObject *__pyx_n_s_file; +static PyObject *__pyx_n_s_float64; +static PyObject *__pyx_n_s_genexpr; +static PyObject *__pyx_n_s_i; +static PyObject *__pyx_n_s_import; +static PyObject *__pyx_n_s_itervalues; +static PyObject *__pyx_n_s_l; +static PyObject *__pyx_n_s_ll; +static PyObject *__pyx_n_s_main; +static PyObject *__pyx_n_s_max; +static PyObject *__pyx_n_s_ml2; +static PyObject *__pyx_n_s_ml2_locals_genexpr; +static PyObject *__pyx_n_s_n_nodes; +static PyObject *__pyx_n_s_n_roots; +static PyObject *__pyx_n_s_n_victims; +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_non_victims; +static PyObject *__pyx_n_s_np; +static PyObject *__pyx_n_s_numpy; +static PyObject *__pyx_n_s_parents; +static PyObject *__pyx_n_s_print; +static PyObject *__pyx_n_s_probs; +static PyObject *__pyx_n_s_probs_fail; +static PyObject *__pyx_n_s_probs_nv; +static PyObject *__pyx_n_s_range; +static PyObject *__pyx_n_s_root_victims; +static PyObject *__pyx_n_s_roots; +static PyObject *__pyx_n_s_send; +static PyObject *__pyx_n_s_successes; +static PyObject *__pyx_n_s_sum; +static PyObject *__pyx_n_s_t; +static PyObject *__pyx_n_s_test; +static PyObject *__pyx_n_s_throw; +static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd; +static PyObject *__pyx_n_s_victims; +static PyObject *__pyx_n_s_w1; +static PyObject *__pyx_n_s_w2; +static PyObject *__pyx_n_s_w3; +static PyObject *__pyx_n_s_zeros; +static PyObject *__pyx_tuple_; +static PyObject *__pyx_tuple__2; +static PyObject *__pyx_tuple__3; +static PyObject *__pyx_tuple__4; +static PyObject *__pyx_tuple__5; +static PyObject *__pyx_tuple__6; +static PyObject *__pyx_tuple__7; +static PyObject *__pyx_codeobj__8; + +/* "ml2.pyx":9 + * ctypedef np.float_t DTYPE_t + * + * cdef DTYPE_t plogis(DTYPE_t weight, DTYPE_t delta): # <<<<<<<<<<<<<< + * return 1./(1. + exp(-weight/delta)) + * + */ + +static __pyx_t_3ml2_DTYPE_t __pyx_f_3ml2_plogis(__pyx_t_3ml2_DTYPE_t __pyx_v_weight, __pyx_t_3ml2_DTYPE_t __pyx_v_delta) { + __pyx_t_3ml2_DTYPE_t __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("plogis", 0); + + /* "ml2.pyx":10 + * + * cdef DTYPE_t plogis(DTYPE_t weight, DTYPE_t delta): + * return 1./(1. + exp(-weight/delta)) # <<<<<<<<<<<<<< + * + * cdef DTYPE_t weight_success(int dist, int dt, DTYPE_t alpha, DTYPE_t delta, + */ + __pyx_r = (1. / (1. + exp(((-__pyx_v_weight) / __pyx_v_delta)))); + goto __pyx_L0; + + /* "ml2.pyx":9 + * ctypedef np.float_t DTYPE_t + * + * cdef DTYPE_t plogis(DTYPE_t weight, DTYPE_t delta): # <<<<<<<<<<<<<< + * return 1./(1. + exp(-weight/delta)) + * + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "ml2.pyx":12 + * return 1./(1. + exp(-weight/delta)) + * + * cdef DTYPE_t weight_success(int dist, int dt, DTYPE_t alpha, DTYPE_t delta, # <<<<<<<<<<<<<< + * DTYPE_t w1, DTYPE_t w2, DTYPE_t w3): + * """weight for successful infection, exponential time model""" + */ + +static __pyx_t_3ml2_DTYPE_t __pyx_f_3ml2_weight_success(int __pyx_v_dist, int __pyx_v_dt, __pyx_t_3ml2_DTYPE_t __pyx_v_alpha, __pyx_t_3ml2_DTYPE_t __pyx_v_delta, CYTHON_UNUSED __pyx_t_3ml2_DTYPE_t __pyx_v_w1, CYTHON_UNUSED __pyx_t_3ml2_DTYPE_t __pyx_v_w2, CYTHON_UNUSED __pyx_t_3ml2_DTYPE_t __pyx_v_w3) { + __pyx_t_3ml2_DTYPE_t __pyx_v_structural; + __pyx_t_3ml2_DTYPE_t __pyx_v_temporal; + __pyx_t_3ml2_DTYPE_t __pyx_v_result; + __pyx_t_3ml2_DTYPE_t __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("weight_success", 0); + + /* "ml2.pyx":16 + * """weight for successful infection, exponential time model""" + * cdef DTYPE_t structural, temporal, result + * structural = delta ** dist # <<<<<<<<<<<<<< + * # structural = plogis(w1,delta) * plogis(w2,delta) * plogis(w3,delta) + * temporal = exp(-alpha*dt) * (exp(alpha)-1.) + */ + __pyx_v_structural = pow(__pyx_v_delta, ((__pyx_t_3ml2_DTYPE_t)__pyx_v_dist)); + + /* "ml2.pyx":18 + * structural = delta ** dist + * # structural = plogis(w1,delta) * plogis(w2,delta) * plogis(w3,delta) + * temporal = exp(-alpha*dt) * (exp(alpha)-1.) # <<<<<<<<<<<<<< + * # temporal = 1 - exp(-alpha*dt) + * if exp(-alpha*dt)==0.: print 'UNDERFLOW ERROR' + */ + __pyx_v_temporal = (exp(((-__pyx_v_alpha) * __pyx_v_dt)) * (exp(__pyx_v_alpha) - 1.)); + + /* "ml2.pyx":20 + * temporal = exp(-alpha*dt) * (exp(alpha)-1.) + * # temporal = 1 - exp(-alpha*dt) + * if exp(-alpha*dt)==0.: print 'UNDERFLOW ERROR' # <<<<<<<<<<<<<< + * # temporal = 1. / (1. + (dt - 1.)/alpha)**0.01 - 1. / (1. + dt/alpha)**0.01 + * result = log(structural * temporal) + */ + __pyx_t_1 = ((exp(((-__pyx_v_alpha) * __pyx_v_dt)) == 0.) != 0); + if (__pyx_t_1) { + if (__Pyx_PrintOne(0, __pyx_kp_s_UNDERFLOW_ERROR) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L3; + } + __pyx_L3:; + + /* "ml2.pyx":22 + * if exp(-alpha*dt)==0.: print 'UNDERFLOW ERROR' + * # temporal = 1. / (1. + (dt - 1.)/alpha)**0.01 - 1. / (1. + dt/alpha)**0.01 + * result = log(structural * temporal) # <<<<<<<<<<<<<< + * # print 'st', structural, temporal + * return result + */ + __pyx_v_result = log((__pyx_v_structural * __pyx_v_temporal)); + + /* "ml2.pyx":24 + * result = log(structural * temporal) + * # print 'st', structural, temporal + * return result # <<<<<<<<<<<<<< + * + * cdef DTYPE_t weight_failure(int dist, int dt, DTYPE_t alpha, DTYPE_t delta, + */ + __pyx_r = __pyx_v_result; + goto __pyx_L0; + + /* "ml2.pyx":12 + * return 1./(1. + exp(-weight/delta)) + * + * cdef DTYPE_t weight_success(int dist, int dt, DTYPE_t alpha, DTYPE_t delta, # <<<<<<<<<<<<<< + * DTYPE_t w1, DTYPE_t w2, DTYPE_t w3): + * """weight for successful infection, exponential time model""" + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_WriteUnraisable("ml2.weight_success", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); + __pyx_r = 0; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "ml2.pyx":26 + * return result + * + * cdef DTYPE_t weight_failure(int dist, int dt, DTYPE_t alpha, DTYPE_t delta, # <<<<<<<<<<<<<< + * DTYPE_t w1, DTYPE_t w2, DTYPE_t w3): + * """weight for failed infection, exponential time model""" + */ + +static __pyx_t_3ml2_DTYPE_t __pyx_f_3ml2_weight_failure(int __pyx_v_dist, int __pyx_v_dt, __pyx_t_3ml2_DTYPE_t __pyx_v_alpha, __pyx_t_3ml2_DTYPE_t __pyx_v_delta, CYTHON_UNUSED __pyx_t_3ml2_DTYPE_t __pyx_v_w1, CYTHON_UNUSED __pyx_t_3ml2_DTYPE_t __pyx_v_w2, CYTHON_UNUSED __pyx_t_3ml2_DTYPE_t __pyx_v_w3) { + __pyx_t_3ml2_DTYPE_t __pyx_v_structural; + __pyx_t_3ml2_DTYPE_t __pyx_v_temporal; + __pyx_t_3ml2_DTYPE_t __pyx_v_result; + __pyx_t_3ml2_DTYPE_t __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("weight_failure", 0); + + /* "ml2.pyx":30 + * """weight for failed infection, exponential time model""" + * cdef DTYPE_t structural, temporal, result + * structural = delta ** dist # <<<<<<<<<<<<<< + * # structural = plogis(w1,delta) * plogis(w2,delta) * plogis(w3,delta) + * temporal = exp(-alpha * dt) + */ + __pyx_v_structural = pow(__pyx_v_delta, ((__pyx_t_3ml2_DTYPE_t)__pyx_v_dist)); + + /* "ml2.pyx":32 + * structural = delta ** dist + * # structural = plogis(w1,delta) * plogis(w2,delta) * plogis(w3,delta) + * temporal = exp(-alpha * dt) # <<<<<<<<<<<<<< + * # temporal = 1. - 1. / (1. + dt/alpha)**0.01 + * result = log(1. - structural + structural * temporal) + */ + __pyx_v_temporal = exp(((-__pyx_v_alpha) * __pyx_v_dt)); + + /* "ml2.pyx":34 + * temporal = exp(-alpha * dt) + * # temporal = 1. - 1. / (1. + dt/alpha)**0.01 + * result = log(1. - structural + structural * temporal) # <<<<<<<<<<<<<< + * # print 'stnv', structural, temporal + * return result + */ + __pyx_v_result = log(((1. - __pyx_v_structural) + (__pyx_v_structural * __pyx_v_temporal))); + + /* "ml2.pyx":36 + * result = log(1. - structural + structural * temporal) + * # print 'stnv', structural, temporal + * return result # <<<<<<<<<<<<<< + * + * def ml2(dict root_victims, dict victims, dict non_victims, DTYPE_t age, + */ + __pyx_r = __pyx_v_result; + goto __pyx_L0; + + /* "ml2.pyx":26 + * return result + * + * cdef DTYPE_t weight_failure(int dist, int dt, DTYPE_t alpha, DTYPE_t delta, # <<<<<<<<<<<<<< + * DTYPE_t w1, DTYPE_t w2, DTYPE_t w3): + * """weight for failed infection, exponential time model""" + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "ml2.pyx":38 + * return result + * + * def ml2(dict root_victims, dict victims, dict non_victims, DTYPE_t age, # <<<<<<<<<<<<<< + * DTYPE_t alpha, DTYPE_t delta): + * cdef: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_3ml2_1ml2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_3ml2_1ml2 = {"ml2", (PyCFunction)__pyx_pw_3ml2_1ml2, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_3ml2_1ml2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_root_victims = 0; + PyObject *__pyx_v_victims = 0; + PyObject *__pyx_v_non_victims = 0; + CYTHON_UNUSED __pyx_t_3ml2_DTYPE_t __pyx_v_age; + __pyx_t_3ml2_DTYPE_t __pyx_v_alpha; + __pyx_t_3ml2_DTYPE_t __pyx_v_delta; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("ml2 (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_root_victims,&__pyx_n_s_victims,&__pyx_n_s_non_victims,&__pyx_n_s_age,&__pyx_n_s_alpha,&__pyx_n_s_delta,0}; + PyObject* values[6] = {0,0,0,0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_root_victims)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_victims)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("ml2", 1, 6, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + case 2: + if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_non_victims)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("ml2", 1, 6, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + case 3: + if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_age)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("ml2", 1, 6, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + case 4: + if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_alpha)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("ml2", 1, 6, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + case 5: + if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_delta)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("ml2", 1, 6, 6, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ml2") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + values[5] = PyTuple_GET_ITEM(__pyx_args, 5); + } + __pyx_v_root_victims = ((PyObject*)values[0]); + __pyx_v_victims = ((PyObject*)values[1]); + __pyx_v_non_victims = ((PyObject*)values[2]); + __pyx_v_age = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_age == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_alpha = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_alpha == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_delta = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_delta == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("ml2", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_L3_error:; + __Pyx_AddTraceback("ml2.ml2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root_victims), (&PyDict_Type), 1, "root_victims", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_victims), (&PyDict_Type), 1, "victims", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_non_victims), (&PyDict_Type), 1, "non_victims", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_3ml2_ml2(__pyx_self, __pyx_v_root_victims, __pyx_v_victims, __pyx_v_non_victims, __pyx_v_age, __pyx_v_alpha, __pyx_v_delta); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +static PyObject *__pyx_gb_3ml2_3ml2_2generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ + +/* "ml2.pyx":62 + * for (dist, dt, w1, w2, w3) in parents] + * # find parent that maximizes log(p) - log(\tilde{p}) + * probs[i] = max(s - failures[l] for l, s in enumerate(successes)) # <<<<<<<<<<<<<< + * + * # loop through non-victims + */ + +static PyObject *__pyx_pf_3ml2_3ml2_genexpr(PyObject *__pyx_self) { + struct __pyx_obj_3ml2___pyx_scope_struct_1_genexpr *__pyx_cur_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("genexpr", 0); + __pyx_cur_scope = (struct __pyx_obj_3ml2___pyx_scope_struct_1_genexpr *)__pyx_tp_new_3ml2___pyx_scope_struct_1_genexpr(__pyx_ptype_3ml2___pyx_scope_struct_1_genexpr, __pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __Pyx_RefNannyFinishContext(); + return NULL; + } + __Pyx_GOTREF(__pyx_cur_scope); + __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_3ml2___pyx_scope_struct__ml2 *) __pyx_self; + __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); + { + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_3ml2_3ml2_2generator, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_ml2_locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; + } + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("ml2.ml2.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_gb_3ml2_3ml2_2generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +{ + struct __pyx_obj_3ml2___pyx_scope_struct_1_genexpr *__pyx_cur_scope = ((struct __pyx_obj_3ml2___pyx_scope_struct_1_genexpr *)__pyx_generator->closure); + PyObject *__pyx_r = NULL; + Py_ssize_t __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("None", 0); + switch (__pyx_generator->resume_label) { + case 0: goto __pyx_L3_first_run; + case 1: goto __pyx_L6_resume_from_yield; + default: /* CPython raises the right error here */ + __Pyx_RefNannyFinishContext(); + return NULL; + } + __pyx_L3_first_run:; + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = 0; + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_successes)) { __Pyx_RaiseClosureNameError("successes"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_2 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_successes; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; + for (;;) { + if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_s); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_s, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; + __pyx_cur_scope->__pyx_v_l = __pyx_t_1; + __pyx_t_1 = (__pyx_t_1 + 1); + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_failures)) { __Pyx_RaiseClosureNameError("failures"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_failures == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_failures, __pyx_cur_scope->__pyx_v_l, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 0); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_s, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; + __Pyx_XGIVEREF(__pyx_t_2); + __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; + __pyx_cur_scope->__pyx_t_2 = __pyx_t_3; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + /* return from generator, yielding value */ + __pyx_generator->resume_label = 1; + return __pyx_r; + __pyx_L6_resume_from_yield:; + __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; + __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; + __pyx_cur_scope->__pyx_t_1 = 0; + __Pyx_XGOTREF(__pyx_t_2); + __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* function exit code */ + PyErr_SetNone(PyExc_StopIteration); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_L0:; + __Pyx_XDECREF(__pyx_r); + __pyx_generator->resume_label = -1; + __Pyx_Generator_clear((PyObject*)__pyx_generator); + __Pyx_RefNannyFinishContext(); + return NULL; +} + +/* "ml2.pyx":38 + * return result + * + * def ml2(dict root_victims, dict victims, dict non_victims, DTYPE_t age, # <<<<<<<<<<<<<< + * DTYPE_t alpha, DTYPE_t delta): + * cdef: + */ + +static PyObject *__pyx_pf_3ml2_ml2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_root_victims, PyObject *__pyx_v_victims, PyObject *__pyx_v_non_victims, CYTHON_UNUSED __pyx_t_3ml2_DTYPE_t __pyx_v_age, __pyx_t_3ml2_DTYPE_t __pyx_v_alpha, __pyx_t_3ml2_DTYPE_t __pyx_v_delta) { + struct __pyx_obj_3ml2___pyx_scope_struct__ml2 *__pyx_cur_scope; + int __pyx_v_n_roots; + int __pyx_v_n_victims; + CYTHON_UNUSED int __pyx_v_n_nodes; + int __pyx_v_roots; + int __pyx_v_i; + int __pyx_v_dist; + int __pyx_v_dt; + __pyx_t_3ml2_DTYPE_t __pyx_v_beta; + __pyx_t_3ml2_DTYPE_t __pyx_v_ll; + PyObject *__pyx_v_parents = 0; + PyArrayObject *__pyx_v_probs = 0; + PyArrayObject *__pyx_v_probs_fail = 0; + PyArrayObject *__pyx_v_probs_nv = 0; + PyObject *__pyx_v_w1 = NULL; + PyObject *__pyx_v_w2 = NULL; + PyObject *__pyx_v_w3 = NULL; + __Pyx_LocalBuf_ND __pyx_pybuffernd_probs; + __Pyx_Buffer __pyx_pybuffer_probs; + __Pyx_LocalBuf_ND __pyx_pybuffernd_probs_fail; + __Pyx_Buffer __pyx_pybuffer_probs_fail; + __Pyx_LocalBuf_ND __pyx_pybuffernd_probs_nv; + __Pyx_Buffer __pyx_pybuffer_probs_nv; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + Py_ssize_t __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyArrayObject *__pyx_t_7 = NULL; + PyArrayObject *__pyx_t_8 = NULL; + PyArrayObject *__pyx_t_9 = NULL; + int __pyx_t_10; + int __pyx_t_11; + int __pyx_t_12; + Py_ssize_t __pyx_t_13; + 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)(PyObject *); + int __pyx_t_21; + __pyx_t_3ml2_DTYPE_t __pyx_t_22; + __pyx_t_3ml2_DTYPE_t __pyx_t_23; + __pyx_t_3ml2_DTYPE_t __pyx_t_24; + int __pyx_t_25; + int __pyx_t_26; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("ml2", 0); + __pyx_cur_scope = (struct __pyx_obj_3ml2___pyx_scope_struct__ml2 *)__pyx_tp_new_3ml2___pyx_scope_struct__ml2(__pyx_ptype_3ml2___pyx_scope_struct__ml2, __pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __Pyx_RefNannyFinishContext(); + return NULL; + } + __Pyx_GOTREF(__pyx_cur_scope); + __pyx_pybuffer_probs.pybuffer.buf = NULL; + __pyx_pybuffer_probs.refcount = 0; + __pyx_pybuffernd_probs.data = NULL; + __pyx_pybuffernd_probs.rcbuffer = &__pyx_pybuffer_probs; + __pyx_pybuffer_probs_fail.pybuffer.buf = NULL; + __pyx_pybuffer_probs_fail.refcount = 0; + __pyx_pybuffernd_probs_fail.data = NULL; + __pyx_pybuffernd_probs_fail.rcbuffer = &__pyx_pybuffer_probs_fail; + __pyx_pybuffer_probs_nv.pybuffer.buf = NULL; + __pyx_pybuffer_probs_nv.refcount = 0; + __pyx_pybuffernd_probs_nv.data = NULL; + __pyx_pybuffernd_probs_nv.rcbuffer = &__pyx_pybuffer_probs_nv; + + /* "ml2.pyx":44 + * DTYPE_t beta, ll + * list parents, failures, successes + * n_roots, n_victims = len(root_victims), len(victims) # <<<<<<<<<<<<<< + * n_nodes = 100 + * cdef: + */ + if (unlikely(__pyx_v_root_victims == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_1 = PyDict_Size(__pyx_v_root_victims); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__pyx_v_victims == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_2 = PyDict_Size(__pyx_v_victims); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_n_roots = __pyx_t_1; + __pyx_v_n_victims = __pyx_t_2; + + /* "ml2.pyx":45 + * list parents, failures, successes + * n_roots, n_victims = len(root_victims), len(victims) + * n_nodes = 100 # <<<<<<<<<<<<<< + * cdef: + * np.ndarray[DTYPE_t] probs = np.zeros(n_victims, dtype=DTYPE) + */ + __pyx_v_n_nodes = 100; + + /* "ml2.pyx":47 + * n_nodes = 100 + * cdef: + * np.ndarray[DTYPE_t] probs = np.zeros(n_victims, dtype=DTYPE) # <<<<<<<<<<<<<< + * np.ndarray[DTYPE_t] probs_fail = np.zeros(n_victims, dtype=DTYPE) + * np.ndarray[DTYPE_t] probs_nv = np.zeros(len(non_victims), dtype=DTYPE) + */ + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_n_victims); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_DTYPE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_probs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_3ml2_DTYPE_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { + __pyx_v_probs = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_probs.rcbuffer->pybuffer.buf = NULL; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } else {__pyx_pybuffernd_probs.diminfo[0].strides = __pyx_pybuffernd_probs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_probs.diminfo[0].shape = __pyx_pybuffernd_probs.rcbuffer->pybuffer.shape[0]; + } + } + __pyx_t_7 = 0; + __pyx_v_probs = ((PyArrayObject *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "ml2.pyx":48 + * cdef: + * np.ndarray[DTYPE_t] probs = np.zeros(n_victims, dtype=DTYPE) + * np.ndarray[DTYPE_t] probs_fail = np.zeros(n_victims, dtype=DTYPE) # <<<<<<<<<<<<<< + * np.ndarray[DTYPE_t] probs_nv = np.zeros(len(non_victims), dtype=DTYPE) + * + */ + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_n_victims); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_6); + __pyx_t_6 = 0; + __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_DTYPE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = ((PyArrayObject *)__pyx_t_4); + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_probs_fail.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_3ml2_DTYPE_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { + __pyx_v_probs_fail = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_probs_fail.rcbuffer->pybuffer.buf = NULL; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } else {__pyx_pybuffernd_probs_fail.diminfo[0].strides = __pyx_pybuffernd_probs_fail.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_probs_fail.diminfo[0].shape = __pyx_pybuffernd_probs_fail.rcbuffer->pybuffer.shape[0]; + } + } + __pyx_t_8 = 0; + __pyx_v_probs_fail = ((PyArrayObject *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "ml2.pyx":49 + * np.ndarray[DTYPE_t] probs = np.zeros(n_victims, dtype=DTYPE) + * np.ndarray[DTYPE_t] probs_fail = np.zeros(n_victims, dtype=DTYPE) + * np.ndarray[DTYPE_t] probs_nv = np.zeros(len(non_victims), dtype=DTYPE) # <<<<<<<<<<<<<< + * + * # loop through victims + */ + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(__pyx_v_non_victims == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_2 = PyDict_Size(__pyx_v_non_victims); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_DTYPE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = ((PyArrayObject *)__pyx_t_3); + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_probs_nv.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_3ml2_DTYPE_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { + __pyx_v_probs_nv = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_probs_nv.rcbuffer->pybuffer.buf = NULL; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } else {__pyx_pybuffernd_probs_nv.diminfo[0].strides = __pyx_pybuffernd_probs_nv.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_probs_nv.diminfo[0].shape = __pyx_pybuffernd_probs_nv.rcbuffer->pybuffer.shape[0]; + } + } + __pyx_t_9 = 0; + __pyx_v_probs_nv = ((PyArrayObject *)__pyx_t_3); + __pyx_t_3 = 0; + + /* "ml2.pyx":52 + * + * # loop through victims + * for i, parents in enumerate(victims.itervalues()): # <<<<<<<<<<<<<< + * # for each victim node i, compute the probability that all its parents + * # fail to infect it, also computes the probability that its most + */ + __pyx_t_10 = 0; + __pyx_t_2 = 0; + if (unlikely(__pyx_v_victims == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "itervalues"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_4 = __Pyx_dict_iterator(__pyx_v_victims, 1, __pyx_n_s_itervalues, (&__pyx_t_1), (&__pyx_t_11)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_3); + __pyx_t_3 = __pyx_t_4; + __pyx_t_4 = 0; + while (1) { + __pyx_t_12 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_1, &__pyx_t_2, NULL, &__pyx_t_4, NULL, __pyx_t_11); + if (unlikely(__pyx_t_12 == 0)) break; + if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + if (!(likely(PyList_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_XDECREF_SET(__pyx_v_parents, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + __pyx_v_i = __pyx_t_10; + __pyx_t_10 = (__pyx_t_10 + 1); + + /* "ml2.pyx":56 + * # fail to infect it, also computes the probability that its most + * # likely parent infects it + * failures = [weight_failure(dist, dt, alpha, delta, w1, w2, w3) # <<<<<<<<<<<<<< + * for (dist, dt, w1, w2, w3) in parents] + * probs_fail[i] = sum(failures) + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + + /* "ml2.pyx":57 + * # likely parent infects it + * failures = [weight_failure(dist, dt, alpha, delta, w1, w2, w3) + * for (dist, dt, w1, w2, w3) in parents] # <<<<<<<<<<<<<< + * probs_fail[i] = sum(failures) + * successes = [weight_success(dist, dt, alpha, delta, w1, w2, w3) + */ + if (unlikely(__pyx_v_parents == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_5 = __pyx_v_parents; __Pyx_INCREF(__pyx_t_5); __pyx_t_13 = 0; + for (;;) { + if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_5)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_13); __Pyx_INCREF(__pyx_t_6); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { + PyObject* sequence = __pyx_t_6; + #if CYTHON_COMPILING_IN_CPYTHON + Py_ssize_t size = Py_SIZE(sequence); + #else + Py_ssize_t size = PySequence_Size(sequence); + #endif + if (unlikely(size != 5)) { + if (size > 5) __Pyx_RaiseTooManyValuesError(5); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + #if CYTHON_COMPILING_IN_CPYTHON + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_14 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_15 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_16 = PyTuple_GET_ITEM(sequence, 2); + __pyx_t_17 = PyTuple_GET_ITEM(sequence, 3); + __pyx_t_18 = PyTuple_GET_ITEM(sequence, 4); + } else { + __pyx_t_14 = PyList_GET_ITEM(sequence, 0); + __pyx_t_15 = PyList_GET_ITEM(sequence, 1); + __pyx_t_16 = PyList_GET_ITEM(sequence, 2); + __pyx_t_17 = PyList_GET_ITEM(sequence, 3); + __pyx_t_18 = PyList_GET_ITEM(sequence, 4); + } + __Pyx_INCREF(__pyx_t_14); + __Pyx_INCREF(__pyx_t_15); + __Pyx_INCREF(__pyx_t_16); + __Pyx_INCREF(__pyx_t_17); + __Pyx_INCREF(__pyx_t_18); + #else + { + Py_ssize_t i; + PyObject** temps[5] = {&__pyx_t_14,&__pyx_t_15,&__pyx_t_16,&__pyx_t_17,&__pyx_t_18}; + for (i=0; i < 5; i++) { + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(item); + *(temps[i]) = item; + } + } + #endif + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } else { + Py_ssize_t index = -1; + PyObject** temps[5] = {&__pyx_t_14,&__pyx_t_15,&__pyx_t_16,&__pyx_t_17,&__pyx_t_18}; + __pyx_t_19 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_19); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_20 = Py_TYPE(__pyx_t_19)->tp_iternext; + for (index=0; index < 5; index++) { + PyObject* item = __pyx_t_20(__pyx_t_19); if (unlikely(!item)) goto __pyx_L7_unpacking_failed; + __Pyx_GOTREF(item); + *(temps[index]) = item; + } + if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_19), 5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_20 = NULL; + __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; + goto __pyx_L8_unpacking_done; + __pyx_L7_unpacking_failed:; + __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; + __pyx_t_20 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_L8_unpacking_done:; + } + __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_14); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_t_15); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __pyx_v_dist = __pyx_t_12; + __pyx_v_dt = __pyx_t_21; + __Pyx_XDECREF_SET(__pyx_v_w1, __pyx_t_16); + __pyx_t_16 = 0; + __Pyx_XDECREF_SET(__pyx_v_w2, __pyx_t_17); + __pyx_t_17 = 0; + __Pyx_XDECREF_SET(__pyx_v_w3, __pyx_t_18); + __pyx_t_18 = 0; + + /* "ml2.pyx":56 + * # fail to infect it, also computes the probability that its most + * # likely parent infects it + * failures = [weight_failure(dist, dt, alpha, delta, w1, w2, w3) # <<<<<<<<<<<<<< + * for (dist, dt, w1, w2, w3) in parents] + * probs_fail[i] = sum(failures) + */ + __pyx_t_22 = __pyx_PyFloat_AsDouble(__pyx_v_w1); if (unlikely((__pyx_t_22 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_23 = __pyx_PyFloat_AsDouble(__pyx_v_w2); if (unlikely((__pyx_t_23 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_24 = __pyx_PyFloat_AsDouble(__pyx_v_w3); if (unlikely((__pyx_t_24 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyFloat_FromDouble(__pyx_f_3ml2_weight_failure(__pyx_v_dist, __pyx_v_dt, __pyx_v_alpha, __pyx_v_delta, __pyx_t_22, __pyx_t_23, __pyx_t_24)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "ml2.pyx":57 + * # likely parent infects it + * failures = [weight_failure(dist, dt, alpha, delta, w1, w2, w3) + * for (dist, dt, w1, w2, w3) in parents] # <<<<<<<<<<<<<< + * probs_fail[i] = sum(failures) + * successes = [weight_success(dist, dt, alpha, delta, w1, w2, w3) + */ + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_failures); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_failures, ((PyObject*)__pyx_t_4)); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; + + /* "ml2.pyx":58 + * failures = [weight_failure(dist, dt, alpha, delta, w1, w2, w3) + * for (dist, dt, w1, w2, w3) in parents] + * probs_fail[i] = sum(failures) # <<<<<<<<<<<<<< + * successes = [weight_success(dist, dt, alpha, delta, w1, w2, w3) + * for (dist, dt, w1, w2, w3) in parents] + */ + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_failures); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_cur_scope->__pyx_v_failures); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_failures); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_24 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_24 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_21 = __pyx_v_i; + if (__pyx_t_21 < 0) __pyx_t_21 += __pyx_pybuffernd_probs_fail.diminfo[0].shape; + *__Pyx_BufPtrStrided1d(__pyx_t_3ml2_DTYPE_t *, __pyx_pybuffernd_probs_fail.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_probs_fail.diminfo[0].strides) = __pyx_t_24; + + /* "ml2.pyx":59 + * for (dist, dt, w1, w2, w3) in parents] + * probs_fail[i] = sum(failures) + * successes = [weight_success(dist, dt, alpha, delta, w1, w2, w3) # <<<<<<<<<<<<<< + * for (dist, dt, w1, w2, w3) in parents] + * # find parent that maximizes log(p) - log(\tilde{p}) + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + + /* "ml2.pyx":60 + * probs_fail[i] = sum(failures) + * successes = [weight_success(dist, dt, alpha, delta, w1, w2, w3) + * for (dist, dt, w1, w2, w3) in parents] # <<<<<<<<<<<<<< + * # find parent that maximizes log(p) - log(\tilde{p}) + * probs[i] = max(s - failures[l] for l, s in enumerate(successes)) + */ + if (unlikely(__pyx_v_parents == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_4 = __pyx_v_parents; __Pyx_INCREF(__pyx_t_4); __pyx_t_13 = 0; + for (;;) { + if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_13); __Pyx_INCREF(__pyx_t_6); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { + PyObject* sequence = __pyx_t_6; + #if CYTHON_COMPILING_IN_CPYTHON + Py_ssize_t size = Py_SIZE(sequence); + #else + Py_ssize_t size = PySequence_Size(sequence); + #endif + if (unlikely(size != 5)) { + if (size > 5) __Pyx_RaiseTooManyValuesError(5); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + #if CYTHON_COMPILING_IN_CPYTHON + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_18 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_17 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_16 = PyTuple_GET_ITEM(sequence, 2); + __pyx_t_15 = PyTuple_GET_ITEM(sequence, 3); + __pyx_t_14 = PyTuple_GET_ITEM(sequence, 4); + } else { + __pyx_t_18 = PyList_GET_ITEM(sequence, 0); + __pyx_t_17 = PyList_GET_ITEM(sequence, 1); + __pyx_t_16 = PyList_GET_ITEM(sequence, 2); + __pyx_t_15 = PyList_GET_ITEM(sequence, 3); + __pyx_t_14 = PyList_GET_ITEM(sequence, 4); + } + __Pyx_INCREF(__pyx_t_18); + __Pyx_INCREF(__pyx_t_17); + __Pyx_INCREF(__pyx_t_16); + __Pyx_INCREF(__pyx_t_15); + __Pyx_INCREF(__pyx_t_14); + #else + { + Py_ssize_t i; + PyObject** temps[5] = {&__pyx_t_18,&__pyx_t_17,&__pyx_t_16,&__pyx_t_15,&__pyx_t_14}; + for (i=0; i < 5; i++) { + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(item); + *(temps[i]) = item; + } + } + #endif + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } else { + Py_ssize_t index = -1; + PyObject** temps[5] = {&__pyx_t_18,&__pyx_t_17,&__pyx_t_16,&__pyx_t_15,&__pyx_t_14}; + __pyx_t_19 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_19); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_20 = Py_TYPE(__pyx_t_19)->tp_iternext; + for (index=0; index < 5; index++) { + PyObject* item = __pyx_t_20(__pyx_t_19); if (unlikely(!item)) goto __pyx_L11_unpacking_failed; + __Pyx_GOTREF(item); + *(temps[index]) = item; + } + if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_19), 5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_20 = NULL; + __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; + goto __pyx_L12_unpacking_done; + __pyx_L11_unpacking_failed:; + __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; + __pyx_t_20 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_L12_unpacking_done:; + } + __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_18); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + __pyx_t_25 = __Pyx_PyInt_As_int(__pyx_t_17); if (unlikely((__pyx_t_25 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __pyx_v_dist = __pyx_t_12; + __pyx_v_dt = __pyx_t_25; + __Pyx_XDECREF_SET(__pyx_v_w1, __pyx_t_16); + __pyx_t_16 = 0; + __Pyx_XDECREF_SET(__pyx_v_w2, __pyx_t_15); + __pyx_t_15 = 0; + __Pyx_XDECREF_SET(__pyx_v_w3, __pyx_t_14); + __pyx_t_14 = 0; + + /* "ml2.pyx":59 + * for (dist, dt, w1, w2, w3) in parents] + * probs_fail[i] = sum(failures) + * successes = [weight_success(dist, dt, alpha, delta, w1, w2, w3) # <<<<<<<<<<<<<< + * for (dist, dt, w1, w2, w3) in parents] + * # find parent that maximizes log(p) - log(\tilde{p}) + */ + __pyx_t_24 = __pyx_PyFloat_AsDouble(__pyx_v_w1); if (unlikely((__pyx_t_24 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_23 = __pyx_PyFloat_AsDouble(__pyx_v_w2); if (unlikely((__pyx_t_23 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_22 = __pyx_PyFloat_AsDouble(__pyx_v_w3); if (unlikely((__pyx_t_22 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyFloat_FromDouble(__pyx_f_3ml2_weight_success(__pyx_v_dist, __pyx_v_dt, __pyx_v_alpha, __pyx_v_delta, __pyx_t_24, __pyx_t_23, __pyx_t_22)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "ml2.pyx":60 + * probs_fail[i] = sum(failures) + * successes = [weight_success(dist, dt, alpha, delta, w1, w2, w3) + * for (dist, dt, w1, w2, w3) in parents] # <<<<<<<<<<<<<< + * # find parent that maximizes log(p) - log(\tilde{p}) + * probs[i] = max(s - failures[l] for l, s in enumerate(successes)) + */ + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_successes); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_successes, ((PyObject*)__pyx_t_5)); + __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_5 = 0; + + /* "ml2.pyx":62 + * for (dist, dt, w1, w2, w3) in parents] + * # find parent that maximizes log(p) - log(\tilde{p}) + * probs[i] = max(s - failures[l] for l, s in enumerate(successes)) # <<<<<<<<<<<<<< + * + * # loop through non-victims + */ + __pyx_t_5 = __pyx_pf_3ml2_3ml2_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_max, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_22 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_22 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_25 = __pyx_v_i; + if (__pyx_t_25 < 0) __pyx_t_25 += __pyx_pybuffernd_probs.diminfo[0].shape; + *__Pyx_BufPtrStrided1d(__pyx_t_3ml2_DTYPE_t *, __pyx_pybuffernd_probs.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_probs.diminfo[0].strides) = __pyx_t_22; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "ml2.pyx":65 + * + * # loop through non-victims + * for i, parents in enumerate(non_victims.itervalues()): # <<<<<<<<<<<<<< + * # for each non victim node, compute the probability that all its + * # parents fail to infect it + */ + __pyx_t_10 = 0; + __pyx_t_1 = 0; + if (unlikely(__pyx_v_non_victims == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "itervalues"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_non_victims, 1, __pyx_n_s_itervalues, (&__pyx_t_2), (&__pyx_t_11)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_3); + __pyx_t_3 = __pyx_t_5; + __pyx_t_5 = 0; + while (1) { + __pyx_t_12 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_2, &__pyx_t_1, NULL, &__pyx_t_5, NULL, __pyx_t_11); + if (unlikely(__pyx_t_12 == 0)) break; + if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (!(likely(PyList_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_5)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_XDECREF_SET(__pyx_v_parents, ((PyObject*)__pyx_t_5)); + __pyx_t_5 = 0; + __pyx_v_i = __pyx_t_10; + __pyx_t_10 = (__pyx_t_10 + 1); + + /* "ml2.pyx":68 + * # for each non victim node, compute the probability that all its + * # parents fail to infect it + * failures = [weight_failure(dist, dt, alpha, delta, w1, w2, w3) # <<<<<<<<<<<<<< + * for (dist, dt, w1, w2, w3) in parents] + * probs_nv[i] = sum(failures) + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + + /* "ml2.pyx":69 + * # parents fail to infect it + * failures = [weight_failure(dist, dt, alpha, delta, w1, w2, w3) + * for (dist, dt, w1, w2, w3) in parents] # <<<<<<<<<<<<<< + * probs_nv[i] = sum(failures) + * + */ + if (unlikely(__pyx_v_parents == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_4 = __pyx_v_parents; __Pyx_INCREF(__pyx_t_4); __pyx_t_13 = 0; + for (;;) { + if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_13); __Pyx_INCREF(__pyx_t_6); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { + PyObject* sequence = __pyx_t_6; + #if CYTHON_COMPILING_IN_CPYTHON + Py_ssize_t size = Py_SIZE(sequence); + #else + Py_ssize_t size = PySequence_Size(sequence); + #endif + if (unlikely(size != 5)) { + if (size > 5) __Pyx_RaiseTooManyValuesError(5); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + #if CYTHON_COMPILING_IN_CPYTHON + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_14 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_15 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_16 = PyTuple_GET_ITEM(sequence, 2); + __pyx_t_17 = PyTuple_GET_ITEM(sequence, 3); + __pyx_t_18 = PyTuple_GET_ITEM(sequence, 4); + } else { + __pyx_t_14 = PyList_GET_ITEM(sequence, 0); + __pyx_t_15 = PyList_GET_ITEM(sequence, 1); + __pyx_t_16 = PyList_GET_ITEM(sequence, 2); + __pyx_t_17 = PyList_GET_ITEM(sequence, 3); + __pyx_t_18 = PyList_GET_ITEM(sequence, 4); + } + __Pyx_INCREF(__pyx_t_14); + __Pyx_INCREF(__pyx_t_15); + __Pyx_INCREF(__pyx_t_16); + __Pyx_INCREF(__pyx_t_17); + __Pyx_INCREF(__pyx_t_18); + #else + { + Py_ssize_t i; + PyObject** temps[5] = {&__pyx_t_14,&__pyx_t_15,&__pyx_t_16,&__pyx_t_17,&__pyx_t_18}; + for (i=0; i < 5; i++) { + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(item); + *(temps[i]) = item; + } + } + #endif + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } else { + Py_ssize_t index = -1; + PyObject** temps[5] = {&__pyx_t_14,&__pyx_t_15,&__pyx_t_16,&__pyx_t_17,&__pyx_t_18}; + __pyx_t_19 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_19); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_20 = Py_TYPE(__pyx_t_19)->tp_iternext; + for (index=0; index < 5; index++) { + PyObject* item = __pyx_t_20(__pyx_t_19); if (unlikely(!item)) goto __pyx_L17_unpacking_failed; + __Pyx_GOTREF(item); + *(temps[index]) = item; + } + if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_19), 5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_20 = NULL; + __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; + goto __pyx_L18_unpacking_done; + __pyx_L17_unpacking_failed:; + __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; + __pyx_t_20 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_L18_unpacking_done:; + } + __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_14); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_26 = __Pyx_PyInt_As_int(__pyx_t_15); if (unlikely((__pyx_t_26 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __pyx_v_dist = __pyx_t_12; + __pyx_v_dt = __pyx_t_26; + __Pyx_XDECREF_SET(__pyx_v_w1, __pyx_t_16); + __pyx_t_16 = 0; + __Pyx_XDECREF_SET(__pyx_v_w2, __pyx_t_17); + __pyx_t_17 = 0; + __Pyx_XDECREF_SET(__pyx_v_w3, __pyx_t_18); + __pyx_t_18 = 0; + + /* "ml2.pyx":68 + * # for each non victim node, compute the probability that all its + * # parents fail to infect it + * failures = [weight_failure(dist, dt, alpha, delta, w1, w2, w3) # <<<<<<<<<<<<<< + * for (dist, dt, w1, w2, w3) in parents] + * probs_nv[i] = sum(failures) + */ + __pyx_t_22 = __pyx_PyFloat_AsDouble(__pyx_v_w1); if (unlikely((__pyx_t_22 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_23 = __pyx_PyFloat_AsDouble(__pyx_v_w2); if (unlikely((__pyx_t_23 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_24 = __pyx_PyFloat_AsDouble(__pyx_v_w3); if (unlikely((__pyx_t_24 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyFloat_FromDouble(__pyx_f_3ml2_weight_failure(__pyx_v_dist, __pyx_v_dt, __pyx_v_alpha, __pyx_v_delta, __pyx_t_22, __pyx_t_23, __pyx_t_24)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "ml2.pyx":69 + * # parents fail to infect it + * failures = [weight_failure(dist, dt, alpha, delta, w1, w2, w3) + * for (dist, dt, w1, w2, w3) in parents] # <<<<<<<<<<<<<< + * probs_nv[i] = sum(failures) + * + */ + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_failures); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_failures, ((PyObject*)__pyx_t_5)); + __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_5 = 0; + + /* "ml2.pyx":70 + * failures = [weight_failure(dist, dt, alpha, delta, w1, w2, w3) + * for (dist, dt, w1, w2, w3) in parents] + * probs_nv[i] = sum(failures) # <<<<<<<<<<<<<< + * + * # print successes + */ + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_failures); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_failures); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_failures); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_24 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_24 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_26 = __pyx_v_i; + if (__pyx_t_26 < 0) __pyx_t_26 += __pyx_pybuffernd_probs_nv.diminfo[0].shape; + *__Pyx_BufPtrStrided1d(__pyx_t_3ml2_DTYPE_t *, __pyx_pybuffernd_probs_nv.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_probs_nv.diminfo[0].strides) = __pyx_t_24; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "ml2.pyx":80 + * # cdef: + * # np.ndarray[DTYPE_t] cums = probs.cumsum() + * ll = probs_fail.sum() # add probability that all edges to victims fail # <<<<<<<<<<<<<< + * ll += probs_nv.sum() # add probability that all edges to non_victims fail + * ll += probs.sum() # add probability for realized edges and subtract probability these edges fail + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_probs_fail), __pyx_n_s_sum); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + if (__pyx_t_5) { + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else { + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_24 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_24 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_ll = __pyx_t_24; + + /* "ml2.pyx":81 + * # np.ndarray[DTYPE_t] cums = probs.cumsum() + * ll = probs_fail.sum() # add probability that all edges to victims fail + * ll += probs_nv.sum() # add probability that all edges to non_victims fail # <<<<<<<<<<<<<< + * ll += probs.sum() # add probability for realized edges and subtract probability these edges fail + * + */ + __pyx_t_3 = PyFloat_FromDouble(__pyx_v_ll); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_probs_nv), __pyx_n_s_sum); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && 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_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } else { + __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_24 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_24 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_ll = __pyx_t_24; + + /* "ml2.pyx":82 + * ll = probs_fail.sum() # add probability that all edges to victims fail + * ll += probs_nv.sum() # add probability that all edges to non_victims fail + * ll += probs.sum() # add probability for realized edges and subtract probability these edges fail # <<<<<<<<<<<<<< + * + * roots = n_roots + */ + __pyx_t_5 = PyFloat_FromDouble(__pyx_v_ll); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_probs), __pyx_n_s_sum); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && 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_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } else { + __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __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_24 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_24 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_ll = __pyx_t_24; + + /* "ml2.pyx":84 + * ll += probs.sum() # add probability for realized edges and subtract probability these edges fail + * + * roots = n_roots # <<<<<<<<<<<<<< + * beta = 0 + * # print n_nodes, n_roots, n_victims, max_i, roots + */ + __pyx_v_roots = __pyx_v_n_roots; + + /* "ml2.pyx":85 + * + * roots = n_roots + * beta = 0 # <<<<<<<<<<<<<< + * # print n_nodes, n_roots, n_victims, max_i, roots + * return (beta, roots, ll) + */ + __pyx_v_beta = 0.0; + + /* "ml2.pyx":87 + * beta = 0 + * # print n_nodes, n_roots, n_victims, max_i, roots + * return (beta, roots, ll) # <<<<<<<<<<<<<< + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = PyFloat_FromDouble(__pyx_v_beta); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_roots); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyFloat_FromDouble(__pyx_v_ll); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_t_5 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "ml2.pyx":38 + * return result + * + * def ml2(dict root_victims, dict victims, dict non_victims, DTYPE_t age, # <<<<<<<<<<<<<< + * DTYPE_t alpha, DTYPE_t delta): + * cdef: + */ + + /* 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_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); + { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; + __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_probs.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_probs_fail.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_probs_nv.rcbuffer->pybuffer); + __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} + __Pyx_AddTraceback("ml2.ml2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + goto __pyx_L2; + __pyx_L0:; + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_probs.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_probs_fail.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_probs_nv.rcbuffer->pybuffer); + __pyx_L2:; + __Pyx_XDECREF(__pyx_v_parents); + __Pyx_XDECREF((PyObject *)__pyx_v_probs); + __Pyx_XDECREF((PyObject *)__pyx_v_probs_fail); + __Pyx_XDECREF((PyObject *)__pyx_v_probs_nv); + __Pyx_XDECREF(__pyx_v_w1); + __Pyx_XDECREF(__pyx_v_w2); + __Pyx_XDECREF(__pyx_v_w3); + __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/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_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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__getbuffer__", 0); + if (__pyx_v_info != NULL) { + __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(__pyx_v_info->obj); + } + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":203 + * # of flags + * + * if info == NULL: return # <<<<<<<<<<<<<< + * + * cdef int copy_shape, i, ndim + */ + __pyx_t_1 = ((__pyx_v_info == NULL) != 0); + if (__pyx_t_1) { + __pyx_r = 0; + goto __pyx_L0; + } + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/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_v_endian_detector = 1; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/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_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/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_v_ndim = PyArray_NDIM(__pyx_v_self); + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/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_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); + if (__pyx_t_1) { + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":212 + * + * if sizeof(npy_intp) != sizeof(Py_ssize_t): + * copy_shape = 1 # <<<<<<<<<<<<<< + * else: + * copy_shape = 0 + */ + __pyx_v_copy_shape = 1; + goto __pyx_L4; + } + /*else*/ { + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/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_v_copy_shape = 0; + } + __pyx_L4:; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/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_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; + } + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/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_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_C_CONTIGUOUS) != 0)) != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L6_bool_binop_done:; + if (__pyx_t_1) { + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/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_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/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_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; + } + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/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_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L9_bool_binop_done:; + if (__pyx_t_1) { + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/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_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/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_v_info->buf = PyArray_DATA(__pyx_v_self); + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/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_v_info->ndim = __pyx_v_ndim; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/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_t_1 = (__pyx_v_copy_shape != 0); + if (__pyx_t_1) { + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/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_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2))); + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/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_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/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_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; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/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_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]); + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/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_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]); + } + goto __pyx_L11; + } + /*else*/ { + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/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_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/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_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self)); + } + __pyx_L11:; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/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_v_info->suboffsets = NULL; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/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_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self); + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/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_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0)); + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":242 + * + * cdef int t + * cdef char* f = NULL # <<<<<<<<<<<<<< + * cdef dtype descr = self.descr + * cdef list stack + */ + __pyx_v_f = NULL; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":243 + * cdef int t + * cdef char* f = NULL + * cdef dtype descr = self.descr # <<<<<<<<<<<<<< + * cdef list stack + * cdef int offset + */ + __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; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":247 + * cdef int offset + * + * cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<< + * + * if not hasfields and not copy_shape: + */ + __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr); + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":249 + * cdef bint hasfields = PyDataType_HASFIELDS(descr) + * + * if not hasfields and not copy_shape: # <<<<<<<<<<<<<< + * # do not call releasebuffer + * info.obj = None + */ + __pyx_t_2 = ((!(__pyx_v_hasfields != 0)) != 0); + if (__pyx_t_2) { + } 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) { + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":251 + * if not hasfields and not copy_shape: + * # do not call releasebuffer + * info.obj = None # <<<<<<<<<<<<<< + * else: + * # need to call releasebuffer + */ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); + __pyx_v_info->obj = Py_None; + goto __pyx_L14; + } + /*else*/ { + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":254 + * else: + * # need to call releasebuffer + * info.obj = self # <<<<<<<<<<<<<< + * + * if not hasfields: + */ + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); + __pyx_v_info->obj = ((PyObject *)__pyx_v_self); + } + __pyx_L14:; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":256 + * info.obj = self + * + * if not hasfields: # <<<<<<<<<<<<<< + * t = descr.type_num + * if ((descr.byteorder == c'>' and little_endian) or + */ + __pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0); + if (__pyx_t_1) { + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/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)): + */ + __pyx_t_4 = __pyx_v_descr->type_num; + __pyx_v_t = __pyx_t_4; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":258 + * if not hasfields: + * t = descr.type_num + * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< + * (descr.byteorder == c'<' and not little_endian)): + * raise ValueError(u"Non-native byte order not supported") + */ + __pyx_t_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:; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":259 + * t = descr.type_num + * if ((descr.byteorder == c'>' and little_endian) or + * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< + * raise ValueError(u"Non-native byte order not supported") + * if t == NPY_BYTE: f = "b" + */ + __pyx_t_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:; + if (__pyx_t_1) { + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":260 + * if ((descr.byteorder == c'>' and little_endian) or + * (descr.byteorder == c'<' and not little_endian)): + * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< + * if t == NPY_BYTE: f = "b" + * elif t == NPY_UBYTE: f = "B" + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":277 + * elif t == NPY_CDOUBLE: f = "Zd" + * elif t == NPY_CLONGDOUBLE: f = "Zg" + * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< + * else: + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) + */ + switch (__pyx_v_t) { + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":261 + * (descr.byteorder == c'<' and not little_endian)): + * raise ValueError(u"Non-native byte order not supported") + * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< + * elif t == NPY_UBYTE: f = "B" + * elif t == NPY_SHORT: f = "h" + */ + case NPY_BYTE: + __pyx_v_f = __pyx_k_b; + break; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":262 + * raise ValueError(u"Non-native byte order not supported") + * if t == NPY_BYTE: f = "b" + * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< + * elif t == NPY_SHORT: f = "h" + * elif t == NPY_USHORT: f = "H" + */ + case NPY_UBYTE: + __pyx_v_f = __pyx_k_B; + break; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":263 + * if t == NPY_BYTE: f = "b" + * elif t == NPY_UBYTE: f = "B" + * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< + * elif t == NPY_USHORT: f = "H" + * elif t == NPY_INT: f = "i" + */ + case NPY_SHORT: + __pyx_v_f = __pyx_k_h; + break; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":264 + * elif t == NPY_UBYTE: f = "B" + * elif t == NPY_SHORT: f = "h" + * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< + * elif t == NPY_INT: f = "i" + * elif t == NPY_UINT: f = "I" + */ + case NPY_USHORT: + __pyx_v_f = __pyx_k_H; + break; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":265 + * elif t == NPY_SHORT: f = "h" + * elif t == NPY_USHORT: f = "H" + * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< + * elif t == NPY_UINT: f = "I" + * elif t == NPY_LONG: f = "l" + */ + case NPY_INT: + __pyx_v_f = __pyx_k_i; + break; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":266 + * elif t == NPY_USHORT: f = "H" + * elif t == NPY_INT: f = "i" + * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< + * elif t == NPY_LONG: f = "l" + * elif t == NPY_ULONG: f = "L" + */ + case NPY_UINT: + __pyx_v_f = __pyx_k_I; + break; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":267 + * elif t == NPY_INT: f = "i" + * elif t == NPY_UINT: f = "I" + * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< + * elif t == NPY_ULONG: f = "L" + * elif t == NPY_LONGLONG: f = "q" + */ + case NPY_LONG: + __pyx_v_f = __pyx_k_l; + break; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":268 + * elif t == NPY_UINT: f = "I" + * elif t == NPY_LONG: f = "l" + * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< + * elif t == NPY_LONGLONG: f = "q" + * elif t == NPY_ULONGLONG: f = "Q" + */ + case NPY_ULONG: + __pyx_v_f = __pyx_k_L; + break; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":269 + * elif t == NPY_LONG: f = "l" + * elif t == NPY_ULONG: f = "L" + * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< + * elif t == NPY_ULONGLONG: f = "Q" + * elif t == NPY_FLOAT: f = "f" + */ + case NPY_LONGLONG: + __pyx_v_f = __pyx_k_q; + break; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":270 + * elif t == NPY_ULONG: f = "L" + * elif t == NPY_LONGLONG: f = "q" + * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< + * elif t == NPY_FLOAT: f = "f" + * elif t == NPY_DOUBLE: f = "d" + */ + case NPY_ULONGLONG: + __pyx_v_f = __pyx_k_Q; + break; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":271 + * elif t == NPY_LONGLONG: f = "q" + * elif t == NPY_ULONGLONG: f = "Q" + * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< + * elif t == NPY_DOUBLE: f = "d" + * elif t == NPY_LONGDOUBLE: f = "g" + */ + case NPY_FLOAT: + __pyx_v_f = __pyx_k_f; + break; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":272 + * elif t == NPY_ULONGLONG: f = "Q" + * elif t == NPY_FLOAT: f = "f" + * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< + * elif t == NPY_LONGDOUBLE: f = "g" + * elif t == NPY_CFLOAT: f = "Zf" + */ + case NPY_DOUBLE: + __pyx_v_f = __pyx_k_d; + break; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":273 + * elif t == NPY_FLOAT: f = "f" + * elif t == NPY_DOUBLE: f = "d" + * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< + * elif t == NPY_CFLOAT: f = "Zf" + * elif t == NPY_CDOUBLE: f = "Zd" + */ + case NPY_LONGDOUBLE: + __pyx_v_f = __pyx_k_g; + break; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":274 + * elif t == NPY_DOUBLE: f = "d" + * elif t == NPY_LONGDOUBLE: f = "g" + * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< + * elif t == NPY_CDOUBLE: f = "Zd" + * elif t == NPY_CLONGDOUBLE: f = "Zg" + */ + case NPY_CFLOAT: + __pyx_v_f = __pyx_k_Zf; + break; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":275 + * elif t == NPY_LONGDOUBLE: f = "g" + * elif t == NPY_CFLOAT: f = "Zf" + * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< + * elif t == NPY_CLONGDOUBLE: f = "Zg" + * elif t == NPY_OBJECT: f = "O" + */ + case NPY_CDOUBLE: + __pyx_v_f = __pyx_k_Zd; + break; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":276 + * elif t == NPY_CFLOAT: f = "Zf" + * elif t == NPY_CDOUBLE: f = "Zd" + * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< + * elif t == NPY_OBJECT: f = "O" + * else: + */ + case NPY_CLONGDOUBLE: + __pyx_v_f = __pyx_k_Zg; + break; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":277 + * elif t == NPY_CDOUBLE: f = "Zd" + * elif t == NPY_CLONGDOUBLE: f = "Zg" + * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< + * else: + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) + */ + case NPY_OBJECT: + __pyx_v_f = __pyx_k_O; + break; + default: + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":279 + * elif t == NPY_OBJECT: f = "O" + * else: + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< + * info.format = f + * return + */ + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); + __Pyx_GIVEREF(__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_filename = __pyx_f[1]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + break; + } + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":280 + * else: + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) + * info.format = f # <<<<<<<<<<<<<< + * return + * else: + */ + __pyx_v_info->format = __pyx_v_f; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":281 + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) + * info.format = f + * return # <<<<<<<<<<<<<< + * else: + * info.format = <char*>stdlib.malloc(_buffer_format_string_len) + */ + __pyx_r = 0; + goto __pyx_L0; + } + /*else*/ { + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":283 + * return + * else: + * info.format = <char*>stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< + * info.format[0] = c'^' # Native data types, manual alignment + * offset = 0 + */ + __pyx_v_info->format = ((char *)malloc(255)); + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":284 + * else: + * info.format = <char*>stdlib.malloc(_buffer_format_string_len) + * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<< + * offset = 0 + * f = _util_dtypestring(descr, info.format + 1, + */ + (__pyx_v_info->format[0]) = '^'; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":285 + * info.format = <char*>stdlib.malloc(_buffer_format_string_len) + * info.format[0] = c'^' # Native data types, manual alignment + * offset = 0 # <<<<<<<<<<<<<< + * f = _util_dtypestring(descr, info.format + 1, + * info.format + _buffer_format_string_len, + */ + __pyx_v_offset = 0; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":286 + * info.format[0] = c'^' # Native data types, manual alignment + * offset = 0 + * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< + * info.format + _buffer_format_string_len, + * &offset) + */ + __pyx_t_7 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_f = __pyx_t_7; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":289 + * info.format + _buffer_format_string_len, + * &offset) + * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<< + * + * def __releasebuffer__(ndarray self, Py_buffer* info): + */ + (__pyx_v_f[0]) = '\x00'; + } + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/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_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":291 + * f[0] = c'\0' # Terminate format string + * + * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< + * if PyArray_HASFIELDS(self): + * stdlib.free(info.format) + */ + +/* Python wrapper */ +static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ +static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0); + __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) { + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("__releasebuffer__", 0); + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/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): + */ + __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); + if (__pyx_t_1) { + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":293 + * def __releasebuffer__(ndarray self, Py_buffer* info): + * if PyArray_HASFIELDS(self): + * stdlib.free(info.format) # <<<<<<<<<<<<<< + * if sizeof(npy_intp) != sizeof(Py_ssize_t): + * stdlib.free(info.strides) + */ + free(__pyx_v_info->format); + goto __pyx_L3; + } + __pyx_L3:; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":294 + * if PyArray_HASFIELDS(self): + * stdlib.free(info.format) + * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< + * stdlib.free(info.strides) + * # info.shape was stored after info.strides in the same block + */ + __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); + if (__pyx_t_1) { + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":295 + * stdlib.free(info.format) + * if sizeof(npy_intp) != sizeof(Py_ssize_t): + * stdlib.free(info.strides) # <<<<<<<<<<<<<< + * # info.shape was stored after info.strides in the same block + * + */ + free(__pyx_v_info->strides); + goto __pyx_L4; + } + __pyx_L4:; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":291 + * f[0] = c'\0' # Terminate format string + * + * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< + * if PyArray_HASFIELDS(self): + * stdlib.free(info.format) + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":771 + * ctypedef npy_cdouble complex_t + * + * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(1, <void*>a) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":772 + * + * cdef inline object PyArray_MultiIterNew1(a): + * return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew2(a, b): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":771 + * ctypedef npy_cdouble complex_t + * + * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(1, <void*>a) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":774 + * return PyArray_MultiIterNew(1, <void*>a) + * + * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(2, <void*>a, <void*>b) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":775 + * + * cdef inline object PyArray_MultiIterNew2(a, b): + * return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":774 + * return PyArray_MultiIterNew(1, <void*>a) + * + * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(2, <void*>a, <void*>b) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":777 + * return PyArray_MultiIterNew(2, <void*>a, <void*>b) + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":778 + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): + * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":777 + * return PyArray_MultiIterNew(2, <void*>a, <void*>b) + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":780 + * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":781 + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): + * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":780 + * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":783 + * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":784 + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): + * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<< + * + * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":783 + * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":786 + * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) + * + * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< + * # Recursive utility function used in __getbuffer__ to get format + * # string. The new location in the format string is returned. + */ + +static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) { + PyArray_Descr *__pyx_v_child = 0; + int __pyx_v_endian_detector; + int __pyx_v_little_endian; + PyObject *__pyx_v_fields = 0; + PyObject *__pyx_v_childname = NULL; + PyObject *__pyx_v_new_offset = NULL; + PyObject *__pyx_v_t = NULL; + char *__pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_t_6; + int __pyx_t_7; + long __pyx_t_8; + char *__pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_util_dtypestring", 0); + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":793 + * cdef int delta_offset + * cdef tuple i + * cdef int endian_detector = 1 # <<<<<<<<<<<<<< + * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) + * cdef tuple fields + */ + __pyx_v_endian_detector = 1; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":794 + * cdef tuple i + * cdef int endian_detector = 1 + * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<< + * cdef tuple fields + * + */ + __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":797 + * cdef tuple fields + * + * for childname in descr.names: # <<<<<<<<<<<<<< + * fields = descr.fields[childname] + * child, new_offset = fields + */ + if (unlikely(__pyx_v_descr->names == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; + for (;;) { + if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); + __pyx_t_3 = 0; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":798 + * + * for childname in descr.names: + * fields = descr.fields[childname] # <<<<<<<<<<<<<< + * child, new_offset = fields + * + */ + if (unlikely(__pyx_v_descr->fields == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_3); + if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); + __pyx_t_3 = 0; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":799 + * for childname in descr.names: + * fields = descr.fields[childname] + * child, new_offset = fields # <<<<<<<<<<<<<< + * + * if (end - f) - <int>(new_offset - offset[0]) < 15: + */ + if (likely(__pyx_v_fields != Py_None)) { + PyObject* sequence = __pyx_v_fields; + #if CYTHON_COMPILING_IN_CPYTHON + Py_ssize_t size = Py_SIZE(sequence); + #else + Py_ssize_t size = PySequence_Size(sequence); + #endif + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + #else + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + #endif + } else { + __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3)); + __pyx_t_3 = 0; + __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4); + __pyx_t_4 = 0; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":801 + * 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_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __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) { + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":802 + * + * 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_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":804 + * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") + * + * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< + * (child.byteorder == c'<' and not little_endian)): + * raise ValueError(u"Non-native byte order not supported") + */ + __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0); + if (!__pyx_t_7) { + 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:; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":805 + * + * if ((child.byteorder == c'>' and little_endian) or + * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< + * raise ValueError(u"Non-native byte order not supported") + * # One could encode it in the format string and have Cython + */ + __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0); + if (__pyx_t_7) { + } 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:; + if (__pyx_t_6) { + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":806 + * if ((child.byteorder == c'>' and little_endian) or + * (child.byteorder == c'<' and not little_endian)): + * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< + * # One could encode it in the format string and have Cython + * # complain instead, BUT: < and > in format strings also imply + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":816 + * + * # Output padding bytes + * while offset[0] < new_offset: # <<<<<<<<<<<<<< + * f[0] = 120 # "x"; pad byte + * f += 1 + */ + while (1) { + __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!__pyx_t_6) break; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":817 + * # Output padding bytes + * while offset[0] < new_offset: + * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< + * f += 1 + * offset[0] += 1 + */ + (__pyx_v_f[0]) = 120; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":818 + * while offset[0] < new_offset: + * f[0] = 120 # "x"; pad byte + * f += 1 # <<<<<<<<<<<<<< + * offset[0] += 1 + * + */ + __pyx_v_f = (__pyx_v_f + 1); + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":819 + * f[0] = 120 # "x"; pad byte + * f += 1 + * offset[0] += 1 # <<<<<<<<<<<<<< + * + * offset[0] += child.itemsize + */ + __pyx_t_8 = 0; + (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1); + } + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":821 + * offset[0] += 1 + * + * offset[0] += child.itemsize # <<<<<<<<<<<<<< + * + * if not PyDataType_HASFIELDS(child): + */ + __pyx_t_8 = 0; + (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize); + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":823 + * offset[0] += child.itemsize + * + * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< + * t = child.type_num + * if end - f < 5: + */ + __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); + if (__pyx_t_6) { + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":824 + * + * if not PyDataType_HASFIELDS(child): + * t = child.type_num # <<<<<<<<<<<<<< + * if end - f < 5: + * raise RuntimeError(u"Format string allocated too short.") + */ + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4); + __pyx_t_4 = 0; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":825 + * if not PyDataType_HASFIELDS(child): + * t = child.type_num + * if end - f < 5: # <<<<<<<<<<<<<< + * raise RuntimeError(u"Format string allocated too short.") + * + */ + __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); + if (__pyx_t_6) { + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":826 + * t = child.type_num + * if end - f < 5: + * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< + * + * # Until ticket #99 is fixed, use integers to avoid warnings + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":829 + * + * # Until ticket #99 is fixed, use integers to avoid warnings + * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< + * elif t == NPY_UBYTE: f[0] = 66 #"B" + * elif t == NPY_SHORT: f[0] = 104 #"h" + */ + __pyx_t_4 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 98; + goto __pyx_L15; + } + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":830 + * # Until ticket #99 is fixed, use integers to avoid warnings + * if t == NPY_BYTE: f[0] = 98 #"b" + * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< + * elif t == NPY_SHORT: f[0] = 104 #"h" + * elif t == NPY_USHORT: f[0] = 72 #"H" + */ + __pyx_t_3 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 66; + goto __pyx_L15; + } + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":831 + * if t == NPY_BYTE: f[0] = 98 #"b" + * elif t == NPY_UBYTE: f[0] = 66 #"B" + * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< + * elif t == NPY_USHORT: f[0] = 72 #"H" + * elif t == NPY_INT: f[0] = 105 #"i" + */ + __pyx_t_4 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 104; + goto __pyx_L15; + } + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":832 + * elif t == NPY_UBYTE: f[0] = 66 #"B" + * elif t == NPY_SHORT: f[0] = 104 #"h" + * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< + * elif t == NPY_INT: f[0] = 105 #"i" + * elif t == NPY_UINT: f[0] = 73 #"I" + */ + __pyx_t_3 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 72; + goto __pyx_L15; + } + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":833 + * elif t == NPY_SHORT: f[0] = 104 #"h" + * elif t == NPY_USHORT: f[0] = 72 #"H" + * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< + * elif t == NPY_UINT: f[0] = 73 #"I" + * elif t == NPY_LONG: f[0] = 108 #"l" + */ + __pyx_t_4 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 105; + goto __pyx_L15; + } + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":834 + * elif t == NPY_USHORT: f[0] = 72 #"H" + * elif t == NPY_INT: f[0] = 105 #"i" + * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< + * elif t == NPY_LONG: f[0] = 108 #"l" + * elif t == NPY_ULONG: f[0] = 76 #"L" + */ + __pyx_t_3 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 73; + goto __pyx_L15; + } + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":835 + * elif t == NPY_INT: f[0] = 105 #"i" + * elif t == NPY_UINT: f[0] = 73 #"I" + * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< + * elif t == NPY_ULONG: f[0] = 76 #"L" + * elif t == NPY_LONGLONG: f[0] = 113 #"q" + */ + __pyx_t_4 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 108; + goto __pyx_L15; + } + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":836 + * elif t == NPY_UINT: f[0] = 73 #"I" + * elif t == NPY_LONG: f[0] = 108 #"l" + * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< + * elif t == NPY_LONGLONG: f[0] = 113 #"q" + * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" + */ + __pyx_t_3 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 76; + goto __pyx_L15; + } + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":837 + * elif t == NPY_LONG: f[0] = 108 #"l" + * elif t == NPY_ULONG: f[0] = 76 #"L" + * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< + * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" + * elif t == NPY_FLOAT: f[0] = 102 #"f" + */ + __pyx_t_4 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 113; + goto __pyx_L15; + } + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":838 + * elif t == NPY_ULONG: f[0] = 76 #"L" + * elif t == NPY_LONGLONG: f[0] = 113 #"q" + * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< + * elif t == NPY_FLOAT: f[0] = 102 #"f" + * elif t == NPY_DOUBLE: f[0] = 100 #"d" + */ + __pyx_t_3 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 81; + goto __pyx_L15; + } + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":839 + * elif t == NPY_LONGLONG: f[0] = 113 #"q" + * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" + * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< + * elif t == NPY_DOUBLE: f[0] = 100 #"d" + * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" + */ + __pyx_t_4 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 102; + goto __pyx_L15; + } + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":840 + * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" + * elif t == NPY_FLOAT: f[0] = 102 #"f" + * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< + * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" + * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf + */ + __pyx_t_3 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 100; + goto __pyx_L15; + } + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":841 + * elif t == NPY_FLOAT: f[0] = 102 #"f" + * elif t == NPY_DOUBLE: f[0] = 100 #"d" + * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< + * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf + * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd + */ + __pyx_t_4 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 103; + goto __pyx_L15; + } + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":842 + * elif t == NPY_DOUBLE: f[0] = 100 #"d" + * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" + * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< + * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd + * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg + */ + __pyx_t_3 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 90; + (__pyx_v_f[1]) = 102; + __pyx_v_f = (__pyx_v_f + 1); + goto __pyx_L15; + } + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":843 + * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" + * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf + * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< + * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg + * elif t == NPY_OBJECT: f[0] = 79 #"O" + */ + __pyx_t_4 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 90; + (__pyx_v_f[1]) = 100; + __pyx_v_f = (__pyx_v_f + 1); + goto __pyx_L15; + } + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":844 + * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf + * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd + * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< + * elif t == NPY_OBJECT: f[0] = 79 #"O" + * else: + */ + __pyx_t_3 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __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]) = 103; + __pyx_v_f = (__pyx_v_f + 1); + goto __pyx_L15; + } + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":845 + * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd + * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg + * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< + * else: + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) + */ + __pyx_t_4 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 79; + goto __pyx_L15; + } + /*else*/ { + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":847 + * elif t == NPY_OBJECT: f[0] = 79 #"O" + * else: + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< + * f += 1 + * else: + */ + __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L15:; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":848 + * else: + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) + * f += 1 # <<<<<<<<<<<<<< + * else: + * # Cython ignores struct boundary information ("T{...}"), + */ + __pyx_v_f = (__pyx_v_f + 1); + goto __pyx_L13; + } + /*else*/ { + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":852 + * # Cython ignores struct boundary information ("T{...}"), + * # so don't output it + * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< + * return f + * + */ + __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_filename = __pyx_f[1]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_f = __pyx_t_9; + } + __pyx_L13:; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":797 + * cdef tuple fields + * + * for childname in descr.names: # <<<<<<<<<<<<<< + * fields = descr.fields[childname] + * child, new_offset = fields + */ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":853 + * # so don't output it + * f = _util_dtypestring(child, f, end, offset) + * return f # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = __pyx_v_f; + goto __pyx_L0; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":786 + * 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_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":969 + * + * + * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< + * cdef PyObject* baseptr + * if base is None: + */ + +static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) { + PyObject *__pyx_v_baseptr; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + __Pyx_RefNannySetupContext("set_array_base", 0); + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":971 + * cdef inline void set_array_base(ndarray arr, object base): + * cdef PyObject* baseptr + * if base is None: # <<<<<<<<<<<<<< + * baseptr = NULL + * else: + */ + __pyx_t_1 = (__pyx_v_base == Py_None); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":972 + * cdef PyObject* baseptr + * if base is None: + * baseptr = NULL # <<<<<<<<<<<<<< + * else: + * Py_INCREF(base) # important to do this before decref below! + */ + __pyx_v_baseptr = NULL; + goto __pyx_L3; + } + /*else*/ { + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":974 + * baseptr = NULL + * else: + * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<< + * baseptr = <PyObject*>base + * Py_XDECREF(arr.base) + */ + Py_INCREF(__pyx_v_base); + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":975 + * else: + * Py_INCREF(base) # important to do this before decref below! + * baseptr = <PyObject*>base # <<<<<<<<<<<<<< + * Py_XDECREF(arr.base) + * arr.base = baseptr + */ + __pyx_v_baseptr = ((PyObject *)__pyx_v_base); + } + __pyx_L3:; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":976 + * Py_INCREF(base) # important to do this before decref below! + * baseptr = <PyObject*>base + * Py_XDECREF(arr.base) # <<<<<<<<<<<<<< + * arr.base = baseptr + * + */ + Py_XDECREF(__pyx_v_arr->base); + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":977 + * baseptr = <PyObject*>base + * Py_XDECREF(arr.base) + * arr.base = baseptr # <<<<<<<<<<<<<< + * + * cdef inline object get_array_base(ndarray arr): + */ + __pyx_v_arr->base = __pyx_v_baseptr; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":969 + * + * + * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< + * cdef PyObject* baseptr + * if base is None: + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":979 + * arr.base = baseptr + * + * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< + * if arr.base is NULL: + * return None + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("get_array_base", 0); + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":980 + * + * cdef inline object get_array_base(ndarray arr): + * if arr.base is NULL: # <<<<<<<<<<<<<< + * return None + * else: + */ + __pyx_t_1 = ((__pyx_v_arr->base == NULL) != 0); + if (__pyx_t_1) { + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":981 + * cdef inline object get_array_base(ndarray arr): + * if arr.base is NULL: + * return None # <<<<<<<<<<<<<< + * else: + * return <object>arr.base + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_None); + __pyx_r = Py_None; + goto __pyx_L0; + } + /*else*/ { + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":983 + * return None + * else: + * return <object>arr.base # <<<<<<<<<<<<<< + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_arr->base)); + __pyx_r = ((PyObject *)__pyx_v_arr->base); + goto __pyx_L0; + } + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":979 + * arr.base = baseptr + * + * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< + * if arr.base is NULL: + * return None + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static struct __pyx_obj_3ml2___pyx_scope_struct__ml2 *__pyx_freelist_3ml2___pyx_scope_struct__ml2[8]; +static int __pyx_freecount_3ml2___pyx_scope_struct__ml2 = 0; + +static PyObject *__pyx_tp_new_3ml2___pyx_scope_struct__ml2(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_3ml2___pyx_scope_struct__ml2 > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3ml2___pyx_scope_struct__ml2)))) { + o = (PyObject*)__pyx_freelist_3ml2___pyx_scope_struct__ml2[--__pyx_freecount_3ml2___pyx_scope_struct__ml2]; + memset(o, 0, sizeof(struct __pyx_obj_3ml2___pyx_scope_struct__ml2)); + (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_3ml2___pyx_scope_struct__ml2(PyObject *o) { + struct __pyx_obj_3ml2___pyx_scope_struct__ml2 *p = (struct __pyx_obj_3ml2___pyx_scope_struct__ml2 *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_failures); + Py_CLEAR(p->__pyx_v_successes); + if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_3ml2___pyx_scope_struct__ml2 < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3ml2___pyx_scope_struct__ml2)))) { + __pyx_freelist_3ml2___pyx_scope_struct__ml2[__pyx_freecount_3ml2___pyx_scope_struct__ml2++] = ((struct __pyx_obj_3ml2___pyx_scope_struct__ml2 *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); + } +} + +static int __pyx_tp_traverse_3ml2___pyx_scope_struct__ml2(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_3ml2___pyx_scope_struct__ml2 *p = (struct __pyx_obj_3ml2___pyx_scope_struct__ml2 *)o; + if (p->__pyx_v_failures) { + e = (*v)(p->__pyx_v_failures, a); if (e) return e; + } + if (p->__pyx_v_successes) { + e = (*v)(p->__pyx_v_successes, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_3ml2___pyx_scope_struct__ml2(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_3ml2___pyx_scope_struct__ml2 *p = (struct __pyx_obj_3ml2___pyx_scope_struct__ml2 *)o; + tmp = ((PyObject*)p->__pyx_v_failures); + p->__pyx_v_failures = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_successes); + p->__pyx_v_successes = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyTypeObject __pyx_type_3ml2___pyx_scope_struct__ml2 = { + PyVarObject_HEAD_INIT(0, 0) + "ml2.__pyx_scope_struct__ml2", /*tp_name*/ + sizeof(struct __pyx_obj_3ml2___pyx_scope_struct__ml2), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_3ml2___pyx_scope_struct__ml2, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #else + 0, /*reserved*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_3ml2___pyx_scope_struct__ml2, /*tp_traverse*/ + __pyx_tp_clear_3ml2___pyx_scope_struct__ml2, /*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_3ml2___pyx_scope_struct__ml2, /*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_3ml2___pyx_scope_struct_1_genexpr *__pyx_freelist_3ml2___pyx_scope_struct_1_genexpr[8]; +static int __pyx_freecount_3ml2___pyx_scope_struct_1_genexpr = 0; + +static PyObject *__pyx_tp_new_3ml2___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_3ml2___pyx_scope_struct_1_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3ml2___pyx_scope_struct_1_genexpr)))) { + o = (PyObject*)__pyx_freelist_3ml2___pyx_scope_struct_1_genexpr[--__pyx_freecount_3ml2___pyx_scope_struct_1_genexpr]; + memset(o, 0, sizeof(struct __pyx_obj_3ml2___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_3ml2___pyx_scope_struct_1_genexpr(PyObject *o) { + struct __pyx_obj_3ml2___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_3ml2___pyx_scope_struct_1_genexpr *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_outer_scope); + Py_CLEAR(p->__pyx_v_s); + Py_CLEAR(p->__pyx_t_1); + if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_3ml2___pyx_scope_struct_1_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3ml2___pyx_scope_struct_1_genexpr)))) { + __pyx_freelist_3ml2___pyx_scope_struct_1_genexpr[__pyx_freecount_3ml2___pyx_scope_struct_1_genexpr++] = ((struct __pyx_obj_3ml2___pyx_scope_struct_1_genexpr *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); + } +} + +static int __pyx_tp_traverse_3ml2___pyx_scope_struct_1_genexpr(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_3ml2___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_3ml2___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_s) { + e = (*v)(p->__pyx_v_s, a); if (e) return e; + } + if (p->__pyx_t_1) { + e = (*v)(p->__pyx_t_1, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_3ml2___pyx_scope_struct_1_genexpr(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_3ml2___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_3ml2___pyx_scope_struct_1_genexpr *)o; + tmp = ((PyObject*)p->__pyx_outer_scope); + p->__pyx_outer_scope = ((struct __pyx_obj_3ml2___pyx_scope_struct__ml2 *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_s); + p->__pyx_v_s = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_t_1); + p->__pyx_t_1 = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyTypeObject __pyx_type_3ml2___pyx_scope_struct_1_genexpr = { + PyVarObject_HEAD_INIT(0, 0) + "ml2.__pyx_scope_struct_1_genexpr", /*tp_name*/ + sizeof(struct __pyx_obj_3ml2___pyx_scope_struct_1_genexpr), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_3ml2___pyx_scope_struct_1_genexpr, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #else + 0, /*reserved*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_3ml2___pyx_scope_struct_1_genexpr, /*tp_traverse*/ + __pyx_tp_clear_3ml2___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_3ml2___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 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 + "ml2", + 0, /* 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_n_s_DTYPE, __pyx_k_DTYPE, sizeof(__pyx_k_DTYPE), 0, 0, 1, 1}, + {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0}, + {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0}, + {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0}, + {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, + {&__pyx_kp_s_UNDERFLOW_ERROR, __pyx_k_UNDERFLOW_ERROR, sizeof(__pyx_k_UNDERFLOW_ERROR), 0, 0, 1, 0}, + {&__pyx_kp_s_Users_ben_Documents_Cascade_Pro, __pyx_k_Users_ben_Documents_Cascade_Pro, sizeof(__pyx_k_Users_ben_Documents_Cascade_Pro), 0, 0, 1, 0}, + {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, + {&__pyx_n_s_age, __pyx_k_age, sizeof(__pyx_k_age), 0, 0, 1, 1}, + {&__pyx_n_s_alpha, __pyx_k_alpha, sizeof(__pyx_k_alpha), 0, 0, 1, 1}, + {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1}, + {&__pyx_n_s_beta, __pyx_k_beta, sizeof(__pyx_k_beta), 0, 0, 1, 1}, + {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1}, + {&__pyx_n_s_delta, __pyx_k_delta, sizeof(__pyx_k_delta), 0, 0, 1, 1}, + {&__pyx_n_s_dist, __pyx_k_dist, sizeof(__pyx_k_dist), 0, 0, 1, 1}, + {&__pyx_n_s_dt, __pyx_k_dt, sizeof(__pyx_k_dt), 0, 0, 1, 1}, + {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1}, + {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1}, + {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1}, + {&__pyx_n_s_failures, __pyx_k_failures, sizeof(__pyx_k_failures), 0, 0, 1, 1}, + {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1}, + {&__pyx_n_s_float64, __pyx_k_float64, sizeof(__pyx_k_float64), 0, 0, 1, 1}, + {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 0, 1, 1}, + {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1}, + {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, + {&__pyx_n_s_itervalues, __pyx_k_itervalues, sizeof(__pyx_k_itervalues), 0, 0, 1, 1}, + {&__pyx_n_s_l, __pyx_k_l, sizeof(__pyx_k_l), 0, 0, 1, 1}, + {&__pyx_n_s_ll, __pyx_k_ll, sizeof(__pyx_k_ll), 0, 0, 1, 1}, + {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, + {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1}, + {&__pyx_n_s_ml2, __pyx_k_ml2, sizeof(__pyx_k_ml2), 0, 0, 1, 1}, + {&__pyx_n_s_ml2_locals_genexpr, __pyx_k_ml2_locals_genexpr, sizeof(__pyx_k_ml2_locals_genexpr), 0, 0, 1, 1}, + {&__pyx_n_s_n_nodes, __pyx_k_n_nodes, sizeof(__pyx_k_n_nodes), 0, 0, 1, 1}, + {&__pyx_n_s_n_roots, __pyx_k_n_roots, sizeof(__pyx_k_n_roots), 0, 0, 1, 1}, + {&__pyx_n_s_n_victims, __pyx_k_n_victims, sizeof(__pyx_k_n_victims), 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_non_victims, __pyx_k_non_victims, sizeof(__pyx_k_non_victims), 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_n_s_parents, __pyx_k_parents, sizeof(__pyx_k_parents), 0, 0, 1, 1}, + {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1}, + {&__pyx_n_s_probs, __pyx_k_probs, sizeof(__pyx_k_probs), 0, 0, 1, 1}, + {&__pyx_n_s_probs_fail, __pyx_k_probs_fail, sizeof(__pyx_k_probs_fail), 0, 0, 1, 1}, + {&__pyx_n_s_probs_nv, __pyx_k_probs_nv, sizeof(__pyx_k_probs_nv), 0, 0, 1, 1}, + {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, + {&__pyx_n_s_root_victims, __pyx_k_root_victims, sizeof(__pyx_k_root_victims), 0, 0, 1, 1}, + {&__pyx_n_s_roots, __pyx_k_roots, sizeof(__pyx_k_roots), 0, 0, 1, 1}, + {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1}, + {&__pyx_n_s_successes, __pyx_k_successes, sizeof(__pyx_k_successes), 0, 0, 1, 1}, + {&__pyx_n_s_sum, __pyx_k_sum, sizeof(__pyx_k_sum), 0, 0, 1, 1}, + {&__pyx_n_s_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 0, 1, 1}, + {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, + {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1}, + {&__pyx_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_victims, __pyx_k_victims, sizeof(__pyx_k_victims), 0, 0, 1, 1}, + {&__pyx_n_s_w1, __pyx_k_w1, sizeof(__pyx_k_w1), 0, 0, 1, 1}, + {&__pyx_n_s_w2, __pyx_k_w2, sizeof(__pyx_k_w2), 0, 0, 1, 1}, + {&__pyx_n_s_w3, __pyx_k_w3, sizeof(__pyx_k_w3), 0, 0, 1, 1}, + {&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 0, 0, 1, 1}, + {0, 0, 0, 0, 0, 0, 0} +}; +static int __Pyx_InitCachedBuiltins(void) { + __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_n_s_sum); if (!__pyx_builtin_sum) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_max = __Pyx_GetBuiltinName(__pyx_n_s_max); if (!__pyx_builtin_max) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + return 0; + __pyx_L1_error:; + return -1; +} + +static int __Pyx_InitCachedConstants(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/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_ = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple_); + __Pyx_GIVEREF(__pyx_tuple_); + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/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__2 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__2); + __Pyx_GIVEREF(__pyx_tuple__2); + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":260 + * 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__3 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__3); + __Pyx_GIVEREF(__pyx_tuple__3); + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":802 + * + * 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__4 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__4); + __Pyx_GIVEREF(__pyx_tuple__4); + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":806 + * 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__5 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__5); + __Pyx_GIVEREF(__pyx_tuple__5); + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":826 + * 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__6 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__6); + __Pyx_GIVEREF(__pyx_tuple__6); + + /* "ml2.pyx":38 + * return result + * + * def ml2(dict root_victims, dict victims, dict non_victims, DTYPE_t age, # <<<<<<<<<<<<<< + * DTYPE_t alpha, DTYPE_t delta): + * cdef: + */ + __pyx_tuple__7 = PyTuple_Pack(28, __pyx_n_s_root_victims, __pyx_n_s_victims, __pyx_n_s_non_victims, __pyx_n_s_age, __pyx_n_s_alpha, __pyx_n_s_delta, __pyx_n_s_n_roots, __pyx_n_s_n_victims, __pyx_n_s_n_nodes, __pyx_n_s_roots, __pyx_n_s_i, __pyx_n_s_dist, __pyx_n_s_dt, __pyx_n_s_t, __pyx_n_s_l, __pyx_n_s_beta, __pyx_n_s_ll, __pyx_n_s_parents, __pyx_n_s_failures, __pyx_n_s_successes, __pyx_n_s_probs, __pyx_n_s_probs_fail, __pyx_n_s_probs_nv, __pyx_n_s_w1, __pyx_n_s_w2, __pyx_n_s_w3, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__7); + __Pyx_GIVEREF(__pyx_tuple__7); + __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(6, 0, 28, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__7, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ben_Documents_Cascade_Pro, __pyx_n_s_ml2, 38, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_InitGlobals(void) { + if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + return 0; + __pyx_L1_error:; + return -1; +} + +#if PY_MAJOR_VERSION < 3 +PyMODINIT_FUNC initml2(void); /*proto*/ +PyMODINIT_FUNC initml2(void) +#else +PyMODINIT_FUNC PyInit_ml2(void); /*proto*/ +PyMODINIT_FUNC PyInit_ml2(void) +#endif +{ + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_REFNANNY + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); + if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); + } + #endif + __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_ml2(void)", 0); + if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #ifdef __Pyx_CyFunction_USED + if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + #ifdef __Pyx_FusedFunction_USED + if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + #ifdef __Pyx_Generator_USED + if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + /*--- Library function declarations ---*/ + /*--- Threads initialization code ---*/ + #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS + #ifdef WITH_THREAD /* Python build with threading support? */ + PyEval_InitThreads(); + #endif + #endif + /*--- Module creation code ---*/ + #if PY_MAJOR_VERSION < 3 + __pyx_m = Py_InitModule4("ml2", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); + #else + __pyx_m = PyModule_Create(&__pyx_moduledef); + #endif + if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + Py_INCREF(__pyx_d); + __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #if CYTHON_COMPILING_IN_PYPY + Py_INCREF(__pyx_b); + #endif + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + /*--- Initialize various global constants etc. ---*/ + if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) + if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + if (__pyx_module_is_main_ml2) { + if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + } + #if PY_MAJOR_VERSION >= 3 + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!PyDict_GetItemString(modules, "ml2")) { + if (unlikely(PyDict_SetItemString(modules, "ml2", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + } + #endif + /*--- Builtin init code ---*/ + if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + /*--- Constants init code ---*/ + if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + /*--- Global init code ---*/ + /*--- Variable export code ---*/ + /*--- Function export code ---*/ + /*--- Type init code ---*/ + if (PyType_Ready(&__pyx_type_3ml2___pyx_scope_struct__ml2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_3ml2___pyx_scope_struct__ml2.tp_print = 0; + __pyx_ptype_3ml2___pyx_scope_struct__ml2 = &__pyx_type_3ml2___pyx_scope_struct__ml2; + if (PyType_Ready(&__pyx_type_3ml2___pyx_scope_struct_1_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_3ml2___pyx_scope_struct_1_genexpr.tp_print = 0; + __pyx_ptype_3ml2___pyx_scope_struct_1_genexpr = &__pyx_type_3ml2___pyx_scope_struct_1_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_filename = __pyx_f[2]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + /*--- Variable import code ---*/ + /*--- Function import code ---*/ + /*--- Execution code ---*/ + + /* "ml2.pyx":2 + * # cython: boundscheck=False, cdivision=True + * import numpy as np # <<<<<<<<<<<<<< + * cimport numpy as np + * from libc.math cimport log, exp + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "ml2.pyx":6 + * from libc.math cimport log, exp + * + * DTYPE = np.float64 # <<<<<<<<<<<<<< + * ctypedef np.float_t DTYPE_t + * + */ + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_float64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_DTYPE, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "ml2.pyx":38 + * return result + * + * def ml2(dict root_victims, dict victims, dict non_victims, DTYPE_t age, # <<<<<<<<<<<<<< + * DTYPE_t alpha, DTYPE_t delta): + * cdef: + */ + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3ml2_1ml2, NULL, __pyx_n_s_ml2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ml2, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "ml2.pyx":1 + * # cython: boundscheck=False, cdivision=True # <<<<<<<<<<<<<< + * import numpy as np + * cimport numpy as np + */ + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "../../../../Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":979 + * arr.base = baseptr + * + * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< + * if arr.base is NULL: + * return None + */ + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + if (__pyx_m) { + if (__pyx_d) { + __Pyx_AddTraceback("init ml2", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + Py_DECREF(__pyx_m); __pyx_m = 0; + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init ml2"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if PY_MAJOR_VERSION < 3 + return; + #else + return __pyx_m; + #endif +} + +/* --- Runtime support code --- */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule((char *)modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, (char *)"RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name); + if (unlikely(!result)) { + PyErr_Format(PyExc_NameError, +#if PY_MAJOR_VERSION >= 3 + "name '%U' is not defined", name); +#else + "name '%.200s' is not defined", PyString_AS_STRING(name)); +#endif + } + return result; +} + +static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { +#if CYTHON_COMPILING_IN_CPYTHON + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyThreadState *tstate = PyThreadState_GET(); + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#else + PyErr_Restore(type, value, tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { +#if CYTHON_COMPILING_IN_CPYTHON + PyThreadState *tstate = PyThreadState_GET(); + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#else + PyErr_Fetch(type, value, tb); +#endif +} + +static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, + CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, + int full_traceback) { + PyObject *old_exc, *old_val, *old_tb; + PyObject *ctx; + __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); + if (full_traceback) { + Py_XINCREF(old_exc); + Py_XINCREF(old_val); + Py_XINCREF(old_tb); + __Pyx_ErrRestore(old_exc, old_val, old_tb); + PyErr_PrintEx(1); + } + #if PY_MAJOR_VERSION < 3 + ctx = PyString_FromString(name); + #else + ctx = PyUnicode_FromString(name); + #endif + __Pyx_ErrRestore(old_exc, old_val, old_tb); + if (!ctx) { + PyErr_WriteUnraisable(Py_None); + } else { + PyErr_WriteUnraisable(ctx); + Py_DECREF(ctx); + } +} + +static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *more_or_less; + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + +static void __Pyx_RaiseDoubleKeywordsError( + const char* func_name, + PyObject* kw_name) +{ + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION >= 3 + "%s() got multiple values for keyword argument '%U'", func_name, kw_name); + #else + "%s() got multiple values for keyword argument '%s'", func_name, + PyString_AsString(kw_name)); + #endif +} + +static int __Pyx_ParseOptionalKeywords( + PyObject *kwds, + PyObject **argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject *key = 0, *value = 0; + Py_ssize_t pos = 0; + PyObject*** name; + PyObject*** first_kw_arg = argnames + num_pos_args; + while (PyDict_Next(kwds, &pos, &key, &value)) { + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + values[name-argnames] = value; + continue; + } + name = first_kw_arg; + #if PY_MAJOR_VERSION < 3 + if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { + while (*name) { + if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) + && _PyString_Eq(**name, key)) { + values[name-argnames] = value; + break; + } + name++; + } + if (*name) continue; + else { + PyObject*** argname = argnames; + while (argname != first_kw_arg) { + if ((**argname == key) || ( + (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) + && _PyString_Eq(**argname, key))) { + goto arg_passed_twice; + } + argname++; + } + } + } else + #endif + if (likely(PyUnicode_Check(key))) { + while (*name) { + int cmp = (**name == key) ? 0 : + #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 + (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : + #endif + PyUnicode_Compare(**name, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + values[name-argnames] = value; + break; + } + name++; + } + if (*name) continue; + else { + PyObject*** argname = argnames; + while (argname != first_kw_arg) { + int cmp = (**argname == key) ? 0 : + #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 + (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : + #endif + PyUnicode_Compare(**argname, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + argname++; + } + } + } else + goto invalid_keyword_type; + if (kwds2) { + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else { + goto invalid_keyword; + } + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION < 3 + "%.200s() got an unexpected keyword argument '%.200s'", + function_name, PyString_AsString(key)); + #else + "%s() got an unexpected keyword argument '%U'", + function_name, key); + #endif +bad: + return -1; +} + +static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) { + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", + name, type->tp_name, Py_TYPE(obj)->tp_name); +} +static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, + const char *name, int exact) +{ + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + if (none_allowed && obj == Py_None) return 1; + else if (exact) { + if (likely(Py_TYPE(obj) == type)) return 1; + #if PY_MAJOR_VERSION == 2 + else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; + #endif + } + else { + if (likely(PyObject_TypeCheck(obj, type))) return 1; + } + __Pyx_RaiseArgumentTypeInvalid(name, obj, type); + return 0; +} + +static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) { + PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname); +} + +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { + PyObject *r; + if (!j) return NULL; + r = PyObject_GetItem(o, j); + Py_DECREF(j); + return r; +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck) { +#if CYTHON_COMPILING_IN_CPYTHON + if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o); + if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) { + PyObject *r = PyList_GET_ITEM(o, i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck) { +#if CYTHON_COMPILING_IN_CPYTHON + if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o); + if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, + int is_list, int wraparound, int boundscheck) { +#if CYTHON_COMPILING_IN_CPYTHON + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); + if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) { + PyObject *r = PyList_GET_ITEM(o, n); + Py_INCREF(r); + return r; + } + } + else if (PyTuple_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); + if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, n); + Py_INCREF(r); + return r; + } + } else { + PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; + if (likely(m && m->sq_item)) { + if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { + Py_ssize_t l = m->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + if (PyErr_ExceptionMatches(PyExc_OverflowError)) + PyErr_Clear(); + else + return NULL; + } + } + return m->sq_item(o, i); + } + } +#else + if (is_list || PySequence_Check(o)) { + return PySequence_GetItem(o, i); + } +#endif + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +} + +static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { + PyObject *result; +#if CYTHON_COMPILING_IN_CPYTHON + 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; +} + +#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 + +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + if (likely(PyObject_TypeCheck(obj, type))) + return 1; + PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", + Py_TYPE(obj)->tp_name, type->tp_name); + return 0; +} + +static CYTHON_INLINE int __Pyx_IsLittleEndian(void) { + unsigned int n = 1; + return *(unsigned char*)(&n) != 0; +} +static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, + __Pyx_BufFmt_StackElem* stack, + __Pyx_TypeInfo* type) { + stack[0].field = &ctx->root; + stack[0].parent_offset = 0; + ctx->root.type = type; + ctx->root.name = "buffer dtype"; + ctx->root.offset = 0; + ctx->head = stack; + ctx->head->field = &ctx->root; + ctx->fmt_offset = 0; + ctx->head->parent_offset = 0; + ctx->new_packmode = '@'; + ctx->enc_packmode = '@'; + ctx->new_count = 1; + ctx->enc_count = 0; + ctx->enc_type = 0; + ctx->is_complex = 0; + ctx->is_valid_array = 0; + ctx->struct_alignment = 0; + while (type->typegroup == 'S') { + ++ctx->head; + ctx->head->field = type->fields; + ctx->head->parent_offset = 0; + type = type->fields->type; + } +} +static int __Pyx_BufFmt_ParseNumber(const char** ts) { + int count; + const char* t = *ts; + if (*t < '0' || *t > '9') { + return -1; + } else { + count = *t++ - '0'; + while (*t >= '0' && *t < '9') { + count *= 10; + count += *t++ - '0'; + } + } + *ts = t; + return count; +} +static int __Pyx_BufFmt_ExpectNumber(const char **ts) { + int number = __Pyx_BufFmt_ParseNumber(ts); + if (number == -1) + PyErr_Format(PyExc_ValueError,\ + "Does not understand character buffer dtype format string ('%c')", **ts); + return number; +} +static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) { + PyErr_Format(PyExc_ValueError, + "Unexpected format string character: '%c'", ch); +} +static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) { + switch (ch) { + case 'c': return "'char'"; + case 'b': return "'signed char'"; + case 'B': return "'unsigned char'"; + case 'h': return "'short'"; + case 'H': return "'unsigned short'"; + case 'i': return "'int'"; + case 'I': return "'unsigned int'"; + case 'l': return "'long'"; + case 'L': return "'unsigned long'"; + case 'q': return "'long long'"; + case 'Q': return "'unsigned long long'"; + case 'f': return (is_complex ? "'complex float'" : "'float'"); + case 'd': return (is_complex ? "'complex double'" : "'double'"); + case 'g': return (is_complex ? "'complex long double'" : "'long double'"); + case 'T': return "a struct"; + case 'O': return "Python object"; + case 'P': return "a pointer"; + case 's': case 'p': return "a string"; + case 0: return "end"; + default: return "unparseable format string"; + } +} +static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) { + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return 2; + case 'i': case 'I': case 'l': case 'L': return 4; + case 'q': case 'Q': return 8; + case 'f': return (is_complex ? 8 : 4); + case 'd': return (is_complex ? 16 : 8); + case 'g': { + PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g').."); + return 0; + } + case 'O': case 'P': return sizeof(void*); + default: + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } +} +static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) { + switch (ch) { + case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return sizeof(short); + case 'i': case 'I': return sizeof(int); + case 'l': case 'L': return sizeof(long); + #ifdef HAVE_LONG_LONG + case 'q': case 'Q': return sizeof(PY_LONG_LONG); + #endif + case 'f': return sizeof(float) * (is_complex ? 2 : 1); + case 'd': return sizeof(double) * (is_complex ? 2 : 1); + case 'g': return sizeof(long double) * (is_complex ? 2 : 1); + case 'O': case 'P': return sizeof(void*); + default: { + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } + } +} +typedef struct { char c; short x; } __Pyx_st_short; +typedef struct { char c; int x; } __Pyx_st_int; +typedef struct { char c; long x; } __Pyx_st_long; +typedef struct { char c; float x; } __Pyx_st_float; +typedef struct { char c; double x; } __Pyx_st_double; +typedef struct { char c; long double x; } __Pyx_st_longdouble; +typedef struct { char c; void *x; } __Pyx_st_void_p; +#ifdef HAVE_LONG_LONG +typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong; +#endif +static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) { + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short); + case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int); + case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long); +#ifdef HAVE_LONG_LONG + case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG); +#endif + case 'f': return sizeof(__Pyx_st_float) - sizeof(float); + case 'd': return sizeof(__Pyx_st_double) - sizeof(double); + case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double); + case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*); + default: + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } +} +/* These are for computing the padding at the end of the struct to align + on the first member of the struct. This will probably the same as above, + but we don't have any guarantees. + */ +typedef struct { short x; char c; } __Pyx_pad_short; +typedef struct { int x; char c; } __Pyx_pad_int; +typedef struct { long x; char c; } __Pyx_pad_long; +typedef struct { float x; char c; } __Pyx_pad_float; +typedef struct { double x; char c; } __Pyx_pad_double; +typedef struct { long double x; char c; } __Pyx_pad_longdouble; +typedef struct { void *x; char c; } __Pyx_pad_void_p; +#ifdef HAVE_LONG_LONG +typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong; +#endif +static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) { + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short); + case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int); + case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long); +#ifdef HAVE_LONG_LONG + case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG); +#endif + case 'f': return sizeof(__Pyx_pad_float) - sizeof(float); + case 'd': return sizeof(__Pyx_pad_double) - sizeof(double); + case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double); + case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*); + default: + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } +} +static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) { + switch (ch) { + case 'c': + return 'H'; + case 'b': case 'h': case 'i': + case 'l': case 'q': case 's': case 'p': + return 'I'; + case 'B': case 'H': case 'I': case 'L': case 'Q': + return 'U'; + case 'f': case 'd': case 'g': + return (is_complex ? 'C' : 'R'); + case 'O': + return 'O'; + case 'P': + return 'P'; + default: { + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } + } +} +static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) { + if (ctx->head == NULL || ctx->head->field == &ctx->root) { + const char* expected; + const char* quote; + if (ctx->head == NULL) { + expected = "end"; + quote = ""; + } else { + expected = ctx->head->field->type->name; + quote = "'"; + } + PyErr_Format(PyExc_ValueError, + "Buffer dtype mismatch, expected %s%s%s but got %s", + quote, expected, quote, + __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex)); + } else { + __Pyx_StructField* field = ctx->head->field; + __Pyx_StructField* parent = (ctx->head - 1)->field; + PyErr_Format(PyExc_ValueError, + "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'", + field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex), + parent->type->name, field->name); + } +} +static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) { + char group; + size_t size, offset, arraysize = 1; + if (ctx->enc_type == 0) return 0; + if (ctx->head->field->type->arraysize[0]) { + int i, ndim = 0; + if (ctx->enc_type == 's' || ctx->enc_type == 'p') { + ctx->is_valid_array = ctx->head->field->type->ndim == 1; + ndim = 1; + if (ctx->enc_count != ctx->head->field->type->arraysize[0]) { + PyErr_Format(PyExc_ValueError, + "Expected a dimension of size %zu, got %zu", + ctx->head->field->type->arraysize[0], ctx->enc_count); + return -1; + } + } + if (!ctx->is_valid_array) { + PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d", + ctx->head->field->type->ndim, ndim); + return -1; + } + for (i = 0; i < ctx->head->field->type->ndim; i++) { + arraysize *= ctx->head->field->type->arraysize[i]; + } + ctx->is_valid_array = 0; + ctx->enc_count = 1; + } + group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex); + do { + __Pyx_StructField* field = ctx->head->field; + __Pyx_TypeInfo* type = field->type; + if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') { + size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex); + } else { + size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex); + } + if (ctx->enc_packmode == '@') { + size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex); + size_t align_mod_offset; + if (align_at == 0) return -1; + align_mod_offset = ctx->fmt_offset % align_at; + if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset; + if (ctx->struct_alignment == 0) + ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type, + ctx->is_complex); + } + if (type->size != size || type->typegroup != group) { + if (type->typegroup == 'C' && type->fields != NULL) { + size_t parent_offset = ctx->head->parent_offset + field->offset; + ++ctx->head; + ctx->head->field = type->fields; + ctx->head->parent_offset = parent_offset; + continue; + } + if ((type->typegroup == 'H' || group == 'H') && type->size == size) { + } else { + __Pyx_BufFmt_RaiseExpected(ctx); + return -1; + } + } + offset = ctx->head->parent_offset + field->offset; + if (ctx->fmt_offset != offset) { + PyErr_Format(PyExc_ValueError, + "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected", + (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset); + return -1; + } + ctx->fmt_offset += size; + if (arraysize) + ctx->fmt_offset += (arraysize - 1) * size; + --ctx->enc_count; + while (1) { + if (field == &ctx->root) { + ctx->head = NULL; + if (ctx->enc_count != 0) { + __Pyx_BufFmt_RaiseExpected(ctx); + return -1; + } + break; + } + ctx->head->field = ++field; + if (field->type == NULL) { + --ctx->head; + field = ctx->head->field; + continue; + } else if (field->type->typegroup == 'S') { + size_t parent_offset = ctx->head->parent_offset + field->offset; + if (field->type->fields->type == NULL) continue; + field = field->type->fields; + ++ctx->head; + ctx->head->field = field; + ctx->head->parent_offset = parent_offset; + break; + } else { + break; + } + } + } while (ctx->enc_count); + ctx->enc_type = 0; + ctx->is_complex = 0; + return 0; +} +static CYTHON_INLINE PyObject * +__pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp) +{ + const char *ts = *tsp; + int i = 0, number; + int ndim = ctx->head->field->type->ndim; +; + ++ts; + if (ctx->new_count != 1) { + PyErr_SetString(PyExc_ValueError, + "Cannot handle repeated arrays in format string"); + return NULL; + } + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + while (*ts && *ts != ')') { + switch (*ts) { + case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue; + default: break; + } + number = __Pyx_BufFmt_ExpectNumber(&ts); + if (number == -1) return NULL; + if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i]) + return PyErr_Format(PyExc_ValueError, + "Expected a dimension of size %zu, got %d", + ctx->head->field->type->arraysize[i], number); + if (*ts != ',' && *ts != ')') + return PyErr_Format(PyExc_ValueError, + "Expected a comma in format string, got '%c'", *ts); + if (*ts == ',') ts++; + i++; + } + if (i != ndim) + return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d", + ctx->head->field->type->ndim, i); + if (!*ts) { + PyErr_SetString(PyExc_ValueError, + "Unexpected end of format string, expected ')'"); + return NULL; + } + ctx->is_valid_array = 1; + ctx->new_count = 1; + *tsp = ++ts; + return Py_None; +} +static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) { + int got_Z = 0; + while (1) { + switch(*ts) { + case 0: + if (ctx->enc_type != 0 && ctx->head == NULL) { + __Pyx_BufFmt_RaiseExpected(ctx); + return NULL; + } + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + if (ctx->head != NULL) { + __Pyx_BufFmt_RaiseExpected(ctx); + return NULL; + } + return ts; + case ' ': + case '\r': + case '\n': + ++ts; + break; + case '<': + if (!__Pyx_IsLittleEndian()) { + PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); + return NULL; + } + ctx->new_packmode = '='; + ++ts; + break; + case '>': + case '!': + if (__Pyx_IsLittleEndian()) { + PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler"); + return NULL; + } + ctx->new_packmode = '='; + ++ts; + break; + case '=': + case '@': + case '^': + ctx->new_packmode = *ts++; + break; + case 'T': + { + const char* ts_after_sub; + size_t i, struct_count = ctx->new_count; + size_t struct_alignment = ctx->struct_alignment; + ctx->new_count = 1; + ++ts; + if (*ts != '{') { + PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'"); + return NULL; + } + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->enc_type = 0; + ctx->enc_count = 0; + ctx->struct_alignment = 0; + ++ts; + ts_after_sub = ts; + for (i = 0; i != struct_count; ++i) { + ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts); + if (!ts_after_sub) return NULL; + } + ts = ts_after_sub; + if (struct_alignment) ctx->struct_alignment = struct_alignment; + } + break; + case '}': + { + size_t alignment = ctx->struct_alignment; + ++ts; + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->enc_type = 0; + if (alignment && ctx->fmt_offset % alignment) { + ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment); + } + } + return ts; + case 'x': + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->fmt_offset += ctx->new_count; + ctx->new_count = 1; + ctx->enc_count = 0; + ctx->enc_type = 0; + ctx->enc_packmode = ctx->new_packmode; + ++ts; + break; + case 'Z': + got_Z = 1; + ++ts; + if (*ts != 'f' && *ts != 'd' && *ts != 'g') { + __Pyx_BufFmt_RaiseUnexpectedChar('Z'); + return NULL; + } + case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I': + case 'l': case 'L': case 'q': case 'Q': + case 'f': case 'd': case 'g': + case 'O': case 'p': + if (ctx->enc_type == *ts && got_Z == ctx->is_complex && + ctx->enc_packmode == ctx->new_packmode) { + ctx->enc_count += ctx->new_count; + ctx->new_count = 1; + got_Z = 0; + ++ts; + break; + } + case 's': + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->enc_count = ctx->new_count; + ctx->enc_packmode = ctx->new_packmode; + ctx->enc_type = *ts; + ctx->is_complex = got_Z; + ++ts; + ctx->new_count = 1; + got_Z = 0; + break; + case ':': + ++ts; + while(*ts != ':') ++ts; + ++ts; + break; + case '(': + if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL; + break; + default: + { + int number = __Pyx_BufFmt_ExpectNumber(&ts); + if (number == -1) return NULL; + ctx->new_count = (size_t)number; + } + } + } +} +static CYTHON_INLINE void __Pyx_ZeroBuffer(Py_buffer* buf) { + buf->buf = NULL; + buf->obj = NULL; + buf->strides = __Pyx_zeros; + buf->shape = __Pyx_zeros; + buf->suboffsets = __Pyx_minusones; +} +static CYTHON_INLINE int __Pyx_GetBufferAndValidate( + Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, + int nd, int cast, __Pyx_BufFmt_StackElem* stack) +{ + if (obj == Py_None || obj == NULL) { + __Pyx_ZeroBuffer(buf); + return 0; + } + buf->buf = NULL; + if (__Pyx_GetBuffer(obj, buf, flags) == -1) goto fail; + if (buf->ndim != nd) { + PyErr_Format(PyExc_ValueError, + "Buffer has wrong number of dimensions (expected %d, got %d)", + nd, buf->ndim); + goto fail; + } + if (!cast) { + __Pyx_BufFmt_Context ctx; + __Pyx_BufFmt_Init(&ctx, stack, dtype); + if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail; + } + if ((unsigned)buf->itemsize != dtype->size) { + PyErr_Format(PyExc_ValueError, + "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "d byte%s) does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "d byte%s)", + buf->itemsize, (buf->itemsize > 1) ? "s" : "", + dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ? "s" : ""); + goto fail; + } + if (buf->suboffsets == NULL) buf->suboffsets = __Pyx_minusones; + return 0; +fail:; + __Pyx_ZeroBuffer(buf); + return -1; +} +static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { + if (info->buf == NULL) return; + if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL; + __Pyx_ReleaseBuffer(info); +} + +static CYTHON_INLINE int __Pyx_IterFinish(void) { +#if CYTHON_COMPILING_IN_CPYTHON + PyThreadState *tstate = PyThreadState_GET(); + PyObject* exc_type = tstate->curexc_type; + if (unlikely(exc_type)) { + if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) { + PyObject *exc_value, *exc_tb; + exc_value = tstate->curexc_value; + exc_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; + Py_DECREF(exc_type); + Py_XDECREF(exc_value); + Py_XDECREF(exc_tb); + return 0; + } else { + return -1; + } + } + return 0; +#else + if (unlikely(PyErr_Occurred())) { + if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { + PyErr_Clear(); + return 0; + } else { + return -1; + } + } + return 0; +#endif +} + +#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 + +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { +#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 + +#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) { +#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); + } + } + return __Pyx__PyObject_CallOneArg(func, arg); +} +#else +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject* args = PyTuple_Pack(1, arg); + return (likely(args)) ? __Pyx_PyObject_Call(func, args, NULL) : NULL; +} +#endif + +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_COMPILING_IN_CPYTHON + 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; +} + +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { + PyErr_Format(PyExc_ValueError, + "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", + index, (index == 1) ? "" : "s"); +} + +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { + PyErr_Format(PyExc_ValueError, + "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); +} + +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { + if (unlikely(retval)) { + Py_DECREF(retval); + __Pyx_RaiseTooManyValuesError(expected); + return -1; + } else { + return __Pyx_IterFinish(); + } + return 0; +} + +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); +} + +static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { + if (t == Py_None) { + __Pyx_RaiseNoneNotIterableError(); + } else if (PyTuple_GET_SIZE(t) < index) { + __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t)); + } else { + __Pyx_RaiseTooManyValuesError(index); + } +} + +static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, + int is_tuple, int has_known_size, int decref_tuple) { + Py_ssize_t index; + PyObject *value1 = NULL, *value2 = NULL, *iter = NULL; + if (!is_tuple && unlikely(!PyTuple_Check(tuple))) { + iternextfunc iternext; + iter = PyObject_GetIter(tuple); + if (unlikely(!iter)) goto bad; + if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; } + iternext = Py_TYPE(iter)->tp_iternext; + value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; } + value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; } + if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad; + Py_DECREF(iter); + } else { + if (!has_known_size && unlikely(PyTuple_GET_SIZE(tuple) != 2)) { + __Pyx_UnpackTupleError(tuple, 2); + goto bad; + } +#if CYTHON_COMPILING_IN_PYPY + value1 = PySequence_ITEM(tuple, 0); + if (unlikely(!value1)) goto bad; + value2 = PySequence_ITEM(tuple, 1); + if (unlikely(!value2)) goto bad; +#else + value1 = PyTuple_GET_ITEM(tuple, 0); + value2 = PyTuple_GET_ITEM(tuple, 1); + Py_INCREF(value1); + Py_INCREF(value2); +#endif + if (decref_tuple) { Py_DECREF(tuple); } + } + *pvalue1 = value1; + *pvalue2 = value2; + return 0; +unpacking_failed: + if (!has_known_size && __Pyx_IterFinish() == 0) + __Pyx_RaiseNeedMoreValuesError(index); +bad: + Py_XDECREF(iter); + Py_XDECREF(value1); + Py_XDECREF(value2); + if (decref_tuple) { Py_XDECREF(tuple); } + return -1; +} + +static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, + Py_ssize_t* p_orig_length, int* p_source_is_dict) { + is_dict = is_dict || likely(PyDict_CheckExact(iterable)); + *p_source_is_dict = is_dict; +#if !CYTHON_COMPILING_IN_PYPY + if (is_dict) { + *p_orig_length = PyDict_Size(iterable); + Py_INCREF(iterable); + return iterable; + } +#endif + *p_orig_length = 0; + if (method_name) { + PyObject* iter; + iterable = __Pyx_PyObject_CallMethod0(iterable, method_name); + if (!iterable) + return NULL; +#if !CYTHON_COMPILING_IN_PYPY + if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable)) + return iterable; +#endif + iter = PyObject_GetIter(iterable); + Py_DECREF(iterable); + return iter; + } + return PyObject_GetIter(iterable); +} +static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* iter_obj, Py_ssize_t orig_length, Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) { + PyObject* next_item; +#if !CYTHON_COMPILING_IN_PYPY + if (source_is_dict) { + PyObject *key, *value; + if (unlikely(orig_length != PyDict_Size(iter_obj))) { + PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration"); + return -1; + } + if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) { + return 0; + } + if (pitem) { + PyObject* tuple = PyTuple_New(2); + if (unlikely(!tuple)) { + return -1; + } + Py_INCREF(key); + Py_INCREF(value); + PyTuple_SET_ITEM(tuple, 0, key); + PyTuple_SET_ITEM(tuple, 1, value); + *pitem = tuple; + } else { + if (pkey) { + Py_INCREF(key); + *pkey = key; + } + if (pvalue) { + Py_INCREF(value); + *pvalue = value; + } + } + return 1; + } else if (PyTuple_CheckExact(iter_obj)) { + Py_ssize_t pos = *ppos; + if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0; + *ppos = pos + 1; + next_item = PyTuple_GET_ITEM(iter_obj, pos); + Py_INCREF(next_item); + } else if (PyList_CheckExact(iter_obj)) { + Py_ssize_t pos = *ppos; + if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0; + *ppos = pos + 1; + next_item = PyList_GET_ITEM(iter_obj, pos); + Py_INCREF(next_item); + } else +#endif + { + next_item = PyIter_Next(iter_obj); + if (unlikely(!next_item)) { + return __Pyx_IterFinish(); + } + } + if (pitem) { + *pitem = next_item; + } else if (pkey && pvalue) { + if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1)) + return -1; + } else if (pkey) { + *pkey = next_item; + } else { + *pvalue = next_item; + } + return 1; +} + +#if PY_MAJOR_VERSION < 3 +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, + CYTHON_UNUSED PyObject *cause) { + Py_XINCREF(type); + if (!value || value == Py_None) + value = NULL; + else + Py_INCREF(value); + if (!tb || tb == Py_None) + tb = NULL; + else { + Py_INCREF(tb); + if (!PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto raise_error; + } + } + if (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_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) { + if (PyObject_IsSubclass(instance_class, type)) { + type = instance_class; + } else { + instance_class = NULL; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } +#if PY_VERSION_HEX >= 0x03030000 + if (cause) { +#else + if (cause && cause != Py_None) { +#endif + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#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 + +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = (start + end) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static PyCodeObject *__pyx_find_code_object(int code_line) { + PyCodeObject* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); + if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { + return NULL; + } + code_object = __pyx_code_cache.entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + __pyx_code_cache.entries = entries; + __pyx_code_cache.max_count = 64; + __pyx_code_cache.count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); + if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { + PyCodeObject* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_DECREF(tmp); + return; + } + if (__pyx_code_cache.count == __pyx_code_cache.max_count) { + int new_max = __pyx_code_cache.max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + __pyx_code_cache.entries, (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); +} + +#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; + py_frame->f_lineno = py_line; + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} + +#if PY_MAJOR_VERSION < 3 +static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { + if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); + if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags); + PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name); + return -1; +} +static void __Pyx_ReleaseBuffer(Py_buffer *view) { + PyObject *obj = view->obj; + if (!obj) return; + if (PyObject_CheckBuffer(obj)) { + PyBuffer_Release(view); + return; + } + if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) { __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view); return; } + Py_DECREF(obj); + view->obj = NULL; +} +#endif + + + 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; +} + +#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 +static PyObject *__Pyx_GetStdout(void) { + PyObject *f = PySys_GetObject((char *)"stdout"); + if (!f) { + PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout"); + } + return f; +} +static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) { + int i; + if (!f) { + if (!(f = __Pyx_GetStdout())) + return -1; + } + Py_INCREF(f); + for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) { + PyObject* v; + if (PyFile_SoftSpace(f, 1)) { + if (PyFile_WriteString(" ", f) < 0) + goto error; + } + v = PyTuple_GET_ITEM(arg_tuple, i); + if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0) + goto error; + if (PyString_Check(v)) { + char *s = PyString_AsString(v); + Py_ssize_t len = PyString_Size(v); + if (len > 0) { + switch (s[len-1]) { + case ' ': break; + case '\f': case '\r': case '\n': case '\t': case '\v': + PyFile_SoftSpace(f, 0); + break; + default: break; + } + } + } + } + if (newline) { + if (PyFile_WriteString("\n", f) < 0) + goto error; + PyFile_SoftSpace(f, 0); + } + Py_DECREF(f); + return 0; +error: + Py_DECREF(f); + return -1; +} +#else +static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) { + PyObject* kwargs = 0; + PyObject* result = 0; + PyObject* end_string; + if (unlikely(!__pyx_print)) { + __pyx_print = PyObject_GetAttr(__pyx_b, __pyx_n_s_print); + if (!__pyx_print) + return -1; + } + if (stream) { + kwargs = PyDict_New(); + if (unlikely(!kwargs)) + return -1; + if (unlikely(PyDict_SetItem(kwargs, __pyx_n_s_file, stream) < 0)) + goto bad; + if (!newline) { + end_string = PyUnicode_FromStringAndSize(" ", 1); + if (unlikely(!end_string)) + goto bad; + if (PyDict_SetItem(kwargs, __pyx_n_s_end, end_string) < 0) { + Py_DECREF(end_string); + goto bad; + } + Py_DECREF(end_string); + } + } else if (!newline) { + if (unlikely(!__pyx_print_kwargs)) { + __pyx_print_kwargs = PyDict_New(); + if (unlikely(!__pyx_print_kwargs)) + return -1; + end_string = PyUnicode_FromStringAndSize(" ", 1); + if (unlikely(!end_string)) + return -1; + if (PyDict_SetItem(__pyx_print_kwargs, __pyx_n_s_end, end_string) < 0) { + Py_DECREF(end_string); + return -1; + } + Py_DECREF(end_string); + } + kwargs = __pyx_print_kwargs; + } + result = PyObject_Call(__pyx_print, arg_tuple, kwargs); + if (unlikely(kwargs) && (kwargs != __pyx_print_kwargs)) + Py_DECREF(kwargs); + if (!result) + return -1; + Py_DECREF(result); + return 0; +bad: + if (kwargs != __pyx_print_kwargs) + Py_XDECREF(kwargs); + return -1; +} +#endif + +#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 +static int __Pyx_PrintOne(PyObject* f, PyObject *o) { + if (!f) { + if (!(f = __Pyx_GetStdout())) + return -1; + } + Py_INCREF(f); + if (PyFile_SoftSpace(f, 0)) { + if (PyFile_WriteString(" ", f) < 0) + goto error; + } + if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0) + goto error; + if (PyFile_WriteString("\n", f) < 0) + goto error; + Py_DECREF(f); + return 0; +error: + Py_DECREF(f); + return -1; + /* the line below is just to avoid C compiler + * warnings about unused functions */ + return __Pyx_Print(f, NULL, 0); +} +#else +static int __Pyx_PrintOne(PyObject* stream, PyObject *o) { + int res; + PyObject* arg_tuple = PyTuple_Pack(1, o); + if (unlikely(!arg_tuple)) + return -1; + res = __Pyx_Print(stream, arg_tuple, 1); + Py_DECREF(arg_tuple); + return res; +} +#endif + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { + const int neg_one = (int) -1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(int) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); + } else if (sizeof(int) <= sizeof(unsigned long long)) { + return PyLong_FromUnsignedLongLong((unsigned long long) value); + } + } else { + if (sizeof(int) <= sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(int) <= sizeof(long long)) { + return PyLong_FromLongLong((long long) value); + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(int), + little, !is_unsigned); + } +} + +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value) \ + { \ + 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 (is_unsigned && unlikely(value < zero)) \ + goto raise_neg_overflow; \ + else \ + goto raise_overflow; \ + } \ + } \ + return (target_type) value; \ + } + +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 + #if CYTHON_USE_PYLONG_INTERNALS + #include "longintrepr.h" + #endif +#endif + +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { + const int neg_one = (int) -1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(int) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(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_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 + #if CYTHON_USE_PYLONG_INTERNALS + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: __PYX_VERIFY_RETURN_INT(int, digit, ((PyLongObject*)x)->ob_digit[0]); + } + #endif +#endif + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } + if (sizeof(int) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, PyLong_AsUnsignedLong(x)) + } else if (sizeof(int) <= sizeof(unsigned long long)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long long, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 + #if CYTHON_USE_PYLONG_INTERNALS + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: __PYX_VERIFY_RETURN_INT(int, digit, +(((PyLongObject*)x)->ob_digit[0])); + case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, -(sdigit) ((PyLongObject*)x)->ob_digit[0]); + } + #endif +#endif + if (sizeof(int) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT(int, long, PyLong_AsLong(x)) + } else if (sizeof(int) <= sizeof(long long)) { + __PYX_VERIFY_RETURN_INT(int, long long, PyLong_AsLongLong(x)) + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + int val; + PyObject *v = __Pyx_PyNumber_Int(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (int) -1; + } + } else { + int val; + PyObject *tmp = __Pyx_PyNumber_Int(x); + if (!tmp) return (int) -1; + val = __Pyx_PyInt_As_int(tmp); + Py_DECREF(tmp); + return val; + } +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; +} + +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + return ::std::complex< float >(x, y); + } + #else + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + return x + y*(__pyx_t_float_complex)_Complex_I; + } + #endif +#else + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + __pyx_t_float_complex z; + z.real = x; + z.imag = y; + return z; + } +#endif + +#if CYTHON_CCOMPLEX +#else + static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex a, __pyx_t_float_complex b) { + return (a.real == b.real) && (a.imag == b.imag); + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real + b.real; + z.imag = a.imag + b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real - b.real; + z.imag = a.imag - b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real * b.real - a.imag * b.imag; + z.imag = a.real * b.imag + a.imag * b.real; + return z; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + float denom = b.real * b.real + b.imag * b.imag; + z.real = (a.real * b.real + a.imag * b.imag) / denom; + z.imag = (a.imag * b.real - a.real * b.imag) / denom; + return z; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex a) { + __pyx_t_float_complex z; + z.real = -a.real; + z.imag = -a.imag; + return z; + } + static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex a) { + return (a.real == 0) && (a.imag == 0); + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex a) { + __pyx_t_float_complex z; + z.real = a.real; + z.imag = -a.imag; + return z; + } + #if 1 + static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex z) { + #if !defined(HAVE_HYPOT) || defined(_MSC_VER) + return sqrtf(z.real*z.real + z.imag*z.imag); + #else + return hypotf(z.real, z.imag); + #endif + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + float r, lnr, theta, z_r, z_theta; + if (b.imag == 0 && b.real == (int)b.real) { + if (b.real < 0) { + float denom = a.real * a.real + a.imag * a.imag; + a.real = a.real / denom; + a.imag = -a.imag / denom; + b.real = -b.real; + } + switch ((int)b.real) { + case 0: + z.real = 1; + z.imag = 0; + return z; + case 1: + return a; + case 2: + z = __Pyx_c_prodf(a, a); + return __Pyx_c_prodf(a, a); + case 3: + z = __Pyx_c_prodf(a, a); + return __Pyx_c_prodf(z, a); + case 4: + z = __Pyx_c_prodf(a, a); + return __Pyx_c_prodf(z, z); + } + } + if (a.imag == 0) { + if (a.real == 0) { + return a; + } + r = a.real; + theta = 0; + } else { + r = __Pyx_c_absf(a); + theta = atan2f(a.imag, a.real); + } + lnr = logf(r); + z_r = expf(lnr * b.real - theta * b.imag); + z_theta = theta * b.real + lnr * b.imag; + z.real = z_r * cosf(z_theta); + z.imag = z_r * sinf(z_theta); + return z; + } + #endif +#endif + +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + return ::std::complex< double >(x, y); + } + #else + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + return x + y*(__pyx_t_double_complex)_Complex_I; + } + #endif +#else + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + __pyx_t_double_complex z; + z.real = x; + z.imag = y; + return z; + } +#endif + +#if CYTHON_CCOMPLEX +#else + static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex a, __pyx_t_double_complex b) { + return (a.real == b.real) && (a.imag == b.imag); + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real + b.real; + z.imag = a.imag + b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real - b.real; + z.imag = a.imag - b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real * b.real - a.imag * b.imag; + z.imag = a.real * b.imag + a.imag * b.real; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + double denom = b.real * b.real + b.imag * b.imag; + z.real = (a.real * b.real + a.imag * b.imag) / denom; + z.imag = (a.imag * b.real - a.real * b.imag) / denom; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex a) { + __pyx_t_double_complex z; + z.real = -a.real; + z.imag = -a.imag; + return z; + } + static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex a) { + return (a.real == 0) && (a.imag == 0); + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex a) { + __pyx_t_double_complex z; + z.real = a.real; + z.imag = -a.imag; + return z; + } + #if 1 + static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex z) { + #if !defined(HAVE_HYPOT) || defined(_MSC_VER) + return sqrt(z.real*z.real + z.imag*z.imag); + #else + return hypot(z.real, z.imag); + #endif + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + double r, lnr, theta, z_r, z_theta; + if (b.imag == 0 && b.real == (int)b.real) { + if (b.real < 0) { + double denom = a.real * a.real + a.imag * a.imag; + a.real = a.real / denom; + a.imag = -a.imag / denom; + b.real = -b.real; + } + switch ((int)b.real) { + case 0: + z.real = 1; + z.imag = 0; + return z; + case 1: + return a; + case 2: + z = __Pyx_c_prod(a, a); + return __Pyx_c_prod(a, a); + case 3: + z = __Pyx_c_prod(a, a); + return __Pyx_c_prod(z, a); + case 4: + z = __Pyx_c_prod(a, a); + return __Pyx_c_prod(z, z); + } + } + if (a.imag == 0) { + if (a.real == 0) { + return a; + } + r = a.real; + theta = 0; + } else { + r = __Pyx_c_abs(a); + theta = atan2(a.imag, a.real); + } + lnr = log(r); + z_r = exp(lnr * b.real - theta * b.imag); + z_theta = theta * b.real + lnr * b.imag; + z.real = z_r * cos(z_theta); + z.imag = z_r * sin(z_theta); + return z; + } + #endif +#endif + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { + const long neg_one = (long) -1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); + } else if (sizeof(long) <= sizeof(unsigned long long)) { + return PyLong_FromUnsignedLongLong((unsigned long long) value); + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(long) <= sizeof(long long)) { + return PyLong_FromLongLong((long long) value); + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); + } +} + +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { + const long neg_one = (long) -1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(long) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(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_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 + #if CYTHON_USE_PYLONG_INTERNALS + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: __PYX_VERIFY_RETURN_INT(long, digit, ((PyLongObject*)x)->ob_digit[0]); + } + #endif +#endif + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } + if (sizeof(long) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, PyLong_AsUnsignedLong(x)) + } else if (sizeof(long) <= sizeof(unsigned long long)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long long, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 + #if CYTHON_USE_PYLONG_INTERNALS + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: __PYX_VERIFY_RETURN_INT(long, digit, +(((PyLongObject*)x)->ob_digit[0])); + case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, -(sdigit) ((PyLongObject*)x)->ob_digit[0]); + } + #endif +#endif + if (sizeof(long) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT(long, long, PyLong_AsLong(x)) + } else if (sizeof(long) <= sizeof(long long)) { + __PYX_VERIFY_RETURN_INT(long, long long, PyLong_AsLongLong(x)) + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + long val; + PyObject *v = __Pyx_PyNumber_Int(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (long) -1; + } + } else { + long val; + PyObject *tmp = __Pyx_PyNumber_Int(x); + if (!tmp) return (long) -1; + val = __Pyx_PyInt_As_long(tmp); + Py_DECREF(tmp); + return val; + } +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; +} + +static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { + PyObject* fake_module; + PyTypeObject* cached_type = NULL; + fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI); + if (!fake_module) return NULL; + Py_INCREF(fake_module); + cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name); + if (cached_type) { + if (!PyType_Check((PyObject*)cached_type)) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s is not a type object", + type->tp_name); + goto bad; + } + if (cached_type->tp_basicsize != type->tp_basicsize) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s has the wrong size, try recompiling", + type->tp_name); + goto bad; + } + } else { + if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; + PyErr_Clear(); + if (PyType_Ready(type) < 0) goto bad; + if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0) + goto bad; + Py_INCREF(type); + cached_type = type; + } +done: + Py_DECREF(fake_module); + return cached_type; +bad: + Py_XDECREF(cached_type); + cached_type = NULL; + goto done; +} + +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; +#if CYTHON_COMPILING_IN_CPYTHON + PyThreadState *tstate = PyThreadState_GET(); + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = *type; + tstate->exc_value = *value; + tstate->exc_traceback = *tb; +#else + PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); + PyErr_SetExcInfo(*type, *value, *tb); +#endif + *type = tmp_type; + *value = tmp_value; + *tb = tmp_tb; +} + +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { + PyObject *method, *result = NULL; + method = __Pyx_PyObject_GetAttrStr(obj, method_name); + if (unlikely(!method)) goto bad; +#if CYTHON_COMPILING_IN_CPYTHON + if (likely(PyMethod_Check(method))) { + PyObject *self = PyMethod_GET_SELF(method); + if (likely(self)) { + PyObject *args; + PyObject *function = PyMethod_GET_FUNCTION(method); + args = PyTuple_New(2); + if (unlikely(!args)) goto bad; + 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); +bad: + Py_XDECREF(method); + return result; +} + +static PyObject *__Pyx_Generator_Next(PyObject *self); +static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value); +static PyObject *__Pyx_Generator_Close(PyObject *self); +static PyObject *__Pyx_Generator_Throw(PyObject *gen, PyObject *args); +static PyTypeObject *__pyx_GeneratorType = 0; +#define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType) +#define __Pyx_Generator_Undelegate(gen) Py_CLEAR((gen)->yieldfrom) +#if 1 || PY_VERSION_HEX < 0x030300B0 +static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue) { + PyObject *et, *ev, *tb; + PyObject *value = NULL; + __Pyx_ErrFetch(&et, &ev, &tb); + if (!et) { + Py_XDECREF(tb); + Py_XDECREF(ev); + Py_INCREF(Py_None); + *pvalue = Py_None; + return 0; + } + if (unlikely(et != PyExc_StopIteration) && + unlikely(!PyErr_GivenExceptionMatches(et, PyExc_StopIteration))) { + __Pyx_ErrRestore(et, ev, tb); + return -1; + } + if (likely(et == PyExc_StopIteration)) { + if (likely(!ev) || !PyObject_IsInstance(ev, PyExc_StopIteration)) { + if (!ev) { + Py_INCREF(Py_None); + ev = Py_None; + } + Py_XDECREF(tb); + Py_DECREF(et); + *pvalue = ev; + return 0; + } + } + PyErr_NormalizeException(&et, &ev, &tb); + if (unlikely(!PyObject_IsInstance(ev, PyExc_StopIteration))) { + __Pyx_ErrRestore(et, ev, tb); + return -1; + } + Py_XDECREF(tb); + Py_DECREF(et); +#if PY_VERSION_HEX >= 0x030300A0 + value = ((PyStopIterationObject *)ev)->value; + Py_INCREF(value); + Py_DECREF(ev); +#else + { + PyObject* args = PyObject_GetAttr(ev, __pyx_n_s_args); + Py_DECREF(ev); + if (likely(args)) { + value = PyObject_GetItem(args, 0); + Py_DECREF(args); + } + if (unlikely(!value)) { + __Pyx_ErrRestore(NULL, NULL, NULL); + Py_INCREF(Py_None); + value = Py_None; + } + } +#endif + *pvalue = value; + return 0; +} +#endif +static CYTHON_INLINE +void __Pyx_Generator_ExceptionClear(__pyx_GeneratorObject *self) { + PyObject *exc_type = self->exc_type; + PyObject *exc_value = self->exc_value; + PyObject *exc_traceback = self->exc_traceback; + self->exc_type = NULL; + self->exc_value = NULL; + self->exc_traceback = NULL; + Py_XDECREF(exc_type); + Py_XDECREF(exc_value); + Py_XDECREF(exc_traceback); +} +static CYTHON_INLINE +int __Pyx_Generator_CheckRunning(__pyx_GeneratorObject *gen) { + if (unlikely(gen->is_running)) { + PyErr_SetString(PyExc_ValueError, + "generator already executing"); + return 1; + } + return 0; +} +static CYTHON_INLINE +PyObject *__Pyx_Generator_SendEx(__pyx_GeneratorObject *self, PyObject *value) { + PyObject *retval; + assert(!self->is_running); + if (unlikely(self->resume_label == 0)) { + if (unlikely(value && value != Py_None)) { + PyErr_SetString(PyExc_TypeError, + "can't send non-None value to a " + "just-started generator"); + return NULL; + } + } + if (unlikely(self->resume_label == -1)) { + PyErr_SetNone(PyExc_StopIteration); + return NULL; + } + if (value) { +#if CYTHON_COMPILING_IN_PYPY +#else + if (self->exc_traceback) { + PyThreadState *tstate = PyThreadState_GET(); + PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback; + PyFrameObject *f = tb->tb_frame; + Py_XINCREF(tstate->frame); + assert(f->f_back == NULL); + f->f_back = tstate->frame; + } +#endif + __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value, + &self->exc_traceback); + } else { + __Pyx_Generator_ExceptionClear(self); + } + self->is_running = 1; + retval = self->body((PyObject *) self, value); + self->is_running = 0; + if (retval) { + __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value, + &self->exc_traceback); +#if CYTHON_COMPILING_IN_PYPY +#else + if (self->exc_traceback) { + PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback; + PyFrameObject *f = tb->tb_frame; + Py_CLEAR(f->f_back); + } +#endif + } else { + __Pyx_Generator_ExceptionClear(self); + } + return retval; +} +static CYTHON_INLINE +PyObject *__Pyx_Generator_FinishDelegation(__pyx_GeneratorObject *gen) { + PyObject *ret; + PyObject *val = NULL; + __Pyx_Generator_Undelegate(gen); + __Pyx_PyGen_FetchStopIterationValue(&val); + ret = __Pyx_Generator_SendEx(gen, val); + Py_XDECREF(val); + return ret; +} +static PyObject *__Pyx_Generator_Next(PyObject *self) { + __pyx_GeneratorObject *gen = (__pyx_GeneratorObject*) self; + PyObject *yf = gen->yieldfrom; + if (unlikely(__Pyx_Generator_CheckRunning(gen))) + return NULL; + if (yf) { + PyObject *ret; + gen->is_running = 1; + ret = Py_TYPE(yf)->tp_iternext(yf); + gen->is_running = 0; + if (likely(ret)) { + return ret; + } + return __Pyx_Generator_FinishDelegation(gen); + } + return __Pyx_Generator_SendEx(gen, Py_None); +} +static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value) { + __pyx_GeneratorObject *gen = (__pyx_GeneratorObject*) self; + PyObject *yf = gen->yieldfrom; + if (unlikely(__Pyx_Generator_CheckRunning(gen))) + return NULL; + if (yf) { + PyObject *ret; + gen->is_running = 1; + if (__Pyx_Generator_CheckExact(yf)) { + ret = __Pyx_Generator_Send(yf, value); + } else { + if (value == Py_None) + ret = PyIter_Next(yf); + else + ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value); + } + gen->is_running = 0; + if (likely(ret)) { + return ret; + } + return __Pyx_Generator_FinishDelegation(gen); + } + return __Pyx_Generator_SendEx(gen, value); +} +static int __Pyx_Generator_CloseIter(__pyx_GeneratorObject *gen, PyObject *yf) { + PyObject *retval = NULL; + int err = 0; + if (__Pyx_Generator_CheckExact(yf)) { + retval = __Pyx_Generator_Close(yf); + if (!retval) + return -1; + } else { + PyObject *meth; + gen->is_running = 1; + meth = PyObject_GetAttr(yf, __pyx_n_s_close); + if (unlikely(!meth)) { + if (!PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_WriteUnraisable(yf); + } + PyErr_Clear(); + } else { + retval = PyObject_CallFunction(meth, NULL); + Py_DECREF(meth); + if (!retval) + err = -1; + } + gen->is_running = 0; + } + Py_XDECREF(retval); + return err; +} +static PyObject *__Pyx_Generator_Close(PyObject *self) { + __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self; + PyObject *retval, *raised_exception; + PyObject *yf = gen->yieldfrom; + int err = 0; + if (unlikely(__Pyx_Generator_CheckRunning(gen))) + return NULL; + if (yf) { + Py_INCREF(yf); + err = __Pyx_Generator_CloseIter(gen, yf); + __Pyx_Generator_Undelegate(gen); + Py_DECREF(yf); + } + if (err == 0) + PyErr_SetNone(PyExc_GeneratorExit); + retval = __Pyx_Generator_SendEx(gen, NULL); + if (retval) { + Py_DECREF(retval); + PyErr_SetString(PyExc_RuntimeError, + "generator ignored GeneratorExit"); + return NULL; + } + raised_exception = PyErr_Occurred(); + if (!raised_exception + || raised_exception == PyExc_StopIteration + || 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_Generator_Throw(PyObject *self, PyObject *args) { + __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self; + PyObject *typ; + PyObject *tb = NULL; + PyObject *val = NULL; + PyObject *yf = gen->yieldfrom; + if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb)) + return NULL; + if (unlikely(__Pyx_Generator_CheckRunning(gen))) + return NULL; + if (yf) { + PyObject *ret; + Py_INCREF(yf); + if (PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit)) { + int err = __Pyx_Generator_CloseIter(gen, yf); + Py_DECREF(yf); + __Pyx_Generator_Undelegate(gen); + if (err < 0) + return __Pyx_Generator_SendEx(gen, NULL); + goto throw_here; + } + gen->is_running = 1; + if (__Pyx_Generator_CheckExact(yf)) { + ret = __Pyx_Generator_Throw(yf, args); + } else { + PyObject *meth = PyObject_GetAttr(yf, __pyx_n_s_throw); + if (unlikely(!meth)) { + Py_DECREF(yf); + if (!PyErr_ExceptionMatches(PyExc_AttributeError)) { + gen->is_running = 0; + return NULL; + } + PyErr_Clear(); + __Pyx_Generator_Undelegate(gen); + gen->is_running = 0; + goto throw_here; + } + ret = PyObject_CallObject(meth, args); + Py_DECREF(meth); + } + gen->is_running = 0; + Py_DECREF(yf); + if (!ret) { + ret = __Pyx_Generator_FinishDelegation(gen); + } + return ret; + } +throw_here: + __Pyx_Raise(typ, val, tb, NULL); + return __Pyx_Generator_SendEx(gen, NULL); +} +static int __Pyx_Generator_traverse(PyObject *self, visitproc visit, void *arg) { + __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self; + Py_VISIT(gen->closure); + Py_VISIT(gen->classobj); + Py_VISIT(gen->yieldfrom); + Py_VISIT(gen->exc_type); + Py_VISIT(gen->exc_value); + Py_VISIT(gen->exc_traceback); + return 0; +} +static int __Pyx_Generator_clear(PyObject *self) { + __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self; + Py_CLEAR(gen->closure); + Py_CLEAR(gen->classobj); + Py_CLEAR(gen->yieldfrom); + Py_CLEAR(gen->exc_type); + Py_CLEAR(gen->exc_value); + Py_CLEAR(gen->exc_traceback); + Py_CLEAR(gen->gi_name); + Py_CLEAR(gen->gi_qualname); + return 0; +} +static void __Pyx_Generator_dealloc(PyObject *self) { + __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self; + PyObject_GC_UnTrack(gen); + if (gen->gi_weakreflist != NULL) + PyObject_ClearWeakRefs(self); + if (gen->resume_label > 0) { + PyObject_GC_Track(self); +#if PY_VERSION_HEX >= 0x030400a1 + if (PyObject_CallFinalizerFromDealloc(self)) +#else + Py_TYPE(gen)->tp_del(self); + if (self->ob_refcnt > 0) +#endif + { + return; + } + PyObject_GC_UnTrack(self); + } + __Pyx_Generator_clear(self); + PyObject_GC_Del(gen); +} +static void __Pyx_Generator_del(PyObject *self) { + PyObject *res; + PyObject *error_type, *error_value, *error_traceback; + __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self; + if (gen->resume_label <= 0) + return ; +#if PY_VERSION_HEX < 0x030400a1 + assert(self->ob_refcnt == 0); + self->ob_refcnt = 1; +#endif + __Pyx_ErrFetch(&error_type, &error_value, &error_traceback); + res = __Pyx_Generator_Close(self); + if (res == NULL) + PyErr_WriteUnraisable(self); + else + Py_DECREF(res); + __Pyx_ErrRestore(error_type, error_value, error_traceback); +#if PY_VERSION_HEX < 0x030400a1 + 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_Generator_get_name(__pyx_GeneratorObject *self) +{ + Py_INCREF(self->gi_name); + return self->gi_name; +} +static int +__Pyx_Generator_set_name(__pyx_GeneratorObject *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_Generator_get_qualname(__pyx_GeneratorObject *self) +{ + Py_INCREF(self->gi_qualname); + return self->gi_qualname; +} +static int +__Pyx_Generator_set_qualname(__pyx_GeneratorObject *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 PyGetSetDef __pyx_Generator_getsets[] = { + {(char *) "__name__", (getter)__Pyx_Generator_get_name, (setter)__Pyx_Generator_set_name, + (char*) PyDoc_STR("name of the generator"), 0}, + {(char *) "__qualname__", (getter)__Pyx_Generator_get_qualname, (setter)__Pyx_Generator_set_qualname, + (char*) PyDoc_STR("qualified name of the generator"), 0}, + {0, 0, 0, 0, 0} +}; +static PyMemberDef __pyx_Generator_memberlist[] = { + {(char *) "gi_running", T_BOOL, offsetof(__pyx_GeneratorObject, is_running), READONLY, NULL}, + {0, 0, 0, 0, 0} +}; +static PyMethodDef __pyx_Generator_methods[] = { + {"send", (PyCFunction) __Pyx_Generator_Send, METH_O, 0}, + {"throw", (PyCFunction) __Pyx_Generator_Throw, METH_VARARGS, 0}, + {"close", (PyCFunction) __Pyx_Generator_Close, METH_NOARGS, 0}, + {0, 0, 0, 0} +}; +static PyTypeObject __pyx_GeneratorType_type = { + PyVarObject_HEAD_INIT(0, 0) + "generator", + sizeof(__pyx_GeneratorObject), + 0, + (destructor) __Pyx_Generator_dealloc, + 0, + 0, + 0, +#if PY_MAJOR_VERSION < 3 + 0, +#else + 0, +#endif + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, + 0, + (traverseproc) __Pyx_Generator_traverse, + 0, + 0, + offsetof(__pyx_GeneratorObject, 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_Generator_del, +#endif + 0, +#if PY_VERSION_HEX >= 0x030400a1 + __Pyx_Generator_del, +#endif +}; +static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body, + PyObject *closure, PyObject *name, PyObject *qualname) { + __pyx_GeneratorObject *gen = + PyObject_GC_New(__pyx_GeneratorObject, &__pyx_GeneratorType_type); + if (gen == NULL) + return NULL; + gen->body = body; + gen->closure = closure; + Py_XINCREF(closure); + gen->is_running = 0; + gen->resume_label = 0; + gen->classobj = NULL; + gen->yieldfrom = NULL; + gen->exc_type = NULL; + gen->exc_value = NULL; + gen->exc_traceback = NULL; + gen->gi_weakreflist = NULL; + Py_XINCREF(qualname); + gen->gi_qualname = qualname; + Py_XINCREF(name); + gen->gi_name = name; + PyObject_GC_Track(gen); + return gen; +} +static int __pyx_Generator_init(void) { + __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr; + __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter; + __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type); + if (__pyx_GeneratorType == NULL) { + return -1; + } + return 0; +} + +static int __Pyx_check_binary_version(void) { + char ctversion[4], rtversion[4]; + PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION); + PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion()); + if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compiletime version %s of module '%.100s' " + "does not match runtime version %s", + ctversion, __Pyx_MODULE_NAME, rtversion); + return PyErr_WarnEx(NULL, message, 1); + } + return 0; +} + +#ifndef __PYX_HAVE_RT_ImportModule +#define __PYX_HAVE_RT_ImportModule +static PyObject *__Pyx_ImportModule(const char *name) { + PyObject *py_name = 0; + PyObject *py_module = 0; + py_name = __Pyx_PyIdentifier_FromString(name); + if (!py_name) + goto bad; + py_module = PyImport_Import(py_name); + Py_DECREF(py_name); + return py_module; +bad: + Py_XDECREF(py_name); + return 0; +} +#endif + +#ifndef __PYX_HAVE_RT_ImportType +#define __PYX_HAVE_RT_ImportType +static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, + size_t size, int strict) +{ + PyObject *py_module = 0; + PyObject *result = 0; + PyObject *py_name = 0; + char warning[200]; + Py_ssize_t basicsize; +#ifdef Py_LIMITED_API + PyObject *py_basicsize; +#endif + py_module = __Pyx_ImportModule(module_name); + if (!py_module) + goto bad; + py_name = __Pyx_PyIdentifier_FromString(class_name); + if (!py_name) + goto bad; + result = PyObject_GetAttr(py_module, py_name); + Py_DECREF(py_name); + py_name = 0; + Py_DECREF(py_module); + py_module = 0; + if (!result) + goto bad; + if (!PyType_Check(result)) { + PyErr_Format(PyExc_TypeError, + "%.200s.%.200s is not a type object", + module_name, class_name); + goto bad; + } +#ifndef Py_LIMITED_API + basicsize = ((PyTypeObject *)result)->tp_basicsize; +#else + py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); + if (!py_basicsize) + goto bad; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = 0; + if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; +#endif + if (!strict && (size_t)basicsize > size) { + PyOS_snprintf(warning, sizeof(warning), + "%s.%s size changed, may indicate binary incompatibility", + module_name, class_name); + if (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", + module_name, class_name); + goto bad; + } + return (PyTypeObject *)result; +bad: + Py_XDECREF(py_module); + Py_XDECREF(result); + return NULL; +} +#endif + +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 __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 + 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_Int(PyObject* x) { + PyNumberMethods *m; + const char *name = NULL; + PyObject *res = NULL; +#if PY_MAJOR_VERSION < 3 + if (PyInt_Check(x) || PyLong_Check(x)) +#else + if (PyLong_Check(x)) +#endif + return Py_INCREF(x), x; + m = Py_TYPE(x)->tp_as_number; +#if PY_MAJOR_VERSION < 3 + if (m && m->nb_int) { + name = "int"; + res = PyNumber_Int(x); + } + else if (m && m->nb_long) { + name = "long"; + res = PyNumber_Long(x); + } +#else + if (m && m->nb_int) { + name = "int"; + res = PyNumber_Long(x); + } +#endif + if (res) { +#if PY_MAJOR_VERSION < 3 + if (!PyInt_Check(res) && !PyLong_Check(res)) { +#else + if (!PyLong_Check(res)) { +#endif + PyErr_Format(PyExc_TypeError, + "__%.4s__ returned non-%.4s (type %.200s)", + name, name, Py_TYPE(res)->tp_name); + Py_DECREF(res); + return NULL; + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(b))) + return PyInt_AS_LONG(b); +#endif + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 + #if CYTHON_USE_PYLONG_INTERNALS + switch (Py_SIZE(b)) { + case -1: return -(sdigit)((PyLongObject*)b)->ob_digit[0]; + case 0: return 0; + case 1: return ((PyLongObject*)b)->ob_digit[0]; + } + #endif + #endif + 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 */ diff --git a/experiments/ml2.pyx b/experiments/ml2.pyx new file mode 100644 index 0000000..9edc7e6 --- /dev/null +++ b/experiments/ml2.pyx @@ -0,0 +1,86 @@ +# cython: boundscheck=False, cdivision=True +import numpy as np +cimport numpy as np +from libc.math cimport log, exp + +DTYPE = np.float64 +ctypedef np.float_t DTYPE_t + +cdef DTYPE_t plogis(DTYPE_t weight, DTYPE_t delta): + return 1./(1. + exp(-weight/delta)) + +cdef DTYPE_t weight_success(int dist, int dt, DTYPE_t alpha, DTYPE_t delta, + DTYPE_t w1, DTYPE_t w2, DTYPE_t w3): + """weight for successful infection, exponential time model""" + cdef DTYPE_t structural, temporal, result + structural = delta ** dist + # structural = plogis(w1,delta) * plogis(w2,delta) * plogis(w3,delta) + temporal = exp(-alpha*dt) * (exp(alpha)-1.) + # temporal = 1 - exp(-alpha*dt) + if exp(-alpha*dt)==0.: print 'UNDERFLOW ERROR' + # temporal = 1. / (1. + (dt - 1.)/alpha)**0.01 - 1. / (1. + dt/alpha)**0.01 + result = log(structural * temporal) + # print 'st', structural, temporal + return result + +cdef DTYPE_t weight_failure(int dist, int dt, DTYPE_t alpha, DTYPE_t delta, + DTYPE_t w1, DTYPE_t w2, DTYPE_t w3): + """weight for failed infection, exponential time model""" + cdef DTYPE_t structural, temporal, result + structural = delta ** dist + # structural = plogis(w1,delta) * plogis(w2,delta) * plogis(w3,delta) + temporal = exp(-alpha * dt) + # temporal = 1. - 1. / (1. + dt/alpha)**0.01 + result = log(1. - structural + structural * temporal) + # print 'stnv', structural, temporal + return result + +def ml2(dict root_victims, dict victims, dict non_victims, DTYPE_t age, + DTYPE_t alpha, DTYPE_t delta): + cdef: + int n_roots, n_victims, roots, i, dist, dt, t, l + DTYPE_t beta, ll + list parents, failures, successes + n_roots, n_victims = len(root_victims), len(victims) + cdef: + np.ndarray[DTYPE_t] probs = np.zeros(n_victims, dtype=DTYPE) + np.ndarray[DTYPE_t] probs_fail = np.zeros(n_victims, dtype=DTYPE) + np.ndarray[DTYPE_t] probs_nv = np.zeros(len(non_victims), dtype=DTYPE) + + # loop through victims + for i, parents in enumerate(victims.itervalues()): + # for each victim node i, compute the probability that all its parents + # fail to infect it, also computes the probability that its most + # likely parent infects it + failures = [weight_failure(dist, dt, alpha, delta, w1, w2, w3) + for (dist, dt, w1, w2, w3) in parents] + probs_fail[i] = sum(failures) + successes = [weight_success(dist, dt, alpha, delta, w1, w2, w3) + for (dist, dt, w1, w2, w3) in parents] + # find parent that maximizes log(p) - log(\tilde{p}) + probs[i] = max(s - failures[l] for l, s in enumerate(successes)) + + # loop through non-victims + for i, parents in enumerate(non_victims.itervalues()): + # for each non victim node, compute the probability that all its + # parents fail to infect it + failures = [weight_failure(dist, dt, alpha, delta, w1, w2, w3) + for (dist, dt, w1, w2, w3) in parents] + probs_nv[i] = sum(failures) + + # print successes + # print failures + # print probs + + # calculate log likelihood + # probs.sort(); probs = probs[::-1] # sort probs in descending order + # cdef: + # np.ndarray[DTYPE_t] cums = probs.cumsum() + ll = probs_fail.sum() # add probability that all edges to victims fail + ll += probs_nv.sum() # add probability that all edges to non_victims fail + ll += probs.sum() # add probability for realized edges and subtract probability these edges fail + + roots = n_roots + beta = 0 + # print n_nodes, n_roots, n_victims, max_i, roots + return (beta, roots, ll) diff --git a/experiments/ml2.so b/experiments/ml2.so Binary files differnew file mode 100755 index 0000000..b8dc4b6 --- /dev/null +++ b/experiments/ml2.so diff --git a/experiments/out.log b/experiments/out.log index 6b67669..faa96dd 100644 --- a/experiments/out.log +++ b/experiments/out.log @@ -1,2500 +1,14 @@ -0.001 0.001 0.13 20 -52.0832474113 -0.001 0.00112465782212 0.13 20 -52.1005125537 -0.001 0.00126485521686 0.13 20 -52.1199509282 -0.001 0.00142252931349 0.13 20 -52.1418390225 -0.001 0.00159985871961 0.13 20 -52.1664892743 -0.001 0.00179929362329 0.13 20 -52.1942549491 -0.001 0.00202358964773 0.13 20 -52.225535731 -0.001 0.00227584592607 0.13 20 -52.2607841467 -0.001 0.0025595479227 0.13 20 -52.3005129593 -0.001 0.00287861559235 0.13 20 -52.3453037031 -0.001 0.00323745754282 0.13 20 -52.3958165575 -0.001 0.00364103194931 0.13 20 -52.4528018042 -0.001 0.00409491506238 0.13 20 -52.51711316 -0.001 0.00460537825582 0.13 20 -52.589723343 -0.001 0.00517947467923 0.13 20 -52.6717423073 -0.001 0.00582513671247 0.13 20 -52.7644386796 -0.001 0.0065512855686 0.13 20 -52.8692650573 -0.001 0.00736795455966 0.13 20 -52.9878879795 -0.001 0.00828642772855 0.13 20 -53.1222235829 -0.001 0.00931939576234 0.13 20 -53.2744802023 -0.001 0.0104811313415 0.13 20 -53.447209494 -0.001 0.0117876863479 0.13 20 -53.6433680699 -0.001 0.0132571136559 0.13 20 -53.8663921501 -0.001 0.0149097165718 0.13 20 -54.120288421 -0.001 0.0167683293681 0.13 20 -54.4097451574 -0.001 0.0188586327877 0.13 20 -54.7402688054 -0.001 0.0212095088792 0.13 20 -55.1183527117 -0.001 0.0238534400643 0.13 20 -55.5516866311 -0.001 0.0268269579528 0.13 20 -56.0494182218 -0.001 0.0301711481053 0.13 20 -56.6224811403 -0.001 0.033932217719 0.13 20 -57.2840088874 -0.001 0.0381621340795 0.13 20 -58.0498596248 -0.001 0.0429193426013 0.13 20 -58.9392853408 -0.001 0.0482695743768 0.13 20 -59.9757897802 -0.001 0.0542867543932 0.13 20 -61.1882345479 -0.001 0.0610540229659 0.13 20 -62.6122733035 -0.001 0.0686648845004 0.13 20 -64.2922221645 -0.001 0.0772244994584 0.13 20 -66.2835134819 -0.001 0.0868511373751 0.13 20 -68.6559345702 -0.001 0.0976778110089 0.13 20 -71.4979294263 -0.001 0.109854114199 0.13 20 -74.9223497807 -0.001 0.123548288826 0.13 20 -79.0741968175 -0.001 0.138949549437 0.13 20 -84.14111926 -0.001 0.156270697655 0.13 20 -90.3677628212 -0.001 0.175751062485 0.13 20 -98.0755574422 -0.001 0.19765980717 0.13 20 -107.690276966 -0.001 0.222299648253 0.13 20 -119.780873153 -0.001 0.250011038262 0.13 20 -135.114960731 -0.001 0.281176869797 0.13 20 -154.739447493 -0.001 0.316227766017 0.13 20 -180.100201802 -0.00114599750858 0.001 0.13 20 -52.0875591672 -0.00114599750858 0.00112465782212 0.13 20 -52.1053646041 -0.00114599750858 0.00126485521686 0.13 20 -52.1254113682 -0.00114599750858 0.00142252931349 0.13 20 -52.147984633 -0.00114599750858 0.00159985871961 0.13 20 -52.1734066576 -0.00114599750858 0.00179929362329 0.13 20 -52.2020418193 -0.00114599750858 0.00202358964773 0.13 20 -52.2343023842 -0.00114599750858 0.00227584592607 0.13 20 -52.2706551355 -0.00114599750858 0.0025595479227 0.13 20 -52.3116290059 -0.00114599750858 0.00287861559235 0.13 20 -52.3578238865 -0.00114599750858 0.00323745754282 0.13 20 -52.4099208198 -0.00114599750858 0.00364103194931 0.13 20 -52.4686938272 -0.00114599750858 0.00409491506238 0.13 20 -52.5350236761 -0.00114599750858 0.00460537825582 0.13 20 -52.6099139521 -0.00114599750858 0.00517947467923 0.13 20 -52.6945098905 -0.00114599750858 0.00582513671247 0.13 20 -52.790120517 -0.00114599750858 0.0065512855686 0.13 20 -52.8982447782 -0.00114599750858 0.00736795455966 0.13 20 -53.020602505 -0.00114599750858 0.00828642772855 0.13 20 -53.1591712517 -0.00114599750858 0.00931939576234 0.13 20 -53.3162303172 -0.00114599750858 0.0104811313415 0.13 20 -53.4944135799 -0.00114599750858 0.0117876863479 0.13 20 -53.6967732037 -0.00114599750858 0.0132571136559 0.13 20 -53.926856811 -0.00114599750858 0.0149097165718 0.13 20 -54.1888014204 -0.00114599750858 0.0167683293681 0.13 20 -54.4874483518 -0.00114599750858 0.0188586327877 0.13 20 -54.8284844781 -0.00114599750858 0.0212095088792 0.13 20 -55.2186167453 -0.00114599750858 0.0238534400643 0.13 20 -55.6657889016 -0.00114599750858 0.0268269579528 0.13 20 -56.1794520421 -0.00114599750858 0.0301711481053 0.13 20 -56.7709041065 -0.00114599750858 0.033932217719 0.13 20 -57.4537181694 -0.00114599750858 0.0381621340795 0.13 20 -58.2442856537 -0.00114599750858 0.0429193426013 0.13 20 -59.1625090628 -0.00114599750858 0.0482695743768 0.13 20 -60.2326902681 -0.00114599750858 0.0542867543932 0.13 20 -61.4846759586 -0.00114599750858 0.0610540229659 0.13 20 -62.9553431389 -0.00114599750858 0.0686648845004 0.13 20 -64.6905368626 -0.00114599750858 0.0772244994584 0.13 20 -66.7476129599 -0.00114599750858 0.0868511373751 0.13 20 -69.1987951204 -0.00114599750858 0.0976778110089 0.13 20 -72.135635264 -0.00114599750858 0.109854114199 0.13 20 -75.6749789879 -0.00114599750858 0.123548288826 0.13 20 -79.966999556 -0.00114599750858 0.138949549437 0.13 20 -85.2060982908 -0.00114599750858 0.156270697655 0.13 20 -91.6458138505 -0.00114599750858 0.175751062485 0.13 20 -99.619398252 -0.00114599750858 0.19765980717 0.13 20 -109.568504189 -0.00114599750858 0.222299648253 0.13 20 -122.083659148 -0.00114599750858 0.250011038262 0.13 20 -137.962185888 -0.00114599750858 0.281176869797 0.13 20 -158.292541375 -0.00114599750858 0.316227766017 0.13 20 -184.579809615 -0.00131331028968 0.001 0.13 20 -52.0910702252 -0.00131331028968 0.00112465782212 0.13 20 -52.1093156476 -0.00131331028968 0.00126485521686 0.13 20 -52.1298578563 -0.00131331028968 0.00142252931349 0.13 20 -52.1529891007 -0.00131331028968 0.00159985871961 0.13 20 -52.1790396411 -0.00131331028968 0.00179929362329 0.13 20 -52.2083829081 -0.00131331028968 0.00202358964773 0.13 20 -52.2414414189 -0.00131331028968 0.00227584592607 0.13 20 -52.278693574 -0.00131331028968 0.0025595479227 0.13 20 -52.3206814827 -0.00131331028968 0.00287861559235 0.13 20 -52.3680199968 -0.00131331028968 0.00323745754282 0.13 20 -52.4214071636 -0.00131331028968 0.00364103194931 0.13 20 -52.4816363569 -0.00131331028968 0.00409491506238 0.13 20 -52.5496103971 -0.00131331028968 0.00460537825582 0.13 20 -52.626358039 -0.00131331028968 0.00517947467923 0.13 20 -52.7130532903 -0.00131331028968 0.00582513671247 0.13 20 -52.8110381278 -0.00131331028968 0.0065512855686 0.13 20 -52.9218493103 -0.00131331028968 0.00736795455966 0.13 20 -53.0472501527 -0.00131331028968 0.00828642772855 0.13 20 -53.1892683353 -0.00131331028968 0.00931939576234 0.13 20 -53.3502410877 -0.00131331028968 0.0104811313415 0.13 20 -53.532869427 -0.00131331028968 0.0117876863479 0.13 20 -53.7402835618 -0.00131331028968 0.0132571136559 0.13 20 -53.9761221327 -0.00131331028968 0.0149097165718 0.13 20 -54.2446286767 -0.00131331028968 0.0167683293681 0.13 20 -54.5507696374 -0.00131331028968 0.0188586327877 0.13 20 -54.9003794504 -0.00131331028968 0.0212095088792 0.13 20 -55.3003398218 -0.00131331028968 0.0238534400643 0.13 20 -55.7588023917 -0.00131331028968 0.0268269579528 0.13 20 -56.2854667209 -0.00131331028968 0.0301711481053 0.13 20 -56.8919291684 -0.00131331028968 0.033932217719 0.13 20 -57.5921230701 -0.00131331028968 0.0381621340795 0.13 20 -58.4028771003 -0.00131331028968 0.0429193426013 0.13 20 -59.3446274166 -0.00131331028968 0.0482695743768 0.13 20 -60.4423309699 -0.00131331028968 0.0542867543932 0.13 20 -61.7266433958 -0.00131331028968 0.0610540229659 0.13 20 -63.2354468411 -0.00131331028968 0.0686648845004 0.13 20 -65.015843274 -0.00131331028968 0.0772244994584 0.13 20 -67.1267706788 -0.00131331028968 0.0868511373751 0.13 20 -69.6424579445 -0.00131331028968 0.0976778110089 0.13 20 -72.657016427 -0.00131331028968 0.109854114199 0.13 20 -76.2905827992 -0.00131331028968 0.123548288826 0.13 20 -80.6975950572 -0.00131331028968 0.138949549437 0.13 20 -86.0780263122 -0.00131331028968 0.156270697655 0.13 20 -92.6927584249 -0.00131331028968 0.175751062485 0.13 20 -100.884812969 -0.00131331028968 0.19765980717 0.13 20 -111.108975966 -0.00131331028968 0.222299648253 0.13 20 -123.973637343 -0.00131331028968 0.250011038262 0.13 20 -140.30074227 -0.00131331028968 0.281176869797 0.13 20 -161.213229185 -0.00131331028968 0.316227766017 0.13 20 -188.265402555 -0.00150505031997 0.001 0.13 20 -52.0938240958 -0.00150505031997 0.00112465782212 0.13 20 -52.1124146374 -0.00150505031997 0.00126485521686 0.13 20 -52.1333454722 -0.00150505031997 0.00142252931349 0.13 20 -52.1569144017 -0.00150505031997 0.00159985871961 0.13 20 -52.183457965 -0.00150505031997 0.00179929362329 0.13 20 -52.2133566977 -0.00150505031997 0.00202358964773 0.13 20 -52.2470411623 -0.00150505031997 0.00227584592607 0.13 20 -52.2849988777 -0.00150505031997 0.0025595479227 0.13 20 -52.3277822964 -0.00150505031997 0.00287861559235 0.13 20 -52.3760180152 -0.00150505031997 0.00323745754282 0.13 20 -52.4304174323 -0.00150505031997 0.00364103194931 0.13 20 -52.4917891176 -0.00150505031997 0.00409491506238 0.13 20 -52.5610532105 -0.00150505031997 0.00460537825582 0.13 20 -52.6392582351 -0.00150505031997 0.00517947467923 0.13 20 -52.7276008021 -0.00150505031997 0.00582513671247 0.13 20 -52.8274487789 -0.00150505031997 0.0065512855686 0.13 20 -52.9403686398 -0.00150505031997 0.00736795455966 0.13 20 -53.0681578803 -0.00150505031997 0.00828642772855 0.13 20 -53.2128835911 -0.00150505031997 0.00931939576234 0.13 20 -53.3769285605 -0.00150505031997 0.0104811313415 0.13 20 -53.5630466199 -0.00150505031997 0.0117876863479 0.13 20 -53.7744293898 -0.00150505031997 0.0132571136559 0.13 20 -54.0147871538 -0.00150505031997 0.0149097165718 0.13 20 -54.2884473214 -0.00150505031997 0.0167683293681 0.13 20 -54.6004748942 -0.00150505031997 0.0188586327877 0.13 20 -54.9568205856 -0.00150505031997 0.0212095088792 0.13 20 -55.3645038665 -0.00150505031997 0.0238534400643 0.13 20 -55.8318403305 -0.00150505031997 0.0268269579528 0.13 20 -56.3687255782 -0.00150505031997 0.0301711481053 0.13 20 -56.9869915326 -0.00150505031997 0.033932217719 0.13 20 -57.7008560482 -0.00150505031997 0.0381621340795 0.13 20 -58.5274932959 -0.00150505031997 0.0429193426013 0.13 20 -59.4877613228 -0.00150505031997 0.0482695743768 0.13 20 -60.60713524 -0.00150505031997 0.0542867543932 0.13 20 -61.9169109017 -0.00150505031997 0.0610540229659 0.13 20 -63.4557663901 -0.00150505031997 0.0686648845004 0.13 20 -65.2717995426 -0.00150505031997 0.0772244994584 0.13 20 -67.4252026248 -0.00150505031997 0.0868511373751 0.13 20 -69.9917951071 -0.00150505031997 0.0976778110089 0.13 20 -73.0677197514 -0.00150505031997 0.109854114199 0.13 20 -76.7757268704 -0.00150505031997 0.123548288826 0.13 20 -81.2736433398 -0.00150505031997 0.138949549437 0.13 20 -86.7658723992 -0.00150505031997 0.156270697655 0.13 20 -93.5191379634 -0.00150505031997 0.175751062485 0.13 20 -101.884238663 -0.00150505031997 0.19765980717 0.13 20 -112.326421675 -0.00150505031997 0.222299648253 0.13 20 -125.468313889 -0.00150505031997 0.250011038262 0.13 20 -142.151498275 -0.00150505031997 0.281176869797 0.13 20 -163.526433825 -0.00150505031997 0.316227766017 0.13 20 -191.186740753 -0.00172478391698 0.001 0.13 20 -52.0959088489 -0.00172478391698 0.00112465782212 0.13 20 -52.1147606719 -0.00172478391698 0.00126485521686 0.13 20 -52.1359857305 -0.00172478391698 0.00142252931349 0.13 20 -52.1598860315 -0.00172478391698 0.00159985871961 0.13 20 -52.1868028697 -0.00172478391698 0.00179929362329 0.13 20 -52.2171221625 -0.00172478391698 0.00202358964773 0.13 20 -52.2512805676 -0.00172478391698 0.00227584592607 0.13 20 -52.2897725119 -0.00172478391698 0.0025595479227 0.13 20 -52.3331582853 -0.00172478391698 0.00287861559235 0.13 20 -52.3820733843 -0.00172478391698 0.00323745754282 0.13 20 -52.4372393258 -0.00172478391698 0.00364103194931 0.13 20 -52.4994761978 -0.00172478391698 0.00409491506238 0.13 20 -52.5697172695 -0.00172478391698 0.00460537825582 0.13 20 -52.6490260543 -0.00172478391698 0.00517947467923 0.13 20 -52.738616304 -0.00172478391698 0.00582513671247 0.13 20 -52.8398755244 -0.00172478391698 0.0065512855686 0.13 20 -52.9543927344 -0.00172478391698 0.00736795455966 0.13 20 -53.0839913679 -0.00172478391698 0.00828642772855 0.13 20 -53.2307684304 -0.00172478391698 0.00931939576234 0.13 20 -53.3971413019 -0.00172478391698 0.0104811313415 0.13 20 -53.5859039268 -0.00172478391698 0.0117876863479 0.13 20 -53.8002945844 -0.00172478391698 0.0132571136559 0.13 20 -54.0440780095 -0.00172478391698 0.0149097165718 0.13 20 -54.3216453823 -0.00172478391698 0.0167683293681 0.13 20 -54.6381366714 -0.00172478391698 0.0188586327877 0.13 20 -54.9995910741 -0.00172478391698 0.0212095088792 0.13 20 -55.4131329447 -0.00172478391698 0.0238534400643 0.13 20 -55.8872027585 -0.00172478391698 0.0268269579528 0.13 20 -56.4318455134 -0.00172478391698 0.0301711481053 0.13 20 -57.0590727458 -0.00172478391698 0.033932217719 0.13 20 -57.7833193699 -0.00172478391698 0.0381621340795 0.13 20 -58.6220232873 -0.00172478391698 0.0429193426013 0.13 20 -59.5963647781 -0.00172478391698 0.0482695743768 0.13 20 -60.7322149548 -0.00172478391698 0.0542867543932 0.13 20 -62.0613592545 -0.00172478391698 0.0610540229659 0.13 20 -63.6230847981 -0.00172478391698 0.0686648845004 0.13 20 -65.4662519231 -0.00172478391698 0.0772244994584 0.13 20 -67.652013849 -0.00172478391698 0.0868511373751 0.13 20 -70.257409403 -0.00172478391698 0.0976778110089 0.13 20 -73.3801395848 -0.00172478391698 0.109854114199 0.13 20 -77.1449607338 -0.00172478391698 0.123548288826 0.13 20 -81.7123022169 -0.00172478391698 0.138949549437 0.13 20 -87.2899711686 -0.00172478391698 0.156270697655 0.13 20 -94.1491823894 -0.00172478391698 0.175751062485 0.13 20 -102.646715366 -0.00172478391698 0.19765980717 0.13 20 -113.255865097 -0.00172478391698 0.222299648253 0.13 20 -126.610213923 -0.00172478391698 0.250011038262 0.13 20 -143.566458693 -0.00172478391698 0.281176869797 0.13 20 -165.296240123 -0.00172478391698 0.316227766017 0.13 20 -193.423436243 -0.0019765980717 0.001 0.13 20 -52.0974431014 -0.0019765980717 0.00112465782212 0.13 20 -52.1164872261 -0.0019765980717 0.00126485521686 0.13 20 -52.1379288354 -0.0019765980717 0.00142252931349 0.13 20 -52.1620730331 -0.0019765980717 0.00159985871961 0.13 20 -52.1892646158 -0.0019765980717 0.00179929362329 0.13 20 -52.2198934645 -0.0019765980717 0.00202358964773 0.13 20 -52.2544007263 -0.0019765980717 0.00227584592607 0.13 20 -52.2932859164 -0.0019765980717 0.0025595479227 0.13 20 -52.3371150983 -0.0019765980717 0.00287861559235 0.13 20 -52.3865303261 -0.0019765980717 0.00323745754282 0.13 20 -52.442260573 -0.0019765980717 0.00364103194931 0.13 20 -52.5051344158 -0.0019765980717 0.00409491506238 0.13 20 -52.5760948021 -0.0019765980717 0.00460537825582 0.13 20 -52.6562162965 -0.0019765980717 0.00517947467923 0.13 20 -52.7467252916 -0.0019765980717 0.00582513671247 0.13 20 -52.8490237782 -0.0019765980717 0.0065512855686 0.13 20 -52.9647174087 -0.0019765980717 0.00736795455966 0.13 20 -53.0956487592 -0.0019765980717 0.00828642772855 0.13 20 -53.2439369193 -0.0019765980717 0.00931939576234 0.13 20 -53.4120248137 -0.0019765980717 0.0104811313415 0.13 20 -53.6027360197 -0.0019765980717 0.0117876863479 0.13 20 -53.8193432981 -0.0019765980717 0.0132571136559 0.13 20 -54.0656516414 -0.0019765980717 0.0149097165718 0.13 20 -54.3460993981 -0.0019765980717 0.0167683293681 0.13 20 -54.6658820136 -0.0019765980717 0.0188586327877 0.13 20 -55.0311041983 -0.0019765980717 0.0212095088792 0.13 20 -55.4489680031 -0.0019765980717 0.0238534400643 0.13 20 -55.9280064676 -0.0019765980717 0.0268269579528 0.13 20 -56.4783753921 -0.0019765980717 0.0301711481053 0.13 20 -57.1122196085 -0.0019765980717 0.033932217719 0.13 20 -57.8441352223 -0.0019765980717 0.0381621340795 0.13 20 -58.6917561165 -0.0019765980717 0.0429193426013 0.13 20 -59.6765021931 -0.0019765980717 0.0482695743768 0.13 20 -60.8245392525 -0.0019765980717 0.0542867543932 0.13 20 -62.1680173223 -0.0019765980717 0.0610540229659 0.13 20 -63.7466774023 -0.0019765980717 0.0686648845004 0.13 20 -65.6099484881 -0.0019765980717 0.0772244994584 0.13 20 -67.8197009751 -0.0019765980717 0.0868511373751 0.13 20 -70.4538843554 -0.0019765980717 0.0976778110089 0.13 20 -73.6113641651 -0.0019765980717 0.109854114199 0.13 20 -77.4183968755 -0.0019765980717 0.123548288826 0.13 20 -82.037359141 -0.0019765980717 0.138949549437 0.13 20 -87.6786062844 -0.0019765980717 0.156270697655 0.13 20 -94.6167163515 -0.0019765980717 0.175751062485 0.13 20 -103.212949114 -0.0019765980717 0.19765980717 0.13 20 -113.94662887 -0.0019765980717 0.222299648253 0.13 20 -127.459544826 -0.0019765980717 0.250011038262 0.13 20 -144.619711933 -0.0019765980717 0.281176869797 0.13 20 -166.614622608 -0.0019765980717 0.316227766017 0.13 20 -195.090775578 -0.00226517646564 0.001 0.13 20 -52.0985576278 -0.00226517646564 0.00112465782212 0.13 20 -52.1177414577 -0.00226517646564 0.00126485521686 0.13 20 -52.1393403923 -0.00226517646564 0.00142252931349 0.13 20 -52.1636617859 -0.00226517646564 0.00159985871961 0.13 20 -52.1910529812 -0.00226517646564 0.00179929362329 0.13 20 -52.2219067407 -0.00226517646564 0.00202358964773 0.13 20 -52.2566674753 -0.00226517646564 0.00227584592607 0.13 20 -52.2958384008 -0.00226517646564 0.0025595479227 0.13 20 -52.3399897796 -0.00226517646564 0.00287861559235 0.13 20 -52.3897684354 -0.00226517646564 0.00323745754282 0.13 20 -52.4459087657 -0.00226517646564 0.00364103194931 0.13 20 -52.5092455242 -0.00226517646564 0.00409491506238 0.13 20 -52.5807287021 -0.00226517646564 0.00460537825582 0.13 20 -52.6614409083 -0.00226517646564 0.00517947467923 0.13 20 -52.752617739 -0.00226517646564 0.00582513671247 0.13 20 -52.8556717347 -0.00226517646564 0.0065512855686 0.13 20 -52.972220665 -0.00226517646564 0.00736795455966 0.13 20 -53.104121056 -0.00226517646564 0.00828642772855 0.13 20 -53.2535080959 -0.00226517646564 0.00931939576234 0.13 20 -53.4228433386 -0.00226517646564 0.0104811313415 0.13 20 -53.6149719806 -0.00226517646564 0.0117876863479 0.13 20 -53.8331919507 -0.00226517646564 0.0132571136559 0.13 20 -54.0813376392 -0.00226517646564 0.0149097165718 0.13 20 -54.3638818575 -0.00226517646564 0.0167683293681 0.13 20 -54.6860606062 -0.00226517646564 0.0188586327877 0.13 20 -55.0540265167 -0.00226517646564 0.0212095088792 0.13 20 -55.4750385088 -0.00226517646564 0.0238534400643 0.13 20 -55.9576974189 -0.00226517646564 0.0268269579528 0.13 20 -56.512240259 -0.00226517646564 0.0301711481053 0.13 20 -57.1509096325 -0.00226517646564 0.033932217719 0.13 20 -57.8884199688 -0.00226517646564 0.0381621340795 0.13 20 -58.7425491293 -0.00226517646564 0.0429193426013 0.13 20 -59.7348932018 -0.00226517646564 0.0482695743768 0.13 20 -60.8918348452 -0.00226517646564 0.0542867543932 0.13 20 -62.2457926207 -0.00226517646564 0.0610540229659 0.13 20 -63.8368421191 -0.00226517646564 0.0686648845004 0.13 20 -65.7148319074 -0.00226517646564 0.0772244994584 0.13 20 -67.9421619912 -0.00226517646564 0.0868511373751 0.13 20 -70.5974549215 -0.00226517646564 0.0976778110089 0.13 20 -73.7804376124 -0.00226517646564 0.109854114199 0.13 20 -77.6184769587 -0.00226517646564 0.123548288826 0.13 20 -82.2753919652 -0.00226517646564 0.138949549437 0.13 20 -87.9634263939 -0.00226517646564 0.156270697655 0.13 20 -94.9596517098 -0.00226517646564 0.175751062485 0.13 20 -103.628649861 -0.00226517646564 0.19765980717 0.13 20 -114.454215639 -0.00226517646564 0.222299648253 0.13 20 -128.084221008 -0.00226517646564 0.250011038262 0.13 20 -145.395063091 -0.00226517646564 0.281176869797 0.13 20 -167.585958934 -0.00226517646564 0.316227766017 0.13 20 -196.320106367 -0.00259588658613 0.001 0.13 20 -52.0993768424 -0.00259588658613 0.00112465782212 0.13 20 -52.118663369 -0.00259588658613 0.00126485521686 0.13 20 -52.140377955 -0.00259588658613 0.00142252931349 0.13 20 -52.16482961 -0.00259588658613 0.00159985871961 0.13 20 -52.1923675494 -0.00259588658613 0.00179929362329 0.13 20 -52.2233866556 -0.00259588658613 0.00202358964773 0.13 20 -52.2583337406 -0.00259588658613 0.00227584592607 0.13 20 -52.297714743 -0.00259588658613 0.0025595479227 0.13 20 -52.342103015 -0.00259588658613 0.00287861559235 0.13 20 -52.392148891 -0.00259588658613 0.00323745754282 0.13 20 -52.4485907613 -0.00259588658613 0.00364103194931 0.13 20 -52.5122679273 -0.00259588658613 0.00409491506238 0.13 20 -52.5841355669 -0.00259588658613 0.00460537825582 0.13 20 -52.6652822146 -0.00259588658613 0.00517947467923 0.13 20 -52.7569502471 -0.00259588658613 0.00582513671247 0.13 20 -52.8605599792 -0.00259588658613 0.0065512855686 0.13 20 -52.977738113 -0.00259588658613 0.00736795455966 0.13 20 -53.1103514613 -0.00259588658613 0.00828642772855 0.13 20 -53.2605470882 -0.00259588658613 0.00931939576234 0.13 20 -53.430800295 -0.00259588658613 0.0104811313415 0.13 20 -53.6239722394 -0.00259588658613 0.0117876863479 0.13 20 -53.8433794399 -0.00259588658613 0.0132571136559 0.13 20 -54.0928780122 -0.00259588658613 0.0149097165718 0.13 20 -54.3769662499 -0.00259588658613 0.0167683293681 0.13 20 -54.7009101591 -0.00259588658613 0.0188586327877 0.13 20 -55.0708978481 -0.00259588658613 0.0212095088792 0.13 20 -55.4942303677 -0.00259588658613 0.0238534400643 0.13 20 -55.9795588174 -0.00259588658613 0.0268269579528 0.13 20 -56.5371804652 -0.00259588658613 0.0301711481053 0.13 20 -57.1794105164 -0.00259588658613 0.033932217719 0.13 20 -57.9210513404 -0.00259588658613 0.0381621340795 0.13 20 -58.7799879025 -0.00259588658613 0.0429193426013 0.13 20 -59.7779474767 -0.00259588658613 0.0482695743768 0.13 20 -60.9414743514 -0.00259588658613 0.0542867543932 0.13 20 -62.3031874316 -0.00259588658613 0.0610540229659 0.13 20 -63.9034121908 -0.00259588658613 0.0686648845004 0.13 20 -65.7923108664 -0.00259588658613 0.0772244994584 0.13 20 -68.0326798029 -0.00259588658613 0.0868511373751 0.13 20 -70.7036457437 -0.00259588658613 0.0976778110089 0.13 20 -73.90558148 -0.00259588658613 0.109854114199 0.13 20 -77.7666872583 -0.00259588658613 0.123548288826 0.13 20 -82.4518653857 -0.00259588658613 0.138949549437 0.13 20 -88.174778885 -0.00259588658613 0.156270697655 0.13 20 -95.2143740192 -0.00259588658613 0.175751062485 0.13 20 -103.937731229 -0.00259588658613 0.19765980717 0.13 20 -114.83200711 -0.00259588658613 0.222299648253 0.13 20 -128.549645619 -0.00259588658613 0.250011038262 0.13 20 -145.973337905 -0.00259588658613 0.281176869797 0.13 20 -168.311090318 -0.00259588658613 0.316227766017 0.13 20 -197.238587981 -0.00297487956027 0.001 0.13 20 -52.100004519 -0.00297487956027 0.00112465782212 0.13 20 -52.119369736 -0.00297487956027 0.00126485521686 0.13 20 -52.14117294 -0.00297487956027 0.00142252931349 0.13 20 -52.1657244096 -0.00297487956027 0.00159985871961 0.13 20 -52.1933747959 -0.00297487956027 0.00179929362329 0.13 20 -52.2245206061 -0.00297487956027 0.00202358964773 0.13 20 -52.2596104936 -0.00297487956027 0.00227584592607 0.13 20 -52.2991524846 -0.00297487956027 0.0025595479227 0.13 20 -52.3437223009 -0.00297487956027 0.00287861559235 0.13 20 -52.3939729691 -0.00297487956027 0.00323745754282 0.13 20 -52.4506459424 -0.00297487956027 0.00364103194931 0.13 20 -52.5145840107 -0.00297487956027 0.00409491506238 0.13 20 -52.5867463318 -0.00297487956027 0.00460537825582 0.13 20 -52.668225987 -0.00297487956027 0.00517947467923 0.13 20 -52.7602705574 -0.00297487956027 0.00582513671247 0.13 20 -52.8643063265 -0.00297487956027 0.0065512855686 0.13 20 -52.9819668554 -0.00297487956027 0.00736795455966 0.13 20 -53.1151268579 -0.00297487956027 0.00828642772855 0.13 20 -53.2659425226 -0.00297487956027 0.00931939576234 0.13 20 -53.4368997165 -0.00297487956027 0.0104811313415 0.13 20 -53.6308718686 -0.00297487956027 0.0117876863479 0.13 20 -53.8511897958 -0.00297487956027 0.0132571136559 0.13 20 -54.1017263304 -0.00297487956027 0.0149097165718 0.13 20 -54.3869993832 -0.00297487956027 0.0167683293681 0.13 20 -54.7122980711 -0.00297487956027 0.0188586327877 0.13 20 -55.0838378433 -0.00297487956027 0.0212095088792 0.13 20 -55.5089522393 -0.00297487956027 0.0238534400643 0.13 20 -55.9963311437 -0.00297487956027 0.0268269579528 0.13 20 -56.5563183547 -0.00297487956027 0.0301711481053 0.13 20 -57.2012851839 -0.00297487956027 0.033932217719 0.13 20 -57.946102017 -0.00297487956027 0.0381621340795 0.13 20 -58.8087367303 -0.00297487956027 0.0429193426013 0.13 20 -59.8110182463 -0.00297487956027 0.0482695743768 0.13 20 -60.9796162133 -0.00297487956027 0.0542867543932 0.13 20 -62.3473050824 -0.00297487956027 0.0610540229659 0.13 20 -63.9546045405 -0.00297487956027 0.0686648845004 0.13 20 -65.8519208791 -0.00297487956027 0.0772244994584 0.13 20 -68.1023591564 -0.00297487956027 0.0868511373751 0.13 20 -70.7854392654 -0.00297487956027 0.0976778110089 0.13 20 -74.002038163 -0.00297487956027 0.109854114199 0.13 20 -77.8810072586 -0.00297487956027 0.123548288826 0.13 20 -82.5880961113 -0.00297487956027 0.138949549437 0.13 20 -88.3380786367 -0.00297487956027 0.156270697655 0.13 20 -95.4113694732 -0.00297487956027 0.175751062485 0.13 20 -104.177006701 -0.00297487956027 0.19765980717 0.13 20 -115.124781231 -0.00297487956027 0.222299648253 0.13 20 -128.910718554 -0.00297487956027 0.250011038262 0.13 20 -146.422436323 -0.00297487956027 0.281176869797 0.13 20 -168.87481035 -0.00297487956027 0.316227766017 0.13 20 -197.953262692 -0.0034092045644 0.001 0.13 20 -52.1005166074 -0.0034092045644 0.00112465782212 0.13 20 -52.1199460245 -0.0034092045644 0.00126485521686 0.13 20 -52.1418215284 -0.0034092045644 0.00142252931349 0.13 20 -52.1664544331 -0.0034092045644 0.00159985871961 0.13 20 -52.1941965608 -0.0034092045644 0.00179929362329 0.13 20 -52.225445745 -0.0034092045644 0.00202358964773 0.13 20 -52.2606521413 -0.0034092045644 0.00227584592607 0.13 20 -52.3003254793 -0.0034092045644 0.0025595479227 0.13 20 -52.3450434145 -0.0034092045644 0.00287861559235 0.13 20 -52.3954611705 -0.0034092045644 0.00323745754282 0.13 20 -52.4523226998 -0.0034092045644 0.00364103194931 0.13 20 -52.5164736396 -0.0034092045644 0.00409491506238 0.13 20 -52.5888763953 -0.0034092045644 0.00460537825582 0.13 20 -52.6706277597 -0.0034092045644 0.00517947467923 0.13 20 -52.7629795617 -0.0034092045644 0.00582513671247 0.13 20 -52.8673629567 -0.0034092045644 0.0065512855686 0.13 20 -52.9854171055 -0.0034092045644 0.00736795455966 0.13 20 -53.1190231726 -0.0034092045644 0.00828642772855 0.13 20 -53.2703447968 -0.0034092045644 0.00931939576234 0.13 20 -53.4418764736 -0.0034092045644 0.0104811313415 0.13 20 -53.6365016551 -0.0034092045644 0.0117876863479 0.13 20 -53.8575628385 -0.0034092045644 0.0132571136559 0.13 20 -54.1089465156 -0.0034092045644 0.0149097165718 0.13 20 -54.39518663 -0.0034092045644 0.0167683293681 0.13 20 -54.7215911923 -0.0034092045644 0.0188586327877 0.13 20 -55.0943980113 -0.0034092045644 0.0212095088792 0.13 20 -55.5209672048 -0.0034092045644 0.0238534400643 0.13 20 -56.0100204013 -0.0034092045644 0.0268269579528 0.13 20 -56.5719394988 -0.0034092045644 0.0301711481053 0.13 20 -57.2191417756 -0.0034092045644 0.033932217719 0.13 20 -57.9665533738 -0.0034092045644 0.0381621340795 0.13 20 -58.832210182 -0.0034092045644 0.0429193426013 0.13 20 -59.838024566 -0.0034092045644 0.0482695743768 0.13 20 -61.0107691634 -0.0034092045644 0.0542867543932 0.13 20 -62.3833463244 -0.0034092045644 0.0610540229659 0.13 20 -63.9964355746 -0.0034092045644 0.0686648845004 0.13 20 -65.9006442595 -0.0034092045644 0.0772244994584 0.13 20 -68.1593320138 -0.0034092045644 0.0868511373751 0.13 20 -70.8523432726 -0.0034092045644 0.0976778110089 0.13 20 -74.0809716134 -0.0034092045644 0.109854114199 0.13 20 -77.9746070942 -0.0034092045644 0.123548288826 0.13 20 -82.6997008261 -0.0034092045644 0.138949549437 0.13 20 -88.4719474266 -0.0034092045644 0.156270697655 0.13 20 -95.5729794996 -0.0034092045644 0.175751062485 0.13 20 -104.37345997 -0.0034092045644 0.19765980717 0.13 20 -115.36536717 -0.0034092045644 0.222299648253 0.13 20 -129.207700954 -0.0034092045644 0.250011038262 0.13 20 -146.792169292 -0.0034092045644 0.281176869797 0.13 20 -169.339347264 -0.0034092045644 0.316227766017 0.13 20 -198.542723941 -0.00390693993705 0.001 0.13 20 -52.1009614596 -0.00390693993705 0.00112465782212 0.13 20 -52.1204466447 -0.00390693993705 0.00126485521686 0.13 20 -52.1423849517 -0.00390693993705 0.00142252931349 0.13 20 -52.1670885938 -0.00390693993705 0.00159985871961 0.13 20 -52.1949104104 -0.00390693993705 0.00179929362329 0.13 20 -52.2262493862 -0.00390693993705 0.00202358964773 0.13 20 -52.2615569812 -0.00390693993705 0.00227584592607 0.13 20 -52.3013444041 -0.00390693993705 0.0025595479227 0.13 20 -52.346190989 -0.00390693993705 0.00287861559235 0.13 20 -52.3967538665 -0.00390693993705 0.00323745754282 0.13 20 -52.4537791587 -0.00390693993705 0.00364103194931 0.13 20 -52.5181149738 -0.00390693993705 0.00409491506238 0.13 20 -52.5907265361 -0.00390693993705 0.00460537825582 0.13 20 -52.6727138584 -0.00390693993705 0.00517947467923 0.13 20 -52.7653324559 -0.00390693993705 0.00582513671247 0.13 20 -52.8700177106 -0.00390693993705 0.0065512855686 0.13 20 -52.9884136408 -0.00390693993705 0.00736795455966 0.13 20 -53.1224070063 -0.00390693993705 0.00828642772855 0.13 20 -53.2741679074 -0.00390693993705 0.00931939576234 0.13 20 -53.4461983223 -0.00390693993705 0.0104811313415 0.13 20 -53.641390394 -0.00390693993705 0.0117876863479 0.13 20 -53.8630967468 -0.00390693993705 0.0132571136559 0.13 20 -54.1152157145 -0.00390693993705 0.0149097165718 0.13 20 -54.4022951394 -0.00390693993705 0.0167683293681 0.13 20 -54.7296594105 -0.00390693993705 0.0188586327877 0.13 20 -55.1035657186 -0.00390693993705 0.0212095088792 0.13 20 -55.5313972219 -0.00390693993705 0.0238534400643 0.13 20 -56.0219030687 -0.00390693993705 0.0268269579528 0.13 20 -56.5854981912 -0.00390693993705 0.0301711481053 0.13 20 -57.2346397296 -0.00390693993705 0.033932217719 0.13 20 -57.9843021904 -0.00390693993705 0.0381621340795 0.13 20 -58.8525804752 -0.00390693993705 0.0429193426013 0.13 20 -59.8614593811 -0.00390693993705 0.0482695743768 0.13 20 -61.0378009859 -0.00390693993705 0.0542867543932 0.13 20 -62.4146187736 -0.00390693993705 0.0610540229659 0.13 20 -64.0327312463 -0.00390693993705 0.0686648845004 0.13 20 -65.9429206853 -0.00390693993705 0.0772244994584 0.13 20 -68.2087684061 -0.00390693993705 0.0868511373751 0.13 20 -70.9104016897 -0.00390693993705 0.0976778110089 0.13 20 -74.1494775354 -0.00390693993705 0.109854114199 0.13 20 -78.0558563105 -0.00390693993705 0.123548288826 0.13 20 -82.7966022564 -0.00390693993705 0.138949549437 0.13 20 -88.5882154132 -0.00390693993705 0.156270697655 0.13 20 -95.7133948277 -0.00390693993705 0.175751062485 0.13 20 -104.544227342 -0.00390693993705 0.19765980717 0.13 20 -115.574609658 -0.00390693993705 0.222299648253 0.13 20 -129.466151747 -0.00390693993705 0.250011038262 0.13 20 -147.11415251 -0.00390693993705 0.281176869797 0.13 20 -169.744191332 -0.00390693993705 0.316227766017 0.13 20 -199.056839547 -0.00447734343405 0.001 0.13 20 -52.1013653708 -0.00447734343405 0.00112465782212 0.13 20 -52.120901186 -0.00447734343405 0.00126485521686 0.13 20 -52.1428965087 -0.00447734343405 0.00142252931349 0.13 20 -52.167664368 -0.00447734343405 0.00159985871961 0.13 20 -52.1955585257 -0.00447734343405 0.00179929362329 0.13 20 -52.2269790111 -0.00447734343405 0.00202358964773 0.13 20 -52.2623784672 -0.00447734343405 0.00227584592607 0.13 20 -52.3022694437 -0.00447734343405 0.0025595479227 0.13 20 -52.3472327968 -0.00447734343405 0.00287861559235 0.13 20 -52.3979273862 -0.00447734343405 0.00323745754282 0.13 20 -52.4551013001 -0.00447734343405 0.00364103194931 0.13 20 -52.519604886 -0.00447734343405 0.00409491506238 0.13 20 -52.5924059221 -0.00447734343405 0.00460537825582 0.13 20 -52.6746073381 -0.00447734343405 0.00517947467923 0.13 20 -52.767467987 -0.00447734343405 0.00582513671247 0.13 20 -52.8724270774 -0.00447734343405 0.0065512855686 0.13 20 -52.9911330238 -0.00447734343405 0.00736795455966 0.13 20 -53.1254776486 -0.00447734343405 0.00828642772855 0.13 20 -53.2776368964 -0.00447734343405 0.00931939576234 0.13 20 -53.450119511 -0.00447734343405 0.0104811313415 0.13 20 -53.6458254909 -0.00447734343405 0.0117876863479 0.13 20 -53.868116611 -0.00447734343405 0.0132571136559 0.13 20 -54.1209019009 -0.00447734343405 0.0149097165718 0.13 20 -54.4087417525 -0.00447734343405 0.0167683293681 0.13 20 -54.7369753378 -0.00447734343405 0.0188586327877 0.13 20 -55.1118773366 -0.00447734343405 0.0212095088792 0.13 20 -55.5408516908 -0.00447734343405 0.0238534400643 0.13 20 -56.0326723664 -0.00447734343405 0.0268269579528 0.13 20 -56.59778408 -0.00447734343405 0.0301711481053 0.13 20 -57.2486799067 -0.00447734343405 0.033932217719 0.13 20 -58.0003779482 -0.00447734343405 0.0381621340795 0.13 20 -58.8710262991 -0.00447734343405 0.0429193426013 0.13 20 -59.8826750481 -0.00447734343405 0.0482695743768 0.13 20 -61.0622669091 -0.00447734343405 0.0542867543932 0.13 20 -62.4429155855 -0.00447734343405 0.0610540229659 0.13 20 -64.0655649492 -0.00447734343405 0.0686648845004 0.13 20 -65.9811551607 -0.00447734343405 0.0772244994584 0.13 20 -68.2534677093 -0.00447734343405 0.0868511373751 0.13 20 -70.9628854427 -0.00447734343405 0.0976778110089 0.13 20 -74.2113939667 -0.00447734343405 0.109854114199 0.13 20 -78.1292792404 -0.00447734343405 0.123548288826 0.13 20 -82.8841608108 -0.00447734343405 0.138949549437 0.13 20 -88.6932688391 -0.00447734343405 0.156270697655 0.13 20 -95.8402700097 -0.00447734343405 0.175751062485 0.13 20 -104.698544379 -0.00447734343405 0.19765980717 0.13 20 -115.76373257 -0.00447734343405 0.222299648253 0.13 20 -129.699819506 -0.00447734343405 0.250011038262 0.13 20 -147.405374372 -0.00447734343405 0.281176869797 0.13 20 -170.110537826 -0.00447734343405 0.316227766017 0.13 20 -199.522341473 -0.00513102442049 0.001 0.13 20 -52.1017401911 -0.00513102442049 0.00112465782212 0.13 20 -52.121322983 -0.00513102442049 0.00126485521686 0.13 20 -52.1433712054 -0.00513102442049 0.00142252931349 0.13 20 -52.1681986435 -0.00513102442049 0.00159985871961 0.13 20 -52.1961599145 -0.00513102442049 0.00179929362329 0.13 20 -52.2276560154 -0.00513102442049 0.00202358964773 0.13 20 -52.2631406853 -0.00513102442049 0.00227584592607 0.13 20 -52.3031277164 -0.00513102442049 0.0025595479227 0.13 20 -52.3481993743 -0.00513102442049 0.00287861559235 0.13 20 -52.3990161195 -0.00513102442049 0.00323745754282 0.13 20 -52.4563278608 -0.00513102442049 0.00364103194931 0.13 20 -52.5209870179 -0.00513102442049 0.00409491506238 0.13 20 -52.5939637313 -0.00513102442049 0.00460537825582 0.13 20 -52.6763636288 -0.00513102442049 0.00517947467923 0.13 20 -52.7694486489 -0.00513102442049 0.00582513671247 0.13 20 -52.8746615365 -0.00513102442049 0.0065512855686 0.13 20 -52.9936547671 -0.00513102442049 0.00736795455966 0.13 20 -53.1283248375 -0.00513102442049 0.00828642772855 0.13 20 -53.2808530858 -0.00513102442049 0.00931939576234 0.13 20 -53.4537544964 -0.00513102442049 0.0104811313415 0.13 20 -53.64993631 -0.00513102442049 0.0117876863479 0.13 20 -53.8727687327 -0.00513102442049 0.0132571136559 0.13 20 -54.126170644 -0.00513102442049 0.0149097165718 0.13 20 -54.4147139858 -0.00513102442049 0.0167683293681 0.13 20 -54.7437515284 -0.00513102442049 0.0188586327877 0.13 20 -55.1195740292 -0.00513102442049 0.0212095088792 0.13 20 -55.5496045266 -0.00513102442049 0.0238534400643 0.13 20 -56.0426397773 -0.00513102442049 0.0268269579528 0.13 20 -56.6091518374 -0.00513102442049 0.0301711481053 0.13 20 -57.2616667524 -0.00513102442049 0.033932217719 0.13 20 -58.0152426082 -0.00513102442049 0.0381621340795 0.13 20 -58.8880762726 -0.00513102442049 0.0429193426013 0.13 20 -59.9022776893 -0.00513102442049 0.0482695743768 0.13 20 -61.0848634858 -0.00513102442049 0.0542867543932 0.13 20 -62.4690392302 -0.00513102442049 0.0610540229659 0.13 20 -64.0958637261 -0.00513102442049 0.0686648845004 0.13 20 -66.0164219008 -0.00513102442049 0.0772244994584 0.13 20 -68.2946788552 -0.00513102442049 0.0868511373751 0.13 20 -71.011251964 -0.00513102442049 0.0976778110089 0.13 20 -74.2684285563 -0.00513102442049 0.109854114199 0.13 20 -78.1968856215 -0.00513102442049 0.123548288826 0.13 20 -82.9647532993 -0.00513102442049 0.138949549437 0.13 20 -88.7899336363 -0.00513102442049 0.156270697655 0.13 20 -95.9569845686 -0.00513102442049 0.175751062485 0.13 20 -104.840478406 -0.00513102442049 0.19765980717 0.13 20 -115.937665145 -0.00513102442049 0.222299648253 0.13 20 -129.914723687 -0.00513102442049 0.250011038262 0.13 20 -147.673247563 -0.00513102442049 0.281176869797 0.13 20 -170.447600434 -0.00513102442049 0.316227766017 0.13 20 -199.950802258 -0.00588014120237 0.001 0.13 20 -52.1020901808 -0.00588014120237 0.00112465782212 0.13 20 -52.1217168295 -0.00588014120237 0.00126485521686 0.13 20 -52.1438144363 -0.00588014120237 0.00142252931349 0.13 20 -52.1686974916 -0.00588014120237 0.00159985871961 0.13 20 -52.1967214098 -0.00588014120237 0.00179929362329 0.13 20 -52.2282880902 -0.00588014120237 0.00202358964773 0.13 20 -52.2638522934 -0.00588014120237 0.00227584592607 0.13 20 -52.3039289693 -0.00588014120237 0.0025595479227 0.13 20 -52.3491016964 -0.00588014120237 0.00287861559235 0.13 20 -52.4000324263 -0.00588014120237 0.00323745754282 0.13 20 -52.457472762 -0.00588014120237 0.00364103194931 0.13 20 -52.5222770518 -0.00588014120237 0.00409491506238 0.13 20 -52.5954176342 -0.00588014120237 0.00460537825582 0.13 20 -52.6780026454 -0.00588014120237 0.00517947467923 0.13 20 -52.771296892 -0.00588014120237 0.00582513671247 0.13 20 -52.8767464041 -0.00588014120237 0.0065512855686 0.13 20 -52.9960074278 -0.00588014120237 0.00736795455966 0.13 20 -53.1309807973 -0.00588014120237 0.00828642772855 0.13 20 -53.283852853 -0.00588014120237 0.00931939576234 0.13 20 -53.4571443632 -0.00588014120237 0.0104811313415 0.13 20 -53.653769276 -0.00588014120237 0.0117876863479 0.13 20 -53.877105601 -0.00588014120237 0.0132571136559 0.13 20 -54.1310813272 -0.00588014120237 0.0149097165718 0.13 20 -54.420279071 -0.00588014120237 0.0167683293681 0.13 20 -54.7500641597 -0.00588014120237 0.0188586327877 0.13 20 -55.1267421867 -0.00588014120237 0.0212095088792 0.13 20 -55.5577537988 -0.00588014120237 0.0238534400643 0.13 20 -56.0519167524 -0.00588014120237 0.0268269579528 0.13 20 -56.6197282765 -0.00588014120237 0.0301711481053 0.13 20 -57.2737447556 -0.00588014120237 0.033932217719 0.13 20 -58.0290610473 -0.00588014120237 0.0381621340795 0.13 20 -58.9039188519 -0.00588014120237 0.0429193426013 0.13 20 -59.9204831091 -0.00588014120237 0.0482695743768 0.13 20 -61.1058383406 -0.00588014120237 0.0542867543932 0.13 20 -62.4932744815 -0.00588014120237 0.0610540229659 0.13 20 -64.12395588 -0.00588014120237 0.0686648845004 0.13 20 -66.0491004147 -0.00588014120237 0.0772244994584 0.13 20 -68.3328418439 -0.00588014120237 0.0868511373751 0.13 20 -71.0560130371 -0.00588014120237 0.0976778110089 0.13 20 -74.3211786813 -0.00588014120237 0.109854114199 0.13 20 -78.2593754179 -0.00588014120237 0.123548288826 0.13 20 -83.0392033142 -0.00588014120237 0.138949549437 0.13 20 -88.8791832536 -0.00588014120237 0.156270697655 0.13 20 -96.0646947365 -0.00588014120237 0.175751062485 0.13 20 -104.971410093 -0.00588014120237 0.19765980717 0.13 20 -116.098065621 -0.00588014120237 0.222299648253 0.13 20 -130.112868502 -0.00588014120237 0.250011038262 0.13 20 -147.920211241 -0.00588014120237 0.281176869797 0.13 20 -170.758370371 -0.00588014120237 0.316227766017 0.13 20 -200.345921519 -0.00673862716803 0.001 0.13 20 -52.1024166719 -0.00673862716803 0.00112465782212 0.13 20 -52.1220842244 -0.00673862716803 0.00126485521686 0.13 20 -52.1442278882 -0.00673862716803 0.00142252931349 0.13 20 -52.1691628105 -0.00673862716803 0.00159985871961 0.13 20 -52.1972451483 -0.00673862716803 0.00179929362329 0.13 20 -52.2288776408 -0.00673862716803 0.00202358964773 0.13 20 -52.2645159995 -0.00673862716803 0.00227584592607 0.13 20 -52.3046762515 -0.00673862716803 0.0025595479227 0.13 20 -52.3499431969 -0.00673862716803 0.00287861559235 0.13 20 -52.4009801735 -0.00673862716803 0.00323745754282 0.13 20 -52.4585403598 -0.00673862716803 0.00364103194931 0.13 20 -52.5234798961 -0.00673862716803 0.00409491506238 0.13 20 -52.5967731621 -0.00673862716803 0.00460537825582 0.13 20 -52.6795306231 -0.00673862716803 0.00517947467923 0.13 20 -52.7730197468 -0.00673862716803 0.00582513671247 0.13 20 -52.8786896097 -0.00673862716803 0.0065512855686 0.13 20 -52.9981999524 -0.00673862716803 0.00736795455966 0.13 20 -53.1334556262 -0.00673862716803 0.00828642772855 0.13 20 -53.2866476009 -0.00673862716803 0.00931939576234 0.13 20 -53.4603019934 -0.00673862716803 0.0104811313415 0.13 20 -53.6573389498 -0.00673862716803 0.0117876863479 0.13 20 -53.8811436838 -0.00673862716803 0.0132571136559 0.13 20 -54.1356525876 -0.00673862716803 0.0149097165718 0.13 20 -54.4254581144 -0.00673862716803 0.0167683293681 0.13 20 -54.7559371537 -0.00673862716803 0.0188586327877 0.13 20 -55.1334089459 -0.00673862716803 0.0212095088792 0.13 20 -55.5653303197 -0.00673862716803 0.0238534400643 0.13 20 -56.0605383129 -0.00673862716803 0.0268269579528 0.13 20 -56.6295532476 -0.00673862716803 0.0301711481053 0.13 20 -57.2849593162 -0.00673862716803 0.033932217719 0.13 20 -58.0418850554 -0.00673862716803 0.0381621340795 0.13 20 -58.918613199 -0.00673862716803 0.0429193426013 0.13 20 -59.9373589926 -0.00673862716803 0.0482695743768 0.13 20 -61.1252690321 -0.00673862716803 0.0542867543932 0.13 20 -62.5157103597 -0.00673862716803 0.0610540229659 0.13 20 -64.1499437643 -0.00673862716803 0.0686648845004 0.13 20 -66.0793085968 -0.00673862716803 0.0772244994584 0.13 20 -68.3680927189 -0.00673862716803 0.0868511373751 0.13 20 -71.0973259352 -0.00673862716803 0.0976778110089 0.13 20 -74.3698264859 -0.00673862716803 0.109854114199 0.13 20 -78.3169599425 -0.00673862716803 0.123548288826 0.13 20 -83.1077563998 -0.00673862716803 0.138949549437 0.13 20 -88.9613034102 -0.00673862716803 0.156270697655 0.13 20 -96.1637333458 -0.00673862716803 0.175751062485 0.13 20 -105.091727418 -0.00673862716803 0.19765980717 0.13 20 -116.245386298 -0.00673862716803 0.222299648253 0.13 20 -130.294780839 -0.00673862716803 0.250011038262 0.13 20 -148.146877978 -0.00673862716803 0.281176869797 0.13 20 -171.043557151 -0.00673862716803 0.316227766017 0.13 20 -200.708515643 -0.00772244994584 0.001 0.13 20 -52.1027204848 -0.00772244994584 0.00112465782212 0.13 20 -52.1224260912 -0.00772244994584 0.00126485521686 0.13 20 -52.1446126008 -0.00772244994584 0.00142252931349 0.13 20 -52.169595771 -0.00772244994584 0.00159985871961 0.13 20 -52.1977324482 -0.00772244994584 0.00179929362329 0.13 20 -52.2294261518 -0.00772244994584 0.00202358964773 0.13 20 -52.2651334758 -0.00772244994584 0.00227584592607 0.13 20 -52.305371447 -0.00772244994584 0.0025595479227 0.13 20 -52.3507259986 -0.00772244994584 0.00287861559235 0.13 20 -52.4018617541 -0.00772244994584 0.00323745754282 0.13 20 -52.4595333521 -0.00772244994584 0.00364103194931 0.13 20 -52.5245985933 -0.00772244994584 0.00409491506238 0.13 20 -52.5980337477 -0.00772244994584 0.00460537825582 0.13 20 -52.6809514359 -0.00772244994584 0.00517947467923 0.13 20 -52.7746215871 -0.00772244994584 0.00582513671247 0.13 20 -52.8804960938 -0.00772244994584 0.0065512855686 0.13 20 -53.0002379244 -0.00772244994584 0.00736795455966 0.13 20 -53.135755638 -0.00772244994584 0.00828642772855 0.13 20 -53.2892444734 -0.00772244994584 0.00931939576234 0.13 20 -53.4632354758 -0.00772244994584 0.0104811313415 0.13 20 -53.6606544968 -0.00772244994584 0.0117876863479 0.13 20 -53.8848933755 -0.00772244994584 0.0132571136559 0.13 20 -54.1398962239 -0.00772244994584 0.0149097165718 0.13 20 -54.4302645226 -0.00772244994584 0.0167683293681 0.13 20 -54.7613857601 -0.00772244994584 0.0188586327877 0.13 20 -55.1395916734 -0.00772244994584 0.0212095088792 0.13 20 -55.5723538923 -0.00772244994584 0.0238534400643 0.13 20 -56.0685270711 -0.00772244994584 0.0268269579528 0.13 20 -56.6386526078 -0.00772244994584 0.0301711481053 0.13 20 -57.2953400484 -0.00772244994584 0.033932217719 0.13 20 -58.0537486053 -0.00772244994584 0.0381621340795 0.13 20 -58.9321983532 -0.00772244994584 0.0429193426013 0.13 20 -59.9529502809 -0.00772244994584 0.0482695743768 0.13 20 -61.1432073888 -0.00772244994584 0.0542867543932 0.13 20 -62.5364067458 -0.00772244994584 0.0610540229659 0.13 20 -64.1738966892 -0.00772244994584 0.0686648845004 0.13 20 -66.1071268124 -0.00772244994584 0.0772244994584 0.13 20 -68.4005248181 -0.00772244994584 0.0868511373751 0.13 20 -71.1352992262 -0.00772244994584 0.0976778110089 0.13 20 -74.4144984126 -0.00772244994584 0.109854114199 0.13 20 -78.3697865954 -0.00772244994584 0.123548288826 0.13 20 -83.1705844763 -0.00772244994584 0.138949549437 0.13 20 -89.0364946139 -0.00772244994584 0.156270697655 0.13 20 -96.2543340533 -0.00772244994584 0.175751062485 0.13 20 -105.20170216 -0.00772244994584 0.19765980717 0.13 20 -116.379942268 -0.00772244994584 0.222299648253 0.13 20 -130.460824081 -0.00772244994584 0.250011038262 0.13 20 -148.353663417 -0.00772244994584 0.281176869797 0.13 20 -171.303630136 -0.00772244994584 0.316227766017 0.13 20 -201.039103912 -0.00884990839809 0.001 0.13 20 -52.1030027987 -0.00884990839809 0.00112465782212 0.13 20 -52.1227437574 -0.00884990839809 0.00126485521686 0.13 20 -52.1449700687 -0.00884990839809 0.00142252931349 0.13 20 -52.1699980558 -0.00884990839809 0.00159985871961 0.13 20 -52.1981852049 -0.00884990839809 0.00179929362329 0.13 20 -52.229935758 -0.00884990839809 0.00202358964773 0.13 20 -52.2657071275 -0.00884990839809 0.00227584592607 0.13 20 -52.3060172661 -0.00884990839809 0.0025595479227 0.13 20 -52.3514531566 -0.00884990839809 0.00287861559235 0.13 20 -52.4026806124 -0.00884990839809 0.00323745754282 0.13 20 -52.4604556233 -0.00884990839809 0.00364103194931 0.13 20 -52.5256375254 -0.00884990839809 0.00409491506238 0.13 20 -52.5992043362 -0.00884990839809 0.00460537825582 0.13 20 -52.6822706672 -0.00884990839809 0.00517947467923 0.13 20 -52.7761087198 -0.00884990839809 0.00582513671247 0.13 20 -52.8821729842 -0.00884990839809 0.0065512855686 0.13 20 -53.0021294037 -0.00884990839809 0.00736795455966 0.13 20 -53.1378899523 -0.00884990839809 0.00828642772855 0.13 20 -53.2916537966 -0.00884990839809 0.00931939576234 0.13 20 -53.4659565121 -0.00884990839809 0.0104811313415 0.13 20 -53.6637291889 -0.00884990839809 0.0117876863479 0.13 20 -53.888369743 -0.00884990839809 0.0132571136559 0.13 20 -54.1438293585 -0.00884990839809 0.0149097165718 0.13 20 -54.4347177766 -0.00884990839809 0.0167683293681 0.13 20 -54.7664321714 -0.00884990839809 0.0188586327877 0.13 20 -55.1453156851 -0.00884990839809 0.0212095088792 0.13 20 -55.5788534387 -0.00884990839809 0.0238534400643 0.13 20 -56.0759161225 -0.00884990839809 0.0268269579528 0.13 20 -56.6470642946 -0.00884990839809 0.0301711481053 0.13 20 -57.3049305212 -0.00884990839809 0.033932217719 0.13 20 -58.0647018338 -0.00884990839809 0.0381621340795 0.13 20 -58.9447321325 -0.00884990839809 0.0429193426013 0.13 20 -59.9673237996 -0.00884990839809 0.0482695743768 0.13 20 -61.1597308306 -0.00884990839809 0.0542867543932 0.13 20 -62.5554535552 -0.00884990839809 0.0610540229659 0.13 20 -64.1959193493 -0.00884990839809 0.0686648845004 0.13 20 -66.1326772853 -0.00884990839809 0.0772244994584 0.13 20 -68.4302812119 -0.00884990839809 0.0868511373751 0.13 20 -71.1701008353 -0.00884990839809 0.0976778110089 0.13 20 -74.455392092 -0.00884990839809 0.109854114199 0.13 20 -78.4180885864 -0.00884990839809 0.123548288826 0.13 20 -83.2279634511 -0.00884990839809 0.138949549437 0.13 20 -89.1050840948 -0.00884990839809 0.156270697655 0.13 20 -96.3368858565 -0.00884990839809 0.175751062485 0.13 20 -105.301797714 -0.00884990839809 0.19765980717 0.13 20 -116.502286542 -0.00884990839809 0.222299648253 0.13 20 -130.611659122 -0.00884990839809 0.250011038262 0.13 20 -148.541358069 -0.00884990839809 0.281176869797 0.13 20 -171.539534974 -0.00884990839809 0.316227766017 0.13 20 -201.338816362 -0.0101419729754 0.001 0.13 20 -52.1032652568 -0.0101419729754 0.00112465782212 0.13 20 -52.1230390728 -0.0101419729754 0.00126485521686 0.13 20 -52.1453023745 -0.0101419729754 0.00142252931349 0.13 20 -52.1703720102 -0.0101419729754 0.00159985871961 0.13 20 -52.1986060592 -0.0101419729754 0.00179929362329 0.13 20 -52.2304094343 -0.0101419729754 0.00202358964773 0.13 20 -52.266240306 -0.0101419729754 0.00227584592607 0.13 20 -52.3066174853 -0.0101419729754 0.0025595479227 0.13 20 -52.3521289271 -0.0101419729754 0.00287861559235 0.13 20 -52.4034415469 -0.0101419729754 0.00323745754282 0.13 20 -52.4613125847 -0.0101419729754 0.00364103194931 0.13 20 -52.5266027971 -0.0101419729754 0.00409491506238 0.13 20 -52.6002918168 -0.0101419729754 0.00460537825582 0.13 20 -52.6834960945 -0.0101419729754 0.00517947467923 0.13 20 -52.7774899295 -0.0101419729754 0.00582513671247 0.13 20 -52.8837302078 -0.0101419729754 0.0065512855686 0.13 20 -53.0038856151 -0.0101419729754 0.00736795455966 0.13 20 -53.1398712691 -0.0101419729754 0.00828642772855 0.13 20 -53.29388995 -0.0101419729754 0.00931939576234 0.13 20 -53.4684813955 -0.0101419729754 0.0104811313415 0.13 20 -53.6665815041 -0.0101419729754 0.0117876863479 0.13 20 -53.8915937621 -0.0101419729754 0.0132571136559 0.13 20 -54.1474758282 -0.0101419729754 0.0149097165718 0.13 20 -54.4388449955 -0.0101419729754 0.0167683293681 0.13 20 -54.7711072805 -0.0101419729754 0.0188586327877 0.13 20 -55.1506162226 -0.0101419729754 0.0212095088792 0.13 20 -55.5848692225 -0.0101419729754 0.0238534400643 0.13 20 -56.0827515451 -0.0101419729754 0.0268269579528 0.13 20 -56.654841136 -0.0101419729754 0.0301711481053 0.13 20 -57.3137914205 -0.0101419729754 0.033932217719 0.13 20 -58.0748146008 -0.0101419729754 0.0381621340795 0.13 20 -58.9562951402 -0.0101419729754 0.0429193426013 0.13 20 -59.9805727737 -0.0101419729754 0.0482695743768 0.13 20 -61.1749474594 -0.0101419729754 0.0542867543932 0.13 20 -62.5729764833 -0.0101419729754 0.0610540229659 0.13 20 -64.2161583186 -0.0101419729754 0.0686648845004 0.13 20 -66.1561314529 -0.0101419729754 0.0772244994584 0.13 20 -68.4575630512 -0.0101419729754 0.0868511373751 0.13 20 -71.2019675492 -0.0101419729754 0.0976778110089 0.13 20 -74.4927872019 -0.0101419729754 0.109854114199 0.13 20 -78.4621974009 -0.0101419729754 0.123548288826 0.13 20 -83.2802876107 -0.0101419729754 0.138949549437 0.13 20 -89.1675425387 -0.0101419729754 0.156270697655 0.13 20 -96.4119527149 -0.0101419729754 0.175751062485 0.13 20 -105.392692321 -0.0101419729754 0.19765980717 0.13 20 -116.613237895 -0.0101419729754 0.222299648253 0.13 20 -130.748278173 -0.0101419729754 0.250011038262 0.13 20 -148.711168978 -0.0101419729754 0.281176869797 0.13 20 -171.752745783 -0.0101419729754 0.316227766017 0.13 20 -201.609460289 -0.0116226757619 0.001 0.13 20 -52.1035098349 -0.0116226757619 0.00112465782212 0.13 20 -52.1233142617 -0.0116226757619 0.00126485521686 0.13 20 -52.1456120223 -0.0116226757619 0.00142252931349 0.13 20 -52.1707204537 -0.0116226757619 0.00159985871961 0.13 20 -52.1989981866 -0.0116226757619 0.00179929362329 0.13 20 -52.230850757 -0.0116226757619 0.00202358964773 0.13 20 -52.2667370401 -0.0116226757619 0.00227584592607 0.13 20 -52.307176644 -0.0116226757619 0.0025595479227 0.13 20 -52.3527584263 -0.0116226757619 0.00287861559235 0.13 20 -52.4041503249 -0.0116226757619 0.00323745754282 0.13 20 -52.4621107399 -0.0116226757619 0.00364103194931 0.13 20 -52.5275017442 -0.0116226757619 0.00409491506238 0.13 20 -52.601304467 -0.0116226757619 0.00460537825582 0.13 20 -52.6846370621 -0.0116226757619 0.00517947467923 0.13 20 -52.7787757691 -0.0116226757619 0.00582513671247 0.13 20 -52.8851796888 -0.0116226757619 0.0065512855686 0.13 20 -53.0055200391 -0.0116226757619 0.00736795455966 0.13 20 -53.1417148385 -0.0116226757619 0.00828642772855 0.13 20 -53.2959701969 -0.0116226757619 0.00931939576234 0.13 20 -53.4708296838 -0.0116226757619 0.0104811313415 0.13 20 -53.6692336182 -0.0116226757619 0.0117876863479 0.13 20 -53.894590601 -0.0116226757619 0.0132571136559 0.13 20 -54.1508642269 -0.0116226757619 0.0149097165718 0.13 20 -54.4426787027 -0.0116226757619 0.0167683293681 0.13 20 -54.7754481275 -0.0116226757619 0.0188586327877 0.13 20 -55.1555355284 -0.0116226757619 0.0212095088792 0.13 20 -55.5904494934 -0.0116226757619 0.0238534400643 0.13 20 -56.0890885421 -0.0116226757619 0.0268269579528 0.13 20 -56.6620464058 -0.0116226757619 0.0301711481053 0.13 20 -57.321995414 -0.0116226757619 0.033932217719 0.13 20 -58.084170542 -0.0116226757619 0.0381621340795 0.13 20 -58.9669838584 -0.0116226757619 0.0429193426013 0.13 20 -59.9928087824 -0.0116226757619 0.0482695743768 0.13 20 -61.1889866576 -0.0116226757619 0.0542867543932 0.13 20 -62.589125984 -0.0116226757619 0.0610540229659 0.13 20 -64.2347890836 -0.0116226757619 0.0686648845004 0.13 20 -66.1776946543 -0.0116226757619 0.0772244994584 0.13 20 -68.4826114166 -0.0116226757619 0.0868511373751 0.13 20 -71.2311834138 -0.0116226757619 0.0976778110089 0.13 20 -74.5270196499 -0.0116226757619 0.109854114199 0.13 20 -78.5025118122 -0.0116226757619 0.123548288826 0.13 20 -83.3280322611 -0.0116226757619 0.138949549437 0.13 20 -89.2244388352 -0.0116226757619 0.156270697655 0.13 20 -96.4802184726 -0.0116226757619 0.175751062485 0.13 20 -105.4752117 -0.0116226757619 0.19765980717 0.13 20 -116.713798004 -0.0116226757619 0.222299648253 0.13 20 -130.871902281 -0.0116226757619 0.250011038262 0.13 20 -148.864592184 -0.0116226757619 0.281176869797 0.13 20 -171.945105362 -0.0116226757619 0.316227766017 0.13 20 -201.853318516 -0.0133195574662 0.001 0.13 20 -52.1037387144 -0.0133195574662 0.00112465782212 0.13 20 -52.1235717792 -0.0133195574662 0.00126485521686 0.13 20 -52.1459017763 -0.0133195574662 0.00142252931349 0.13 20 -52.1710464985 -0.0133195574662 0.00159985871961 0.13 20 -52.1993650916 -0.0133195574662 0.00179929362329 0.13 20 -52.2312636731 -0.0133195574662 0.00202358964773 0.13 20 -52.2672017758 -0.0133195574662 0.00227584592607 0.13 20 -52.3076997515 -0.0133195574662 0.0025595479227 0.13 20 -52.353347299 -0.0133195574662 0.00287861559235 0.13 20 -52.4048133094 -0.0133195574662 0.00323745754282 0.13 20 -52.4628572627 -0.0133195574662 0.00364103194931 0.13 20 -52.5283424577 -0.0133195574662 0.00409491506238 0.13 20 -52.6022514156 -0.0133195574662 0.00460537825582 0.13 20 -52.6857038731 -0.0133195574662 0.00517947467923 0.13 20 -52.7799778722 -0.0133195574662 0.00582513671247 0.13 20 -52.8865345694 -0.0133195574662 0.0065512855686 0.13 20 -53.0070475304 -0.0133195574662 0.00736795455966 0.13 20 -53.1434374604 -0.0133195574662 0.00828642772855 0.13 20 -53.2979135503 -0.0133195574662 0.00931939576234 0.13 20 -53.4730229103 -0.0133195574662 0.0104811313415 0.13 20 -53.671709939 -0.0133195574662 0.0117876863479 0.13 20 -53.8973879507 -0.0133195574662 0.0132571136559 0.13 20 -54.1540260026 -0.0133195574662 0.0149097165718 0.13 20 -54.4462546529 -0.0133195574662 0.0167683293681 0.13 20 -54.7794954134 -0.0133195574662 0.0188586327877 0.13 20 -55.1601199974 -0.0133195574662 0.0212095088792 0.13 20 -55.5956472158 -0.0133195574662 0.0238534400643 0.13 20 -56.094987677 -0.0133195574662 0.0268269579528 0.13 20 -56.6687494811 -0.0133195574662 0.0301711481053 0.13 20 -57.3296221311 -0.0133195574662 0.033932217719 0.13 20 -58.0928612487 -0.0133195574662 0.0381621340795 0.13 20 -58.9769038809 -0.0133195574662 0.0429193426013 0.13 20 -60.0041538667 -0.0133195574662 0.0482695743768 0.13 20 -61.2019898553 -0.0133195574662 0.0542867543932 0.13 20 -62.6040664305 -0.0133195574662 0.0610540229659 0.13 20 -64.2520032727 -0.0133195574662 0.0686648845004 0.13 20 -66.1975910285 -0.0133195574662 0.0772244994584 0.13 20 -68.5056893906 -0.0133195574662 0.0868511373751 0.13 20 -71.2580583649 -0.0133195574662 0.0976778110089 0.13 20 -74.5584559972 -0.0133195574662 0.109854114199 0.13 20 -78.5394671354 -0.0133195574662 0.123548288826 0.13 20 -83.3717166016 -0.0133195574662 0.138949549437 0.13 20 -89.2763950398 -0.0133195574662 0.156270697655 0.13 20 -96.5424319626 -0.0133195574662 0.175751062485 0.13 20 -105.550261799 -0.0133195574662 0.19765980717 0.13 20 -116.805068652 -0.0133195574662 0.222299648253 0.13 20 -130.983878823 -0.0133195574662 0.250011038262 0.13 20 -149.003285093 -0.0133195574662 0.281176869797 0.13 20 -172.118665285 -0.0133195574662 0.316227766017 0.13 20 -202.072947701 -0.0152641796718 0.001 0.13 20 -52.103954206 -0.0152641796718 0.00112465782212 0.13 20 -52.1238142267 -0.0152641796718 0.00126485521686 0.13 20 -52.1461745646 -0.0152641796718 0.00142252931349 0.13 20 -52.1713534411 -0.0152641796718 0.00159985871961 0.13 20 -52.1997104858 -0.0152641796718 0.00179929362329 0.13 20 -52.2316523626 -0.0152641796718 0.00202358964773 0.13 20 -52.2676392213 -0.0152641796718 0.00227584592607 0.13 20 -52.3081921114 -0.0152641796718 0.0025595479227 0.13 20 -52.3539015212 -0.0152641796718 0.00287861559235 0.13 20 -52.4054372351 -0.0152641796718 0.00323745754282 0.13 20 -52.4635597455 -0.0152641796718 0.00364103194931 0.13 20 -52.529133499 -0.0152641796718 0.00409491506238 0.13 20 -52.6031423195 -0.0152641796718 0.00460537825582 0.13 20 -52.6867074243 -0.0152641796718 0.00517947467923 0.13 20 -52.7811085399 -0.0152641796718 0.00582513671247 0.13 20 -52.887808742 -0.0152641796718 0.0065512855686 0.13 20 -53.0084837863 -0.0152641796718 0.00736795455966 0.13 20 -53.1450568817 -0.0152641796718 0.00828642772855 0.13 20 -53.2997400867 -0.0152641796718 0.00931939576234 0.13 20 -53.4750838029 -0.0152641796718 0.0104811313415 0.13 20 -53.674036216 -0.0152641796718 0.0117876863479 0.13 20 -53.9000150094 -0.0152641796718 0.0132571136559 0.13 20 -54.1569942955 -0.0152641796718 0.0149097165718 0.13 20 -54.4496105007 -0.0152641796718 0.0167683293681 0.13 20 -54.7832919729 -0.0152641796718 0.0188586327877 0.13 20 -55.1644184204 -0.0152641796718 0.0212095088792 0.13 20 -55.6005180447 -0.0152641796718 0.0238534400643 0.13 20 -56.1005125351 -0.0152641796718 0.0268269579528 0.13 20 -56.6750231341 -0.0152641796718 0.0301711481053 0.13 20 -57.3367550166 -0.0152641796718 0.033932217719 0.13 20 -58.1009826031 -0.0152641796718 0.0381621340795 0.13 20 -58.9861656313 -0.0152641796718 0.0429193426013 0.13 20 -60.0147355109 -0.0152641796718 0.0482695743768 0.13 20 -61.214104627 -0.0152641796718 0.0542867543932 0.13 20 -62.6179691475 -0.0152641796718 0.0610540229659 0.13 20 -64.2680004028 -0.0152641796718 0.0686648845004 0.13 20 -66.2160537009 -0.0152641796718 0.0772244994584 0.13 20 -68.5270703435 -0.0152641796718 0.0868511373751 0.13 20 -71.2829141909 -0.0152641796718 0.0976778110089 0.13 20 -74.587476567 -0.0152641796718 0.109854114199 0.13 20 -78.5735148201 -0.0152641796718 0.123548288826 0.13 20 -83.4118789662 -0.0152641796718 0.138949549437 0.13 20 -89.3240562095 -0.0152641796718 0.156270697655 0.13 20 -96.5993700958 -0.0152641796718 0.175751062485 0.13 20 -105.618783431 -0.0152641796718 0.19765980717 0.13 20 -116.888195719 -0.0152641796718 0.222299648253 0.13 20 -131.085612038 -0.0152641796718 0.250011038262 0.13 20 -149.128979899 -0.0152641796718 0.281176869797 0.13 20 -172.275577473 -0.0152641796718 0.316227766017 0.13 20 -202.271041846 -0.0174927118744 0.001 0.13 20 -52.1041586826 -0.0174927118744 0.00112465782212 0.13 20 -52.1240442746 -0.0174927118744 0.00126485521686 0.13 20 -52.1464333932 -0.0174927118744 0.00142252931349 0.13 20 -52.1716446656 -0.0174927118744 0.00159985871961 0.13 20 -52.2000381794 -0.0174927118744 0.00179929362329 0.13 20 -52.2320211156 -0.0174927118744 0.00202358964773 0.13 20 -52.2680542079 -0.0174927118744 0.00227584592607 0.13 20 -52.3086591659 -0.0174927118744 0.0025595479227 0.13 20 -52.3544272239 -0.0174927118744 0.00287861559235 0.13 20 -52.4060290109 -0.0174927118744 0.00323745754282 0.13 20 -52.4642259751 -0.0174927118744 0.00364103194931 0.13 20 -52.5298836467 -0.0174927118744 0.00409491506238 0.13 20 -52.6039870787 -0.0174927118744 0.00460537825582 0.13 20 -52.6876588841 -0.0174927118744 0.00517947467923 0.13 20 -52.7821803759 -0.0174927118744 0.00582513671247 0.13 20 -52.889016436 -0.0174927118744 0.0065512855686 0.13 20 -53.0098448795 -0.0174927118744 0.00736795455966 0.13 20 -53.1465912664 -0.0174927118744 0.00828642772855 0.13 20 -53.3014703455 -0.0174927118744 0.00931939576234 0.13 20 -53.4770356022 -0.0174927118744 0.0104811313415 0.13 20 -53.6762387654 -0.0174927118744 0.0117876863479 0.13 20 -53.9025016001 -0.0174927118744 0.0132571136559 0.13 20 -54.1598029334 -0.0174927118744 0.0149097165718 0.13 20 -54.4527846547 -0.0174927118744 0.0167683293681 0.13 20 -54.7868814644 -0.0174927118744 0.0188586327877 0.13 20 -55.1684804846 -0.0174927118744 0.0212095088792 0.13 20 -55.6051186058 -0.0174927118744 0.0238534400643 0.13 20 -56.1057277473 -0.0174927118744 0.0268269579528 0.13 20 -56.6809412555 -0.0174927118744 0.0301711481053 0.13 20 -57.343478703 -0.0174927118744 0.033932217719 0.13 20 -58.1086317368 -0.0174927118744 0.0381621340795 0.13 20 -58.9948808327 -0.0174927118744 0.0429193426013 0.13 20 -60.0246825327 -0.0174927118744 0.0482695743768 0.13 20 -61.2254798933 -0.0174927118744 0.0542867543932 0.13 20 -62.6310067902 -0.0174927118744 0.0610540229659 0.13 20 -64.2829812708 -0.0174927118744 0.0686648845004 0.13 20 -66.2333169856 -0.0174927118744 0.0772244994584 0.13 20 -68.5470286986 -0.0174927118744 0.0868511373751 0.13 20 -71.3060735516 -0.0174927118744 0.0976778110089 0.13 20 -74.614462335 -0.0174927118744 0.109854114199 0.13 20 -78.6051067311 -0.0174927118744 0.123548288826 0.13 20 -83.4490578929 -0.0174927118744 0.138949549437 0.13 20 -89.3680674992 -0.0174927118744 0.156270697655 0.13 20 -96.6518100205 -0.0174927118744 0.175751062485 0.13 20 -105.681718266 -0.0174927118744 0.19765980717 0.13 20 -116.964327432 -0.0174927118744 0.222299648253 0.13 20 -131.178511498 -0.0174927118744 0.250011038262 0.13 20 -149.243419627 -0.0174927118744 0.281176869797 0.13 20 -172.418014353 -0.0174927118744 0.316227766017 0.13 20 -202.450332039 -0.0200466042264 0.001 0.13 20 -52.104354468 -0.0200466042264 0.00112465782212 0.13 20 -52.1242645383 -0.0200466042264 0.00126485521686 0.13 20 -52.1466812057 -0.0200466042264 0.00142252931349 0.13 20 -52.1719234854 -0.0200466042264 0.00159985871961 0.13 20 -52.2003519026 -0.0200466042264 0.00179929362329 0.13 20 -52.232374132 -0.0200466042264 0.00202358964773 0.13 20 -52.2684514651 -0.0200466042264 0.00227584592607 0.13 20 -52.3091062414 -0.0200466042264 0.0025595479227 0.13 20 -52.3549304071 -0.0200466042264 0.00287861559235 0.13 20 -52.4065953964 -0.0200466042264 0.00323745754282 0.13 20 -52.4648635691 -0.0200466042264 0.00364103194931 0.13 20 -52.5306014875 -0.0200466042264 0.00409491506238 0.13 20 -52.6047953748 -0.0200466042264 0.00460537825582 0.13 20 -52.6885691717 -0.0200466042264 0.00517947467923 0.13 20 -52.7832056998 -0.0200466042264 0.00582513671247 0.13 20 -52.8901715566 -0.0200466042264 0.0065512855686 0.13 20 -53.0111465112 -0.0200466042264 0.00736795455966 0.13 20 -53.1480583529 -0.0200466042264 0.00828642772855 0.13 20 -53.3031243774 -0.0200466042264 0.00931939576234 0.13 20 -53.4789009865 -0.0200466042264 0.0104811313415 0.13 20 -53.6783432551 -0.0200466042264 0.0117876863479 0.13 20 -53.9048767965 -0.0200466042264 0.0132571136559 0.13 20 -54.1624848757 -0.0200466042264 0.0149097165718 0.13 20 -54.4558145154 -0.0200466042264 0.0167683293681 0.13 20 -54.7903063724 -0.0200466042264 0.0188586327877 0.13 20 -55.1723545064 -0.0200466042264 0.0212095088792 0.13 20 -55.6095039201 -0.0200466042264 0.0238534400643 0.13 20 -56.1106960606 -0.0200466042264 0.0268269579528 0.13 20 -56.6865755181 -0.0200466042264 0.0301711481053 0.13 20 -57.3498752049 -0.0200466042264 0.033932217719 0.13 20 -58.1159026824 -0.0200466042264 0.0381621340795 0.13 20 -59.0031575309 -0.0200466042264 0.0429193426013 0.13 20 -60.0341193758 -0.0200466042264 0.0482695743768 0.13 20 -61.2362593595 -0.0200466042264 0.0542867543932 0.13 20 -62.6433457834 -0.0200466042264 0.0610540229659 0.13 20 -64.2971392178 -0.0200466042264 0.0686648845004 0.13 20 -66.2496062619 -0.0200466042264 0.0772244994584 0.13 20 -68.5658281604 -0.0200466042264 0.0868511373751 0.13 20 -71.3278462412 -0.0200466042264 0.0976778110089 0.13 20 -74.6397788333 -0.0200466042264 0.109854114199 0.13 20 -78.6346762074 -0.0200466042264 0.123548288826 0.13 20 -83.4837697271 -0.0200466042264 0.138949549437 0.13 20 -89.4090475414 -0.0200466042264 0.156270697655 0.13 20 -96.7004972994 -0.0200466042264 0.175751062485 0.13 20 -105.739970551 -0.0200466042264 0.19765980717 0.13 20 -117.034567992 -0.0200466042264 0.222299648253 0.13 20 -131.263935515 -0.0200466042264 0.250011038262 0.13 20 -149.348288503 -0.0200466042264 0.281176869797 0.13 20 -172.548082387 -0.0200466042264 0.316227766017 0.13 20 -202.61347797 -0.022973358499 0.001 0.13 20 -52.1045436753 -0.022973358499 0.00112465782212 0.13 20 -52.1244773959 -0.022973358499 0.00126485521686 0.13 20 -52.1469206788 -0.022973358499 0.00142252931349 0.13 20 -52.1721929134 -0.022973358499 0.00159985871961 0.13 20 -52.2006550469 -0.022973358499 0.00179929362329 0.13 20 -52.2327152303 -0.022973358499 0.00202358964773 0.13 20 -52.2688352925 -0.022973358499 0.00227584592607 0.13 20 -52.3095381799 -0.022973358499 0.0025595479227 0.13 20 -52.3554165246 -0.022973358499 0.00287861559235 0.13 20 -52.4071425361 -0.022973358499 0.00323745754282 0.13 20 -52.465479451 -0.022973358499 0.00364103194931 0.13 20 -52.5312948246 -0.022973358499 0.00409491506238 0.13 20 -52.6055760047 -0.022973358499 0.00460537825582 0.13 20 -52.6894482076 -0.022973358499 0.00517947467923 0.13 20 -52.7841957027 -0.022973358499 0.00582513671247 0.13 20 -52.891286733 -0.022973358499 0.0065512855686 0.13 20 -53.0124029396 -0.022973358499 0.00736795455966 0.13 20 -53.1494742458 -0.022973358499 0.00828642772855 0.13 20 -53.3047203823 -0.022973358499 0.00931939576234 0.13 20 -53.4807005356 -0.022973358499 0.0104811313415 0.13 20 -53.6803729714 -0.022973358499 0.0117876863479 0.13 20 -53.9071669668 -0.022973358499 0.0132571136559 0.13 20 -54.1650700053 -0.022973358499 0.0149097165718 0.13 20 -54.4587339797 -0.022973358499 0.0167683293681 0.13 20 -54.793605187 -0.022973358499 0.0188586327877 0.13 20 -55.1760842417 -0.022973358499 0.0212095088792 0.13 20 -55.6137237935 -0.022973358499 0.0238534400643 0.13 20 -56.1154742481 -0.022973358499 0.0268269579528 0.13 20 -56.6919907401 -0.022973358499 0.0301711481053 0.13 20 -57.3560186552 -0.022973358499 0.033932217719 0.13 20 -58.1228803929 -0.022973358499 0.0381621340795 0.13 20 -59.0110932889 -0.022973358499 0.0429193426013 0.13 20 -60.0431583531 -0.022973358499 0.0482695743768 0.13 20 -61.2465726608 -0.022973358499 0.0542867543932 0.13 20 -62.6551361922 -0.022973358499 0.0610540229659 0.13 20 -64.3106485152 -0.022973358499 0.0686648845004 0.13 20 -66.2651246238 -0.022973358499 0.0772244994584 0.13 20 -68.5837063242 -0.022973358499 0.0868511373751 0.13 20 -71.3485113864 -0.022973358499 0.0976778110089 0.13 20 -74.6637554828 -0.022973358499 0.109854114199 0.13 20 -78.6626139639 -0.022973358499 0.123548288826 0.13 20 -83.5164803868 -0.022973358499 0.138949549437 0.13 20 -89.4475551818 -0.022973358499 0.156270697655 0.13 20 -96.7461064766 -0.022973358499 0.175751062485 0.13 20 -105.794360034 -0.022973358499 0.19765980717 0.13 20 -117.099920933 -0.022973358499 0.222299648253 0.13 20 -131.343122362 -0.022973358499 0.250011038262 0.13 20 -149.445127583 -0.022973358499 0.281176869797 0.13 20 -172.667717399 -0.022973358499 0.316227766017 0.13 20 -202.762936349 -0.0263274116037 0.001 0.13 20 -52.1047280447 -0.0263274116037 0.00112465782212 0.13 20 -52.1246848057 -0.0263274116037 0.00126485521686 0.13 20 -52.1471540166 -0.0263274116037 0.00142252931349 0.13 20 -52.1724554305 -0.0263274116037 0.00159985871961 0.13 20 -52.2009504052 -0.0263274116037 0.00179929362329 0.13 20 -52.2330475547 -0.0263274116037 0.00202358964773 0.13 20 -52.2692092304 -0.0263274116037 0.00227584592607 0.13 20 -52.3099589685 -0.0263274116037 0.0025595479227 0.13 20 -52.3558900672 -0.0263274116037 0.00287861559235 0.13 20 -52.4076754888 -0.0263274116037 0.00323745754282 0.13 20 -52.4660793212 -0.0263274116037 0.00364103194931 0.13 20 -52.5319700825 -0.0263274116037 0.00409491506238 0.13 20 -52.6063362112 -0.0263274116037 0.00460537825582 0.13 20 -52.6903041592 -0.0263274116037 0.00517947467923 0.13 20 -52.7851595978 -0.0263274116037 0.00582513671247 0.13 20 -52.8923723617 -0.0263274116037 0.0065512855686 0.13 20 -53.0136259019 -0.0263274116037 0.00736795455966 0.13 20 -53.1508522017 -0.0263274116037 0.00828642772855 0.13 20 -53.306273341 -0.0263274116037 0.00931939576234 0.13 20 -53.4824511888 -0.0263274116037 0.0104811313415 0.13 20 -53.6823470805 -0.0263274116037 0.0117876863479 0.13 20 -53.9093938132 -0.0263274116037 0.0132571136559 0.13 20 -54.1675829161 -0.0263274116037 0.0149097165718 0.13 20 -54.4615709445 -0.0263274116037 0.0167683293681 0.13 20 -54.7968095845 -0.0263274116037 0.0188586327877 0.13 20 -55.1797057002 -0.0263274116037 0.0212095088792 0.13 20 -55.617819215 -0.0263274116037 0.0238534400643 0.13 20 -56.1201090344 -0.0263274116037 0.0268269579528 0.13 20 -56.6972402702 -0.0263274116037 0.0301711481053 0.13 20 -57.3619700765 -0.0263274116037 0.033932217719 0.13 20 -58.1296348079 -0.0263274116037 0.0381621340795 0.13 20 -59.0187684457 -0.0263274116037 0.0429193426013 0.13 20 -60.0518919782 -0.0263274116037 0.0482695743768 0.13 20 -61.256526623 -0.0263274116037 0.0542867543932 0.13 20 -62.6665017443 -0.0263274116037 0.0610540229659 0.13 20 -64.3236529481 -0.0263274116037 0.0686648845004 0.13 20 -66.2800397844 -0.0263274116037 0.0772244994584 0.13 20 -68.6008596091 -0.0263274116037 0.0868511373751 0.13 20 -71.3683000531 -0.0263274116037 0.0976778110089 0.13 20 -74.6866654355 -0.0263274116037 0.109854114199 0.13 20 -78.6892446234 -0.0263274116037 0.123548288826 0.13 20 -83.5475778988 -0.0263274116037 0.138949549437 0.13 20 -89.4840571472 -0.0263274116037 0.156270697655 0.13 20 -96.7892027514 -0.0263274116037 0.175751062485 0.13 20 -105.845576173 -0.0263274116037 0.19765980717 0.13 20 -117.161233927 -0.0263274116037 0.222299648253 0.13 20 -131.417123084 -0.0263274116037 0.250011038262 0.13 20 -149.535252019 -0.0263274116037 0.281176869797 0.13 20 -172.778581365 -0.0263274116037 0.316227766017 0.13 20 -202.900830274 -0.0301711481053 0.001 0.13 20 -52.1049088521 -0.0301711481053 0.00112465782212 0.13 20 -52.1248882038 -0.0301711481053 0.00126485521686 0.13 20 -52.1473828352 -0.0301711481053 0.00142252931349 0.13 20 -52.1727128559 -0.0301711481053 0.00159985871961 0.13 20 -52.2012400255 -0.0301711481053 0.00179929362329 0.13 20 -52.2333734111 -0.0301711481053 0.00202358964773 0.13 20 -52.2695758752 -0.0301711481053 0.00227584592607 0.13 20 -52.3103715311 -0.0301711481053 0.0025595479227 0.13 20 -52.3563543284 -0.0301711481053 0.00287861559235 0.13 20 -52.4081979651 -0.0301711481053 0.00323745754282 0.13 20 -52.4666673606 -0.0301711481053 0.00364103194931 0.13 20 -52.5326319737 -0.0301711481053 0.00409491506238 0.13 20 -52.607081307 -0.0301711481053 0.00460537825582 0.13 20 -52.691143018 -0.0301711481053 0.00517947467923 0.13 20 -52.7861041444 -0.0301711481053 0.00582513671247 0.13 20 -52.8934360714 -0.0301711481053 0.0065512855686 0.13 20 -53.0148240111 -0.0301711481053 0.00736795455966 0.13 20 -53.1522019501 -0.0301711481053 0.00828642772855 0.13 20 -53.3077942497 -0.0301711481053 0.00931939576234 0.13 20 -53.4841653819 -0.0301711481053 0.0104811313415 0.13 20 -53.684279656 -0.0301711481053 0.0117876863479 0.13 20 -53.911573275 -0.0301711481053 0.0132571136559 0.13 20 -54.170041676 -0.0301711481053 0.0149097165718 0.13 20 -54.4643459105 -0.0301711481053 0.0167683293681 0.13 20 -54.7999428514 -0.0301711481053 0.0188586327877 0.13 20 -55.1832453649 -0.0301711481053 0.0212095088792 0.13 20 -55.621820344 -0.0301711481053 0.0238534400643 0.13 20 -56.1246348185 -0.0301711481053 0.0268269579528 0.13 20 -56.7023634103 -0.0301711481053 0.0301711481053 0.13 20 -57.3677744579 -0.0301711481053 0.033932217719 0.13 20 -58.1362175377 -0.0301711481053 0.0381621340795 0.13 20 -59.0262423481 -0.0301711481053 0.0429193426013 0.13 20 -60.060388676 -0.0301711481053 0.0482695743768 0.13 20 -61.266200371 -0.0301711481053 0.0542867543932 0.13 20 -62.6775342379 -0.0301711481053 0.0610540229659 0.13 20 -64.3362594059 -0.0301711481053 0.0686648845004 0.13 20 -66.2944767052 -0.0301711481053 0.0772244994584 0.13 20 -68.6174347519 -0.0301711481053 0.0868511373751 0.13 20 -71.3873853863 -0.0301711481053 0.0976778110089 0.13 20 -74.7087140858 -0.0301711481053 0.109854114199 0.13 20 -78.7148132533 -0.0301711481053 0.123548288826 0.13 20 -83.5773565129 -0.0301711481053 0.138949549437 0.13 20 -89.5189091543 -0.0301711481053 0.156270697655 0.13 20 -96.8302193145 -0.0301711481053 0.175751062485 0.13 20 -105.894150679 -0.0301711481053 0.19765980717 0.13 20 -117.219165133 -0.0301711481053 0.222299648253 0.13 20 -131.48675974 -0.0301711481053 0.250011038262 0.13 20 -149.619698536 -0.0301711481053 0.281176869797 0.13 20 -172.881995357 -0.0301711481053 0.316227766017 0.13 20 -203.028862202 -0.0345760605598 0.001 0.13 20 -52.1050869397 -0.0345760605598 0.00112465782212 0.13 20 -52.125088538 -0.0345760605598 0.00126485521686 0.13 20 -52.1476082015 -0.0345760605598 0.00142252931349 0.13 20 -52.1729663905 -0.0345760605598 0.00159985871961 0.13 20 -52.2015252596 -0.0345760605598 0.00179929362329 0.13 20 -52.2336943213 -0.0345760605598 0.00202358964773 0.13 20 -52.2699369408 -0.0345760605598 0.00227584592607 0.13 20 -52.310777798 -0.0345760605598 0.0025595479227 0.13 20 -52.3568114825 -0.0345760605598 0.00287861559235 0.13 20 -52.4087124145 -0.0345760605598 0.00323745754282 0.13 20 -52.46724633 -0.0345760605598 0.00364103194931 0.13 20 -52.5332836099 -0.0345760605598 0.00409491506238 0.13 20 -52.6078148009 -0.0345760605598 0.00460537825582 0.13 20 -52.6919687414 -0.0345760605598 0.00517947467923 0.13 20 -52.7870338074 -0.0345760605598 0.00582513671247 0.13 20 -52.8944829014 -0.0345760605598 0.0065512855686 0.13 20 -53.0160029578 -0.0345760605598 0.00736795455966 0.13 20 -53.1535299203 -0.0345760605598 0.00828642772855 0.13 20 -53.3092903767 -0.0345760605598 0.00931939576234 0.13 20 -53.4858513365 -0.0345760605598 0.0104811313415 0.13 20 -53.6861800048 -0.0345760605598 0.0117876863479 0.13 20 -53.913715896 -0.0345760605598 0.0132571136559 0.13 20 -54.1724582413 -0.0345760605598 0.0149097165718 0.13 20 -54.4670724497 -0.0345760605598 0.0167683293681 0.13 20 -54.8030204116 -0.0345760605598 0.0188586327877 0.13 20 -55.1867207872 -0.0345760605598 0.0212095088792 0.13 20 -55.6257471824 -0.0345760605598 0.0238534400643 0.13 20 -56.1290744324 -0.0345760605598 0.0268269579528 0.13 20 -56.7073862712 -0.0345760605598 0.0301711481053 0.13 20 -57.3734617225 -0.0345760605598 0.033932217719 0.13 20 -58.1426629539 -0.0345760605598 0.0381621340795 0.13 20 -59.0335545812 -0.0345760605598 0.0429193426013 0.13 20 -60.0686941691 -0.0345760605598 0.0482695743768 0.13 20 -61.2756468892 -0.0345760605598 0.0542867543932 0.13 20 -62.6882952968 -0.0345760605598 0.0610540229659 0.13 20 -64.34853985 -0.0345760605598 0.0686648845004 0.13 20 -66.3085197965 -0.0345760605598 0.0772244994584 0.13 20 -68.6335312553 -0.0345760605598 0.0868511373751 0.13 20 -71.4058853183 -0.0345760605598 0.0976778110089 0.13 20 -74.7300420414 -0.0345760605598 0.109854114199 0.13 20 -78.7394885825 -0.0345760605598 0.123548288826 0.13 20 -83.6060201245 -0.0345760605598 0.138949549437 0.13 20 -89.5523594547 -0.0345760605598 0.156270697655 0.13 20 -96.8694608645 -0.0345760605598 0.175751062485 0.13 20 -105.940460747 -0.0345760605598 0.19765980717 0.13 20 -117.274185746 -0.0345760605598 0.222299648253 0.13 20 -131.552626609 -0.0345760605598 0.250011038262 0.13 20 -149.69922427 -0.0345760605598 0.281176869797 0.13 20 -172.978934402 -0.0345760605598 0.316227766017 0.13 20 -203.148302287 -0.0396240792581 0.001 0.13 20 -52.1052628663 -0.0396240792581 0.00112465782212 0.13 20 -52.125286437 -0.0396240792581 0.00126485521686 0.13 20 -52.1478308232 -0.0396240792581 0.00142252931349 0.13 20 -52.1732168308 -0.0396240792581 0.00159985871961 0.13 20 -52.2018070041 -0.0396240792581 0.00179929362329 0.13 20 -52.234011295 -0.0396240792581 0.00202358964773 0.13 20 -52.2702935638 -0.0396240792581 0.00227584592607 0.13 20 -52.3111790492 -0.0396240792581 0.0025595479227 0.13 20 -52.357262971 -0.0396240792581 0.00287861559235 0.13 20 -52.4092204611 -0.0396240792581 0.00323745754282 0.13 20 -52.4678180588 -0.0396240792581 0.00364103194931 0.13 20 -52.5339270532 -0.0396240792581 0.00409491506238 0.13 20 -52.6085390171 -0.0396240792581 0.00460537825582 0.13 20 -52.6927839502 -0.0396240792581 0.00517947467923 0.13 20 -52.7879515431 -0.0396240792581 0.00582513671247 0.13 20 -52.8955161878 -0.0396240792581 0.0065512855686 0.13 20 -53.0171665082 -0.0396240792581 0.00736795455966 0.13 20 -53.1548403656 -0.0396240792581 0.00828642772855 0.13 20 -53.3107665284 -0.0396240792581 0.00931939576234 0.13 20 -53.4875144872 -0.0396240792581 0.0104811313415 0.13 20 -53.6880542761 -0.0396240792581 0.0117876863479 0.13 20 -53.9158286395 -0.0396240792581 0.0132571136559 0.13 20 -54.1748405042 -0.0396240792581 0.0149097165718 0.13 20 -54.469759516 -0.0396240792581 0.0167683293681 0.13 20 -54.806052435 -0.0396240792581 0.0188586327877 0.13 20 -55.1901435333 -0.0396240792581 0.0212095088792 0.13 20 -55.6296129036 -0.0396240792581 0.0238534400643 0.13 20 -56.1334429049 -0.0396240792581 0.0268269579528 0.13 20 -56.712326031 -0.0396240792581 0.0301711481053 0.13 20 -57.3790515468 -0.0396240792581 0.033932217719 0.13 20 -58.1489936497 -0.0396240792581 0.0381621340795 0.13 20 -59.0407311583 -0.0396240792581 0.0429193426013 0.13 20 -60.0768385015 -0.0396240792581 0.0482695743768 0.13 20 -61.2849009983 -0.0396240792581 0.0542867543932 0.13 20 -62.6988254363 -0.0396240792581 0.0610540229659 0.13 20 -64.3605416296 -0.0396240792581 0.0686648845004 0.13 20 -66.3222246666 -0.0396240792581 0.0772244994584 0.13 20 -68.6492147851 -0.0396240792581 0.0868511373751 0.13 20 -71.4238778603 -0.0396240792581 0.0976778110089 0.13 20 -74.7507425957 -0.0396240792581 0.109854114199 0.13 20 -78.7633829894 -0.0396240792581 0.123548288826 0.13 20 -83.6337051612 -0.0396240792581 0.138949549437 0.13 20 -89.5845750631 -0.0396240792581 0.156270697655 0.13 20 -96.9071336871 -0.0396240792581 0.175751062485 0.13 20 -105.984763566 -0.0396240792581 0.19765980717 0.13 20 -117.326619577 -0.0396240792581 0.222299648253 0.13 20 -131.615135563 -0.0396240792581 0.250011038262 0.13 20 -149.774358679 -0.0396240792581 0.281176869797 0.13 20 -173.070086678 -0.0396240792581 0.316227766017 0.13 20 -203.260055486 -0.0454090961097 0.001 0.13 20 -52.1054371303 -0.0454090961097 0.00112465782212 0.13 20 -52.1254824618 -0.0454090961097 0.00126485521686 0.13 20 -52.1480513313 -0.0454090961097 0.00142252931349 0.13 20 -52.1734648868 -0.0454090961097 0.00159985871961 0.13 20 -52.202086058 -0.0454090961097 0.00179929362329 0.13 20 -52.2343252311 -0.0454090961097 0.00202358964773 0.13 20 -52.270646756 -0.0454090961097 0.00227584592607 0.13 20 -52.3115764235 -0.0454090961097 0.0025595479227 0.13 20 -52.357710076 -0.0454090961097 0.00287861559235 0.13 20 -52.409723548 -0.0454090961097 0.00323745754282 0.13 20 -52.4683841722 -0.0454090961097 0.00364103194931 0.13 20 -52.5345641332 -0.0454090961097 0.00409491506238 0.13 20 -52.6092560163 -0.0454090961097 0.00460537825582 0.13 20 -52.6935909657 -0.0454090961097 0.00517947467923 0.13 20 -52.7888599668 -0.0454090961097 0.00582513671247 0.13 20 -52.8965388779 -0.0454090961097 0.0065512855686 0.13 20 -53.0183179842 -0.0454090961097 0.00736795455966 0.13 20 -53.1561370322 -0.0454090961097 0.00828642772855 0.13 20 -53.3122269302 -0.0454090961097 0.00931939576234 0.13 20 -53.4891596023 -0.0454090961097 0.0104811313415 0.13 20 -53.6899078531 -0.0454090961097 0.0117876863479 0.13 20 -53.9179175862 -0.0454090961097 0.0132571136559 0.13 20 -54.1771953372 -0.0454090961097 0.0149097165718 0.13 20 -54.4724148825 -0.0454090961097 0.0167683293681 0.13 20 -54.8090477204 -0.0454090961097 0.0188586327877 0.13 20 -55.193523572 -0.0454090961097 0.0212095088792 0.13 20 -55.6334288142 -0.0454090961097 0.0238534400643 0.13 20 -56.1377530761 -0.0454090961097 0.0268269579528 0.13 20 -56.7171972917 -0.0454090961097 0.0301711481053 0.13 20 -57.3845605645 -0.0454090961097 0.033932217719 0.13 20 -58.1552286094 -0.0454090961097 0.0381621340795 0.13 20 -59.0477937952 -0.0454090961097 0.0429193426013 0.13 20 -60.0848465778 -0.0454090961097 0.0482695743768 0.13 20 -61.2939913457 -0.0454090961097 0.0542867543932 0.13 20 -62.7091577227 -0.0454090961097 0.0610540229659 0.13 20 -64.3723030641 -0.0454090961097 0.0686648845004 0.13 20 -66.3356359253 -0.0454090961097 0.0772244994584 0.13 20 -68.6645375449 -0.0454090961097 0.0868511373751 0.13 20 -71.4414244631 -0.0454090961097 0.0976778110089 0.13 20 -74.7708885655 -0.0454090961097 0.109854114199 0.13 20 -78.7865833972 -0.0454090961097 0.123548288826 0.13 20 -83.6605162328 -0.0454090961097 0.138949549437 0.13 20 -89.6156829955 -0.0454090961097 0.156270697655 0.13 20 -96.9433934815 -0.0454090961097 0.175751062485 0.13 20 -106.027251941 -0.0454090961097 0.19765980717 0.13 20 -117.376707936 -0.0454090961097 0.222299648253 0.13 20 -131.674591978 -0.0454090961097 0.250011038262 0.13 20 -149.845492648 -0.0454090961097 0.281176869797 0.13 20 -173.155958426 -0.0454090961097 0.316227766017 0.13 20 -203.36478546 -0.0520387110088 0.001 0.13 20 -52.1056104043 -0.0520387110088 0.00112465782212 0.13 20 -52.1256773688 -0.0520387110088 0.00126485521686 0.13 20 -52.1482705767 -0.0520387110088 0.00142252931349 0.13 20 -52.1737115157 -0.0520387110088 0.00159985871961 0.13 20 -52.2023634981 -0.0520387110088 0.00179929362329 0.13 20 -52.234637341 -0.0520387110088 0.00202358964773 0.13 20 -52.2709978801 -0.0520387110088 0.00227584592607 0.13 20 -52.3119714538 -0.0520387110088 0.0025595479227 0.13 20 -52.3581545219 -0.0520387110088 0.00287861559235 0.13 20 -52.4102236156 -0.0520387110088 0.00323745754282 0.13 20 -52.4689468531 -0.0520387110088 0.00364103194931 0.13 20 -52.5351973066 -0.0520387110088 0.00409491506238 0.13 20 -52.609968563 -0.0520387110088 0.00460537825582 0.13 20 -52.694392899 -0.0520387110088 0.00517947467923 0.13 20 -52.7897625801 -0.0520387110088 0.00582513671247 0.13 20 -52.897554913 -0.0520387110088 0.0065512855686 0.13 20 -53.0194618233 -0.0520387110088 0.00736795455966 0.13 20 -53.1574249159 -0.0520387110088 0.00828642772855 0.13 20 -53.313677208 -0.0520387110088 0.00931939576234 0.13 20 -53.4907930182 -0.0520387110088 0.0104811313415 0.13 20 -53.6917478741 -0.0520387110088 0.0117876863479 0.13 20 -53.9199907796 -0.0520387110088 0.0132571136559 0.13 20 -54.1795318066 -0.0520387110088 0.0149097165718 0.13 20 -54.4750487716 -0.0520387110088 0.0167683293681 0.13 20 -54.8120177983 -0.0520387110088 0.0188586327877 0.13 20 -55.1968739156 -0.0520387110088 0.0212095088792 0.13 20 -55.6372096066 -0.0520387110088 0.0238534400643 0.13 20 -56.1420215459 -0.0520387110088 0.0268269579528 0.13 20 -56.7220188235 -0.0520387110088 0.0301711481053 0.13 20 -57.3900100185 -0.0520387110088 0.033932217719 0.13 20 -58.1613919005 -0.0520387110088 0.0381621340795 0.13 20 -59.0547697943 -0.0520387110088 0.0429193426013 0.13 20 -60.0927494173 -0.0520387110088 0.0482695743768 0.13 20 -61.3029532369 -0.0520387110088 0.0542867543932 0.13 20 -62.7193324273 -0.0520387110088 0.0610540229659 0.13 20 -64.3838702057 -0.0520387110088 0.0686648845004 0.13 20 -66.3488063951 -0.0520387110088 0.0772244994584 0.13 20 -68.6795603383 -0.0520387110088 0.0868511373751 0.13 20 -71.458595411 -0.0520387110088 0.0976778110089 0.13 20 -74.7905615911 -0.0520387110088 0.109854114199 0.13 20 -78.8091851747 -0.0520387110088 0.123548288826 0.13 20 -83.6865654703 -0.0520387110088 0.138949549437 0.13 20 -89.6458160657 -0.0520387110088 0.156270697655 0.13 20 -96.9783988645 -0.0520387110088 0.175751062485 0.13 20 -106.068117043 -0.0520387110088 0.19765980717 0.13 20 -117.424683536 -0.0520387110088 0.222299648253 0.13 20 -131.731282178 -0.0520387110088 0.250011038262 0.13 20 -149.912982469 -0.0520387110088 0.281176869797 0.13 20 -173.236998271 -0.0520387110088 0.316227766017 0.13 20 -203.463064071 -0.0596362331659 0.001 0.13 20 -52.1057837352 -0.0596362331659 0.00112465782212 0.13 20 -52.1258723354 -0.0596362331659 0.00126485521686 0.13 20 -52.1484898839 -0.0596362331659 0.00142252931349 0.13 20 -52.1739582073 -0.0596362331659 0.00159985871961 0.13 20 -52.202641 -0.0596362331659 0.00179929362329 0.13 20 -52.2349495095 -0.0596362331659 0.00202358964773 0.13 20 -52.2713490563 -0.0596362331659 0.00227584592607 0.13 20 -52.3123665252 -0.0596362331659 0.0025595479227 0.13 20 -52.3585989919 -0.0596362331659 0.00287861559235 0.13 20 -52.4107236821 -0.0596362331659 0.00323745754282 0.13 20 -52.4695094973 -0.0596362331659 0.00364103194931 0.13 20 -52.5358303934 -0.0596362331659 0.00409491506238 0.13 20 -52.6106809553 -0.0596362331659 0.00460537825582 0.13 20 -52.695194586 -0.0596362331659 0.00517947467923 0.13 20 -52.7906648244 -0.0596362331659 0.00582513671247 0.13 20 -52.8985704164 -0.0596362331659 0.0065512855686 0.13 20 -53.0206049161 -0.0596362331659 0.00736795455966 0.13 20 -53.1587117722 -0.0596362331659 0.00828642772855 0.13 20 -53.3151260911 -0.0596362331659 0.00931939576234 0.13 20 -53.4924245616 -0.0596362331659 0.0104811313415 0.13 20 -53.6935854025 -0.0596362331659 0.0117876863479 0.13 20 -53.9220606777 -0.0596362331659 0.0132571136559 0.13 20 -54.1818639431 -0.0596362331659 0.0149097165718 0.13 20 -54.4776769886 -0.0596362331659 0.0167683293681 0.13 20 -54.8149804776 -0.0596362331659 0.0188586327877 0.13 20 -55.200214636 -0.0596362331659 0.0212095088792 0.13 20 -55.6409779111 -0.0596362331659 0.0238534400643 0.13 20 -56.1462738392 -0.0596362331659 0.0268269579528 0.13 20 -56.726819429 -0.0596362331659 0.0301711481053 0.13 20 -57.3954324283 -0.0596362331659 0.033932217719 0.13 20 -58.1675202628 -0.0596362331659 0.0381621340795 0.13 20 -59.0617006955 -0.0596362331659 0.0429193426013 0.13 20 -60.10059403 -0.0596362331659 0.0482695743768 0.13 20 -61.3118399309 -0.0596362331659 0.0542867543932 0.13 20 -62.7294099661 -0.0596362331659 0.0610540229659 0.13 20 -64.3953116954 -0.0596362331659 0.0686648845004 0.13 20 -66.3618142045 -0.0596362331659 0.0772244994584 0.13 20 -68.6943722873 -0.0596362331659 0.0868511373751 0.13 20 -71.475492629 -0.0596362331659 0.0976778110089 0.13 20 -74.8098785959 -0.0596362331659 0.109854114199 0.13 20 -78.8313229333 -0.0596362331659 0.123548288826 0.13 20 -83.7120084998 -0.0596362331659 0.138949549437 0.13 20 -89.6751550735 -0.0596362331659 0.156270697655 0.13 20 -97.0123610602 -0.0596362331659 0.175751062485 0.13 20 -106.107607216 -0.0596362331659 0.19765980717 0.13 20 -117.470840457 -0.0596362331659 0.222299648253 0.13 20 -131.785557166 -0.0596362331659 0.250011038262 0.13 20 -149.977250703 -0.0596362331659 0.281176869797 0.13 20 -173.313719621 -0.0596362331659 0.316227766017 0.13 20 -203.555521153 -0.0683429746295 0.001 0.13 20 -52.1059586905 -0.0683429746295 0.00112465782212 0.13 20 -52.1260691251 -0.0683429746295 0.00126485521686 0.13 20 -52.1487112362 -0.0683429746295 0.00142252931349 0.13 20 -52.1742071925 -0.0683429746295 0.00159985871961 0.13 20 -52.2029210733 -0.0683429746295 0.00179929362329 0.13 20 -52.2352645595 -0.0683429746295 0.00202358964773 0.13 20 -52.2717034601 -0.0683429746295 0.00227584592607 0.13 20 -52.3127652099 -0.0683429746295 0.0025595479227 0.13 20 -52.3590475045 -0.0683429746295 0.00287861559235 0.13 20 -52.4112282684 -0.0683429746295 0.00323745754282 0.13 20 -52.4700771909 -0.0683429746295 0.00364103194931 0.13 20 -52.5364691163 -0.0683429746295 0.00409491506238 0.13 20 -52.6113996317 -0.0683429746295 0.00460537825582 0.13 20 -52.6960032717 -0.0683429746295 0.00517947467923 0.13 20 -52.7915748524 -0.0683429746295 0.00582513671247 0.13 20 -52.899594563 -0.0683429746295 0.0065512855686 0.13 20 -53.0217575888 -0.0683429746295 0.00736795455966 0.13 20 -53.1600092239 -0.0683429746295 0.00828642772855 0.13 20 -53.3165866635 -0.0683429746295 0.00931939576234 0.13 20 -53.4940689629 -0.0683429746295 0.0104811313415 0.13 20 -53.6954370247 -0.0683429746295 0.0117876863479 0.13 20 -53.9241459595 -0.0683429746295 0.0132571136559 0.13 20 -54.1842127864 -0.0683429746295 0.0149097165718 0.13 20 -54.4803232372 -0.0683429746295 0.0167683293681 0.13 20 -54.8179624693 -0.0683429746295 0.0188586327877 0.13 20 -55.2035758419 -0.0683429746295 0.0212095088792 0.13 20 -55.6447676766 -0.0683429746295 0.0238534400643 0.13 20 -56.1505482491 -0.0683429746295 0.0268269579528 0.13 20 -56.7316423196 -0.0683429746295 0.0301711481053 0.13 20 -57.4008765786 -0.0683429746295 0.033932217719 0.13 20 -58.1736688046 -0.0683429746295 0.0381621340795 0.13 20 -59.0686487907 -0.0683429746295 0.0429193426013 0.13 20 -60.1084508818 -0.0683429746295 0.0482695743768 0.13 20 -61.3207312104 -0.0683429746295 0.0542867543932 0.13 20 -62.7394807642 -0.0683429746295 0.0610540229659 0.13 20 -64.4067301439 -0.0683429746295 0.0686648845004 0.13 20 -66.374775956 -0.0683429746295 0.0772244994584 0.13 20 -68.7091061118 -0.0683429746295 0.0868511373751 0.13 20 -71.4922674722 -0.0683429746295 0.0976778110089 0.13 20 -74.8290125732 -0.0683429746295 0.109854114199 0.13 20 -78.8531949112 -0.0683429746295 0.123548288826 0.13 20 -83.7370731733 -0.0683429746295 0.138949549437 0.13 20 -89.7039628175 -0.0683429746295 0.156270697655 0.13 20 -97.0455843796 -0.0683429746295 0.175751062485 0.13 20 -106.146076435 -0.0683429746295 0.19765980717 0.13 20 -117.515592533 -0.0683429746295 0.222299648253 0.13 20 -131.837903492 -0.0683429746295 0.250011038262 0.13 20 -150.038872916 -0.0683429746295 0.281176869797 0.13 20 -173.386807829 -0.0683429746295 0.316227766017 0.13 20 -203.642978368 -0.0783208786546 0.001 0.13 20 -52.1061374402 -0.0783208786546 0.00112465782212 0.13 20 -52.1262701783 -0.0783208786546 0.00126485521686 0.13 20 -52.1489373789 -0.0783208786546 0.00142252931349 0.13 20 -52.1744615594 -0.0783208786546 0.00159985871961 0.13 20 -52.2032071917 -0.0783208786546 0.00179929362329 0.13 20 -52.2355863989 -0.0783208786546 0.00202358964773 0.13 20 -52.2720654876 -0.0783208786546 0.00227584592607 0.13 20 -52.3131724535 -0.0783208786546 0.0025595479227 0.13 20 -52.359505624 -0.0783208786546 0.00287861559235 0.13 20 -52.4117436349 -0.0783208786546 0.00323745754282 0.13 20 -52.4706569778 -0.0783208786546 0.00364103194931 0.13 20 -52.5371214011 -0.0783208786546 0.00409491506238 0.13 20 -52.6121335114 -0.0783208786546 0.00460537825582 0.13 20 -52.6968289933 -0.0783208786546 0.00517947467923 0.13 20 -52.7925039607 -0.0783208786546 0.00582513671247 0.13 20 -52.9006400677 -0.0783208786546 0.0065512855686 0.13 20 -53.0229341543 -0.0783208786546 0.00736795455966 0.13 20 -53.1613333845 -0.0783208786546 0.00828642772855 0.13 20 -53.3180770681 -0.0783208786546 0.00931939576234 0.13 20 -53.4957466533 -0.0783208786546 0.0104811313415 0.13 20 -53.6973257525 -0.0783208786546 0.0117876863479 0.13 20 -53.9262725484 -0.0783208786546 0.0132571136559 0.13 20 -54.1866075459 -0.0783208786546 0.0149097165718 0.13 20 -54.4830204373 -0.0783208786546 0.0167683293681 0.13 20 -54.8210008858 -0.0783208786546 0.0188586327877 0.13 20 -55.2069993844 -0.0783208786546 0.0212095088792 0.13 20 -55.6486261152 -0.0783208786546 0.0238534400643 0.13 20 -56.1548980566 -0.0783208786546 0.0268269579528 0.13 20 -56.7365476529 -0.0783208786546 0.0301711481053 0.13 20 -57.4064104273 -0.0783208786546 0.033932217719 0.13 20 -58.1799143406 -0.0783208786546 0.0381621340795 0.13 20 -59.0757009652 -0.0783208786546 0.0429193426013 0.13 20 -60.116418325 -0.0783208786546 0.0482695743768 0.13 20 -61.3297385075 -0.0783208786546 0.0542867543932 0.13 20 -62.749671202 -0.0783208786546 0.0610540229659 0.13 20 -64.4182690523 -0.0783208786546 0.0686648845004 0.13 20 -66.3878548095 -0.0783208786546 0.0772244994584 0.13 20 -68.7239476087 -0.0783208786546 0.0868511373751 0.13 20 -71.5091318881 -0.0783208786546 0.0976778110089 0.13 20 -74.8482057901 -0.0783208786546 0.109854114199 0.13 20 -78.8750786731 -0.0783208786546 0.123548288826 0.13 20 -83.7620783352 -0.0783208786546 0.138949549437 0.13 20 -89.7326066626 -0.0783208786546 0.156270697655 0.13 20 -97.0784935363 -0.0783208786546 0.175751062485 0.13 20 -106.184017604 -0.0783208786546 0.19765980717 0.13 20 -117.55951428 -0.0783208786546 0.222299648253 0.13 20 -131.888994001 -0.0783208786546 0.250011038262 0.13 20 -150.098641253 -0.0783208786546 0.281176869797 0.13 20 -173.457200767 -0.0783208786546 0.316227766017 0.13 20 -203.726552729 -0.0897555318082 0.001 0.13 20 -52.1063227553 -0.0897555318082 0.00112465782212 0.13 20 -52.1264786124 -0.0897555318082 0.00126485521686 0.13 20 -52.1491718186 -0.0897555318082 0.00142252931349 0.13 20 -52.1747252526 -0.0897555318082 0.00159985871961 0.13 20 -52.2035037927 -0.0897555318082 0.00179929362329 0.13 20 -52.2359200195 -0.0897555318082 0.00202358964773 0.13 20 -52.2724407551 -0.0897555318082 0.00227584592607 0.13 20 -52.3135945748 -0.0897555318082 0.0025595479227 0.13 20 -52.3599804595 -0.0897555318082 0.00287861559235 0.13 20 -52.4122777808 -0.0897555318082 0.00323745754282 0.13 20 -52.4712578592 -0.0897555318082 0.00364103194931 0.13 20 -52.5377973772 -0.0897555318082 0.00409491506238 0.13 20 -52.612893994 -0.0897555318082 0.00460537825582 0.13 20 -52.6976845813 -0.0897555318082 0.00517947467923 0.13 20 -52.7934665913 -0.0897555318082 0.00582513671247 0.13 20 -52.9017231884 -0.0897555318082 0.0065512855686 0.13 20 -53.024152917 -0.0897555318082 0.00736795455966 0.13 20 -53.1627048654 -0.0897555318082 0.00828642772855 0.13 20 -53.3196205176 -0.0897555318082 0.00931939576234 0.13 20 -53.4974837793 -0.0897555318082 0.0104811313415 0.13 20 -53.6992810429 -0.0897555318082 0.0117876863479 0.13 20 -53.9284736381 -0.0897555318082 0.0132571136559 0.13 20 -54.1890856355 -0.0897555318082 0.0149097165718 0.13 20 -54.4858107713 -0.0897555318082 0.0167683293681 0.13 20 -54.8241433005 -0.0897555318082 0.0188586327877 0.13 20 -55.2105389365 -0.0897555318082 0.0212095088792 0.13 20 -55.6526138055 -0.0897555318082 0.0238534400643 0.13 20 -56.1593916656 -0.0897555318082 0.0268269579528 0.13 20 -56.7416127088 -0.0897555318082 0.0301711481053 0.13 20 -57.4121213321 -0.0897555318082 0.033932217719 0.13 20 -58.1863556859 -0.0897555318082 0.0381621340795 0.13 20 -59.0829690776 -0.0897555318082 0.0429193426013 0.13 20 -60.1246230905 -0.0897555318082 0.0482695743768 0.13 20 -61.3390055399 -0.0897555318082 0.0542867543932 0.13 20 -62.7601444375 -0.0897555318082 0.0610540229659 0.13 20 -64.430113877 -0.0897555318082 0.0686648845004 0.13 20 -66.4012618615 -0.0897555318082 0.0772244994584 0.13 20 -68.7391374407 -0.0897555318082 0.0868511373751 0.13 20 -71.5263607408 -0.0897555318082 0.0976778110089 0.13 20 -74.8677728133 -0.0897555318082 0.109854114199 0.13 20 -78.8973350569 -0.0897555318082 0.123548288826 0.13 20 -83.7874389876 -0.0897555318082 0.138949549437 0.13 20 -89.7615653237 -0.0897555318082 0.156270697655 0.13 20 -97.1116425916 -0.0897555318082 0.175751062485 0.13 20 -106.222074414 -0.0897555318082 0.19765980717 0.13 20 -117.603356689 -0.0897555318082 0.222299648253 0.13 20 -131.939709022 -0.0897555318082 0.250011038262 0.13 20 -150.157593086 -0.0897555318082 0.281176869797 0.13 20 -173.52612795 -0.0897555318082 0.316227766017 0.13 20 -203.807710662 -0.102859615834 0.001 0.13 20 -52.1065179049 -0.102859615834 0.00112465782212 0.13 20 -52.1266981045 -0.102859615834 0.00126485521686 0.13 20 -52.1494186919 -0.102859615834 0.00142252931349 0.13 20 -52.1750029257 -0.102859615834 0.00159985871961 0.13 20 -52.2038161115 -0.102859615834 0.00179929362329 0.13 20 -52.2362713115 -0.102859615834 0.00202358964773 0.13 20 -52.272835889 -0.102859615834 0.00227584592607 0.13 20 -52.3140390296 -0.102859615834 0.0025595479227 0.13 20 -52.3604804004 -0.102859615834 0.00287861559235 0.13 20 -52.4128401464 -0.102859615834 0.00323745754282 0.13 20 -52.4718904585 -0.102859615834 0.00364103194931 0.13 20 -52.5385090002 -0.102859615834 0.00409491506238 0.13 20 -52.6136945359 -0.102859615834 0.00460537825582 0.13 20 -52.6985851823 -0.102859615834 0.00517947467923 0.13 20 -52.7944797957 -0.102859615834 0.00582513671247 0.13 20 -52.9028631232 -0.102859615834 0.0065512855686 0.13 20 -53.0254354944 -0.102859615834 0.00736795455966 0.13 20 -53.1641480123 -0.102859615834 0.00828642772855 0.13 20 -53.3212444347 -0.102859615834 0.00931939576234 0.13 20 -53.4993112359 -0.102859615834 0.0104811313415 0.13 20 -53.7013377103 -0.102859615834 0.0117876863479 0.13 20 -53.9307884694 -0.102859615834 0.0132571136559 0.13 20 -54.1916912973 -0.102859615834 0.0149097165718 0.13 20 -54.4887441357 -0.102859615834 0.0167683293681 0.13 20 -54.8274460065 -0.102859615834 0.0188586327877 0.13 20 -55.214258033 -0.102859615834 0.0212095088792 0.13 20 -55.6568024877 -0.102859615834 0.0238534400643 0.13 20 -56.1641101221 -0.102859615834 0.0268269579528 0.13 20 -56.746929098 -0.102859615834 0.0301711481053 0.13 20 -57.4181129118 -0.102859615834 0.033932217719 0.13 20 -58.1931101261 -0.102859615834 0.0381621340795 0.13 20 -59.0905859902 -0.102859615834 0.0429193426013 0.13 20 -60.1332158242 -0.102859615834 0.0482695743768 0.13 20 -61.3487032945 -0.102859615834 0.0542867543932 0.13 20 -62.7710947721 -0.102859615834 0.0610540229659 0.13 20 -64.4424857045 -0.102859615834 0.0686648845004 0.13 20 -66.4152490511 -0.102859615834 0.0772244994584 0.13 20 -68.7549631887 -0.102859615834 0.0868511373751 0.13 20 -71.5442829199 -0.102859615834 0.0976778110089 0.13 20 -74.8880905844 -0.102859615834 0.109854114199 0.13 20 -78.920397127 -0.102859615834 0.123548288826 0.13 20 -83.8136540395 -0.102859615834 0.138949549437 0.13 20 -89.7914153471 -0.102859615834 0.156270697655 0.13 20 -97.1457001417 -0.102859615834 0.175751062485 0.13 20 -106.261025265 -0.102859615834 0.19765980717 0.13 20 -117.648030026 -0.102859615834 0.222299648253 0.13 20 -131.991118347 -0.102859615834 0.250011038262 0.13 20 -150.216992754 -0.102859615834 0.281176869797 0.13 20 -173.595093057 -0.102859615834 0.316227766017 0.13 20 -203.888253117 -0.117876863479 0.001 0.13 20 -52.1067264458 -0.117876863479 0.00112465782212 0.13 20 -52.1269326558 -0.117876863479 0.00126485521686 0.13 20 -52.1496824999 -0.117876863479 0.00142252931349 0.13 20 -52.1752996421 -0.117876863479 0.00159985871961 0.13 20 -52.2041498448 -0.117876863479 0.00179929362329 0.13 20 -52.2366466837 -0.117876863479 0.00202358964773 0.13 20 -52.2732581006 -0.117876863479 0.00227584592607 0.13 20 -52.3145139316 -0.117876863479 0.0025595479227 0.13 20 -52.3610145766 -0.117876863479 0.00287861559235 0.13 20 -52.4134410054 -0.117876863479 0.00323745754282 0.13 20 -52.4725663379 -0.117876863479 0.00364103194931 0.13 20 -52.5392692835 -0.117876863479 0.00409491506238 0.13 20 -52.6145497847 -0.117876863479 0.00460537825582 0.13 20 -52.6995472856 -0.117876863479 0.00517947467923 0.13 20 -52.7955621382 -0.117876863479 0.00582513671247 0.13 20 -52.9040807752 -0.117876863479 0.0065512855686 0.13 20 -53.0268054269 -0.117876863479 0.00736795455966 0.13 20 -53.1656893398 -0.117876863479 0.00828642772855 0.13 20 -53.3229786901 -0.117876863479 0.00931939576234 0.13 20 -53.5012626811 -0.117876863479 0.0104811313415 0.13 20 -53.7035336897 -0.117876863479 0.0117876863479 0.13 20 -53.9332598092 -0.117876863479 0.0132571136559 0.13 20 -54.1944727599 -0.117876863479 0.0149097165718 0.13 20 -54.4918749365 -0.117876863479 0.0167683293681 0.13 20 -54.8309704025 -0.117876863479 0.0188586327877 0.13 20 -55.2182259936 -0.117876863479 0.0212095088792 0.13 20 -55.6612704623 -0.117876863479 0.0238534400643 0.13 20 -56.1691419189 -0.117876863479 0.0268269579528 0.13 20 -56.7525968938 -0.117876863479 0.0301711481053 0.13 20 -57.4244984143 -0.117876863479 0.033932217719 0.13 20 -58.2003059172 -0.117876863479 0.0381621340795 0.13 20 -59.0986970844 -0.117876863479 0.0429193426013 0.13 20 -60.1423614824 -0.117876863479 0.0482695743768 0.13 20 -61.3590191469 -0.117876863479 0.0542867543932 0.13 20 -62.7827353151 -0.117876863479 0.0610540229659 0.13 20 -64.4556272554 -0.117876863479 0.0686648845004 0.13 20 -66.4300932671 -0.117876863479 0.0772244994584 0.13 20 -68.7717412892 -0.117876863479 0.0868511373751 0.13 20 -71.5632607938 -0.117876863479 0.0976778110089 0.13 20 -74.9095750232 -0.117876863479 0.109854114199 0.13 20 -78.9447435047 -0.117876863479 0.123548288826 0.13 20 -83.841275876 -0.117876863479 0.138949549437 0.13 20 -89.8227963528 -0.117876863479 0.156270697655 0.13 20 -97.1814095757 -0.117876863479 0.175751062485 0.13 20 -106.301737784 -0.117876863479 0.19765980717 0.13 20 -117.694551723 -0.117876863479 0.222299648253 0.13 20 -132.044421488 -0.117876863479 0.250011038262 0.13 20 -150.278263016 -0.117876863479 0.281176869797 0.13 20 -173.665795267 -0.117876863479 0.316227766017 0.13 20 -203.970225273 -0.135086591867 0.001 0.13 20 -52.1069519354 -0.135086591867 0.00112465782212 0.13 20 -52.1271862683 -0.135086591867 0.00126485521686 0.13 20 -52.1499677446 -0.135086591867 0.00142252931349 0.13 20 -52.1756204669 -0.135086591867 0.00159985871961 0.13 20 -52.2045106909 -0.135086591867 0.00179929362329 0.13 20 -52.2370525475 -0.135086591867 0.00202358964773 0.13 20 -52.2737146032 -0.135086591867 0.00227584592607 0.13 20 -52.3150273974 -0.135086591867 0.0025595479227 0.13 20 -52.3615921217 -0.135086591867 0.00287861559235 0.13 20 -52.4140906369 -0.135086591867 0.00323745754282 0.13 20 -52.473297066 -0.135086591867 0.00364103194931 0.13 20 -52.540091248 -0.135086591867 0.00409491506238 0.13 20 -52.6154743978 -0.135086591867 0.00460537825582 0.13 20 -52.7005873924 -0.135086591867 0.00517947467923 0.13 20 -52.7967321979 -0.135086591867 0.00582513671247 0.13 20 -52.9053970664 -0.135086591867 0.0065512855686 0.13 20 -53.0282862786 -0.135086591867 0.00736795455966 0.13 20 -53.1673553925 -0.135086591867 0.00828642772855 0.13 20 -53.3248531914 -0.135086591867 0.00931939576234 0.13 20 -53.5033718202 -0.135086591867 0.0104811313415 0.13 20 -53.7059069753 -0.135086591867 0.0117876863479 0.13 20 -53.9359304987 -0.135086591867 0.0132571136559 0.13 20 -54.1974783458 -0.135086591867 0.0149097165718 0.13 20 -54.4952576991 -0.135086591867 0.0167683293681 0.13 20 -54.8347780376 -0.135086591867 0.0188586327877 0.13 20 -55.2225123282 -0.135086591867 0.0212095088792 0.13 20 -55.6660962706 -0.135086591867 0.0238534400643 0.13 20 -56.1745758545 -0.135086591867 0.0268269579528 0.13 20 -56.7587165576 -0.135086591867 0.0301711481053 0.13 20 -57.4313915801 -0.135086591867 0.033932217719 0.13 20 -58.2080719428 -0.135086591867 0.0381621340795 0.13 20 -59.1074485402 -0.135086591867 0.0429193426013 0.13 20 -60.1522260392 -0.135086591867 0.0482695743768 0.13 20 -61.3701417719 -0.135086591867 0.0542867543932 0.13 20 -62.7952808372 -0.135086591867 0.0610540229659 0.13 20 -64.4697833785 -0.135086591867 0.0686648845004 0.13 20 -66.4460741283 -0.135086591867 0.0772244994584 0.13 20 -68.7897916875 -0.135086591867 0.0868511373751 0.13 20 -71.583661251 -0.135086591867 0.0976778110089 0.13 20 -74.9326478867 -0.135086591867 0.109854114199 0.13 20 -78.9708603706 -0.135086591867 0.123548288826 0.13 20 -83.8708667019 -0.135086591867 0.138949549437 0.13 20 -89.8563607619 -0.135086591867 0.156270697655 0.13 20 -97.2195310363 -0.135086591867 0.175751062485 0.13 20 -106.345101622 -0.135086591867 0.19765980717 0.13 20 -117.743968322 -0.135086591867 0.222299648253 0.13 20 -132.100856655 -0.135086591867 0.250011038262 0.13 20 -150.342878458 -0.135086591867 0.281176869797 0.13 20 -173.740003748 -0.135086591867 0.316227766017 0.13 20 -204.055767837 -0.154808897723 0.001 0.13 20 -52.1071976297 -0.154808897723 0.00112465782212 0.13 20 -52.1274626047 -0.154808897723 0.00126485521686 0.13 20 -52.1502785467 -0.154808897723 0.00142252931349 0.13 20 -52.1759700359 -0.154808897723 0.00159985871961 0.13 20 -52.2049038655 -0.154808897723 0.00179929362329 0.13 20 -52.2374947711 -0.154808897723 0.00202358964773 0.13 20 -52.2742119999 -0.154808897723 0.00227584592607 0.13 20 -52.3155868575 -0.154808897723 0.0025595479227 0.13 20 -52.3622213974 -0.154808897723 0.00287861559235 0.13 20 -52.414798451 -0.154808897723 0.00323745754282 0.13 20 -52.474093234 -0.154808897723 0.00364103194931 0.13 20 -52.5409868158 -0.154808897723 0.00409491506238 0.13 20 -52.6164817963 -0.154808897723 0.00460537825582 0.13 20 -52.7017206131 -0.154808897723 0.00517947467923 0.13 20 -52.79800699 -0.154808897723 0.00582513671247 0.13 20 -52.9068311596 -0.154808897723 0.0065512855686 0.13 20 -53.0298996343 -0.154808897723 0.00736795455966 0.13 20 -53.1691704883 -0.154808897723 0.00828642772855 0.13 20 -53.3268953421 -0.154808897723 0.00931939576234 0.13 20 -53.5056695405 -0.154808897723 0.0104811313415 0.13 20 -53.7084923912 -0.154808897723 0.0117876863479 0.13 20 -53.938839813 -0.154808897723 0.0132571136559 0.13 20 -54.2007523655 -0.154808897723 0.0149097165718 0.13 20 -54.4989424341 -0.154808897723 0.0167683293681 0.13 20 -54.8389253813 -0.154808897723 0.0188586327877 0.13 20 -55.2271808315 -0.154808897723 0.0212095088792 0.13 20 -55.6713520232 -0.154808897723 0.0238534400643 0.13 20 -56.1804934911 -0.154808897723 0.0268269579528 0.13 20 -56.765380408 -0.154808897723 0.0301711481053 0.13 20 -57.4388969872 -0.154808897723 0.033932217719 0.13 20 -58.2165267753 -0.154808897723 0.0381621340795 0.13 20 -59.1169749354 -0.154808897723 0.0429193426013 0.13 20 -60.162962415 -0.154808897723 0.0482695743768 0.13 20 -61.3822451583 -0.154808897723 0.0542867543932 0.13 20 -62.8089295891 -0.154808897723 0.0610540229659 0.13 20 -64.4851803435 -0.154808897723 0.0686648845004 0.13 20 -66.4634503661 -0.154808897723 0.0772244994584 0.13 20 -68.8094108576 -0.154808897723 0.0868511373751 0.13 20 -71.6058248213 -0.154808897723 0.0976778110089 0.13 20 -74.9577013562 -0.154808897723 0.109854114199 0.13 20 -78.9992007578 -0.154808897723 0.123548288826 0.13 20 -83.9029516297 -0.154808897723 0.138949549437 0.13 20 -89.8927195756 -0.154808897723 0.156270697655 0.13 20 -97.2607785463 -0.154808897723 0.175751062485 0.13 20 -106.391955276 -0.154808897723 0.19765980717 0.13 20 -117.79726993 -0.154808897723 0.222299648253 0.13 20 -132.161600268 -0.154808897723 0.250011038262 0.13 20 -150.412246732 -0.154808897723 0.281176869797 0.13 20 -173.81941634 -0.154808897723 0.316227766017 0.13 20 -204.146947401 -0.177410611097 0.001 0.13 20 -52.1074662313 -0.177410611097 0.00112465782212 0.13 20 -52.1277647054 -0.177410611097 0.00126485521686 0.13 20 -52.1506183266 -0.177410611097 0.00142252931349 0.13 20 -52.1763521972 -0.177410611097 0.00159985871961 0.13 20 -52.2053336982 -0.177410611097 0.00179929362329 0.13 20 -52.2379782263 -0.177410611097 0.00202358964773 0.13 20 -52.2747557728 -0.177410611097 0.00227584592607 0.13 20 -52.3161984807 -0.177410611097 0.0025595479227 0.13 20 -52.3629093462 -0.177410611097 0.00287861559235 0.13 20 -52.4155722617 -0.177410611097 0.00323745754282 0.13 20 -52.4749636375 -0.177410611097 0.00364103194931 0.13 20 -52.541965888 -0.177410611097 0.00409491506238 0.13 20 -52.6175831277 -0.177410611097 0.00460537825582 0.13 20 -52.7029595001 -0.177410611097 0.00517947467923 0.13 20 -52.7994006506 -0.177410611097 0.00582513671247 0.13 20 -52.9083989771 -0.177410611097 0.0065512855686 0.13 20 -53.0316634321 -0.177410611097 0.00736795455966 0.13 20 -53.1711548404 -0.177410611097 0.00828642772855 0.13 20 -53.3291279241 -0.177410611097 0.00931939576234 0.13 20 -53.5081815268 -0.177410611097 0.0104811313415 0.13 20 -53.7113189037 -0.177410611097 0.0117876863479 0.13 20 -53.94202043 -0.177410611097 0.0132571136559 0.13 20 -54.2043316983 -0.177410611097 0.0149097165718 0.13 20 -54.5029707811 -0.177410611097 0.0167683293681 0.13 20 -54.8434594712 -0.177410611097 0.0188586327877 0.13 20 -55.2322846678 -0.177410611097 0.0212095088792 0.13 20 -55.6770978467 -0.177410611097 0.0238534400643 0.13 20 -56.1869628773 -0.177410611097 0.0268269579528 0.13 20 -56.7726655209 -0.177410611097 0.0301711481053 0.13 20 -57.4471020141 -0.177410611097 0.033932217719 0.13 20 -58.2257695734 -0.177410611097 0.0381621340795 0.13 20 -59.1273889248 -0.177410611097 0.0429193426013 0.13 20 -60.1746987616 -0.177410611097 0.0482695743768 0.13 20 -61.3954752984 -0.177410611097 0.0542867543932 0.13 20 -62.8238481583 -0.177410611097 0.0610540229659 0.13 20 -64.5020085892 -0.177410611097 0.0686648845004 0.13 20 -66.4824401375 -0.177410611097 0.0772244994584 0.13 20 -68.8308492946 -0.177410611097 0.0868511373751 0.13 20 -71.6300398912 -0.177410611097 0.0976778110089 0.13 20 -74.9850684295 -0.177410611097 0.109854114199 0.13 20 -79.0301504661 -0.177410611097 0.123548288826 0.13 20 -83.9379793205 -0.177410611097 0.138949549437 0.13 20 -89.9323967745 -0.177410611097 0.156270697655 0.13 20 -97.3057669709 -0.177410611097 0.175751062485 0.13 20 -106.443024129 -0.177410611097 0.19765980717 0.13 20 -117.855317467 -0.177410611097 0.222299648253 0.13 20 -132.227681019 -0.177410611097 0.250011038262 0.13 20 -150.487606351 -0.177410611097 0.281176869797 0.13 20 -173.905536971 -0.177410611097 0.316227766017 0.13 20 -204.245607978 -0.203312118313 0.001 0.13 20 -52.1077597269 -0.203312118313 0.00112465782212 0.13 20 -52.1280948055 -0.203312118313 0.00126485521686 0.13 20 -52.150989599 -0.203312118313 0.00142252931349 0.13 20 -52.1767697806 -0.203312118313 0.00159985871961 0.13 20 -52.205803373 -0.203312118313 0.00179929362329 0.13 20 -52.2385064959 -0.203312118313 0.00202358964773 0.13 20 -52.2753499538 -0.203312118313 0.00227584592607 0.13 20 -52.3168668048 -0.203312118313 0.0025595479227 0.13 20 -52.3636610755 -0.203312118313 0.00287861559235 0.13 20 -52.4164178182 -0.203312118313 0.00323745754282 0.13 20 -52.4759147488 -0.203312118313 0.00364103194931 0.13 20 -52.5430357519 -0.203312118313 0.00409491506238 0.13 20 -52.618786598 -0.203312118313 0.00460537825582 0.13 20 -52.7043132954 -0.203312118313 0.00517947467923 0.13 20 -52.8009235905 -0.203312118313 0.00582513671247 0.13 20 -52.9101122486 -0.203312118313 0.0065512855686 0.13 20 -53.0335908904 -0.203312118313 0.00736795455966 0.13 20 -53.1733233488 -0.203312118313 0.00828642772855 0.13 20 -53.331567738 -0.203312118313 0.00931939576234 0.13 20 -53.5109267282 -0.203312118313 0.0104811313415 0.13 20 -53.7144078931 -0.203312118313 0.0117876863479 0.13 20 -53.945496483 -0.203312118313 0.0132571136559 0.13 20 -54.2082435977 -0.203312118313 0.0149097165718 0.13 20 -54.5073735327 -0.203312118313 0.0167683293681 0.13 20 -54.8484151184 -0.203312118313 0.0188586327877 0.13 20 -55.2378632173 -0.203312118313 0.0212095088792 0.13 20 -55.683378323 -0.203312118313 0.0238534400643 0.13 20 -56.1940345256 -0.203312118313 0.0268269579528 0.13 20 -56.7806291812 -0.203312118313 0.0301711481053 0.13 20 -57.4560716949 -0.203312118313 0.033932217719 0.13 20 -58.2358742561 -0.203312118313 0.0381621340795 0.13 20 -59.1387746384 -0.203312118313 0.0429193426013 0.13 20 -60.1875309747 -0.203312118313 0.0482695743768 0.13 20 -61.4099416837 -0.203312118313 0.0542867543932 0.13 20 -62.840161799 -0.203312118313 0.0610540229659 0.13 20 -64.5204117092 -0.203312118313 0.0686648845004 0.13 20 -66.5032084591 -0.203312118313 0.0772244994584 0.13 20 -68.8542971497 -0.203312118313 0.0868511373751 0.13 20 -71.6565262446 -0.203312118313 0.0976778110089 0.13 20 -75.0150040126 -0.203312118313 0.109854114199 0.13 20 -79.0640062732 -0.203312118313 0.123548288826 0.13 20 -83.9762967893 -0.203312118313 0.138949549437 0.13 20 -89.9758000679 -0.203312118313 0.156270697655 0.13 20 -97.3549779018 -0.203312118313 0.175751062485 0.13 20 -106.498880448 -0.203312118313 0.19765980717 0.13 20 -117.918795472 -0.203312118313 0.222299648253 0.13 20 -132.299923806 -0.203312118313 0.250011038262 0.13 20 -150.569959528 -0.203312118313 0.281176869797 0.13 20 -173.999594447 -0.203312118313 0.316227766017 0.13 20 -204.353271675 -0.232995181052 0.001 0.13 20 -52.1080793105 -0.232995181052 0.00112465782212 0.13 20 -52.1284542486 -0.232995181052 0.00126485521686 0.13 20 -52.1513938759 -0.232995181052 0.00142252931349 0.13 20 -52.1772244871 -0.232995181052 0.00159985871961 0.13 20 -52.2063148046 -0.232995181052 0.00179929362329 0.13 20 -52.2390817349 -0.232995181052 0.00202358964773 0.13 20 -52.2759969684 -0.232995181052 0.00227584592607 0.13 20 -52.3175945604 -0.232995181052 0.0025595479227 0.13 20 -52.3644796598 -0.232995181052 0.00287861559235 0.13 20 -52.4173385824 -0.232995181052 0.00323745754282 0.13 20 -52.4769504667 -0.232995181052 0.00364103194931 0.13 20 -52.5442007994 -0.232995181052 0.00409491506238 0.13 20 -52.6200971551 -0.232995181052 0.00460537825582 0.13 20 -52.7057875746 -0.232995181052 0.00517947467923 0.13 20 -52.8025820942 -0.232995181052 0.00582513671247 0.13 20 -52.9119780597 -0.232995181052 0.0065512855686 0.13 20 -53.0356900005 -0.232995181052 0.00736795455966 0.13 20 -53.1756850292 -0.232995181052 0.00828642772855 0.13 20 -53.3342249593 -0.232995181052 0.00931939576234 0.13 20 -53.5139166345 -0.232995181052 0.0104811313415 0.13 20 -53.7177723393 -0.232995181052 0.0117876863479 0.13 20 -53.9492826439 -0.232995181052 0.0132571136559 0.13 20 -54.2125046579 -0.232995181052 0.0149097165718 0.13 20 -54.512169471 -0.232995181052 0.0167683293681 0.13 20 -54.8538135981 -0.232995181052 0.0188586327877 0.13 20 -55.2439406005 -0.232995181052 0.0212095088792 0.13 20 -55.6902208255 -0.232995181052 0.0238534400643 0.13 20 -56.2017395359 -0.232995181052 0.0268269579528 0.13 20 -56.7893067674 -0.232995181052 0.0301711481053 0.13 20 -57.4658463318 -0.232995181052 0.033932217719 0.13 20 -58.2468868068 -0.232995181052 0.0381621340795 0.13 20 -59.1511846349 -0.232995181052 0.0429193426013 0.13 20 -60.2015192477 -0.232995181052 0.0482695743768 0.13 20 -61.4257134049 -0.232995181052 0.0542867543932 0.13 20 -62.8579500108 -0.232995181052 0.0610540229659 0.13 20 -64.5404814338 -0.232995181052 0.0686648845004 0.13 20 -66.5258615005 -0.232995181052 0.0772244994584 0.13 20 -68.8798777278 -0.232995181052 0.0868511373751 0.13 20 -71.6854276344 -0.232995181052 0.0976778110089 0.13 20 -75.0476764074 -0.232995181052 0.109854114199 0.13 20 -79.1009661454 -0.232995181052 0.123548288826 0.13 20 -84.0181380992 -0.232995181052 0.138949549437 0.13 20 -90.0232077704 -0.232995181052 0.156270697655 0.13 20 -97.4087443345 -0.232995181052 0.175751062485 0.13 20 -106.559925367 -0.232995181052 0.19765980717 0.13 20 -117.988190758 -0.232995181052 0.222299648253 0.13 20 -132.378924207 -0.232995181052 0.250011038262 0.13 20 -150.660041342 -0.232995181052 0.281176869797 0.13 20 -174.102504769 -0.232995181052 0.316227766017 0.13 20 -204.471092032 -0.267011896997 0.001 0.13 20 -52.108425352 -0.267011896997 0.00112465782212 0.13 20 -52.1288434511 -0.267011896997 0.00126485521686 0.13 20 -52.1518316263 -0.267011896997 0.00142252931349 0.13 20 -52.1777168453 -0.267011896997 0.00159985871961 0.13 20 -52.2068685882 -0.267011896997 0.00179929362329 0.13 20 -52.2397046142 -0.267011896997 0.00202358964773 0.13 20 -52.2766975731 -0.267011896997 0.00227584592607 0.13 20 -52.3183826005 -0.267011896997 0.0025595479227 0.13 20 -52.3653660611 -0.267011896997 0.00287861559235 0.13 20 -52.4183356396 -0.267011896997 0.00323745754282 0.13 20 -52.4780720164 -0.267011896997 0.00364103194931 0.13 20 -52.5454624138 -0.267011896997 0.00409491506238 0.13 20 -52.621516362 -0.267011896997 0.00460537825582 0.13 20 -52.7073841046 -0.267011896997 0.00517947467923 0.13 20 -52.8043781604 -0.267011896997 0.00582513671247 0.13 20 -52.9139986725 -0.267011896997 0.0065512855686 0.13 20 -53.037963325 -0.267011896997 0.00736795455966 0.13 20 -53.1782427872 -0.267011896997 0.00828642772855 0.13 20 -53.3371028853 -0.267011896997 0.00931939576234 0.13 20 -53.5171549915 -0.267011896997 0.0104811313415 0.13 20 -53.7214165031 -0.267011896997 0.0117876863479 0.13 20 -53.953383765 -0.267011896997 0.0132571136559 0.13 20 -54.2171204135 -0.267011896997 0.0149097165718 0.13 20 -54.5173649185 -0.267011896997 0.0167683293681 0.13 20 -54.8596621461 -0.267011896997 0.0188586327877 0.13 20 -55.2505251145 -0.267011896997 0.0212095088792 0.13 20 -55.6976348893 -0.267011896997 0.0238534400643 0.13 20 -56.2100888914 -0.267011896997 0.0268269579528 0.13 20 -56.7987109637 -0.267011896997 0.0301711481053 0.13 20 -57.4764406148 -0.267011896997 0.033932217719 0.13 20 -58.2588242914 -0.267011896997 0.0381621340795 0.13 20 -59.1646388062 -0.267011896997 0.0429193426013 0.13 20 -60.2166868504 -0.267011896997 0.0482695743768 0.13 20 -61.4428177892 -0.267011896997 0.0542867543932 0.13 20 -62.8772450201 -0.267011896997 0.0610540229659 0.13 20 -64.5622559376 -0.267011896997 0.0686648845004 0.13 20 -66.5504446986 -0.267011896997 0.0772244994584 0.13 20 -68.9076453838 -0.267011896997 0.0868511373751 0.13 20 -71.716809434 -0.267011896997 0.0976778110089 0.13 20 -75.0831646854 -0.267011896997 0.109854114199 0.13 20 -79.1411262934 -0.267011896997 0.123548288826 0.13 20 -84.0636210476 -0.267011896997 0.138949549437 0.13 20 -90.0747650534 -0.267011896997 0.156270697655 0.13 20 -97.4672463986 -0.267011896997 0.175751062485 0.13 20 -106.626383989 -0.267011896997 0.19765980717 0.13 20 -118.063786723 -0.267011896997 0.222299648253 0.13 20 -132.465041803 -0.267011896997 0.250011038262 0.13 20 -150.758311784 -0.267011896997 0.281176869797 0.13 20 -174.214861526 -0.267011896997 0.316227766017 0.13 20 -204.599842251 -0.305994968721 0.001 0.13 20 -52.1087973663 -0.305994968721 0.00112465782212 0.13 20 -52.129261868 -0.305994968721 0.00126485521686 0.13 20 -52.1523022376 -0.305994968721 0.00142252931349 0.13 20 -52.178246167 -0.305994968721 0.00159985871961 0.13 20 -52.2074639509 -0.305994968721 0.00179929362329 0.13 20 -52.2403742654 -0.305994968721 0.00202358964773 0.13 20 -52.2774507926 -0.305994968721 0.00227584592607 0.13 20 -52.3192298298 -0.305994968721 0.0025595479227 0.13 20 -52.3663190499 -0.305994968721 0.00287861559235 0.13 20 -52.4194076102 -0.305994968721 0.00323745754282 0.13 20 -52.4792778496 -0.305994968721 0.00364103194931 0.13 20 -52.5468188586 -0.305994968721 0.00409491506238 0.13 20 -52.6230422714 -0.305994968721 0.00460537825582 0.13 20 -52.7091007028 -0.305994968721 0.00517947467923 0.13 20 -52.8063093433 -0.305994968721 0.00582513671247 0.13 20 -52.9161713485 -0.305994968721 0.0065512855686 0.13 20 -53.0404077986 -0.305994968721 0.00736795455966 0.13 20 -53.180993194 -0.305994968721 0.00828642772855 0.13 20 -53.3401976839 -0.305994968721 0.00931939576234 0.13 20 -53.5206375199 -0.305994968721 0.0104811313415 0.13 20 -53.7253356101 -0.305994968721 0.0117876863479 0.13 20 -53.9577945261 -0.305994968721 0.0132571136559 0.13 20 -54.2220849435 -0.305994968721 0.0149097165718 0.13 20 -54.5229532956 -0.305994968721 0.0167683293681 0.13 20 -54.8659534639 -0.305994968721 0.0188586327877 0.13 20 -55.2576086802 -0.305994968721 0.0212095088792 0.13 20 -55.7056115924 -0.305994968721 0.0238534400643 0.13 20 -56.2190727684 -0.305994968721 0.0268269579528 0.13 20 -56.8088309906 -0.305994968721 0.0301711481053 0.13 20 -57.4878427651 -0.305994968721 0.033932217719 0.13 20 -58.2716739039 -0.305994968721 0.0381621340795 0.13 20 -59.1791233169 -0.305994968721 0.0429193426013 0.13 20 -60.2330189518 -0.305994968721 0.0482695743768 0.13 20 -61.4612390966 -0.305994968721 0.0542867543932 0.13 20 -62.8980303388 -0.305994968721 0.0610540229659 0.13 20 -64.5857182481 -0.305994968721 0.0686648845004 0.13 20 -66.5769410042 -0.305994968721 0.0772244994584 0.13 20 -68.9375835973 -0.305994968721 0.0868511373751 0.13 20 -71.7506565276 -0.305994968721 0.0976778110089 0.13 20 -75.1214563837 -0.305994968721 0.109854114199 0.13 20 -79.1844786645 -0.305994968721 0.123548288826 0.13 20 -84.1127444483 -0.305994968721 0.138949549437 0.13 20 -90.1304810152 -0.305994968721 0.156270697655 0.13 20 -97.5305082201 -0.305994968721 0.175751062485 0.13 20 -106.698302047 -0.305994968721 0.19765980717 0.13 20 -118.145659851 -0.305994968721 0.222299648253 0.13 20 -132.558396563 -0.305994968721 0.250011038262 0.13 20 -150.864952144 -0.305994968721 0.281176869797 0.13 20 -174.336932454 -0.305994968721 0.316227766017 0.13 20 -204.739912249 -0.350669471793 0.001 0.13 20 -52.1091939568 -0.350669471793 0.00112465782212 0.13 20 -52.1297079289 -0.350669471793 0.00126485521686 0.13 20 -52.1528039443 -0.350669471793 0.00142252931349 0.13 20 -52.178810467 -0.350669471793 0.00159985871961 0.13 20 -52.2080986605 -0.350669471793 0.00179929362329 0.13 20 -52.2410881791 -0.350669471793 0.00202358964773 0.13 20 -52.2782538057 -0.350669471793 0.00227584592607 0.13 20 -52.320133077 -0.350669471793 0.0025595479227 0.13 20 -52.3673350611 -0.350669471793 0.00287861559235 0.13 20 -52.4205504867 -0.350669471793 0.00323745754282 0.13 20 -52.4805634622 -0.350669471793 0.00364103194931 0.13 20 -52.5482650713 -0.350669471793 0.00409491506238 0.13 20 -52.6246691943 -0.350669471793 0.00460537825582 0.13 20 -52.7109309763 -0.350669471793 0.00517947467923 0.13 20 -52.8083684605 -0.350669471793 0.00582513671247 0.13 20 -52.9184880185 -0.350669471793 0.0065512855686 0.13 20 -53.0430143578 -0.350669471793 0.00736795455966 0.13 20 -53.183926071 -0.350669471793 0.00828642772855 0.13 20 -53.3434979256 -0.350669471793 0.00931939576234 0.13 20 -53.5243513887 -0.350669471793 0.0104811313415 0.13 20 -53.7295152595 -0.350669471793 0.0117876863479 0.13 20 -53.9624987686 -0.350669471793 0.0132571136559 0.13 20 -54.2273801226 -0.350669471793 0.0149097165718 0.13 20 -54.5289142786 -0.350669471793 0.0167683293681 0.13 20 -54.8726647715 -0.350669471793 0.0188586327877 0.13 20 -55.2651657766 -0.350669471793 0.0212095088792 0.13 20 -55.7141223587 -0.350669471793 0.0238534400643 0.13 20 -56.2286591897 -0.350669471793 0.0268269579528 0.13 20 -56.819631091 -0.350669471793 0.0301711481053 0.13 20 -57.5000128322 -0.350669471793 0.033932217719 0.13 20 -58.285391053 -0.350669471793 0.0381621340795 0.13 20 -59.1945884528 -0.350669471793 0.0429193426013 0.13 20 -60.250460202 -0.350669471793 0.0482695743768 0.13 20 -61.4809158017 -0.350669471793 0.0542867543932 0.13 20 -62.9202377085 -0.350669471793 0.0610540229659 0.13 20 -64.6107928129 -0.350669471793 0.0686648845004 0.13 20 -66.6052670258 -0.350669471793 0.0772244994584 0.13 20 -68.9696006404 -0.350669471793 0.0868511373751 0.13 20 -71.7868684468 -0.350669471793 0.0976778110089 0.13 20 -75.162442047 -0.350669471793 0.109854114199 0.13 20 -79.2309048223 -0.350669471793 0.123548288826 0.13 20 -84.1653812755 -0.350669471793 0.138949549437 0.13 20 -90.1902210093 -0.350669471793 0.156270697655 0.13 20 -97.598389354 -0.350669471793 0.175751062485 0.13 20 -106.775536368 -0.350669471793 0.19765980717 0.13 20 -118.233669131 -0.350669471793 0.222299648253 0.13 20 -132.658857187 -0.350669471793 0.250011038262 0.13 20 -150.979852274 -0.350669471793 0.281176869797 0.13 20 -174.468645753 -0.350669471793 0.316227766017 0.13 20 -204.891294339 -0.401866341011 0.001 0.13 20 -52.1096127371 -0.401866341011 0.00112465782212 0.13 20 -52.13017895 -0.401866341011 0.00126485521686 0.13 20 -52.1533337282 -0.401866341011 0.00142252931349 0.13 20 -52.1794063512 -0.401866341011 0.00159985871961 0.13 20 -52.2087689005 -0.401866341011 0.00179929362329 0.13 20 -52.2418420635 -0.401866341011 0.00202358964773 0.13 20 -52.2791017863 -0.401866341011 0.00227584592607 0.13 20 -52.321086915 -0.401866341011 0.0025595479227 0.13 20 -52.3684079922 -0.401866341011 0.00287861559235 0.13 20 -52.4217574073 -0.401866341011 0.00323745754282 0.13 20 -52.4819211387 -0.401866341011 0.00364103194931 0.13 20 -52.5497923772 -0.401866341011 0.00409491506238 0.13 20 -52.6263873771 -0.401866341011 0.00460537825582 0.13 20 -52.7128639594 -0.401866341011 0.00517947467923 0.13 20 -52.8105431838 -0.401866341011 0.00582513671247 0.13 20 -52.9209348234 -0.401866341011 0.0065512855686 0.13 20 -53.045767423 -0.401866341011 0.00736795455966 0.13 20 -53.1870239054 -0.401866341011 0.00828642772855 0.13 20 -53.3469839267 -0.401866341011 0.00931939576234 0.13 20 -53.5282744752 -0.401866341011 0.0104811313415 0.13 20 -53.7339305898 -0.401866341011 0.0117876863479 0.13 20 -53.9674685559 -0.401866341011 0.0132571136559 0.13 20 -54.2329745628 -0.401866341011 0.0149097165718 0.13 20 -54.5352126056 -0.401866341011 0.0167683293681 0.13 20 -54.8797564617 -0.401866341011 0.0188586327877 0.13 20 -55.2731519232 -0.401866341011 0.0212095088792 0.13 20 -55.7231172448 -0.401866341011 0.0238534400643 0.13 20 -56.2387920909 -0.401866341011 0.0268269579528 0.13 20 -56.8310483461 -0.401866341011 0.0301711481053 0.13 20 -57.5128802272 -0.401866341011 0.033932217719 0.13 20 -58.2998965726 -0.401866341011 0.0381621340795 0.13 20 -59.2109454662 -0.401866341011 0.0429193426013 0.13 20 -60.2689111609 -0.401866341011 0.0482695743768 0.13 20 -61.5017365492 -0.401866341011 0.0542867543932 0.13 20 -62.9437425171 -0.401866341011 0.0610540229659 0.13 20 -64.6373402997 -0.401866341011 0.0686648845004 0.13 20 -66.6352671263 -0.401866341011 0.0772244994584 0.13 20 -69.0035228708 -0.401866341011 0.0868511373751 0.13 20 -71.8252517425 -0.401866341011 0.0976778110089 0.13 20 -75.205906544 -0.401866341011 0.109854114199 0.13 20 -79.2801660516 -0.401866341011 0.123548288826 0.13 20 -84.2212673765 -0.401866341011 0.138949549437 0.13 20 -90.2536937593 -0.401866341011 0.156270697655 0.13 20 -97.670570062 -0.401866341011 0.175751062485 0.13 20 -106.857738039 -0.401866341011 0.19765980717 0.13 20 -118.327436809 -0.401866341011 0.222299648253 0.13 20 -132.7660191 -0.401866341011 0.250011038262 0.13 20 -151.102585467 -0.401866341011 0.281176869797 0.13 20 -174.609561467 -0.401866341011 0.316227766017 0.13 20 -205.053550795 -0.460537825582 0.001 0.13 20 -52.1100502562 -0.460537825582 0.00112465782212 0.13 20 -52.1306710503 -0.460537825582 0.00126485521686 0.13 20 -52.1538872246 -0.460537825582 0.00142252931349 0.13 20 -52.1800289109 -0.460537825582 0.00159985871961 0.13 20 -52.2094691501 -0.460537825582 0.00179929362329 0.13 20 -52.2426297098 -0.460537825582 0.00202358964773 0.13 20 -52.2799877518 -0.460537825582 0.00227584592607 0.13 20 -52.3220834912 -0.460537825582 0.0025595479227 0.13 20 -52.3695290122 -0.460537825582 0.00287861559235 0.13 20 -52.4230184403 -0.460537825582 0.00323745754282 0.13 20 -52.4833397099 -0.460537825582 0.00364103194931 0.13 20 -52.5513882153 -0.460537825582 0.00409491506238 0.13 20 -52.628182694 -0.460537825582 0.00460537825582 0.13 20 -52.7148837665 -0.460537825582 0.00517947467923 0.13 20 -52.8128156485 -0.460537825582 0.00582513671247 0.13 20 -52.9234916732 -0.460537825582 0.0065512855686 0.13 20 -53.048644402 -0.460537825582 0.00736795455966 0.13 20 -53.1902612916 -0.460537825582 0.00828642772855 0.13 20 -53.3506271179 -0.460537825582 0.00931939576234 0.13 20 -53.5323746534 -0.460537825582 0.0104811313415 0.13 20 -53.7385454759 -0.460537825582 0.0117876863479 0.13 20 -53.9726632674 -0.460537825582 0.0132571136559 0.13 20 -54.2388225891 -0.460537825582 0.0149097165718 0.13 20 -54.5417969206 -0.460537825582 0.0167683293681 0.13 20 -54.8871707923 -0.460537825582 0.0188586327877 0.13 20 -55.2815022005 -0.460537825582 0.0212095088792 0.13 20 -55.7325232653 -0.460537825582 0.0238534400643 0.13 20 -56.2493894233 -0.460537825582 0.0268269579528 0.13 20 -56.8429905248 -0.460537825582 0.0301711481053 0.13 20 -57.5263412812 -0.460537825582 0.033932217719 0.13 20 -58.3150739494 -0.460537825582 0.0381621340795 0.13 20 -59.2280634229 -0.460537825582 0.0429193426013 0.13 20 -60.2882247091 -0.460537825582 0.0482695743768 0.13 20 -61.5235360618 -0.460537825582 0.0542867543932 0.13 20 -62.968359127 -0.460537825582 0.0610540229659 0.13 20 -64.6651522549 -0.460537825582 0.0686648845004 0.13 20 -66.6667073047 -0.460537825582 0.0772244994584 0.13 20 -69.0390877106 -0.460537825582 0.0868511373751 0.13 20 -71.8655119121 -0.460537825582 0.0976778110089 0.13 20 -75.2515197663 -0.460537825582 0.109854114199 0.13 20 -79.3318926167 -0.460537825582 0.123548288826 0.13 20 -84.2799890377 -0.460537825582 0.138949549437 0.13 20 -90.3204369276 -0.460537825582 0.156270697655 0.13 20 -97.7465345181 -0.460537825582 0.175751062485 0.13 20 -106.944332807 -0.460537825582 0.19765980717 0.13 20 -118.426325437 -0.460537825582 0.222299648253 0.13 20 -132.879177494 -0.460537825582 0.250011038262 0.13 20 -151.232376688 -0.460537825582 0.281176869797 0.13 20 -174.758833923 -0.460537825582 0.316227766017 0.13 20 -205.225769295 -0.527775200726 0.001 0.13 20 -52.1105019614 -0.527775200726 0.00112465782212 0.13 20 -52.1311791095 -0.527775200726 0.00126485521686 0.13 20 -52.1544586746 -0.527775200726 0.00142252931349 0.13 20 -52.1806716692 -0.527775200726 0.00159985871961 0.13 20 -52.210192125 -0.527775200726 0.00179929362329 0.13 20 -52.2434429253 -0.527775200726 0.00202358964773 0.13 20 -52.2809024878 -0.527775200726 0.00227584592607 0.13 20 -52.3231124419 -0.527775200726 0.0025595479227 0.13 20 -52.3706864647 -0.527775200726 0.00287861559235 0.13 20 -52.4243204757 -0.527775200726 0.00323745754282 0.13 20 -52.4848044304 -0.527775200726 0.00364103194931 0.13 20 -52.5530360006 -0.527775200726 0.00409491506238 0.13 20 -52.6300364911 -0.527775200726 0.00460537825582 0.13 20 -52.7169694159 -0.527775200726 0.00517947467923 0.13 20 -52.8151622549 -0.527775200726 0.00582513671247 0.13 20 -52.9261320231 -0.527775200726 0.0065512855686 0.13 20 -53.0516154369 -0.527775200726 0.00736795455966 0.13 20 -53.1936046444 -0.527775200726 0.00828642772855 0.13 20 -53.3543897205 -0.527775200726 0.00931939576234 0.13 20 -53.5366094269 -0.527775200726 0.0104811313415 0.13 20 -53.7433121135 -0.527775200726 0.0117876863479 0.13 20 -53.9780291259 -0.527775200726 0.0132571136559 0.13 20 -54.2448637042 -0.527775200726 0.0149097165718 0.13 20 -54.5485991635 -0.527775200726 0.0167683293681 0.13 20 -54.8948311929 -0.527775200726 0.0188586327877 0.13 20 -55.29013046 -0.527775200726 0.0212095088792 0.13 20 -55.7422434912 -0.527775200726 0.0238534400643 0.13 20 -56.2603421236 -0.527775200726 0.0268269579528 0.13 20 -56.8553349039 -0.527775200726 0.0301711481053 0.13 20 -57.5402578923 -0.527775200726 0.033932217719 0.13 20 -58.3307677663 -0.527775200726 0.0381621340795 0.13 20 -59.2457674085 -0.527775200726 0.0429193426013 0.13 20 -60.3082039763 -0.527775200726 0.0482695743768 0.13 20 -61.5460927415 -0.527775200726 0.0542867543932 0.13 20 -62.993838089 -0.527775200726 0.0610540229659 0.13 20 -64.6939478587 -0.527775200726 0.0686648845004 0.13 20 -66.6992714054 -0.527775200726 0.0772244994584 0.13 20 -69.0759392027 -0.527775200726 0.0868511373751 0.13 20 -71.9072481718 -0.527775200726 0.0976778110089 0.13 20 -75.2988304543 -0.527775200726 0.109854114199 0.13 20 -79.3855764422 -0.527775200726 0.123548288826 0.13 20 -84.3409742693 -0.527775200726 0.138949549437 0.13 20 -90.3898066915 -0.527775200726 0.156270697655 0.13 20 -97.8255582809 -0.527775200726 0.175751062485 0.13 20 -107.034505941 -0.527775200726 0.19765980717 0.13 20 -118.529419494 -0.527775200726 0.222299648253 0.13 20 -132.997304861 -0.527775200726 0.250011038262 0.13 20 -151.36807492 -0.527775200726 0.281176869797 0.13 20 -174.915177444 -0.527775200726 0.316227766017 0.13 20 -205.406520063 -0.604829065124 0.001 0.13 20 -52.1109622298 -0.604829065124 0.00112465782212 0.13 20 -52.1316968031 -0.604829065124 0.00126485521686 0.13 20 -52.1550409652 -0.604829065124 0.00142252931349 0.13 20 -52.1813266256 -0.604829065124 0.00159985871961 0.13 20 -52.2109288267 -0.604829065124 0.00179929362329 0.13 20 -52.2442715888 -0.604829065124 0.00202358964773 0.13 20 -52.2818346103 -0.604829065124 0.00227584592607 0.13 20 -52.3241609628 -0.604829065124 0.0025595479227 0.13 20 -52.3718659474 -0.604829065124 0.00287861559235 0.13 20 -52.4256473134 -0.604829065124 0.00323745754282 0.13 20 -52.4862970779 -0.604829065124 0.00364103194931 0.13 20 -52.5547152359 -0.604829065124 0.00409491506238 0.13 20 -52.6319257111 -0.604829065124 0.00460537825582 0.13 20 -52.7190949707 -0.604829065124 0.00517947467923 0.13 20 -52.8175538255 -0.604829065124 0.00582513671247 0.13 20 -52.9288230488 -0.604829065124 0.0065512855686 0.13 20 -53.0546435999 -0.604829065124 0.00736795455966 0.13 20 -53.1970124178 -0.604829065124 0.00828642772855 0.13 20 -53.3582249912 -0.604829065124 0.00931939576234 0.13 20 -53.5409262015 -0.604829065124 0.0104811313415 0.13 20 -53.7481713222 -0.604829065124 0.0117876863479 0.13 20 -53.9834995364 -0.604829065124 0.0132571136559 0.13 20 -54.2510229634 -0.604829065124 0.0149097165718 0.13 20 -54.5555349873 -0.604829065124 0.0167683293681 0.13 20 -54.9026427256 -0.604829065124 0.0188586327877 0.13 20 -55.2989298327 -0.604829065124 0.0212095088792 0.13 20 -55.7521576101 -0.604829065124 0.0238534400643 0.13 20 -56.2715147275 -0.604829065124 0.0268269579528 0.13 20 -56.8679289384 -0.604829065124 0.0301711481053 0.13 20 -57.5544582549 -0.604829065124 0.033932217719 0.13 20 -58.3467844919 -0.604829065124 0.0381621340795 0.13 20 -59.2638393769 -0.604829065124 0.0429193426013 0.13 20 -60.3286032433 -0.604829065124 0.0482695743768 0.13 20 -61.569129619 -0.604829065124 0.0542867543932 0.13 20 -63.0198671272 -0.604829065124 0.0610540229659 0.13 20 -64.7233749257 -0.604829065124 0.0686648845004 0.13 20 -66.7325621061 -0.604829065124 0.0772244994584 0.13 20 -69.1136289466 -0.604829065124 0.0868511373751 0.13 20 -71.949954283 -0.604829065124 0.0976778110089 0.13 20 -75.3472668347 -0.604829065124 0.109854114199 0.13 20 -79.4405714507 -0.604829065124 0.123548288826 0.13 20 -84.4034926922 -0.604829065124 0.138949549437 0.13 20 -90.4609769705 -0.604829065124 0.156270697655 0.13 20 -97.9067065741 -0.604829065124 0.175751062485 0.13 20 -107.127199177 -0.604829065124 0.19765980717 0.13 20 -118.635520425 -0.604829065124 0.222299648253 0.13 20 -133.119043382 -0.604829065124 0.250011038262 0.13 20 -151.508141822 -0.604829065124 0.281176869797 0.13 20 -175.076849739 -0.604829065124 0.316227766017 0.13 15 -205.021050626 -0.693132601751 0.001 0.13 20 -52.1114244912 -0.693132601751 0.00112465782212 0.13 20 -52.1322167418 -0.693132601751 0.00126485521686 0.13 20 -52.1556257848 -0.693132601751 0.00142252931349 0.13 20 -52.1819844318 -0.693132601751 0.00159985871961 0.13 20 -52.2116687402 -0.693132601751 0.00179929362329 0.13 20 -52.245103873 -0.693132601751 0.00202358964773 0.13 20 -52.2827708158 -0.693132601751 0.00227584592607 0.13 20 -52.3252140894 -0.693132601751 0.0025595479227 0.13 20 -52.3730506275 -0.693132601751 0.00287861559235 0.13 20 -52.4269800186 -0.693132601751 0.00323745754282 0.13 20 -52.4877963522 -0.693132601751 0.00364103194931 0.13 20 -52.5564019594 -0.693132601751 0.00409491506238 0.13 20 -52.6338233976 -0.693132601751 0.00460537825582 0.13 20 -52.7212301042 -0.693132601751 0.00517947467923 0.13 20 -52.8199562406 -0.693132601751 0.00582513671247 0.13 20 -52.931526362 -0.693132601751 0.0065512855686 0.13 20 -53.0576856973 -0.693132601751 0.00736795455966 0.13 20 -53.2004360087 -0.693132601751 0.00828642772855 0.13 20 -53.3620782359 -0.693132601751 0.00931939576234 0.13 20 -53.5452634251 -0.693132601751 0.0104811313415 0.13 20 -53.7530538261 -0.693132601751 0.0117876863479 0.13 20 -53.9889965224 -0.693132601751 0.0132571136559 0.13 20 -54.2572125884 -0.693132601751 0.0149097165718 0.13 20 -54.5625055678 -0.693132601751 0.0167683293681 0.13 20 -54.9104941164 -0.693132601751 0.0188586327877 0.13 20 -55.3077750079 -0.693132601751 0.0212095088792 0.13 20 -55.7621244805 -0.693132601751 0.0238534400643 0.13 20 -56.2827482342 -0.693132601751 0.0268269579528 0.13 20 -56.8805934708 -0.693132601751 0.0301711481053 0.13 20 -57.5687404527 -0.693132601751 0.033932217719 0.13 20 -58.3628965005 -0.693132601751 0.0381621340795 0.13 20 -59.2820226442 -0.693132601751 0.0429193426013 0.13 20 -60.3491329641 -0.693132601751 0.0482695743768 0.13 20 -61.5923199582 -0.693132601751 0.0542867543932 0.13 20 -63.0460773868 -0.693132601751 0.0610540229659 0.13 20 -64.7530168607 -0.693132601751 0.0686648845004 0.13 20 -66.7661086492 -0.693132601751 0.0772244994584 0.13 20 -69.1516246725 -0.693132601751 0.0868511373751 0.13 20 -71.9930280384 -0.693132601751 0.0976778110089 0.13 20 -75.3961470837 -0.693132601751 0.109854114199 0.13 20 -79.4961050591 -0.693132601751 0.123548288826 0.13 20 -84.4666681074 -0.693132601751 0.138949549437 0.13 20 -90.5329530814 -0.693132601751 0.156270697655 0.13 20 -97.9888489959 -0.693132601751 0.175751062485 0.13 20 -107.221126372 -0.693132601751 0.19765980717 0.13 20 -118.743163044 -0.693132601751 0.222299648253 0.13 20 -133.24272167 -0.693132601751 0.250011038262 0.13 20 -151.65066816 -0.693132601751 0.281176869797 0.13 15 -174.789013977 -0.693132601751 0.316227766017 0.13 15 -204.642142091 -0.794328234724 0.001 0.13 20 -52.1118814583 -0.794328234724 0.00112465782212 0.13 20 -52.1327307285 -0.794328234724 0.00126485521686 0.13 20 -52.1562039138 -0.794328234724 0.00142252931349 0.13 20 -52.1826347175 -0.794328234724 0.00159985871961 0.13 20 -52.2124002007 -0.794328234724 0.00179929362329 0.13 20 -52.2459266572 -0.794328234724 0.00202358964773 0.13 20 -52.2836963452 -0.794328234724 0.00227584592607 0.13 20 -52.3262552195 -0.794328234724 0.0025595479227 0.13 20 -52.3742218288 -0.794328234724 0.00287861559235 0.13 20 -52.4282975814 -0.794328234724 0.00323745754282 0.13 20 -52.4892786176 -0.794328234724 0.00364103194931 0.13 20 -52.5580695806 -0.794328234724 0.00409491506238 0.13 20 -52.6356996344 -0.794328234724 0.00460537825582 0.13 20 -52.7233411569 -0.794328234724 0.00517947467923 0.13 20 -52.8223316275 -0.794328234724 0.00582513671247 0.13 20 -52.9341993465 -0.794328234724 0.0065512855686 0.13 20 -53.0606937723 -0.794328234724 0.00736795455966 0.13 20 -53.2038214464 -0.794328234724 0.00828642772855 0.13 20 -53.3658887112 -0.794328234724 0.00931939576234 0.13 20 -53.5495527252 -0.794328234724 0.0104811313415 0.13 20 -53.7578826572 -0.794328234724 0.0117876863479 0.13 20 -53.9944334301 -0.794328234724 0.0132571136559 0.13 20 -54.2633350077 -0.794328234724 0.0149097165718 0.13 20 -54.569401024 -0.794328234724 0.0167683293681 0.13 20 -54.9182616011 -0.794328234724 0.0188586327877 0.13 20 -55.3165265582 -0.794328234724 0.0212095088792 0.13 20 -55.7719869965 -0.794328234724 0.0238534400643 0.13 20 -56.2938655754 -0.794328234724 0.0268269579528 0.13 20 -56.8931288813 -0.794328234724 0.0301711481053 0.13 20 -57.5828793744 -0.794328234724 0.033932217719 0.13 20 -58.3788498488 -0.794328234724 0.0381621340795 0.13 20 -59.3000306339 -0.794328234724 0.0429193426013 0.13 20 -60.3694695972 -0.794328234724 0.0482695743768 0.13 20 -61.6152983097 -0.794328234724 0.0542867543932 0.13 20 -63.0720558594 -0.794328234724 0.0610540229659 0.13 20 -64.7824066237 -0.794328234724 0.0686648845004 0.13 20 -66.799382534 -0.794328234724 0.0772244994584 0.13 20 -69.1893278726 -0.794328234724 0.0868511373751 0.13 20 -72.0357910643 -0.794328234724 0.0976778110089 0.13 20 -75.4447015581 -0.794328234724 0.109854114199 0.13 20 -79.5513031227 -0.794328234724 0.123548288826 0.13 20 -84.5295064629 -0.794328234724 0.138949549437 0.13 20 -90.6046030607 -0.794328234724 0.156270697655 0.13 20 -98.0706945468 -0.794328234724 0.175751062485 0.13 20 -107.314812599 -0.794328234724 0.19765980717 0.13 20 -118.850659032 -0.794328234724 0.222299648253 0.13 20 -133.366402969 -0.794328234724 0.250011038262 0.13 15 -151.489327103 -0.794328234724 0.281176869797 0.13 15 -174.415599288 -0.794328234724 0.316227766017 0.13 15 -204.283938855 +10.0 0.0001 0.075 11252 -39996.1691938 +10.0 0.000316227766017 0.075 11252 -40000.9511756 +13.0 0.0001 0.075 11252 -39996.1684173 +13.0 0.000316227766017 0.075 11252 -40000.9503994 +16.0 0.0001 0.075 11252 -39996.1683787 +16.0 0.000316227766017 0.075 11252 -40000.9503608 +19.0 0.0001 0.075 11252 -39996.1683768 +19.0 0.000316227766017 0.075 11252 -40000.9503588 +22.0 0.0001 0.075 11252 -39996.1683767 +22.0 0.000316227766017 0.075 11252 -40000.9503587 +25.0 0.0001 0.075 11252 -39996.1683767 +25.0 0.000316227766017 0.075 11252 -40000.9503587 +28.0 0.0001 0.075 11252 -39996.1683767 +28.0 0.000316227766017 0.075 11252 -40000.9503587 diff --git a/experiments/process.py b/experiments/process.py index ff722c8..d01b3fd 100644 --- a/experiments/process.py +++ b/experiments/process.py @@ -1,5 +1,6 @@ import sys from ml import ml +from ml2 import ml2 import numpy as np from cPickle import load from itertools import product @@ -11,10 +12,10 @@ if __name__ == "__main__": sys.exit("usage: {0} <file>".format(sys.argv[0])) root_victims, victims, non_victims, age = load(open(sys.argv[1])) - # alphas = 1. / np.arange(1., 2000., 30.) # parameter of the time component - alphas = np.logspace(-3,-.1,num=50) + alphas = np.arange(10., 30., 3.) # parameter of the time component + # alphas = np.logspace(0,2,num=10) # deltas = np.arange(0.005, 0.5, 0.005) # parameter of the structural component - deltas = np.logspace(-3,-.5,num=50) + deltas = np.logspace(-4,-2,num=5) with open("out.log", "w") as fh: for alpha, delta in product(alphas, deltas): beta, roots, ll = ml(root_victims, victims, non_victims, age, alpha, delta) @@ -24,5 +25,5 @@ if __name__ == "__main__": # alpha = 1/10. # delta = .5 - # beta, roots, ll = ml(root_victims, victims, non_victims, age, alpha, delta) + # beta, roots, ll = ml2(root_victims, victims, non_victims, age, alpha, delta) # print "\t".join(map(str, [1./alpha, delta, beta, roots, ll]))
\ No newline at end of file diff --git a/experiments/setup2.py b/experiments/setup2.py new file mode 100644 index 0000000..3c1a5a2 --- /dev/null +++ b/experiments/setup2.py @@ -0,0 +1,12 @@ +# compile with: python setup.py build_ext --inplace + +from distutils.core import setup +from Cython.Build import cythonize +import numpy + +setup( + ext_modules = cythonize("ml2.pyx"), + include_dirs=[numpy.get_include()] + +) + |
