/pullahelpers.html
HTML | 1459 lines | 1442 code | 16 blank | 1 comment | 0 complexity | e0c14c1aec77a0c83670c8941efa72df MD5 | raw file
Large files files are truncated, but you can click here to view the full file
- <!-- Generated by Cython 0.17.1 on Tue Dec 18 22:56:11 2012 -->
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <style type="text/css">
- body { font-family: courier; font-size: 12; }
- .code { font-size: 9; color: #444444; display: none; margin-left: 20px; }
- .py_c_api { color: red; }
- .py_macro_api { color: #FF7000; }
- .pyx_c_api { color: #FF3000; }
- .pyx_macro_api { color: #FF7000; }
- .refnanny { color: #FFA000; }
- .error_goto { color: #FFA000; }
- .tag { }
- .coerce { color: #008000; border: 1px dotted #008000 }
- .py_attr { color: #FF0000; font-weight: bold; }
- .c_attr { color: #0000FF; }
- .py_call { color: #FF0000; font-weight: bold; }
- .c_call { color: #0000FF; }
- .line { margin: 0em }
- </style>
- <script>
- function toggleDiv(id) {
- theDiv = document.getElementById(id);
- if (theDiv.style.display == 'none') theDiv.style.display = 'block';
- else theDiv.style.display = 'none';
- }
- </script>
- </head>
- <body>
- <p>Generated by Cython 0.17.1 on Tue Dec 18 22:56:11 2012
- <p>Raw output: <a href="pullahelpers.c">pullahelpers.c</a>
- <pre class='line' style='background-color: #FFFF57' onclick='toggleDiv("line1")'> 1: import numpy as np</pre>
- <pre id='line1' class='code' style='background-color: #FFFF57'>
- /* "pullahelpers.pyx":1
- * import numpy as np # <code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code>
- * cimport numpy as np
- * cimport cython
- */
- __pyx_t_1 = <span class='pyx_c_api'>__Pyx_Import</span>(((PyObject *)__pyx_n_s__numpy), 0, -1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_1);
- if (<span class='py_c_api'>PyObject_SetAttr</span>(__pyx_m, __pyx_n_s__np, __pyx_t_1) <code><</code> 0)<span class='error_goto'> {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
- /* "pullahelpers.pyx":1
- * import numpy as np # <code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code>
- * cimport numpy as np
- * cimport cython
- */
- __pyx_t_1 = <span class='py_c_api'>PyDict_New</span>();<span class='error_goto'> if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(((PyObject *)__pyx_t_1));
- if (<span class='py_c_api'>PyObject_SetAttr</span>(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_1)) <code><</code> 0)<span class='error_goto'> {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'>__Pyx_DECREF</span>(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
- </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line2")'> 2: cimport numpy as np</pre>
- <pre id='line2' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line3")'> 3: cimport cython</pre>
- <pre id='line3' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line4")'> 4: </pre>
- <pre id='line4' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line5")'> 5: </pre>
- <pre id='line5' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line6")'> 6: </pre>
- <pre id='line6' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line7")'> 7: ctypedef np.float_t DTYPE_t</pre>
- <pre id='line7' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line8")'> 8: </pre>
- <pre id='line8' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line9")'> 9: @cython.boundscheck(False)</pre>
- <pre id='line9' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFF29' onclick='toggleDiv("line10")'> 10: def interpolate(np.ndarray[DTYPE_t, ndim=2] mapgrid):</pre>
- <pre id='line10' class='code' style='background-color: #FFFF29'>
- /* "pullahelpers.pyx":10
- *
- * @cython.boundscheck(False)
- * def interpolate(np.ndarray[DTYPE_t, ndim=2] mapgrid): # <code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code>
- * cdef int xmax = mapgrid.shape[0]
- * cdef int ymax = mapgrid.shape[1]
- */
- static PyObject *__pyx_pf_12pullahelpers_interpolate(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mapgrid) {
- int __pyx_v_xmax;
- int __pyx_v_ymax;
- __pyx_t_12pullahelpers_DTYPE_t __pyx_v_val1;
- __pyx_t_12pullahelpers_DTYPE_t __pyx_v_val2;
- int __pyx_v_val1f;
- int __pyx_v_val2f;
- int __pyx_v_x;
- int __pyx_v_y;
- int __pyx_v_i1;
- int __pyx_v_i2;
- int __pyx_v_j1;
- int __pyx_v_j2;
- int __pyx_v_i;
- int __pyx_v_j;
- int __pyx_v_c;
- PyObject *__pyx_v_val = NULL;
- __Pyx_LocalBuf_ND __pyx_pybuffernd_mapgrid;
- __Pyx_Buffer __pyx_pybuffer_mapgrid;
- PyObject *__pyx_r = NULL;
- <span class='refnanny'>__Pyx_RefNannyDeclarations</span>
- <span class='pyx_c_api'><span class='refnanny'>__Pyx_RefNannySetupContext</span></span>("interpolate", 0);
- __pyx_pybuffer_mapgrid.pybuffer.buf = NULL;
- __pyx_pybuffer_mapgrid.refcount = 0;
- __pyx_pybuffernd_mapgrid.data = NULL;
- __pyx_pybuffernd_mapgrid.rcbuffer = &__pyx_pybuffer_mapgrid;
- {
- __Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(<span class='pyx_c_api'>__Pyx_GetBufferAndValidate</span>(&__pyx_pybuffernd_mapgrid.rcbuffer->pybuffer, (PyObject*)__pyx_v_mapgrid, &__Pyx_TypeInfo_nn___pyx_t_12pullahelpers_DTYPE_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1))<span class='error_goto'> {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- }
- __pyx_pybuffernd_mapgrid.diminfo[0].strides = __pyx_pybuffernd_mapgrid.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mapgrid.diminfo[0].shape = __pyx_pybuffernd_mapgrid.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_mapgrid.diminfo[1].strides = __pyx_pybuffernd_mapgrid.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mapgrid.diminfo[1].shape = __pyx_pybuffernd_mapgrid.rcbuffer->pybuffer.shape[1];
- /* "pullahelpers.pyx":10
- *
- * @cython.boundscheck(False)
- * def interpolate(np.ndarray[DTYPE_t, ndim=2] mapgrid): # <code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code>
- * cdef int xmax = mapgrid.shape[0]
- * cdef int ymax = mapgrid.shape[1]
- */
- __pyx_k_tuple_13 = <span class='py_c_api'>PyTuple_New</span>(19);<span class='error_goto'> if (unlikely(!__pyx_k_tuple_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_k_tuple_13);
- <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__mapgrid));
- <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 0, ((PyObject *)__pyx_n_s__mapgrid));
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__mapgrid));
- <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__xmax));
- <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 1, ((PyObject *)__pyx_n_s__xmax));
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__xmax));
- <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__ymax));
- <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 2, ((PyObject *)__pyx_n_s__ymax));
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__ymax));
- <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__val1));
- <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 3, ((PyObject *)__pyx_n_s__val1));
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__val1));
- <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__val2));
- <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 4, ((PyObject *)__pyx_n_s__val2));
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__val2));
- <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__val1f));
- <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 5, ((PyObject *)__pyx_n_s__val1f));
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__val1f));
- <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__val2f));
- <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 6, ((PyObject *)__pyx_n_s__val2f));
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__val2f));
- <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__x));
- <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 7, ((PyObject *)__pyx_n_s__x));
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__x));
- <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__y));
- <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 8, ((PyObject *)__pyx_n_s__y));
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__y));
- <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__i1));
- <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 9, ((PyObject *)__pyx_n_s__i1));
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__i1));
- <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__i2));
- <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 10, ((PyObject *)__pyx_n_s__i2));
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__i2));
- <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__j1));
- <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 11, ((PyObject *)__pyx_n_s__j1));
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__j1));
- <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__j2));
- <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 12, ((PyObject *)__pyx_n_s__j2));
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__j2));
- <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__i12));
- <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 13, ((PyObject *)__pyx_n_s__i12));
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__i12));
- <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__DTYPE_t));
- <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 14, ((PyObject *)__pyx_n_s__DTYPE_t));
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__DTYPE_t));
- <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__i));
- <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 15, ((PyObject *)__pyx_n_s__i));
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__i));
- <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__j));
- <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 16, ((PyObject *)__pyx_n_s__j));
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__j));
- <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__c));
- <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 17, ((PyObject *)__pyx_n_s__c));
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__c));
- <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__val));
- <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 18, ((PyObject *)__pyx_n_s__val));
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__val));
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_k_tuple_13));
- /* "pullahelpers.pyx":10
- *
- * @cython.boundscheck(False)
- * def interpolate(np.ndarray[DTYPE_t, ndim=2] mapgrid): # <code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code>
- * cdef int xmax = mapgrid.shape[0]
- * cdef int ymax = mapgrid.shape[1]
- */
- __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_12pullahelpers_1interpolate, NULL, __pyx_n_s__pullahelpers);<span class='error_goto'> if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_1);
- if (<span class='py_c_api'>PyObject_SetAttr</span>(__pyx_m, __pyx_n_s__interpolate, __pyx_t_1) <code><</code> 0)<span class='error_goto'> {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
- </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line11")'> 11: cdef int xmax = mapgrid.shape[0]</pre>
- <pre id='line11' class='code' style='background-color: #FFFFff'>
- /* "pullahelpers.pyx":11
- * @cython.boundscheck(False)
- * def interpolate(np.ndarray[DTYPE_t, ndim=2] mapgrid):
- * cdef int xmax = mapgrid.shape[0] # <code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code>
- * cdef int ymax = mapgrid.shape[1]
- * cdef DTYPE_t val1,val2
- */
- __pyx_v_xmax = (__pyx_v_mapgrid->dimensions[0]);
- </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line12")'> 12: cdef int ymax = mapgrid.shape[1]</pre>
- <pre id='line12' class='code' style='background-color: #FFFFff'>
- /* "pullahelpers.pyx":12
- * def interpolate(np.ndarray[DTYPE_t, ndim=2] mapgrid):
- * cdef int xmax = mapgrid.shape[0]
- * cdef int ymax = mapgrid.shape[1] # <code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code>
- * cdef DTYPE_t val1,val2
- * cdef int val1f,val2f
- */
- __pyx_v_ymax = (__pyx_v_mapgrid->dimensions[1]);
- </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line13")'> 13: cdef DTYPE_t val1,val2</pre>
- <pre id='line13' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line14")'> 14: cdef int val1f,val2f</pre>
- <pre id='line14' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line15")'> 15: cdef int x, y</pre>
- <pre id='line15' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line16")'> 16: </pre>
- <pre id='line16' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line17")'> 17: cdef int i1,i2,j1,j2,i12</pre>
- <pre id='line17' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line18")'> 18: </pre>
- <pre id='line18' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFd4' onclick='toggleDiv("line19")'> 19: print 'step1'</pre>
- <pre id='line19' class='code' style='background-color: #FFFFd4'>
- /* "pullahelpers.pyx":19
- * cdef int i1,i2,j1,j2,i12
- *
- * print 'step1' # <code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code>
- * for x in xrange(xmax):
- * if not np.isnan(np.sum(mapgrid[x])): #Ei tyhjia rivilla -> skipataan koko rivi
- */
- if (<span class='pyx_c_api'>__Pyx_PrintOne</span>(0, ((PyObject *)__pyx_n_s__step1)) <code><</code> 0)<span class='error_goto'> {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line20")'> 20: for x in xrange(xmax):</pre>
- <pre id='line20' class='code' style='background-color: #FFFFff'>
- /* "pullahelpers.pyx":20
- *
- * print 'step1'
- * for x in xrange(xmax): # <code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code>
- * if not np.isnan(np.sum(mapgrid[x])): #Ei tyhjia rivilla -> skipataan koko rivi
- * continue
- */
- __pyx_t_1 = __pyx_v_xmax;
- for (__pyx_t_2 = 0; __pyx_t_2 <code><</code> __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_x = __pyx_t_2;
- </pre><pre class='line' style='background-color: #FFFF2a' onclick='toggleDiv("line21")'> 21: if not np.isnan(np.sum(mapgrid[x])): #Ei tyhjia rivilla -> skipataan koko rivi</pre>
- <pre id='line21' class='code' style='background-color: #FFFF2a'>
- /* "pullahelpers.pyx":21
- * print 'step1'
- * for x in xrange(xmax):
- * if not np.isnan(np.sum(mapgrid[x])): #Ei tyhjia rivilla -> skipataan koko rivi # <code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code>
- * continue
- * for y in xrange(ymax):
- */
- __pyx_t_3 = <span class='pyx_c_api'>__Pyx_GetName</span>(__pyx_m, __pyx_n_s__np);<span class='error_goto'> if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_3);
- __pyx_t_4 = <span class='py_c_api'>PyObject_GetAttr</span>(__pyx_t_3, __pyx_n_s__isnan);<span class='error_goto'> if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_4);
- <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = <span class='pyx_c_api'>__Pyx_GetName</span>(__pyx_m, __pyx_n_s__np);<span class='error_goto'> if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_3);
- __pyx_t_5 = <span class='py_c_api'>PyObject_GetAttr</span>(__pyx_t_3, __pyx_n_s__sum);<span class='error_goto'> if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_5);
- <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = <span class='pyx_c_api'>__Pyx_GetItemInt</span>(((PyObject *)__pyx_v_mapgrid), __pyx_v_x, sizeof(int), PyInt_FromLong);<span class='error_goto'> if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_3);
- __pyx_t_6 = <span class='py_c_api'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_6);
- <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 0, __pyx_t_3);
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(__pyx_t_3);
- __pyx_t_3 = 0;
- __pyx_t_3 = <span class='py_c_api'>PyObject_Call</span>(__pyx_t_5, ((PyObject *)__pyx_t_6), NULL);<span class='error_goto'> if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_3);
- <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0;
- <span class='pyx_macro_api'>__Pyx_DECREF</span>(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
- __pyx_t_6 = <span class='py_c_api'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_6);
- <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 0, __pyx_t_3);
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(__pyx_t_3);
- __pyx_t_3 = 0;
- __pyx_t_3 = <span class='py_c_api'>PyObject_Call</span>(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL);<span class='error_goto'> if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_3);
- <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
- <span class='pyx_macro_api'>__Pyx_DECREF</span>(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
- __pyx_t_7 = __Pyx_<span class='py_c_api'>PyObject_IsTrue</span>(__pyx_t_3);<span class='error_goto'> if (unlikely(__pyx_t_7 <code><</code> 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_8 = (!__pyx_t_7);
- if (__pyx_t_8) {
- </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line22")'> 22: continue</pre>
- <pre id='line22' class='code' style='background-color: #FFFFff'>
- /* "pullahelpers.pyx":22
- * for x in xrange(xmax):
- * if not np.isnan(np.sum(mapgrid[x])): #Ei tyhjia rivilla -> skipataan koko rivi
- * continue # <code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code>
- * for y in xrange(ymax):
- * if not np.isnan(mapgrid[x][y]):
- */
- goto __pyx_L3_continue;
- goto __pyx_L5;
- }
- __pyx_L5:;
- </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line23")'> 23: for y in xrange(ymax):</pre>
- <pre id='line23' class='code' style='background-color: #FFFFff'>
- /* "pullahelpers.pyx":23
- * if not np.isnan(np.sum(mapgrid[x])): #Ei tyhjia rivilla -> skipataan koko rivi
- * continue
- * for y in xrange(ymax): # <code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code>
- * if not np.isnan(mapgrid[x][y]):
- * continue
- */
- __pyx_t_9 = __pyx_v_ymax;
- for (__pyx_t_10 = 0; __pyx_t_10 <code><</code> __pyx_t_9; __pyx_t_10+=1) {
- __pyx_v_y = __pyx_t_10;
- </pre><pre class='line' style='background-color: #FFFF3c' onclick='toggleDiv("line24")'> 24: if not np.isnan(mapgrid[x][y]):</pre>
- <pre id='line24' class='code' style='background-color: #FFFF3c'>
- /* "pullahelpers.pyx":24
- * continue
- * for y in xrange(ymax):
- * if not np.isnan(mapgrid[x][y]): # <code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code>
- * continue
- *
- */
- __pyx_t_3 = <span class='pyx_c_api'>__Pyx_GetName</span>(__pyx_m, __pyx_n_s__np);<span class='error_goto'> if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_3);
- __pyx_t_6 = <span class='py_c_api'>PyObject_GetAttr</span>(__pyx_t_3, __pyx_n_s__isnan);<span class='error_goto'> if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_6);
- <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = <span class='pyx_c_api'>__Pyx_GetItemInt</span>(((PyObject *)__pyx_v_mapgrid), __pyx_v_x, sizeof(int), PyInt_FromLong);<span class='error_goto'> if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_3);
- __pyx_t_4 = <span class='pyx_c_api'>__Pyx_GetItemInt</span>(__pyx_t_3, __pyx_v_y, sizeof(int), PyInt_FromLong);<span class='error_goto'> if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_4);
- <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = <span class='py_c_api'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_3);
- <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_3, 0, __pyx_t_4);
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(__pyx_t_4);
- __pyx_t_4 = 0;
- __pyx_t_4 = <span class='py_c_api'>PyObject_Call</span>(__pyx_t_6, ((PyObject *)__pyx_t_3), NULL);<span class='error_goto'> if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_4);
- <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
- <span class='pyx_macro_api'>__Pyx_DECREF</span>(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
- __pyx_t_8 = __Pyx_<span class='py_c_api'>PyObject_IsTrue</span>(__pyx_t_4);<span class='error_goto'> if (unlikely(__pyx_t_8 <code><</code> 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_7 = (!__pyx_t_8);
- if (__pyx_t_7) {
- </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line25")'> 25: continue</pre>
- <pre id='line25' class='code' style='background-color: #FFFFff'>
- /* "pullahelpers.pyx":25
- * for y in xrange(ymax):
- * if not np.isnan(mapgrid[x][y]):
- * continue # <code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code>
- *
- * i1 = x
- */
- goto __pyx_L6_continue;
- goto __pyx_L8;
- }
- __pyx_L8:;
- </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line26")'> 26: </pre>
- <pre id='line26' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line27")'> 27: i1 = x</pre>
- <pre id='line27' class='code' style='background-color: #FFFFff'>
- /* "pullahelpers.pyx":27
- * continue
- *
- * i1 = x # <code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code>
- * i2 = x
- * j1 = y
- */
- __pyx_v_i1 = __pyx_v_x;
- </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line28")'> 28: i2 = x</pre>
- <pre id='line28' class='code' style='background-color: #FFFFff'>
- /* "pullahelpers.pyx":28
- *
- * i1 = x
- * i2 = x # <code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code>
- * j1 = y
- * j2 = y
- */
- __pyx_v_i2 = __pyx_v_x;
- </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line29")'> 29: j1 = y</pre>
- <pre id='line29' class='code' style='background-color: #FFFFff'>
- /* "pullahelpers.pyx":29
- * i1 = x
- * i2 = x
- * j1 = y # <code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code>
- * j2 = y
- *
- */
- __pyx_v_j1 = __pyx_v_y;
- </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line30")'> 30: j2 = y</pre>
- <pre id='line30' class='code' style='background-color: #FFFFff'>
- /* "pullahelpers.pyx":30
- * i2 = x
- * j1 = y
- * j2 = y # <code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code>
- *
- * for i1 from -x <code><</code>= i1 <code><</code> 0 by 1:
- */
- __pyx_v_j2 = __pyx_v_y;
- </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line31")'> 31: </pre>
- <pre id='line31' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line32")'> 32: for i1 from -x <= i1 < 0 by 1:</pre>
- <pre id='line32' class='code' style='background-color: #FFFFff'>
- /* "pullahelpers.pyx":32
- * j2 = y
- *
- * for i1 from -x <code><</code>= i1 <code><</code> 0 by 1: # <code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code>
- * if not np.isnan(mapgrid[-i1][y]):
- * break
- */
- for (__pyx_v_i1 = (-__pyx_v_x); __pyx_v_i1 <code><</code> 0; __pyx_v_i1+=1) {
- </pre><pre class='line' style='background-color: #FFFF3c' onclick='toggleDiv("line33")'> 33: if not np.isnan(mapgrid[-i1][y]):</pre>
- <pre id='line33' class='code' style='background-color: #FFFF3c'>
- /* "pullahelpers.pyx":33
- *
- * for i1 from -x <code><</code>= i1 <code><</code> 0 by 1:
- * if not np.isnan(mapgrid[-i1][y]): # <code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code>
- * break
- * i1 = -i1
- */
- __pyx_t_4 = <span class='pyx_c_api'>__Pyx_GetName</span>(__pyx_m, __pyx_n_s__np);<span class='error_goto'> if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_4);
- __pyx_t_3 = <span class='py_c_api'>PyObject_GetAttr</span>(__pyx_t_4, __pyx_n_s__isnan);<span class='error_goto'> if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_3);
- <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_11 = (-__pyx_v_i1);
- __pyx_t_4 = <span class='pyx_c_api'>__Pyx_GetItemInt</span>(((PyObject *)__pyx_v_mapgrid), __pyx_t_11, sizeof(int), PyInt_FromLong);<span class='error_goto'> if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_4);
- __pyx_t_6 = <span class='pyx_c_api'>__Pyx_GetItemInt</span>(__pyx_t_4, __pyx_v_y, sizeof(int), PyInt_FromLong);<span class='error_goto'> if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_6);
- <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = <span class='py_c_api'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_4);
- <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_4, 0, __pyx_t_6);
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(__pyx_t_6);
- __pyx_t_6 = 0;
- __pyx_t_6 = <span class='py_c_api'>PyObject_Call</span>(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL);<span class='error_goto'> if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_6);
- <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
- <span class='pyx_macro_api'>__Pyx_DECREF</span>(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
- __pyx_t_7 = __Pyx_<span class='py_c_api'>PyObject_IsTrue</span>(__pyx_t_6);<span class='error_goto'> if (unlikely(__pyx_t_7 <code><</code> 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_8 = (!__pyx_t_7);
- if (__pyx_t_8) {
- </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line34")'> 34: break</pre>
- <pre id='line34' class='code' style='background-color: #FFFFff'>
- /* "pullahelpers.pyx":34
- * for i1 from -x <code><</code>= i1 <code><</code> 0 by 1:
- * if not np.isnan(mapgrid[-i1][y]):
- * break # <code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code>
- * i1 = -i1
- *
- */
- goto __pyx_L10_break;
- goto __pyx_L11;
- }
- __pyx_L11:;
- }
- __pyx_L10_break:;
- </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line35")'> 35: i1 = -i1</pre>
- <pre id='line35' class='code' style='background-color: #FFFFff'>
- /* "pullahelpers.pyx":35
- * if not np.isnan(mapgrid[-i1][y]):
- * break
- * i1 = -i1 # <code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code>
- *
- *
- */
- __pyx_v_i1 = (-__pyx_v_i1);
- </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line36")'> 36: </pre>
- <pre id='line36' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line37")'> 37: </pre>
- <pre id='line37' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line38")'> 38: </pre>
- <pre id='line38' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line39")'> 39: for i2 from x <= i2 < xmax-1 by 1:</pre>
- <pre id='line39' class='code' style='background-color: #FFFFff'>
- /* "pullahelpers.pyx":39
- *
- *
- * for i2 from x <code><</code>= i2 <code><</code> xmax-1 by 1: # <code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code>
- * if not np.isnan(mapgrid[i2][y]):
- * break
- */
- __pyx_t_12 = (__pyx_v_xmax - 1);
- for (__pyx_v_i2 = __pyx_v_x; __pyx_v_i2 <code><</code> __pyx_t_12; __pyx_v_i2+=1) {
- </pre><pre class='line' style='background-color: #FFFF3c' onclick='toggleDiv("line40")'> 40: if not np.isnan(mapgrid[i2][y]):</pre>
- <pre id='line40' class='code' style='background-color: #FFFF3c'>
- /* "pullahelpers.pyx":40
- *
- * for i2 from x <code><</code>= i2 <code><</code> xmax-1 by 1:
- * if not np.isnan(mapgrid[i2][y]): # <code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code>
- * break
- *
- */
- __pyx_t_6 = <span class='pyx_c_api'>__Pyx_GetName</span>(__pyx_m, __pyx_n_s__np);<span class='error_goto'> if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_6);
- __pyx_t_4 = <span class='py_c_api'>PyObject_GetAttr</span>(__pyx_t_6, __pyx_n_s__isnan);<span class='error_goto'> if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_4);
- <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_6 = <span class='pyx_c_api'>__Pyx_GetItemInt</span>(((PyObject *)__pyx_v_mapgrid), __pyx_v_i2, sizeof(int), PyInt_FromLong);<span class='error_goto'> if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_6);
- __pyx_t_3 = <span class='pyx_c_api'>__Pyx_GetItemInt</span>(__pyx_t_6, __pyx_v_y, sizeof(int), PyInt_FromLong);<span class='error_goto'> if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_3);
- <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_6 = <span class='py_c_api'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_6);
- <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 0, __pyx_t_3);
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(__pyx_t_3);
- __pyx_t_3 = 0;
- __pyx_t_3 = <span class='py_c_api'>PyObject_Call</span>(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL);<span class='error_goto'> if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_3);
- <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
- <span class='pyx_macro_api'>__Pyx_DECREF</span>(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
- __pyx_t_8 = __Pyx_<span class='py_c_api'>PyObject_IsTrue</span>(__pyx_t_3);<span class='error_goto'> if (unlikely(__pyx_t_8 <code><</code> 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_7 = (!__pyx_t_8);
- if (__pyx_t_7) {
- </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line41")'> 41: break</pre>
- <pre id='line41' class='code' style='background-color: #FFFFff'>
- /* "pullahelpers.pyx":41
- * for i2 from x <code><</code>= i2 <code><</code> xmax-1 by 1:
- * if not np.isnan(mapgrid[i2][y]):
- * break # <code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code>
- *
- * for j1 from -y <code><</code>= j1 <code><</code> 0 by 1:
- */
- goto __pyx_L13_break;
- goto __pyx_L14;
- }
- __pyx_L14:;
- }
- __pyx_L13_break:;
- </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line42")'> 42: </pre>
- <pre id='line42' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line43")'> 43: for j1 from -y <= j1 < 0 by 1:</pre>
- <pre id='line43' class='code' style='background-color: #FFFFff'>
- /* "pullahelpers.pyx":43
- * break
- *
- * for j1 from -y <code><</code>= j1 <code><</code> 0 by 1: # <code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code>
- * if not np.isnan(mapgrid[x][-j1]):
- * break
- */
- for (__pyx_v_j1 = (-__pyx_v_y); __pyx_v_j1 <code><</code> 0; __pyx_v_j1+=1) {
- </pre><pre class='line' style='background-color: #FFFF3c' onclick='toggleDiv("line44")'> 44: if not np.isnan(mapgrid[x][-j1]):</pre>
- <pre id='line44' class='code' style='background-color: #FFFF3c'>
- /* "pullahelpers.pyx":44
- *
- * for j1 from -y <code><</code>= j1 <code><</code> 0 by 1:
- * if not np.isnan(mapgrid[x][-j1]): # <code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code>
- * break
- * j1 = -j1
- */
- __pyx_t_3 = <span class='pyx_c_api'>__Pyx_GetName</span>(__pyx_m, __pyx_n_s__np);<span class='error_goto'> if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_3);
- __pyx_t_6 = <span class='py_c_api'>PyObject_GetAttr</span>(__pyx_t_3, __pyx_n_s__isnan);<span class='error_goto'> if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_6);
- <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = <span class='pyx_c_api'>__Pyx_GetItemInt</span>(((PyObject *)__pyx_v_mapgrid), __pyx_v_x, sizeof(int), PyInt_FromLong);<span class='error_goto'> if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_3);
- __pyx_t_11 = (-__pyx_v_j1);
- __pyx_t_4 = <span class='pyx_c_api'>__Pyx_GetItemInt</span>(__pyx_t_3, __pyx_t_11, sizeof(int), PyInt_FromLong);<span class='error_goto'> if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_4);
- <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = <span class='py_c_api'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_3);
- <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_3, 0, __pyx_t_4);
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(__pyx_t_4);
- __pyx_t_4 = 0;
- __pyx_t_4 = <span class='py_c_api'>PyObject_Call</span>(__pyx_t_6, ((PyObject *)__pyx_t_3), NULL);<span class='error_goto'> if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_4);
- <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
- <span class='pyx_macro_api'>__Pyx_DECREF</span>(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
- __pyx_t_7 = __Pyx_<span class='py_c_api'>PyObject_IsTrue</span>(__pyx_t_4);<span class='error_goto'> if (unlikely(__pyx_t_7 <code><</code> 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
- <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_8 = (!__pyx_t_7);
- if (__pyx_t_8) {
- </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line45")'> 45: break</pre>
- <pre id='line45' class='code' style='background-color: #FFFFff'>
- /* "pullahelpers.pyx":45
- * for j1 from -y <code><</code>= j1 <code><</code> 0 by 1:
- * if not np.isnan(mapgrid[x][-j1]):
- * break # <code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code>
- * j1 = -j1
- *
- */
- goto __pyx_L16_break;
- goto __pyx_L17;
- }
- __pyx_L17:;
- }
- __pyx_L16_break:;
- </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line46")'> 46: j1 = -j1</pre>
- <pre id='line46' class='code' style='background-color: #FFFFff'>
- /* "pullahelpers.pyx":46
- * if not np.isnan(mapgrid[x][-j1]):
- * break
- * j1 = -j1 # <code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code><code><</code>
- *
- * for j2 from x <code><</code>= j2 <code><</code> ymax-1 by 1:
- */
- __pyx_v_j1 = (-__pyx_v_j1);
- </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line47")'> 47: </pre>
- <pre id='line47' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line48")'> 48: for j2 from x <= j2 < ymax-1 by 1:</pre>
- <pre id='line48' class='code' style='background-color: #FFFFff'>
- /* "pul…
Large files files are truncated, but you can click here to view the full file