Generated by Cython 0.14.1 on Tue Dec 13 06:03:39 2011
Raw output: _sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0.c
1:
2: include "interrupt.pxi" # ctrl-c interrupt block support
/* "_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0.pyx":2 * * include "interrupt.pxi" # ctrl-c interrupt block support #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* include "stdsage.pxi" # ctrl-c interrupt block support * */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_2))<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
3: include "stdsage.pxi" # ctrl-c interrupt block support
4:
5: include "cdefs.pxi"
6: import numpy as np
/* "_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0.pyx":6 * * include "cdefs.pxi" * import numpy as np #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cimport numpy as np * */ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0); 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); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__np, __pyx_t_1)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7: cimport numpy as np
8:
9: cdouble = np.double
/* "_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0.pyx":9 * cimport numpy as np * * cdouble = np.double #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* ctypedef np.double_t cdouble_t * */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__double); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyObject_SetAttr(__pyx_m, __pyx_n_s__cdouble, __pyx_t_2)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10: ctypedef np.double_t cdouble_t
11:
12: cpdef double inv_cross(np.ndarray[cdouble_t] x, np.ndarray[cdouble_t] l_list,
/* "_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0.pyx":12 * ctypedef np.double_t cdouble_t * * cpdef double inv_cross(np.ndarray[cdouble_t] x, np.ndarray[cdouble_t] l_list, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* np.ndarray[cdouble_t] r_list, np.ndarray[cdouble_t] z_list): * cdef double k_f = x[0] */ static PyObject *__pyx_pf_75_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0_inv_cross(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static double __pyx_f_75_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0_inv_cross(PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_l_list, PyArrayObject *__pyx_v_r_list, PyArrayObject *__pyx_v_z_list, int __pyx_skip_dispatch) { double __pyx_v_k_f; double __pyx_v_k_r; unsigned int __pyx_v_m; PyArrayObject *__pyx_v_I = 0; PyArrayObject *__pyx_v_coeffs = 0; PyArrayObject *__pyx_v_monoms = 0; unsigned int __pyx_v_i; double __pyx_v_l; double __pyx_v_r; double __pyx_v_z; Py_buffer __pyx_bstruct_monoms; Py_ssize_t __pyx_bstride_0_monoms = 0; Py_ssize_t __pyx_bshape_0_monoms = 0; Py_buffer __pyx_bstruct_I; Py_ssize_t __pyx_bstride_0_I = 0; Py_ssize_t __pyx_bshape_0_I = 0; Py_buffer __pyx_bstruct_l_list; Py_ssize_t __pyx_bstride_0_l_list = 0; Py_ssize_t __pyx_bshape_0_l_list = 0; Py_buffer __pyx_bstruct_r_list; Py_ssize_t __pyx_bstride_0_r_list = 0; Py_ssize_t __pyx_bshape_0_r_list = 0; Py_buffer __pyx_bstruct_coeffs; Py_ssize_t __pyx_bstride_0_coeffs = 0; Py_ssize_t __pyx_bshape_0_coeffs = 0; Py_buffer __pyx_bstruct_x; Py_ssize_t __pyx_bstride_0_x = 0; Py_ssize_t __pyx_bshape_0_x = 0; Py_buffer __pyx_bstruct_z_list; Py_ssize_t __pyx_bstride_0_z_list = 0; Py_ssize_t __pyx_bshape_0_z_list = 0; double __pyx_r; __Pyx_RefNannySetupContext("inv_cross"); __pyx_bstruct_I.buf = NULL; __pyx_bstruct_coeffs.buf = NULL; __pyx_bstruct_monoms.buf = NULL; __pyx_bstruct_x.buf = NULL; __pyx_bstruct_l_list.buf = NULL; __pyx_bstruct_r_list.buf = NULL; __pyx_bstruct_z_list.buf = NULL; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_x, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_75_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0_cdouble_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_bstride_0_x = __pyx_bstruct_x.strides[0]; __pyx_bshape_0_x = __pyx_bstruct_x.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_l_list, (PyObject*)__pyx_v_l_list, &__Pyx_TypeInfo_nn___pyx_t_75_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0_cdouble_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_bstride_0_l_list = __pyx_bstruct_l_list.strides[0]; __pyx_bshape_0_l_list = __pyx_bstruct_l_list.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_r_list, (PyObject*)__pyx_v_r_list, &__Pyx_TypeInfo_nn___pyx_t_75_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0_cdouble_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_bstride_0_r_list = __pyx_bstruct_r_list.strides[0]; __pyx_bshape_0_r_list = __pyx_bstruct_r_list.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_z_list, (PyObject*)__pyx_v_z_list, &__Pyx_TypeInfo_nn___pyx_t_75_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0_cdouble_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_bstride_0_z_list = __pyx_bstruct_z_list.strides[0]; __pyx_bshape_0_z_list = __pyx_bstruct_z_list.shape[0]; /* "_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0.pyx":12 * ctypedef np.double_t cdouble_t * * cpdef double inv_cross(np.ndarray[cdouble_t] x, np.ndarray[cdouble_t] l_list, #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* np.ndarray[cdouble_t] r_list, np.ndarray[cdouble_t] z_list): * cdef double k_f = x[0] */ static PyObject *__pyx_pf_75_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0_inv_cross(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_75_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0_inv_cross[] = "File: _sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0.pyx (starting at line 12)"; static PyObject *__pyx_pf_75_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0_inv_cross(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_l_list = 0; PyArrayObject *__pyx_v_r_list = 0; PyArrayObject *__pyx_v_z_list = 0; Py_buffer __pyx_bstruct_x; Py_ssize_t __pyx_bstride_0_x = 0; Py_ssize_t __pyx_bshape_0_x = 0; Py_buffer __pyx_bstruct_r_list; Py_ssize_t __pyx_bstride_0_r_list = 0; Py_ssize_t __pyx_bshape_0_r_list = 0; Py_buffer __pyx_bstruct_z_list; Py_ssize_t __pyx_bstride_0_z_list = 0; Py_ssize_t __pyx_bshape_0_z_list = 0; Py_buffer __pyx_bstruct_l_list; Py_ssize_t __pyx_bstride_0_l_list = 0; Py_ssize_t __pyx_bshape_0_l_list = 0; PyObject *__pyx_r = NULL; static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__x,&__pyx_n_s__l_list,&__pyx_n_s__r_list,&__pyx_n_s__z_list,0}; __Pyx_RefNannySetupContext("inv_cross"); __pyx_self = __pyx_self; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args = PyDict_Size(__pyx_kwds); PyObject* values[4] = {0,0,0,0}; switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } switch (PyTuple_GET_SIZE(__pyx_args)) { case 0: values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__x); if (likely(values[0])) kw_args--; else goto __pyx_L5_argtuple_error; case 1: values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__l_list); if (likely(values[1])) kw_args--; else { __Pyx_RaiseArgtupleInvalid("inv_cross", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__r_list); if (likely(values[2])) kw_args--; else { __Pyx_RaiseArgtupleInvalid("inv_cross", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__z_list); if (likely(values[3])) kw_args--; else { __Pyx_RaiseArgtupleInvalid("inv_cross", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "inv_cross")<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_l_list = ((PyArrayObject *)values[1]); __pyx_v_r_list = ((PyArrayObject *)values[2]); __pyx_v_z_list = ((PyArrayObject *)values[3]); } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { __pyx_v_x = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0)); __pyx_v_l_list = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1)); __pyx_v_r_list = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 2)); __pyx_v_z_list = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 3)); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("inv_cross", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0.inv_cross"); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_bstruct_x.buf = NULL; __pyx_bstruct_l_list.buf = NULL; __pyx_bstruct_r_list.buf = NULL; __pyx_bstruct_z_list.buf = NULL; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l_list), __pyx_ptype_5numpy_ndarray, 1, "l_list", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_r_list), __pyx_ptype_5numpy_ndarray, 1, "r_list", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_z_list), __pyx_ptype_5numpy_ndarray, 1, "z_list", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_x, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_75_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0_cdouble_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_bstride_0_x = __pyx_bstruct_x.strides[0]; __pyx_bshape_0_x = __pyx_bstruct_x.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_l_list, (PyObject*)__pyx_v_l_list, &__Pyx_TypeInfo_nn___pyx_t_75_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0_cdouble_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_bstride_0_l_list = __pyx_bstruct_l_list.strides[0]; __pyx_bshape_0_l_list = __pyx_bstruct_l_list.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_r_list, (PyObject*)__pyx_v_r_list, &__Pyx_TypeInfo_nn___pyx_t_75_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0_cdouble_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_bstride_0_r_list = __pyx_bstruct_r_list.strides[0]; __pyx_bshape_0_r_list = __pyx_bstruct_r_list.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_z_list, (PyObject*)__pyx_v_z_list, &__Pyx_TypeInfo_nn___pyx_t_75_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0_cdouble_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_bstride_0_z_list = __pyx_bstruct_z_list.strides[0]; __pyx_bshape_0_z_list = __pyx_bstruct_z_list.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_v_x); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = ((PyObject *)__pyx_v_l_list); __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = ((PyObject *)__pyx_v_r_list); __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = ((PyObject *)__pyx_v_z_list); __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = PyFloat_FromDouble(__pyx_f_75_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0_inv_cross(((PyArrayObject *)__pyx_t_1), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_4), 0)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_x); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_r_list); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_z_list); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_l_list); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0.inv_cross"); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_bstruct_x); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_r_list); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_z_list); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_l_list); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; }
13: np.ndarray[cdouble_t] r_list, np.ndarray[cdouble_t] z_list):
14: cdef double k_f = x[0]
/* "_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0.pyx":14 * cpdef double inv_cross(np.ndarray[cdouble_t] x, np.ndarray[cdouble_t] l_list, * np.ndarray[cdouble_t] r_list, np.ndarray[cdouble_t] z_list): * cdef double k_f = x[0] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef double k_r = x[1] * cdef unsigned int m = len(l_list) */ __pyx_t_1 = 0; __pyx_t_2 = -1; if (__pyx_t_1<
0) { __pyx_t_1 += __pyx_bshape_0_x; if (unlikely(__pyx_t_1<
0)) __pyx_t_2 = 0; } else if (unlikely(__pyx_t_1 >= __pyx_bshape_0_x)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_k_f = (*__Pyx_BufPtrStrided1d(__pyx_t_75_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0_cdouble_t *, __pyx_bstruct_x.buf, __pyx_t_1, __pyx_bstride_0_x));
15: cdef double k_r = x[1]
/* "_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0.pyx":15 * np.ndarray[cdouble_t] r_list, np.ndarray[cdouble_t] z_list): * cdef double k_f = x[0] * cdef double k_r = x[1] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef unsigned int m = len(l_list) * cdef np.ndarray[cdouble_t] I = np.empty(m) */ __pyx_t_3 = 1; __pyx_t_2 = -1; if (__pyx_t_3<
0) { __pyx_t_3 += __pyx_bshape_0_x; if (unlikely(__pyx_t_3<
0)) __pyx_t_2 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_bshape_0_x)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_k_r = (*__Pyx_BufPtrStrided1d(__pyx_t_75_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0_cdouble_t *, __pyx_bstruct_x.buf, __pyx_t_3, __pyx_bstride_0_x));
16: cdef unsigned int m = len(l_list)
/* "_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0.pyx":16 * cdef double k_f = x[0] * cdef double k_r = x[1] * cdef unsigned int m = len(l_list) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef np.ndarray[cdouble_t] I = np.empty(m) * cdef np.ndarray[cdouble_t] coeffs = np.empty(5) */ __pyx_t_4 = ((PyObject *)__pyx_v_l_list); __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_m = __pyx_t_5;
17: cdef np.ndarray[cdouble_t] I = np.empty(m)
/* "_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0.pyx":17 * cdef double k_r = x[1] * cdef unsigned int m = len(l_list) * cdef np.ndarray[cdouble_t] I = np.empty(m) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef np.ndarray[cdouble_t] coeffs = np.empty(5) * cdef np.ndarray[cdouble_t] monoms = np.empty(5) */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__empty); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyLong_FromUnsignedLong(__pyx_v_m); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_7)); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 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 = 17; __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_bstruct_I, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_75_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0_cdouble_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_I = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_I.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_bstride_0_I = __pyx_bstruct_I.strides[0]; __pyx_bshape_0_I = __pyx_bstruct_I.shape[0]; } } __pyx_t_8 = 0; __pyx_v_I = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0;
18: cdef np.ndarray[cdouble_t] coeffs = np.empty(5)
/* "_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0.pyx":18 * cdef unsigned int m = len(l_list) * cdef np.ndarray[cdouble_t] I = np.empty(m) * cdef np.ndarray[cdouble_t] coeffs = np.empty(5) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef np.ndarray[cdouble_t] monoms = np.empty(5) * cdef unsigned int i, j */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__empty); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_k_tuple_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 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 = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_coeffs, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_75_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0_cdouble_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_coeffs = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_coeffs.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_bstride_0_coeffs = __pyx_bstruct_coeffs.strides[0]; __pyx_bshape_0_coeffs = __pyx_bstruct_coeffs.shape[0]; } } __pyx_t_9 = 0; __pyx_v_coeffs = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0.pyx":18 * cdef unsigned int m = len(l_list) * cdef np.ndarray[cdouble_t] I = np.empty(m) * cdef np.ndarray[cdouble_t] coeffs = np.empty(5) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef np.ndarray[cdouble_t] monoms = np.empty(5) * cdef unsigned int i, j */ __pyx_k_tuple_1 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_1)); __Pyx_INCREF(__pyx_int_5); PyTuple_SET_ITEM(__pyx_k_tuple_1, 0, __pyx_int_5); __Pyx_GIVEREF(__pyx_int_5); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_1));
19: cdef np.ndarray[cdouble_t] monoms = np.empty(5)
/* "_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0.pyx":19 * cdef np.ndarray[cdouble_t] I = np.empty(m) * cdef np.ndarray[cdouble_t] coeffs = np.empty(5) * cdef np.ndarray[cdouble_t] monoms = np.empty(5) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef unsigned int i, j * cdef double l, r, z */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__empty); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_k_tuple_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 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 = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_monoms, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_75_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0_cdouble_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_monoms = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_monoms.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_bstride_0_monoms = __pyx_bstruct_monoms.strides[0]; __pyx_bshape_0_monoms = __pyx_bstruct_monoms.shape[0]; } } __pyx_t_10 = 0; __pyx_v_monoms = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0.pyx":19 * cdef np.ndarray[cdouble_t] I = np.empty(m) * cdef np.ndarray[cdouble_t] coeffs = np.empty(5) * cdef np.ndarray[cdouble_t] monoms = np.empty(5) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef unsigned int i, j * cdef double l, r, z */ __pyx_k_tuple_2 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_2)); __Pyx_INCREF(__pyx_int_5); PyTuple_SET_ITEM(__pyx_k_tuple_2, 0, __pyx_int_5); __Pyx_GIVEREF(__pyx_int_5); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_2));
20: cdef unsigned int i, j
21: cdef double l, r, z
22: for i from 0 <= i < m:
/* "_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0.pyx":22 * cdef unsigned int i, j * cdef double l, r, z * for i from 0<
= i<
m: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* l = l_list[i] * r = r_list[i] */ __pyx_t_11 = __pyx_v_m; for (__pyx_v_i = 0; __pyx_v_i<
__pyx_t_11; __pyx_v_i++) {
23: l = l_list[i]
/* "_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0.pyx":23 * cdef double l, r, z * for i from 0<
= i<
m: * l = l_list[i] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* r = r_list[i] * z = z_list[i] */ __pyx_t_12 = __pyx_v_i; __pyx_t_2 = -1; if (unlikely(__pyx_t_12 >= (size_t)__pyx_bshape_0_l_list)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_l = (*__Pyx_BufPtrStrided1d(__pyx_t_75_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0_cdouble_t *, __pyx_bstruct_l_list.buf, __pyx_t_12, __pyx_bstride_0_l_list));
24: r = r_list[i]
/* "_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0.pyx":24 * for i from 0<
= i<
m: * l = l_list[i] * r = r_list[i] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* z = z_list[i] * coeffs = np.array([3*k_f, -3*k_f, -k_f, k_f, -k_r]) */ __pyx_t_13 = __pyx_v_i; __pyx_t_2 = -1; if (unlikely(__pyx_t_13 >= (size_t)__pyx_bshape_0_r_list)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_r = (*__Pyx_BufPtrStrided1d(__pyx_t_75_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0_cdouble_t *, __pyx_bstruct_r_list.buf, __pyx_t_13, __pyx_bstride_0_r_list));
25: z = z_list[i]
/* "_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0.pyx":25 * l = l_list[i] * r = r_list[i] * z = z_list[i] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* coeffs = np.array([3*k_f, -3*k_f, -k_f, k_f, -k_r]) * monoms = np.array([l*r, l*z, r*z, z**2, z]) */ __pyx_t_14 = __pyx_v_i; __pyx_t_2 = -1; if (unlikely(__pyx_t_14 >= (size_t)__pyx_bshape_0_z_list)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_z = (*__Pyx_BufPtrStrided1d(__pyx_t_75_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0_cdouble_t *, __pyx_bstruct_z_list.buf, __pyx_t_14, __pyx_bstride_0_z_list));
26: coeffs = np.array([3*k_f, -3*k_f, -k_f, k_f, -k_r])
/* "_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0.pyx":26 * r = r_list[i] * z = z_list[i] * coeffs = np.array([3*k_f, -3*k_f, -k_f, k_f, -k_r]) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* monoms = np.array([l*r, l*z, r*z, z**2, z]) * I[i] = np.dot(coeffs,monoms) / np.dot(np.abs(coeffs),np.abs(monoms)) */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__array); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyFloat_FromDouble((3.0 * __pyx_v_k_f)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyFloat_FromDouble((-3.0 * __pyx_v_k_f)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_15 = PyFloat_FromDouble((-__pyx_v_k_f)); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_16 = PyFloat_FromDouble(__pyx_v_k_f); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_17 = PyFloat_FromDouble((-__pyx_v_k_r)); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_18 = PyList_New(5); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_18)); PyList_SET_ITEM(__pyx_t_18, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyList_SET_ITEM(__pyx_t_18, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyList_SET_ITEM(__pyx_t_18, 2, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_15); PyList_SET_ITEM(__pyx_t_18, 3, __pyx_t_16); __Pyx_GIVEREF(__pyx_t_16); PyList_SET_ITEM(__pyx_t_18, 4, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); __pyx_t_4 = 0; __pyx_t_6 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_17)); PyTuple_SET_ITEM(__pyx_t_17, 0, ((PyObject *)__pyx_t_18)); __Pyx_GIVEREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; __pyx_t_18 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_17), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0; if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_18); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_bstruct_coeffs); __pyx_t_2 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_coeffs, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_75_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0_cdouble_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_2<
0)) { PyErr_Fetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_coeffs, (PyObject*)__pyx_v_coeffs, &__Pyx_TypeInfo_nn___pyx_t_75_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0_cdouble_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_19); Py_XDECREF(__pyx_t_20); Py_XDECREF(__pyx_t_21); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_19, __pyx_t_20, __pyx_t_21); } } __pyx_bstride_0_coeffs = __pyx_bstruct_coeffs.strides[0]; __pyx_bshape_0_coeffs = __pyx_bstruct_coeffs.shape[0]; if (unlikely(__pyx_t_2<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_v_coeffs)); __pyx_v_coeffs = ((PyArrayObject *)__pyx_t_18); __pyx_t_18 = 0;
27: monoms = np.array([l*r, l*z, r*z, z**2, z])
/* "_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0.pyx":27 * z = z_list[i] * coeffs = np.array([3*k_f, -3*k_f, -k_f, k_f, -k_r]) * monoms = np.array([l*r, l*z, r*z, z**2, z]) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* I[i] = np.dot(coeffs,monoms) / np.dot(np.abs(coeffs),np.abs(monoms)) * return np.linalg.norm(I) / np.sqrt(len(I)) */ __pyx_t_18 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_17 = PyObject_GetAttr(__pyx_t_18, __pyx_n_s__array); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = PyFloat_FromDouble((__pyx_v_l * __pyx_v_r)); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_7 = PyFloat_FromDouble((__pyx_v_l * __pyx_v_z)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_16 = PyFloat_FromDouble((__pyx_v_r * __pyx_v_z)); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_15 = PyFloat_FromDouble(pow(__pyx_v_z, 2.0)); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_6 = PyFloat_FromDouble(__pyx_v_z); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PyList_New(5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); PyList_SET_ITEM(__pyx_t_4, 2, __pyx_t_16); __Pyx_GIVEREF(__pyx_t_16); PyList_SET_ITEM(__pyx_t_4, 3, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_15); PyList_SET_ITEM(__pyx_t_4, 4, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_18 = 0; __pyx_t_7 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_4)); __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_17, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(((PyObject *)__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 = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_bstruct_monoms); __pyx_t_2 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_monoms, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_75_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0_cdouble_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_2<
0)) { PyErr_Fetch(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_monoms, (PyObject*)__pyx_v_monoms, &__Pyx_TypeInfo_nn___pyx_t_75_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0_cdouble_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_21); Py_XDECREF(__pyx_t_20); Py_XDECREF(__pyx_t_19); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_21, __pyx_t_20, __pyx_t_19); } } __pyx_bstride_0_monoms = __pyx_bstruct_monoms.strides[0]; __pyx_bshape_0_monoms = __pyx_bstruct_monoms.shape[0]; if (unlikely(__pyx_t_2<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = 0; __Pyx_DECREF(((PyObject *)__pyx_v_monoms)); __pyx_v_monoms = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0;
28: I[i] = np.dot(coeffs,monoms) / np.dot(np.abs(coeffs),np.abs(monoms))
/* "_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0.pyx":28 * coeffs = np.array([3*k_f, -3*k_f, -k_f, k_f, -k_r]) * monoms = np.array([l*r, l*z, r*z, z**2, z]) * I[i] = np.dot(coeffs,monoms) / np.dot(np.abs(coeffs),np.abs(monoms)) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* return np.linalg.norm(I) / np.sqrt(len(I)) */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__dot); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __Pyx_INCREF(((PyObject *)__pyx_v_coeffs)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_coeffs)); __Pyx_GIVEREF(((PyObject *)__pyx_v_coeffs)); __Pyx_INCREF(((PyObject *)__pyx_v_monoms)); PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_monoms)); __Pyx_GIVEREF(((PyObject *)__pyx_v_monoms)); __pyx_t_17 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__dot); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_15 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__abs); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __Pyx_INCREF(((PyObject *)__pyx_v_coeffs)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_coeffs)); __Pyx_GIVEREF(((PyObject *)__pyx_v_coeffs)); __pyx_t_16 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_15 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__abs); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __Pyx_INCREF(((PyObject *)__pyx_v_monoms)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_monoms)); __Pyx_GIVEREF(((PyObject *)__pyx_v_monoms)); __pyx_t_7 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_16); __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_16 = 0; __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_17, __pyx_t_7); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_22 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_22 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_23 = __pyx_v_i; __pyx_t_2 = -1; if (unlikely(__pyx_t_23 >= (size_t)__pyx_bshape_0_I)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_75_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0_cdouble_t *, __pyx_bstruct_I.buf, __pyx_t_23, __pyx_bstride_0_I) = __pyx_t_22; }
29: return np.linalg.norm(I) / np.sqrt(len(I))
/* "_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0.pyx":29 * monoms = np.array([l*r, l*z, r*z, z**2, z]) * I[i] = np.dot(coeffs,monoms) / np.dot(np.abs(coeffs),np.abs(monoms)) * return np.linalg.norm(I) / np.sqrt(len(I)) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
*/ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__linalg); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__norm); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_7)); __Pyx_INCREF(((PyObject *)__pyx_v_I)); PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_I)); __Pyx_GIVEREF(((PyObject *)__pyx_v_I)); __pyx_t_17 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__sqrt); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_5 = PyObject_Length(((PyObject *)__pyx_v_I)); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyNumber_Divide(__pyx_t_17, __pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_24 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_24 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_24; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_16); __Pyx_XDECREF(__pyx_t_17); __Pyx_XDECREF(__pyx_t_18); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_monoms); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_I); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_l_list); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_r_list); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_coeffs); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_x); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_z_list); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_WriteUnraisable("_sagenb_servers_sage_notebook_sagenb_sagenb_home_klho_20_code_sage57_spyx_0.inv_cross"); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_bstruct_monoms); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_I); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_l_list); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_r_list); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_coeffs); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_x); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_z_list); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_I); __Pyx_XDECREF((PyObject *)__pyx_v_coeffs); __Pyx_XDECREF((PyObject *)__pyx_v_monoms); __Pyx_RefNannyFinishContext(); return __pyx_r; }