PageRenderTime 35ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/pullahelpers.html

https://bitbucket.org/pailakka/pullautin2
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

  1. <!-- Generated by Cython 0.17.1 on Tue Dec 18 22:56:11 2012 -->
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <style type="text/css">
  6. body { font-family: courier; font-size: 12; }
  7. .code { font-size: 9; color: #444444; display: none; margin-left: 20px; }
  8. .py_c_api { color: red; }
  9. .py_macro_api { color: #FF7000; }
  10. .pyx_c_api { color: #FF3000; }
  11. .pyx_macro_api { color: #FF7000; }
  12. .refnanny { color: #FFA000; }
  13. .error_goto { color: #FFA000; }
  14. .tag { }
  15. .coerce { color: #008000; border: 1px dotted #008000 }
  16. .py_attr { color: #FF0000; font-weight: bold; }
  17. .c_attr { color: #0000FF; }
  18. .py_call { color: #FF0000; font-weight: bold; }
  19. .c_call { color: #0000FF; }
  20. .line { margin: 0em }
  21. </style>
  22. <script>
  23. function toggleDiv(id) {
  24. theDiv = document.getElementById(id);
  25. if (theDiv.style.display == 'none') theDiv.style.display = 'block';
  26. else theDiv.style.display = 'none';
  27. }
  28. </script>
  29. </head>
  30. <body>
  31. <p>Generated by Cython 0.17.1 on Tue Dec 18 22:56:11 2012
  32. <p>Raw output: <a href="pullahelpers.c">pullahelpers.c</a>
  33. <pre class='line' style='background-color: #FFFF57' onclick='toggleDiv("line1")'> 1: import numpy as np</pre>
  34. <pre id='line1' class='code' style='background-color: #FFFF57'>
  35. /* "pullahelpers.pyx":1
  36. * 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>
  37. * cimport numpy as np
  38. * cimport cython
  39. */
  40. __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>
  41. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_1);
  42. 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>
  43. <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
  44. /* "pullahelpers.pyx":1
  45. * 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>
  46. * cimport numpy as np
  47. * cimport cython
  48. */
  49. __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>
  50. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(((PyObject *)__pyx_t_1));
  51. 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>
  52. <span class='pyx_macro_api'>__Pyx_DECREF</span>(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  53. </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line2")'> 2: cimport numpy as np</pre>
  54. <pre id='line2' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line3")'> 3: cimport cython</pre>
  55. <pre id='line3' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line4")'> 4: </pre>
  56. <pre id='line4' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line5")'> 5: </pre>
  57. <pre id='line5' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line6")'> 6: </pre>
  58. <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>
  59. <pre id='line7' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line8")'> 8: </pre>
  60. <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>
  61. <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>
  62. <pre id='line10' class='code' style='background-color: #FFFF29'>
  63. /* "pullahelpers.pyx":10
  64. *
  65. * @cython.boundscheck(False)
  66. * 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>
  67. * cdef int xmax = mapgrid.shape[0]
  68. * cdef int ymax = mapgrid.shape[1]
  69. */
  70. static PyObject *__pyx_pf_12pullahelpers_interpolate(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mapgrid) {
  71. int __pyx_v_xmax;
  72. int __pyx_v_ymax;
  73. __pyx_t_12pullahelpers_DTYPE_t __pyx_v_val1;
  74. __pyx_t_12pullahelpers_DTYPE_t __pyx_v_val2;
  75. int __pyx_v_val1f;
  76. int __pyx_v_val2f;
  77. int __pyx_v_x;
  78. int __pyx_v_y;
  79. int __pyx_v_i1;
  80. int __pyx_v_i2;
  81. int __pyx_v_j1;
  82. int __pyx_v_j2;
  83. int __pyx_v_i;
  84. int __pyx_v_j;
  85. int __pyx_v_c;
  86. PyObject *__pyx_v_val = NULL;
  87. __Pyx_LocalBuf_ND __pyx_pybuffernd_mapgrid;
  88. __Pyx_Buffer __pyx_pybuffer_mapgrid;
  89. PyObject *__pyx_r = NULL;
  90. <span class='refnanny'>__Pyx_RefNannyDeclarations</span>
  91. <span class='pyx_c_api'><span class='refnanny'>__Pyx_RefNannySetupContext</span></span>("interpolate", 0);
  92. __pyx_pybuffer_mapgrid.pybuffer.buf = NULL;
  93. __pyx_pybuffer_mapgrid.refcount = 0;
  94. __pyx_pybuffernd_mapgrid.data = NULL;
  95. __pyx_pybuffernd_mapgrid.rcbuffer = &__pyx_pybuffer_mapgrid;
  96. {
  97. __Pyx_BufFmt_StackElem __pyx_stack[1];
  98. 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>
  99. }
  100. __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];
  101. /* "pullahelpers.pyx":10
  102. *
  103. * @cython.boundscheck(False)
  104. * 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>
  105. * cdef int xmax = mapgrid.shape[0]
  106. * cdef int ymax = mapgrid.shape[1]
  107. */
  108. __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>
  109. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_k_tuple_13);
  110. <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__mapgrid));
  111. <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 0, ((PyObject *)__pyx_n_s__mapgrid));
  112. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__mapgrid));
  113. <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__xmax));
  114. <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 1, ((PyObject *)__pyx_n_s__xmax));
  115. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__xmax));
  116. <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__ymax));
  117. <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 2, ((PyObject *)__pyx_n_s__ymax));
  118. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__ymax));
  119. <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__val1));
  120. <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 3, ((PyObject *)__pyx_n_s__val1));
  121. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__val1));
  122. <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__val2));
  123. <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 4, ((PyObject *)__pyx_n_s__val2));
  124. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__val2));
  125. <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__val1f));
  126. <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 5, ((PyObject *)__pyx_n_s__val1f));
  127. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__val1f));
  128. <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__val2f));
  129. <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 6, ((PyObject *)__pyx_n_s__val2f));
  130. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__val2f));
  131. <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__x));
  132. <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 7, ((PyObject *)__pyx_n_s__x));
  133. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__x));
  134. <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__y));
  135. <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 8, ((PyObject *)__pyx_n_s__y));
  136. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__y));
  137. <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__i1));
  138. <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 9, ((PyObject *)__pyx_n_s__i1));
  139. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__i1));
  140. <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__i2));
  141. <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 10, ((PyObject *)__pyx_n_s__i2));
  142. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__i2));
  143. <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__j1));
  144. <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 11, ((PyObject *)__pyx_n_s__j1));
  145. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__j1));
  146. <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__j2));
  147. <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 12, ((PyObject *)__pyx_n_s__j2));
  148. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__j2));
  149. <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__i12));
  150. <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 13, ((PyObject *)__pyx_n_s__i12));
  151. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__i12));
  152. <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__DTYPE_t));
  153. <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 14, ((PyObject *)__pyx_n_s__DTYPE_t));
  154. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__DTYPE_t));
  155. <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__i));
  156. <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 15, ((PyObject *)__pyx_n_s__i));
  157. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__i));
  158. <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__j));
  159. <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 16, ((PyObject *)__pyx_n_s__j));
  160. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__j));
  161. <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__c));
  162. <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 17, ((PyObject *)__pyx_n_s__c));
  163. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__c));
  164. <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_n_s__val));
  165. <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_k_tuple_13, 18, ((PyObject *)__pyx_n_s__val));
  166. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_n_s__val));
  167. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(((PyObject *)__pyx_k_tuple_13));
  168. /* "pullahelpers.pyx":10
  169. *
  170. * @cython.boundscheck(False)
  171. * 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>
  172. * cdef int xmax = mapgrid.shape[0]
  173. * cdef int ymax = mapgrid.shape[1]
  174. */
  175. __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>
  176. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_1);
  177. 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>
  178. <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
  179. </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line11")'> 11: cdef int xmax = mapgrid.shape[0]</pre>
  180. <pre id='line11' class='code' style='background-color: #FFFFff'>
  181. /* "pullahelpers.pyx":11
  182. * @cython.boundscheck(False)
  183. * def interpolate(np.ndarray[DTYPE_t, ndim=2] mapgrid):
  184. * 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>
  185. * cdef int ymax = mapgrid.shape[1]
  186. * cdef DTYPE_t val1,val2
  187. */
  188. __pyx_v_xmax = (__pyx_v_mapgrid->dimensions[0]);
  189. </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line12")'> 12: cdef int ymax = mapgrid.shape[1]</pre>
  190. <pre id='line12' class='code' style='background-color: #FFFFff'>
  191. /* "pullahelpers.pyx":12
  192. * def interpolate(np.ndarray[DTYPE_t, ndim=2] mapgrid):
  193. * cdef int xmax = mapgrid.shape[0]
  194. * 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>
  195. * cdef DTYPE_t val1,val2
  196. * cdef int val1f,val2f
  197. */
  198. __pyx_v_ymax = (__pyx_v_mapgrid->dimensions[1]);
  199. </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line13")'> 13: cdef DTYPE_t val1,val2</pre>
  200. <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>
  201. <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>
  202. <pre id='line15' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line16")'> 16: </pre>
  203. <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>
  204. <pre id='line17' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line18")'> 18: </pre>
  205. <pre id='line18' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFd4' onclick='toggleDiv("line19")'> 19: print 'step1'</pre>
  206. <pre id='line19' class='code' style='background-color: #FFFFd4'>
  207. /* "pullahelpers.pyx":19
  208. * cdef int i1,i2,j1,j2,i12
  209. *
  210. * 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>
  211. * for x in xrange(xmax):
  212. * if not np.isnan(np.sum(mapgrid[x])): #Ei tyhjia rivilla -> skipataan koko rivi
  213. */
  214. 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>
  215. </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line20")'> 20: for x in xrange(xmax):</pre>
  216. <pre id='line20' class='code' style='background-color: #FFFFff'>
  217. /* "pullahelpers.pyx":20
  218. *
  219. * print 'step1'
  220. * 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>
  221. * if not np.isnan(np.sum(mapgrid[x])): #Ei tyhjia rivilla -> skipataan koko rivi
  222. * continue
  223. */
  224. __pyx_t_1 = __pyx_v_xmax;
  225. for (__pyx_t_2 = 0; __pyx_t_2 <code><</code> __pyx_t_1; __pyx_t_2+=1) {
  226. __pyx_v_x = __pyx_t_2;
  227. </pre><pre class='line' style='background-color: #FFFF2a' onclick='toggleDiv("line21")'> 21: if not np.isnan(np.sum(mapgrid[x])): #Ei tyhjia rivilla -&gt; skipataan koko rivi</pre>
  228. <pre id='line21' class='code' style='background-color: #FFFF2a'>
  229. /* "pullahelpers.pyx":21
  230. * print 'step1'
  231. * for x in xrange(xmax):
  232. * 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>
  233. * continue
  234. * for y in xrange(ymax):
  235. */
  236. __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>
  237. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_3);
  238. __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>
  239. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_4);
  240. <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
  241. __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>
  242. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_3);
  243. __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>
  244. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_5);
  245. <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
  246. __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>
  247. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_3);
  248. __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>
  249. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_6);
  250. <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 0, __pyx_t_3);
  251. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(__pyx_t_3);
  252. __pyx_t_3 = 0;
  253. __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>
  254. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_3);
  255. <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0;
  256. <span class='pyx_macro_api'>__Pyx_DECREF</span>(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  257. __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>
  258. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_6);
  259. <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 0, __pyx_t_3);
  260. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(__pyx_t_3);
  261. __pyx_t_3 = 0;
  262. __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>
  263. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_3);
  264. <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
  265. <span class='pyx_macro_api'>__Pyx_DECREF</span>(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  266. __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>
  267. <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
  268. __pyx_t_8 = (!__pyx_t_7);
  269. if (__pyx_t_8) {
  270. </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line22")'> 22: continue</pre>
  271. <pre id='line22' class='code' style='background-color: #FFFFff'>
  272. /* "pullahelpers.pyx":22
  273. * for x in xrange(xmax):
  274. * if not np.isnan(np.sum(mapgrid[x])): #Ei tyhjia rivilla -> skipataan koko rivi
  275. * 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>
  276. * for y in xrange(ymax):
  277. * if not np.isnan(mapgrid[x][y]):
  278. */
  279. goto __pyx_L3_continue;
  280. goto __pyx_L5;
  281. }
  282. __pyx_L5:;
  283. </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line23")'> 23: for y in xrange(ymax):</pre>
  284. <pre id='line23' class='code' style='background-color: #FFFFff'>
  285. /* "pullahelpers.pyx":23
  286. * if not np.isnan(np.sum(mapgrid[x])): #Ei tyhjia rivilla -> skipataan koko rivi
  287. * continue
  288. * 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>
  289. * if not np.isnan(mapgrid[x][y]):
  290. * continue
  291. */
  292. __pyx_t_9 = __pyx_v_ymax;
  293. for (__pyx_t_10 = 0; __pyx_t_10 <code><</code> __pyx_t_9; __pyx_t_10+=1) {
  294. __pyx_v_y = __pyx_t_10;
  295. </pre><pre class='line' style='background-color: #FFFF3c' onclick='toggleDiv("line24")'> 24: if not np.isnan(mapgrid[x][y]):</pre>
  296. <pre id='line24' class='code' style='background-color: #FFFF3c'>
  297. /* "pullahelpers.pyx":24
  298. * continue
  299. * for y in xrange(ymax):
  300. * 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>
  301. * continue
  302. *
  303. */
  304. __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>
  305. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_3);
  306. __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>
  307. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_6);
  308. <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
  309. __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>
  310. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_3);
  311. __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>
  312. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_4);
  313. <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
  314. __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>
  315. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_3);
  316. <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_3, 0, __pyx_t_4);
  317. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(__pyx_t_4);
  318. __pyx_t_4 = 0;
  319. __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>
  320. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_4);
  321. <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
  322. <span class='pyx_macro_api'>__Pyx_DECREF</span>(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  323. __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>
  324. <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
  325. __pyx_t_7 = (!__pyx_t_8);
  326. if (__pyx_t_7) {
  327. </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line25")'> 25: continue</pre>
  328. <pre id='line25' class='code' style='background-color: #FFFFff'>
  329. /* "pullahelpers.pyx":25
  330. * for y in xrange(ymax):
  331. * if not np.isnan(mapgrid[x][y]):
  332. * 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>
  333. *
  334. * i1 = x
  335. */
  336. goto __pyx_L6_continue;
  337. goto __pyx_L8;
  338. }
  339. __pyx_L8:;
  340. </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line26")'> 26: </pre>
  341. <pre id='line26' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line27")'> 27: i1 = x</pre>
  342. <pre id='line27' class='code' style='background-color: #FFFFff'>
  343. /* "pullahelpers.pyx":27
  344. * continue
  345. *
  346. * 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>
  347. * i2 = x
  348. * j1 = y
  349. */
  350. __pyx_v_i1 = __pyx_v_x;
  351. </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line28")'> 28: i2 = x</pre>
  352. <pre id='line28' class='code' style='background-color: #FFFFff'>
  353. /* "pullahelpers.pyx":28
  354. *
  355. * i1 = x
  356. * 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>
  357. * j1 = y
  358. * j2 = y
  359. */
  360. __pyx_v_i2 = __pyx_v_x;
  361. </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line29")'> 29: j1 = y</pre>
  362. <pre id='line29' class='code' style='background-color: #FFFFff'>
  363. /* "pullahelpers.pyx":29
  364. * i1 = x
  365. * i2 = x
  366. * 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>
  367. * j2 = y
  368. *
  369. */
  370. __pyx_v_j1 = __pyx_v_y;
  371. </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line30")'> 30: j2 = y</pre>
  372. <pre id='line30' class='code' style='background-color: #FFFFff'>
  373. /* "pullahelpers.pyx":30
  374. * i2 = x
  375. * j1 = y
  376. * 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>
  377. *
  378. * for i1 from -x <code><</code>= i1 <code><</code> 0 by 1:
  379. */
  380. __pyx_v_j2 = __pyx_v_y;
  381. </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line31")'> 31: </pre>
  382. <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 &lt;= i1 &lt; 0 by 1:</pre>
  383. <pre id='line32' class='code' style='background-color: #FFFFff'>
  384. /* "pullahelpers.pyx":32
  385. * j2 = y
  386. *
  387. * 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>
  388. * if not np.isnan(mapgrid[-i1][y]):
  389. * break
  390. */
  391. for (__pyx_v_i1 = (-__pyx_v_x); __pyx_v_i1 <code><</code> 0; __pyx_v_i1+=1) {
  392. </pre><pre class='line' style='background-color: #FFFF3c' onclick='toggleDiv("line33")'> 33: if not np.isnan(mapgrid[-i1][y]):</pre>
  393. <pre id='line33' class='code' style='background-color: #FFFF3c'>
  394. /* "pullahelpers.pyx":33
  395. *
  396. * for i1 from -x <code><</code>= i1 <code><</code> 0 by 1:
  397. * 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>
  398. * break
  399. * i1 = -i1
  400. */
  401. __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>
  402. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_4);
  403. __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>
  404. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_3);
  405. <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
  406. __pyx_t_11 = (-__pyx_v_i1);
  407. __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>
  408. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_4);
  409. __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>
  410. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_6);
  411. <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
  412. __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>
  413. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_4);
  414. <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_4, 0, __pyx_t_6);
  415. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(__pyx_t_6);
  416. __pyx_t_6 = 0;
  417. __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>
  418. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_6);
  419. <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
  420. <span class='pyx_macro_api'>__Pyx_DECREF</span>(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  421. __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>
  422. <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
  423. __pyx_t_8 = (!__pyx_t_7);
  424. if (__pyx_t_8) {
  425. </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line34")'> 34: break</pre>
  426. <pre id='line34' class='code' style='background-color: #FFFFff'>
  427. /* "pullahelpers.pyx":34
  428. * for i1 from -x <code><</code>= i1 <code><</code> 0 by 1:
  429. * if not np.isnan(mapgrid[-i1][y]):
  430. * 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>
  431. * i1 = -i1
  432. *
  433. */
  434. goto __pyx_L10_break;
  435. goto __pyx_L11;
  436. }
  437. __pyx_L11:;
  438. }
  439. __pyx_L10_break:;
  440. </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line35")'> 35: i1 = -i1</pre>
  441. <pre id='line35' class='code' style='background-color: #FFFFff'>
  442. /* "pullahelpers.pyx":35
  443. * if not np.isnan(mapgrid[-i1][y]):
  444. * break
  445. * 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>
  446. *
  447. *
  448. */
  449. __pyx_v_i1 = (-__pyx_v_i1);
  450. </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line36")'> 36: </pre>
  451. <pre id='line36' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line37")'> 37: </pre>
  452. <pre id='line37' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line38")'> 38: </pre>
  453. <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 &lt;= i2 &lt; xmax-1 by 1:</pre>
  454. <pre id='line39' class='code' style='background-color: #FFFFff'>
  455. /* "pullahelpers.pyx":39
  456. *
  457. *
  458. * 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>
  459. * if not np.isnan(mapgrid[i2][y]):
  460. * break
  461. */
  462. __pyx_t_12 = (__pyx_v_xmax - 1);
  463. for (__pyx_v_i2 = __pyx_v_x; __pyx_v_i2 <code><</code> __pyx_t_12; __pyx_v_i2+=1) {
  464. </pre><pre class='line' style='background-color: #FFFF3c' onclick='toggleDiv("line40")'> 40: if not np.isnan(mapgrid[i2][y]):</pre>
  465. <pre id='line40' class='code' style='background-color: #FFFF3c'>
  466. /* "pullahelpers.pyx":40
  467. *
  468. * for i2 from x <code><</code>= i2 <code><</code> xmax-1 by 1:
  469. * 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>
  470. * break
  471. *
  472. */
  473. __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>
  474. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_6);
  475. __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>
  476. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_4);
  477. <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
  478. __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>
  479. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_6);
  480. __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>
  481. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_3);
  482. <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
  483. __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>
  484. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_6);
  485. <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 0, __pyx_t_3);
  486. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(__pyx_t_3);
  487. __pyx_t_3 = 0;
  488. __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>
  489. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_3);
  490. <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
  491. <span class='pyx_macro_api'>__Pyx_DECREF</span>(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  492. __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>
  493. <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
  494. __pyx_t_7 = (!__pyx_t_8);
  495. if (__pyx_t_7) {
  496. </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line41")'> 41: break</pre>
  497. <pre id='line41' class='code' style='background-color: #FFFFff'>
  498. /* "pullahelpers.pyx":41
  499. * for i2 from x <code><</code>= i2 <code><</code> xmax-1 by 1:
  500. * if not np.isnan(mapgrid[i2][y]):
  501. * 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>
  502. *
  503. * for j1 from -y <code><</code>= j1 <code><</code> 0 by 1:
  504. */
  505. goto __pyx_L13_break;
  506. goto __pyx_L14;
  507. }
  508. __pyx_L14:;
  509. }
  510. __pyx_L13_break:;
  511. </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line42")'> 42: </pre>
  512. <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 &lt;= j1 &lt; 0 by 1:</pre>
  513. <pre id='line43' class='code' style='background-color: #FFFFff'>
  514. /* "pullahelpers.pyx":43
  515. * break
  516. *
  517. * 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>
  518. * if not np.isnan(mapgrid[x][-j1]):
  519. * break
  520. */
  521. for (__pyx_v_j1 = (-__pyx_v_y); __pyx_v_j1 <code><</code> 0; __pyx_v_j1+=1) {
  522. </pre><pre class='line' style='background-color: #FFFF3c' onclick='toggleDiv("line44")'> 44: if not np.isnan(mapgrid[x][-j1]):</pre>
  523. <pre id='line44' class='code' style='background-color: #FFFF3c'>
  524. /* "pullahelpers.pyx":44
  525. *
  526. * for j1 from -y <code><</code>= j1 <code><</code> 0 by 1:
  527. * 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>
  528. * break
  529. * j1 = -j1
  530. */
  531. __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>
  532. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_3);
  533. __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>
  534. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_6);
  535. <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
  536. __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>
  537. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_3);
  538. __pyx_t_11 = (-__pyx_v_j1);
  539. __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>
  540. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_4);
  541. <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
  542. __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>
  543. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_3);
  544. <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_3, 0, __pyx_t_4);
  545. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(__pyx_t_4);
  546. __pyx_t_4 = 0;
  547. __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>
  548. <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_4);
  549. <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
  550. <span class='pyx_macro_api'>__Pyx_DECREF</span>(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  551. __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>
  552. <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
  553. __pyx_t_8 = (!__pyx_t_7);
  554. if (__pyx_t_8) {
  555. </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line45")'> 45: break</pre>
  556. <pre id='line45' class='code' style='background-color: #FFFFff'>
  557. /* "pullahelpers.pyx":45
  558. * for j1 from -y <code><</code>= j1 <code><</code> 0 by 1:
  559. * if not np.isnan(mapgrid[x][-j1]):
  560. * 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>
  561. * j1 = -j1
  562. *
  563. */
  564. goto __pyx_L16_break;
  565. goto __pyx_L17;
  566. }
  567. __pyx_L17:;
  568. }
  569. __pyx_L16_break:;
  570. </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line46")'> 46: j1 = -j1</pre>
  571. <pre id='line46' class='code' style='background-color: #FFFFff'>
  572. /* "pullahelpers.pyx":46
  573. * if not np.isnan(mapgrid[x][-j1]):
  574. * break
  575. * 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>
  576. *
  577. * for j2 from x <code><</code>= j2 <code><</code> ymax-1 by 1:
  578. */
  579. __pyx_v_j1 = (-__pyx_v_j1);
  580. </pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line47")'> 47: </pre>
  581. <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 &lt;= j2 &lt; ymax-1 by 1:</pre>
  582. <pre id='line48' class='code' style='background-color: #FFFFff'>
  583. /* "pul…

Large files files are truncated, but you can click here to view the full file