hspf 2.0.3__py3-none-any.whl → 2.1.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hspf/Masslink_Timeseries.csv +240 -0
- hspf/bin/WinHSPFLt/WinHspfLt.exe +0 -0
- hspf/build_warehouse.py +545 -0
- hspf/data/HSPFParameterRanges.csv +492 -0
- hspf/data/LandUseNames_Mappings.csv +3330 -0
- hspf/hbn.py +27 -39
- hspf/hbn2.py +316 -0
- hspf/hbn_cy.c +14450 -0
- hspf/hbn_cy.html +1540 -0
- hspf/hbn_cy.pyx +107 -0
- hspf/helpers.py +8 -7
- hspf/hspfModel.py +32 -12
- hspf/parser/graph.py +174 -86
- hspf/parser/parsers.py +25 -2
- hspf/reports.py +265 -459
- hspf/uci.py +62 -5
- hspf/validations.py +211 -0
- hspf/warehouse.py +275 -0
- {hspf-2.0.3.dist-info → hspf-2.1.1.dist-info}/METADATA +1 -1
- {hspf-2.0.3.dist-info → hspf-2.1.1.dist-info}/RECORD +21 -10
- {hspf-2.0.3.dist-info → hspf-2.1.1.dist-info}/WHEEL +1 -1
hspf/hbn_cy.html
ADDED
|
@@ -0,0 +1,1540 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<!-- Generated by Cython 3.1.2 -->
|
|
3
|
+
<html>
|
|
4
|
+
<head>
|
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
6
|
+
<title>Cython: hbn_cy.pyx</title>
|
|
7
|
+
<style type="text/css">
|
|
8
|
+
|
|
9
|
+
body.cython { font-family: courier; font-size: 12; }
|
|
10
|
+
|
|
11
|
+
.cython.tag { }
|
|
12
|
+
.cython.line { color: #000000; margin: 0em }
|
|
13
|
+
.cython.code { font-size: 9; color: #444444; display: none; margin: 0px 0px 0px 8px; border-left: 8px none; }
|
|
14
|
+
|
|
15
|
+
.cython.line .run { background-color: #B0FFB0; }
|
|
16
|
+
.cython.line .mis { background-color: #FFB0B0; }
|
|
17
|
+
.cython.code.run { border-left: 8px solid #B0FFB0; }
|
|
18
|
+
.cython.code.mis { border-left: 8px solid #FFB0B0; }
|
|
19
|
+
|
|
20
|
+
.cython.code .py_c_api { color: red; }
|
|
21
|
+
.cython.code .py_macro_api { color: #FF7000; }
|
|
22
|
+
.cython.code .pyx_c_api { color: #FF3000; }
|
|
23
|
+
.cython.code .pyx_macro_api { color: #FF7000; }
|
|
24
|
+
.cython.code .refnanny { color: #FFA000; }
|
|
25
|
+
.cython.code .trace { color: #FFA000; }
|
|
26
|
+
.cython.code .error_goto { color: #FFA000; }
|
|
27
|
+
|
|
28
|
+
.cython.code .coerce { color: #008000; border: 1px dotted #008000 }
|
|
29
|
+
.cython.code .py_attr { color: #FF0000; font-weight: bold; }
|
|
30
|
+
.cython.code .c_attr { color: #0000FF; }
|
|
31
|
+
.cython.code .py_call { color: #FF0000; font-weight: bold; }
|
|
32
|
+
.cython.code .c_call { color: #0000FF; }
|
|
33
|
+
|
|
34
|
+
.cython.score-0 {background-color: #FFFFff;}
|
|
35
|
+
.cython.score-1 {background-color: #FFFFe7;}
|
|
36
|
+
.cython.score-2 {background-color: #FFFFd4;}
|
|
37
|
+
.cython.score-3 {background-color: #FFFFc4;}
|
|
38
|
+
.cython.score-4 {background-color: #FFFFb6;}
|
|
39
|
+
.cython.score-5 {background-color: #FFFFaa;}
|
|
40
|
+
.cython.score-6 {background-color: #FFFF9f;}
|
|
41
|
+
.cython.score-7 {background-color: #FFFF96;}
|
|
42
|
+
.cython.score-8 {background-color: #FFFF8d;}
|
|
43
|
+
.cython.score-9 {background-color: #FFFF86;}
|
|
44
|
+
.cython.score-10 {background-color: #FFFF7f;}
|
|
45
|
+
.cython.score-11 {background-color: #FFFF79;}
|
|
46
|
+
.cython.score-12 {background-color: #FFFF73;}
|
|
47
|
+
.cython.score-13 {background-color: #FFFF6e;}
|
|
48
|
+
.cython.score-14 {background-color: #FFFF6a;}
|
|
49
|
+
.cython.score-15 {background-color: #FFFF66;}
|
|
50
|
+
.cython.score-16 {background-color: #FFFF62;}
|
|
51
|
+
.cython.score-17 {background-color: #FFFF5e;}
|
|
52
|
+
.cython.score-18 {background-color: #FFFF5b;}
|
|
53
|
+
.cython.score-19 {background-color: #FFFF57;}
|
|
54
|
+
.cython.score-20 {background-color: #FFFF55;}
|
|
55
|
+
.cython.score-21 {background-color: #FFFF52;}
|
|
56
|
+
.cython.score-22 {background-color: #FFFF4f;}
|
|
57
|
+
.cython.score-23 {background-color: #FFFF4d;}
|
|
58
|
+
.cython.score-24 {background-color: #FFFF4b;}
|
|
59
|
+
.cython.score-25 {background-color: #FFFF48;}
|
|
60
|
+
.cython.score-26 {background-color: #FFFF46;}
|
|
61
|
+
.cython.score-27 {background-color: #FFFF44;}
|
|
62
|
+
.cython.score-28 {background-color: #FFFF43;}
|
|
63
|
+
.cython.score-29 {background-color: #FFFF41;}
|
|
64
|
+
.cython.score-30 {background-color: #FFFF3f;}
|
|
65
|
+
.cython.score-31 {background-color: #FFFF3e;}
|
|
66
|
+
.cython.score-32 {background-color: #FFFF3c;}
|
|
67
|
+
.cython.score-33 {background-color: #FFFF3b;}
|
|
68
|
+
.cython.score-34 {background-color: #FFFF39;}
|
|
69
|
+
.cython.score-35 {background-color: #FFFF38;}
|
|
70
|
+
.cython.score-36 {background-color: #FFFF37;}
|
|
71
|
+
.cython.score-37 {background-color: #FFFF36;}
|
|
72
|
+
.cython.score-38 {background-color: #FFFF35;}
|
|
73
|
+
.cython.score-39 {background-color: #FFFF34;}
|
|
74
|
+
.cython.score-40 {background-color: #FFFF33;}
|
|
75
|
+
.cython.score-41 {background-color: #FFFF32;}
|
|
76
|
+
.cython.score-42 {background-color: #FFFF31;}
|
|
77
|
+
.cython.score-43 {background-color: #FFFF30;}
|
|
78
|
+
.cython.score-44 {background-color: #FFFF2f;}
|
|
79
|
+
.cython.score-45 {background-color: #FFFF2e;}
|
|
80
|
+
.cython.score-46 {background-color: #FFFF2d;}
|
|
81
|
+
.cython.score-47 {background-color: #FFFF2c;}
|
|
82
|
+
.cython.score-48 {background-color: #FFFF2b;}
|
|
83
|
+
.cython.score-49 {background-color: #FFFF2b;}
|
|
84
|
+
.cython.score-50 {background-color: #FFFF2a;}
|
|
85
|
+
.cython.score-51 {background-color: #FFFF29;}
|
|
86
|
+
.cython.score-52 {background-color: #FFFF29;}
|
|
87
|
+
.cython.score-53 {background-color: #FFFF28;}
|
|
88
|
+
.cython.score-54 {background-color: #FFFF27;}
|
|
89
|
+
.cython.score-55 {background-color: #FFFF27;}
|
|
90
|
+
.cython.score-56 {background-color: #FFFF26;}
|
|
91
|
+
.cython.score-57 {background-color: #FFFF26;}
|
|
92
|
+
.cython.score-58 {background-color: #FFFF25;}
|
|
93
|
+
.cython.score-59 {background-color: #FFFF24;}
|
|
94
|
+
.cython.score-60 {background-color: #FFFF24;}
|
|
95
|
+
.cython.score-61 {background-color: #FFFF23;}
|
|
96
|
+
.cython.score-62 {background-color: #FFFF23;}
|
|
97
|
+
.cython.score-63 {background-color: #FFFF22;}
|
|
98
|
+
.cython.score-64 {background-color: #FFFF22;}
|
|
99
|
+
.cython.score-65 {background-color: #FFFF22;}
|
|
100
|
+
.cython.score-66 {background-color: #FFFF21;}
|
|
101
|
+
.cython.score-67 {background-color: #FFFF21;}
|
|
102
|
+
.cython.score-68 {background-color: #FFFF20;}
|
|
103
|
+
.cython.score-69 {background-color: #FFFF20;}
|
|
104
|
+
.cython.score-70 {background-color: #FFFF1f;}
|
|
105
|
+
.cython.score-71 {background-color: #FFFF1f;}
|
|
106
|
+
.cython.score-72 {background-color: #FFFF1f;}
|
|
107
|
+
.cython.score-73 {background-color: #FFFF1e;}
|
|
108
|
+
.cython.score-74 {background-color: #FFFF1e;}
|
|
109
|
+
.cython.score-75 {background-color: #FFFF1e;}
|
|
110
|
+
.cython.score-76 {background-color: #FFFF1d;}
|
|
111
|
+
.cython.score-77 {background-color: #FFFF1d;}
|
|
112
|
+
.cython.score-78 {background-color: #FFFF1c;}
|
|
113
|
+
.cython.score-79 {background-color: #FFFF1c;}
|
|
114
|
+
.cython.score-80 {background-color: #FFFF1c;}
|
|
115
|
+
.cython.score-81 {background-color: #FFFF1c;}
|
|
116
|
+
.cython.score-82 {background-color: #FFFF1b;}
|
|
117
|
+
.cython.score-83 {background-color: #FFFF1b;}
|
|
118
|
+
.cython.score-84 {background-color: #FFFF1b;}
|
|
119
|
+
.cython.score-85 {background-color: #FFFF1a;}
|
|
120
|
+
.cython.score-86 {background-color: #FFFF1a;}
|
|
121
|
+
.cython.score-87 {background-color: #FFFF1a;}
|
|
122
|
+
.cython.score-88 {background-color: #FFFF1a;}
|
|
123
|
+
.cython.score-89 {background-color: #FFFF19;}
|
|
124
|
+
.cython.score-90 {background-color: #FFFF19;}
|
|
125
|
+
.cython.score-91 {background-color: #FFFF19;}
|
|
126
|
+
.cython.score-92 {background-color: #FFFF19;}
|
|
127
|
+
.cython.score-93 {background-color: #FFFF18;}
|
|
128
|
+
.cython.score-94 {background-color: #FFFF18;}
|
|
129
|
+
.cython.score-95 {background-color: #FFFF18;}
|
|
130
|
+
.cython.score-96 {background-color: #FFFF18;}
|
|
131
|
+
.cython.score-97 {background-color: #FFFF17;}
|
|
132
|
+
.cython.score-98 {background-color: #FFFF17;}
|
|
133
|
+
.cython.score-99 {background-color: #FFFF17;}
|
|
134
|
+
.cython.score-100 {background-color: #FFFF17;}
|
|
135
|
+
.cython.score-101 {background-color: #FFFF16;}
|
|
136
|
+
.cython.score-102 {background-color: #FFFF16;}
|
|
137
|
+
.cython.score-103 {background-color: #FFFF16;}
|
|
138
|
+
.cython.score-104 {background-color: #FFFF16;}
|
|
139
|
+
.cython.score-105 {background-color: #FFFF16;}
|
|
140
|
+
.cython.score-106 {background-color: #FFFF15;}
|
|
141
|
+
.cython.score-107 {background-color: #FFFF15;}
|
|
142
|
+
.cython.score-108 {background-color: #FFFF15;}
|
|
143
|
+
.cython.score-109 {background-color: #FFFF15;}
|
|
144
|
+
.cython.score-110 {background-color: #FFFF15;}
|
|
145
|
+
.cython.score-111 {background-color: #FFFF15;}
|
|
146
|
+
.cython.score-112 {background-color: #FFFF14;}
|
|
147
|
+
.cython.score-113 {background-color: #FFFF14;}
|
|
148
|
+
.cython.score-114 {background-color: #FFFF14;}
|
|
149
|
+
.cython.score-115 {background-color: #FFFF14;}
|
|
150
|
+
.cython.score-116 {background-color: #FFFF14;}
|
|
151
|
+
.cython.score-117 {background-color: #FFFF14;}
|
|
152
|
+
.cython.score-118 {background-color: #FFFF13;}
|
|
153
|
+
.cython.score-119 {background-color: #FFFF13;}
|
|
154
|
+
.cython.score-120 {background-color: #FFFF13;}
|
|
155
|
+
.cython.score-121 {background-color: #FFFF13;}
|
|
156
|
+
.cython.score-122 {background-color: #FFFF13;}
|
|
157
|
+
.cython.score-123 {background-color: #FFFF13;}
|
|
158
|
+
.cython.score-124 {background-color: #FFFF13;}
|
|
159
|
+
.cython.score-125 {background-color: #FFFF12;}
|
|
160
|
+
.cython.score-126 {background-color: #FFFF12;}
|
|
161
|
+
.cython.score-127 {background-color: #FFFF12;}
|
|
162
|
+
.cython.score-128 {background-color: #FFFF12;}
|
|
163
|
+
.cython.score-129 {background-color: #FFFF12;}
|
|
164
|
+
.cython.score-130 {background-color: #FFFF12;}
|
|
165
|
+
.cython.score-131 {background-color: #FFFF12;}
|
|
166
|
+
.cython.score-132 {background-color: #FFFF11;}
|
|
167
|
+
.cython.score-133 {background-color: #FFFF11;}
|
|
168
|
+
.cython.score-134 {background-color: #FFFF11;}
|
|
169
|
+
.cython.score-135 {background-color: #FFFF11;}
|
|
170
|
+
.cython.score-136 {background-color: #FFFF11;}
|
|
171
|
+
.cython.score-137 {background-color: #FFFF11;}
|
|
172
|
+
.cython.score-138 {background-color: #FFFF11;}
|
|
173
|
+
.cython.score-139 {background-color: #FFFF11;}
|
|
174
|
+
.cython.score-140 {background-color: #FFFF11;}
|
|
175
|
+
.cython.score-141 {background-color: #FFFF10;}
|
|
176
|
+
.cython.score-142 {background-color: #FFFF10;}
|
|
177
|
+
.cython.score-143 {background-color: #FFFF10;}
|
|
178
|
+
.cython.score-144 {background-color: #FFFF10;}
|
|
179
|
+
.cython.score-145 {background-color: #FFFF10;}
|
|
180
|
+
.cython.score-146 {background-color: #FFFF10;}
|
|
181
|
+
.cython.score-147 {background-color: #FFFF10;}
|
|
182
|
+
.cython.score-148 {background-color: #FFFF10;}
|
|
183
|
+
.cython.score-149 {background-color: #FFFF10;}
|
|
184
|
+
.cython.score-150 {background-color: #FFFF0f;}
|
|
185
|
+
.cython.score-151 {background-color: #FFFF0f;}
|
|
186
|
+
.cython.score-152 {background-color: #FFFF0f;}
|
|
187
|
+
.cython.score-153 {background-color: #FFFF0f;}
|
|
188
|
+
.cython.score-154 {background-color: #FFFF0f;}
|
|
189
|
+
.cython.score-155 {background-color: #FFFF0f;}
|
|
190
|
+
.cython.score-156 {background-color: #FFFF0f;}
|
|
191
|
+
.cython.score-157 {background-color: #FFFF0f;}
|
|
192
|
+
.cython.score-158 {background-color: #FFFF0f;}
|
|
193
|
+
.cython.score-159 {background-color: #FFFF0f;}
|
|
194
|
+
.cython.score-160 {background-color: #FFFF0f;}
|
|
195
|
+
.cython.score-161 {background-color: #FFFF0e;}
|
|
196
|
+
.cython.score-162 {background-color: #FFFF0e;}
|
|
197
|
+
.cython.score-163 {background-color: #FFFF0e;}
|
|
198
|
+
.cython.score-164 {background-color: #FFFF0e;}
|
|
199
|
+
.cython.score-165 {background-color: #FFFF0e;}
|
|
200
|
+
.cython.score-166 {background-color: #FFFF0e;}
|
|
201
|
+
.cython.score-167 {background-color: #FFFF0e;}
|
|
202
|
+
.cython.score-168 {background-color: #FFFF0e;}
|
|
203
|
+
.cython.score-169 {background-color: #FFFF0e;}
|
|
204
|
+
.cython.score-170 {background-color: #FFFF0e;}
|
|
205
|
+
.cython.score-171 {background-color: #FFFF0e;}
|
|
206
|
+
.cython.score-172 {background-color: #FFFF0e;}
|
|
207
|
+
.cython.score-173 {background-color: #FFFF0d;}
|
|
208
|
+
.cython.score-174 {background-color: #FFFF0d;}
|
|
209
|
+
.cython.score-175 {background-color: #FFFF0d;}
|
|
210
|
+
.cython.score-176 {background-color: #FFFF0d;}
|
|
211
|
+
.cython.score-177 {background-color: #FFFF0d;}
|
|
212
|
+
.cython.score-178 {background-color: #FFFF0d;}
|
|
213
|
+
.cython.score-179 {background-color: #FFFF0d;}
|
|
214
|
+
.cython.score-180 {background-color: #FFFF0d;}
|
|
215
|
+
.cython.score-181 {background-color: #FFFF0d;}
|
|
216
|
+
.cython.score-182 {background-color: #FFFF0d;}
|
|
217
|
+
.cython.score-183 {background-color: #FFFF0d;}
|
|
218
|
+
.cython.score-184 {background-color: #FFFF0d;}
|
|
219
|
+
.cython.score-185 {background-color: #FFFF0d;}
|
|
220
|
+
.cython.score-186 {background-color: #FFFF0d;}
|
|
221
|
+
.cython.score-187 {background-color: #FFFF0c;}
|
|
222
|
+
.cython.score-188 {background-color: #FFFF0c;}
|
|
223
|
+
.cython.score-189 {background-color: #FFFF0c;}
|
|
224
|
+
.cython.score-190 {background-color: #FFFF0c;}
|
|
225
|
+
.cython.score-191 {background-color: #FFFF0c;}
|
|
226
|
+
.cython.score-192 {background-color: #FFFF0c;}
|
|
227
|
+
.cython.score-193 {background-color: #FFFF0c;}
|
|
228
|
+
.cython.score-194 {background-color: #FFFF0c;}
|
|
229
|
+
.cython.score-195 {background-color: #FFFF0c;}
|
|
230
|
+
.cython.score-196 {background-color: #FFFF0c;}
|
|
231
|
+
.cython.score-197 {background-color: #FFFF0c;}
|
|
232
|
+
.cython.score-198 {background-color: #FFFF0c;}
|
|
233
|
+
.cython.score-199 {background-color: #FFFF0c;}
|
|
234
|
+
.cython.score-200 {background-color: #FFFF0c;}
|
|
235
|
+
.cython.score-201 {background-color: #FFFF0c;}
|
|
236
|
+
.cython.score-202 {background-color: #FFFF0c;}
|
|
237
|
+
.cython.score-203 {background-color: #FFFF0b;}
|
|
238
|
+
.cython.score-204 {background-color: #FFFF0b;}
|
|
239
|
+
.cython.score-205 {background-color: #FFFF0b;}
|
|
240
|
+
.cython.score-206 {background-color: #FFFF0b;}
|
|
241
|
+
.cython.score-207 {background-color: #FFFF0b;}
|
|
242
|
+
.cython.score-208 {background-color: #FFFF0b;}
|
|
243
|
+
.cython.score-209 {background-color: #FFFF0b;}
|
|
244
|
+
.cython.score-210 {background-color: #FFFF0b;}
|
|
245
|
+
.cython.score-211 {background-color: #FFFF0b;}
|
|
246
|
+
.cython.score-212 {background-color: #FFFF0b;}
|
|
247
|
+
.cython.score-213 {background-color: #FFFF0b;}
|
|
248
|
+
.cython.score-214 {background-color: #FFFF0b;}
|
|
249
|
+
.cython.score-215 {background-color: #FFFF0b;}
|
|
250
|
+
.cython.score-216 {background-color: #FFFF0b;}
|
|
251
|
+
.cython.score-217 {background-color: #FFFF0b;}
|
|
252
|
+
.cython.score-218 {background-color: #FFFF0b;}
|
|
253
|
+
.cython.score-219 {background-color: #FFFF0b;}
|
|
254
|
+
.cython.score-220 {background-color: #FFFF0b;}
|
|
255
|
+
.cython.score-221 {background-color: #FFFF0b;}
|
|
256
|
+
.cython.score-222 {background-color: #FFFF0a;}
|
|
257
|
+
.cython.score-223 {background-color: #FFFF0a;}
|
|
258
|
+
.cython.score-224 {background-color: #FFFF0a;}
|
|
259
|
+
.cython.score-225 {background-color: #FFFF0a;}
|
|
260
|
+
.cython.score-226 {background-color: #FFFF0a;}
|
|
261
|
+
.cython.score-227 {background-color: #FFFF0a;}
|
|
262
|
+
.cython.score-228 {background-color: #FFFF0a;}
|
|
263
|
+
.cython.score-229 {background-color: #FFFF0a;}
|
|
264
|
+
.cython.score-230 {background-color: #FFFF0a;}
|
|
265
|
+
.cython.score-231 {background-color: #FFFF0a;}
|
|
266
|
+
.cython.score-232 {background-color: #FFFF0a;}
|
|
267
|
+
.cython.score-233 {background-color: #FFFF0a;}
|
|
268
|
+
.cython.score-234 {background-color: #FFFF0a;}
|
|
269
|
+
.cython.score-235 {background-color: #FFFF0a;}
|
|
270
|
+
.cython.score-236 {background-color: #FFFF0a;}
|
|
271
|
+
.cython.score-237 {background-color: #FFFF0a;}
|
|
272
|
+
.cython.score-238 {background-color: #FFFF0a;}
|
|
273
|
+
.cython.score-239 {background-color: #FFFF0a;}
|
|
274
|
+
.cython.score-240 {background-color: #FFFF0a;}
|
|
275
|
+
.cython.score-241 {background-color: #FFFF0a;}
|
|
276
|
+
.cython.score-242 {background-color: #FFFF0a;}
|
|
277
|
+
.cython.score-243 {background-color: #FFFF0a;}
|
|
278
|
+
.cython.score-244 {background-color: #FFFF0a;}
|
|
279
|
+
.cython.score-245 {background-color: #FFFF0a;}
|
|
280
|
+
.cython.score-246 {background-color: #FFFF09;}
|
|
281
|
+
.cython.score-247 {background-color: #FFFF09;}
|
|
282
|
+
.cython.score-248 {background-color: #FFFF09;}
|
|
283
|
+
.cython.score-249 {background-color: #FFFF09;}
|
|
284
|
+
.cython.score-250 {background-color: #FFFF09;}
|
|
285
|
+
.cython.score-251 {background-color: #FFFF09;}
|
|
286
|
+
.cython.score-252 {background-color: #FFFF09;}
|
|
287
|
+
.cython.score-253 {background-color: #FFFF09;}
|
|
288
|
+
.cython.score-254 {background-color: #FFFF09;}
|
|
289
|
+
pre { line-height: 125%; }
|
|
290
|
+
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
|
291
|
+
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
|
292
|
+
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
|
293
|
+
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
|
294
|
+
.cython .hll { background-color: #ffffcc }
|
|
295
|
+
.cython { background: #f8f8f8; }
|
|
296
|
+
.cython .c { color: #3D7B7B; font-style: italic } /* Comment */
|
|
297
|
+
.cython .err { border: 1px solid #F00 } /* Error */
|
|
298
|
+
.cython .k { color: #008000; font-weight: bold } /* Keyword */
|
|
299
|
+
.cython .o { color: #666 } /* Operator */
|
|
300
|
+
.cython .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */
|
|
301
|
+
.cython .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */
|
|
302
|
+
.cython .cp { color: #9C6500 } /* Comment.Preproc */
|
|
303
|
+
.cython .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */
|
|
304
|
+
.cython .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */
|
|
305
|
+
.cython .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */
|
|
306
|
+
.cython .gd { color: #A00000 } /* Generic.Deleted */
|
|
307
|
+
.cython .ge { font-style: italic } /* Generic.Emph */
|
|
308
|
+
.cython .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
|
|
309
|
+
.cython .gr { color: #E40000 } /* Generic.Error */
|
|
310
|
+
.cython .gh { color: #000080; font-weight: bold } /* Generic.Heading */
|
|
311
|
+
.cython .gi { color: #008400 } /* Generic.Inserted */
|
|
312
|
+
.cython .go { color: #717171 } /* Generic.Output */
|
|
313
|
+
.cython .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
|
|
314
|
+
.cython .gs { font-weight: bold } /* Generic.Strong */
|
|
315
|
+
.cython .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
|
|
316
|
+
.cython .gt { color: #04D } /* Generic.Traceback */
|
|
317
|
+
.cython .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
|
|
318
|
+
.cython .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
|
|
319
|
+
.cython .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
|
|
320
|
+
.cython .kp { color: #008000 } /* Keyword.Pseudo */
|
|
321
|
+
.cython .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
|
|
322
|
+
.cython .kt { color: #B00040 } /* Keyword.Type */
|
|
323
|
+
.cython .m { color: #666 } /* Literal.Number */
|
|
324
|
+
.cython .s { color: #BA2121 } /* Literal.String */
|
|
325
|
+
.cython .na { color: #687822 } /* Name.Attribute */
|
|
326
|
+
.cython .nb { color: #008000 } /* Name.Builtin */
|
|
327
|
+
.cython .nc { color: #00F; font-weight: bold } /* Name.Class */
|
|
328
|
+
.cython .no { color: #800 } /* Name.Constant */
|
|
329
|
+
.cython .nd { color: #A2F } /* Name.Decorator */
|
|
330
|
+
.cython .ni { color: #717171; font-weight: bold } /* Name.Entity */
|
|
331
|
+
.cython .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */
|
|
332
|
+
.cython .nf { color: #00F } /* Name.Function */
|
|
333
|
+
.cython .nl { color: #767600 } /* Name.Label */
|
|
334
|
+
.cython .nn { color: #00F; font-weight: bold } /* Name.Namespace */
|
|
335
|
+
.cython .nt { color: #008000; font-weight: bold } /* Name.Tag */
|
|
336
|
+
.cython .nv { color: #19177C } /* Name.Variable */
|
|
337
|
+
.cython .ow { color: #A2F; font-weight: bold } /* Operator.Word */
|
|
338
|
+
.cython .w { color: #BBB } /* Text.Whitespace */
|
|
339
|
+
.cython .mb { color: #666 } /* Literal.Number.Bin */
|
|
340
|
+
.cython .mf { color: #666 } /* Literal.Number.Float */
|
|
341
|
+
.cython .mh { color: #666 } /* Literal.Number.Hex */
|
|
342
|
+
.cython .mi { color: #666 } /* Literal.Number.Integer */
|
|
343
|
+
.cython .mo { color: #666 } /* Literal.Number.Oct */
|
|
344
|
+
.cython .sa { color: #BA2121 } /* Literal.String.Affix */
|
|
345
|
+
.cython .sb { color: #BA2121 } /* Literal.String.Backtick */
|
|
346
|
+
.cython .sc { color: #BA2121 } /* Literal.String.Char */
|
|
347
|
+
.cython .dl { color: #BA2121 } /* Literal.String.Delimiter */
|
|
348
|
+
.cython .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
|
|
349
|
+
.cython .s2 { color: #BA2121 } /* Literal.String.Double */
|
|
350
|
+
.cython .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */
|
|
351
|
+
.cython .sh { color: #BA2121 } /* Literal.String.Heredoc */
|
|
352
|
+
.cython .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */
|
|
353
|
+
.cython .sx { color: #008000 } /* Literal.String.Other */
|
|
354
|
+
.cython .sr { color: #A45A77 } /* Literal.String.Regex */
|
|
355
|
+
.cython .s1 { color: #BA2121 } /* Literal.String.Single */
|
|
356
|
+
.cython .ss { color: #19177C } /* Literal.String.Symbol */
|
|
357
|
+
.cython .bp { color: #008000 } /* Name.Builtin.Pseudo */
|
|
358
|
+
.cython .fm { color: #00F } /* Name.Function.Magic */
|
|
359
|
+
.cython .vc { color: #19177C } /* Name.Variable.Class */
|
|
360
|
+
.cython .vg { color: #19177C } /* Name.Variable.Global */
|
|
361
|
+
.cython .vi { color: #19177C } /* Name.Variable.Instance */
|
|
362
|
+
.cython .vm { color: #19177C } /* Name.Variable.Magic */
|
|
363
|
+
.cython .il { color: #666 } /* Literal.Number.Integer.Long */
|
|
364
|
+
</style>
|
|
365
|
+
</head>
|
|
366
|
+
<body class="cython">
|
|
367
|
+
<p><span style="border-bottom: solid 1px grey;">Generated by Cython 3.1.2</span></p>
|
|
368
|
+
<p>
|
|
369
|
+
<span style="background-color: #FFFF00">Yellow lines</span> hint at Python interaction.<br />
|
|
370
|
+
Click on a line that starts with a "<code>+</code>" to see the C code that Cython generated for it.
|
|
371
|
+
</p>
|
|
372
|
+
<p>Raw output: <a href="hbn_cy.c">hbn_cy.c</a></p>
|
|
373
|
+
<div class="cython"><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">001</span>: <span class="c"># cython: language_level=3, boundscheck=False, wraparound=False, cdivision=True</span></pre>
|
|
374
|
+
<pre class='cython code score-8 '> __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1, __pyx_L1_error)</span>
|
|
375
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
376
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_3) < 0) <span class='error_goto'>__PYX_ERR(0, 1, __pyx_L1_error)</span>
|
|
377
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
378
|
+
</pre><pre class="cython line score-0"> <span class="">002</span>: <span class="c"># hbn_cy.pyx - Cython helpers for reading HBN binary files</span></pre>
|
|
379
|
+
<pre class="cython line score-0"> <span class="">003</span>: <span class="k">from</span><span class="w"> </span><span class="nn">cpython.bytes</span><span class="w"> </span><span class="k">cimport</span> <span class="n">PyBytes_AsStringAndSize</span></pre>
|
|
380
|
+
<pre class="cython line score-0"> <span class="">004</span>: <span class="k">cimport</span><span class="w"> </span><span class="nn">cython</span></pre>
|
|
381
|
+
<pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">005</span>: <span class="k">import</span><span class="w"> </span><span class="nn">numpy</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="nn">np</span></pre>
|
|
382
|
+
<pre class='cython code score-8 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_ImportDottedModule</span>(__pyx_mstate_global->__pyx_n_u_numpy, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L1_error)</span>
|
|
383
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
384
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_np, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 5, __pyx_L1_error)</span>
|
|
385
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
386
|
+
</pre><pre class="cython line score-0"> <span class="">006</span>: <span class="k">cimport</span><span class="w"> </span><span class="nn">numpy</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="nn">cnp</span></pre>
|
|
387
|
+
<pre class="cython line score-22" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">007</span>: <span class="k">from</span><span class="w"> </span><span class="nn">datetime</span><span class="w"> </span><span class="k">import</span> <span class="n">datetime</span><span class="p">,</span> <span class="n">timedelta</span></pre>
|
|
388
|
+
<pre class='cython code score-22 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyList_Pack</span>(2, __pyx_mstate_global->__pyx_n_u_datetime, __pyx_mstate_global->__pyx_n_u_timedelta);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error)</span>
|
|
389
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
390
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_mstate_global->__pyx_n_u_datetime, __pyx_t_2, 0);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7, __pyx_L1_error)</span>
|
|
391
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
392
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
393
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_datetime);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error)</span>
|
|
394
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
395
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_datetime, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 7, __pyx_L1_error)</span>
|
|
396
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
397
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_timedelta);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error)</span>
|
|
398
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
399
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_timedelta, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 7, __pyx_L1_error)</span>
|
|
400
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
401
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
402
|
+
</pre><pre class="cython line score-0"> <span class="">008</span>: </pre>
|
|
403
|
+
<pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">009</span>: <span class="nd">@cython</span><span class="o">.</span><span class="n">inline</span></pre>
|
|
404
|
+
<pre class='cython code score-0 '>static unsigned int __pyx_f_4hspf_6hbn_cy__read_uint32_le(unsigned char const *__pyx_v_buf, Py_ssize_t __pyx_v_offset) {
|
|
405
|
+
unsigned int __pyx_r;
|
|
406
|
+
/* … */
|
|
407
|
+
/* function exit code */
|
|
408
|
+
__pyx_L0:;
|
|
409
|
+
return __pyx_r;
|
|
410
|
+
}
|
|
411
|
+
</pre><pre class="cython line score-0"> <span class="">010</span>: <span class="k">cdef</span><span class="w"> </span><span class="kt">unsigned</span> <span class="kt">int</span> <span class="nf">_read_uint32_le</span><span class="p">(</span><span class="n">const</span> <span class="nb">unsigned</span> <span class="n">char</span><span class="o">*</span> <span class="n">buf</span><span class="p">,</span> <span class="nb">Py_ssize_t</span> <span class="n">offset</span><span class="p">)</span> <span class="k">nogil</span><span class="p">:</span></pre>
|
|
412
|
+
<pre class="cython line score-0"> <span class="">011</span>: <span class="w"> </span><span class="sd">"""Reads a little-endian unsigned 32-bit integer."""</span></pre>
|
|
413
|
+
<pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">012</span>: <span class="k">return</span> <span class="n">buf</span><span class="p">[</span><span class="n">offset</span><span class="p">]</span> <span class="o">|</span> <span class="p">(</span><span class="n">buf</span><span class="p">[</span><span class="n">offset</span><span class="o">+</span><span class="mf">1</span><span class="p">]</span> <span class="o"><<</span> <span class="mf">8</span><span class="p">)</span> <span class="o">|</span> <span class="p">(</span><span class="n">buf</span><span class="p">[</span><span class="n">offset</span><span class="o">+</span><span class="mf">2</span><span class="p">]</span> <span class="o"><<</span> <span class="mf">16</span><span class="p">)</span> <span class="o">|</span> <span class="p">(</span><span class="n">buf</span><span class="p">[</span><span class="n">offset</span><span class="o">+</span><span class="mf">3</span><span class="p">]</span> <span class="o"><<</span> <span class="mf">24</span><span class="p">)</span></pre>
|
|
414
|
+
<pre class='cython code score-0 '> __pyx_r = ((((__pyx_v_buf[__pyx_v_offset]) | ((__pyx_v_buf[(__pyx_v_offset + 1)]) << 8)) | ((__pyx_v_buf[(__pyx_v_offset + 2)]) << 16)) | ((__pyx_v_buf[(__pyx_v_offset + 3)]) << 24));
|
|
415
|
+
goto __pyx_L0;
|
|
416
|
+
</pre><pre class="cython line score-0"> <span class="">013</span>: </pre>
|
|
417
|
+
<pre class="cython line score-48" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">014</span>: <span class="nd">@cython</span><span class="o">.</span><span class="n">boundscheck</span><span class="p">(</span><span class="bp">False</span><span class="p">)</span></pre>
|
|
418
|
+
<pre class='cython code score-48 '>/* Python wrapper */
|
|
419
|
+
static PyObject *__pyx_pw_4hspf_6hbn_cy_1map_hbn_file(PyObject *__pyx_self,
|
|
420
|
+
#if CYTHON_METH_FASTCALL
|
|
421
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
422
|
+
#else
|
|
423
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
424
|
+
#endif
|
|
425
|
+
); /*proto*/
|
|
426
|
+
<span class='py_macro_api'>PyDoc_STRVAR</span>(__pyx_doc_4hspf_6hbn_cy_map_hbn_file, "\n Parses an HBN file from a file path to produce mapn and mapd dictionaries.\n Returns (mapn, mapd, data_bytes).\n ");
|
|
427
|
+
static PyMethodDef __pyx_mdef_4hspf_6hbn_cy_1map_hbn_file = {"map_hbn_file", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4hspf_6hbn_cy_1map_hbn_file, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4hspf_6hbn_cy_map_hbn_file};
|
|
428
|
+
static PyObject *__pyx_pw_4hspf_6hbn_cy_1map_hbn_file(PyObject *__pyx_self,
|
|
429
|
+
#if CYTHON_METH_FASTCALL
|
|
430
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
431
|
+
#else
|
|
432
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
433
|
+
#endif
|
|
434
|
+
) {
|
|
435
|
+
PyObject *__pyx_v_file_path = 0;
|
|
436
|
+
#if !CYTHON_METH_FASTCALL
|
|
437
|
+
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
|
|
438
|
+
#endif
|
|
439
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
440
|
+
PyObject *__pyx_r = 0;
|
|
441
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
442
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("map_hbn_file (wrapper)", 0);
|
|
443
|
+
#if !CYTHON_METH_FASTCALL
|
|
444
|
+
#if CYTHON_ASSUME_SAFE_SIZE
|
|
445
|
+
__pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);
|
|
446
|
+
#else
|
|
447
|
+
__pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
|
|
448
|
+
#endif
|
|
449
|
+
#endif
|
|
450
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs);
|
|
451
|
+
{
|
|
452
|
+
PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_file_path,0};
|
|
453
|
+
PyObject* values[1] = {0};
|
|
454
|
+
const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds) : 0;
|
|
455
|
+
if (unlikely(__pyx_kwds_len) < 0) <span class='error_goto'>__PYX_ERR(0, 14, __pyx_L3_error)</span>
|
|
456
|
+
if (__pyx_kwds_len > 0) {
|
|
457
|
+
switch (__pyx_nargs) {
|
|
458
|
+
case 1:
|
|
459
|
+
values[0] = <span class='pyx_c_api'>__Pyx_ArgRef_FASTCALL</span>(__pyx_args, 0);
|
|
460
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) <span class='error_goto'>__PYX_ERR(0, 14, __pyx_L3_error)</span>
|
|
461
|
+
CYTHON_FALLTHROUGH;
|
|
462
|
+
case 0: break;
|
|
463
|
+
default: goto __pyx_L5_argtuple_error;
|
|
464
|
+
}
|
|
465
|
+
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
466
|
+
if (<span class='pyx_c_api'>__Pyx_ParseKeywords</span>(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "map_hbn_file", 0) < 0) <span class='error_goto'>__PYX_ERR(0, 14, __pyx_L3_error)</span>
|
|
467
|
+
for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
|
|
468
|
+
if (unlikely(!values[i])) { <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("map_hbn_file", 1, 1, 1, i); <span class='error_goto'>__PYX_ERR(0, 14, __pyx_L3_error)</span> }
|
|
469
|
+
}
|
|
470
|
+
} else if (unlikely(__pyx_nargs != 1)) {
|
|
471
|
+
goto __pyx_L5_argtuple_error;
|
|
472
|
+
} else {
|
|
473
|
+
values[0] = <span class='pyx_c_api'>__Pyx_ArgRef_FASTCALL</span>(__pyx_args, 0);
|
|
474
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) <span class='error_goto'>__PYX_ERR(0, 14, __pyx_L3_error)</span>
|
|
475
|
+
}
|
|
476
|
+
__pyx_v_file_path = ((PyObject*)values[0]);
|
|
477
|
+
}
|
|
478
|
+
goto __pyx_L6_skip;
|
|
479
|
+
__pyx_L5_argtuple_error:;
|
|
480
|
+
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("map_hbn_file", 1, 1, 1, __pyx_nargs); <span class='error_goto'>__PYX_ERR(0, 14, __pyx_L3_error)</span>
|
|
481
|
+
__pyx_L6_skip:;
|
|
482
|
+
goto __pyx_L4_argument_unpacking_done;
|
|
483
|
+
__pyx_L3_error:;
|
|
484
|
+
for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
485
|
+
Py_XDECREF(values[__pyx_temp]);
|
|
486
|
+
}
|
|
487
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("hspf.hbn_cy.map_hbn_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
488
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
489
|
+
return NULL;
|
|
490
|
+
__pyx_L4_argument_unpacking_done:;
|
|
491
|
+
if (unlikely(!<span class='pyx_c_api'>__Pyx_ArgTypeTest</span>(((PyObject *)__pyx_v_file_path), (&PyUnicode_Type), 1, "file_path", 1))) <span class='error_goto'>__PYX_ERR(0, 16, __pyx_L1_error)</span>
|
|
492
|
+
__pyx_r = __pyx_pf_4hspf_6hbn_cy_map_hbn_file(__pyx_self, __pyx_v_file_path);
|
|
493
|
+
int __pyx_lineno = 0;
|
|
494
|
+
const char *__pyx_filename = NULL;
|
|
495
|
+
int __pyx_clineno = 0;
|
|
496
|
+
|
|
497
|
+
/* function exit code */
|
|
498
|
+
goto __pyx_L0;
|
|
499
|
+
__pyx_L1_error:;
|
|
500
|
+
__pyx_r = NULL;
|
|
501
|
+
for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
502
|
+
Py_XDECREF(values[__pyx_temp]);
|
|
503
|
+
}
|
|
504
|
+
goto __pyx_L7_cleaned_up;
|
|
505
|
+
__pyx_L0:;
|
|
506
|
+
for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
507
|
+
Py_XDECREF(values[__pyx_temp]);
|
|
508
|
+
}
|
|
509
|
+
__pyx_L7_cleaned_up:;
|
|
510
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
511
|
+
return __pyx_r;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
static PyObject *__pyx_pf_4hspf_6hbn_cy_map_hbn_file(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_file_path) {
|
|
515
|
+
PyObject *__pyx_v_data_bytes = 0;
|
|
516
|
+
unsigned char const *__pyx_v_cbuf;
|
|
517
|
+
Py_ssize_t __pyx_v_buf_len;
|
|
518
|
+
Py_ssize_t __pyx_v_index;
|
|
519
|
+
Py_ssize_t __pyx_v_i;
|
|
520
|
+
Py_ssize_t __pyx_v_slen;
|
|
521
|
+
Py_ssize_t __pyx_v_ln;
|
|
522
|
+
unsigned int __pyx_v_rectype;
|
|
523
|
+
unsigned int __pyx_v_tcode;
|
|
524
|
+
unsigned int __pyx_v_idval;
|
|
525
|
+
unsigned int __pyx_v_reclen;
|
|
526
|
+
unsigned char __pyx_v_rc1;
|
|
527
|
+
unsigned char __pyx_v_rc2;
|
|
528
|
+
unsigned char __pyx_v_rc3;
|
|
529
|
+
unsigned char __pyx_v_rc;
|
|
530
|
+
PyObject *__pyx_v_mapn = 0;
|
|
531
|
+
PyObject *__pyx_v_mapd = 0;
|
|
532
|
+
PyObject *__pyx_v_f = NULL;
|
|
533
|
+
PyObject *__pyx_v_operation = NULL;
|
|
534
|
+
PyObject *__pyx_v_activity = NULL;
|
|
535
|
+
PyObject *__pyx_v_key = NULL;
|
|
536
|
+
PyObject *__pyx_v_name = NULL;
|
|
537
|
+
PyObject *__pyx_r = NULL;
|
|
538
|
+
/* … */
|
|
539
|
+
/* function exit code */
|
|
540
|
+
__pyx_L1_error:;
|
|
541
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
|
|
542
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2);
|
|
543
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3);
|
|
544
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6);
|
|
545
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_13);
|
|
546
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("hspf.hbn_cy.map_hbn_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
547
|
+
__pyx_r = NULL;
|
|
548
|
+
__pyx_L0:;
|
|
549
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_data_bytes);
|
|
550
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_mapn);
|
|
551
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_mapd);
|
|
552
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_f);
|
|
553
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_operation);
|
|
554
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_activity);
|
|
555
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_key);
|
|
556
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_name);
|
|
557
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
|
|
558
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
559
|
+
return __pyx_r;
|
|
560
|
+
}
|
|
561
|
+
/* … */
|
|
562
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_4hspf_6hbn_cy_1map_hbn_file, 0, __pyx_mstate_global->__pyx_n_u_map_hbn_file, NULL, __pyx_mstate_global->__pyx_n_u_hspf_hbn_cy, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0]));<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14, __pyx_L1_error)</span>
|
|
563
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
564
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_map_hbn_file, __pyx_t_3) < 0) <span class='error_goto'>__PYX_ERR(0, 14, __pyx_L1_error)</span>
|
|
565
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
566
|
+
</pre><pre class="cython line score-0"> <span class="">015</span>: <span class="nd">@cython</span><span class="o">.</span><span class="n">wraparound</span><span class="p">(</span><span class="bp">False</span><span class="p">)</span></pre>
|
|
567
|
+
<pre class="cython line score-0"> <span class="">016</span>: <span class="k">def</span><span class="w"> </span><span class="nf">map_hbn_file</span><span class="p">(</span><span class="nb">str</span> <span class="n">file_path</span><span class="p">):</span></pre>
|
|
568
|
+
<pre class="cython line score-0"> <span class="">017</span>: <span class="w"> </span><span class="sd">"""</span></pre>
|
|
569
|
+
<pre class="cython line score-0"> <span class="">018</span>: <span class="sd"> Parses an HBN file from a file path to produce mapn and mapd dictionaries.</span></pre>
|
|
570
|
+
<pre class="cython line score-0"> <span class="">019</span>: <span class="sd"> Returns (mapn, mapd, data_bytes).</span></pre>
|
|
571
|
+
<pre class="cython line score-0"> <span class="">020</span>: <span class="sd"> """</span></pre>
|
|
572
|
+
<pre class="cython line score-0"> <span class="">021</span>: <span class="k">cdef</span><span class="p">:</span></pre>
|
|
573
|
+
<pre class="cython line score-0"> <span class="">022</span>: <span class="nb">bytes</span> <span class="n">data_bytes</span></pre>
|
|
574
|
+
<pre class="cython line score-0"> <span class="">023</span>: <span class="n">const</span> <span class="nb">unsigned</span> <span class="n">char</span><span class="o">*</span> <span class="n">cbuf</span></pre>
|
|
575
|
+
<pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">024</span>: <span class="nb">Py_ssize_t</span> <span class="n">buf_len</span><span class="p">,</span> <span class="n">index</span> <span class="o">=</span> <span class="mf">1</span><span class="p">,</span> <span class="n">i</span><span class="p">,</span> <span class="n">slen</span><span class="p">,</span> <span class="n">ln</span></pre>
|
|
576
|
+
<pre class='cython code score-0 '> __pyx_v_index = 1;
|
|
577
|
+
</pre><pre class="cython line score-0"> <span class="">025</span>: <span class="nb">unsigned</span> <span class="nb">int</span> <span class="n">rectype</span><span class="p">,</span> <span class="n">tcode</span><span class="p">,</span> <span class="n">idval</span><span class="p">,</span> <span class="n">reclen</span></pre>
|
|
578
|
+
<pre class="cython line score-0"> <span class="">026</span>: <span class="nb">unsigned</span> <span class="n">char</span> <span class="n">rc1</span><span class="p">,</span> <span class="n">rc2</span><span class="p">,</span> <span class="n">rc3</span><span class="p">,</span> <span class="n">rc</span></pre>
|
|
579
|
+
<pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">027</span>: <span class="nb">dict</span> <span class="n">mapn</span> <span class="o">=</span> <span class="p">{}</span></pre>
|
|
580
|
+
<pre class='cython code score-2 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error)</span>
|
|
581
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
582
|
+
__pyx_v_mapn = ((PyObject*)__pyx_t_1);
|
|
583
|
+
__pyx_t_1 = 0;
|
|
584
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">028</span>: <span class="nb">dict</span> <span class="n">mapd</span> <span class="o">=</span> <span class="p">{}</span></pre>
|
|
585
|
+
<pre class='cython code score-2 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error)</span>
|
|
586
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
587
|
+
__pyx_v_mapd = ((PyObject*)__pyx_t_1);
|
|
588
|
+
__pyx_t_1 = 0;
|
|
589
|
+
</pre><pre class="cython line score-0"> <span class="">029</span>: </pre>
|
|
590
|
+
<pre class="cython line score-66" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">030</span>: <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">file_path</span><span class="p">,</span> <span class="s">'rb'</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span></pre>
|
|
591
|
+
<pre class='cython code score-66 '> /*with:*/ {
|
|
592
|
+
__pyx_t_2 = NULL;
|
|
593
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_builtin_open);
|
|
594
|
+
__pyx_t_3 = __pyx_builtin_open;
|
|
595
|
+
__pyx_t_4 = 1;
|
|
596
|
+
{
|
|
597
|
+
PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_file_path, __pyx_mstate_global->__pyx_n_u_rb};
|
|
598
|
+
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_FastCall</span>(__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
|
|
599
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
600
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
601
|
+
if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 30, __pyx_L1_error)</span>
|
|
602
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
603
|
+
}
|
|
604
|
+
__pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_LookupSpecial</span>(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_exit);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30, __pyx_L1_error)</span>
|
|
605
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);
|
|
606
|
+
__pyx_t_2 = NULL;
|
|
607
|
+
__pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_LookupSpecial</span>(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_enter);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 30, __pyx_L3_error)</span>
|
|
608
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
|
|
609
|
+
__pyx_t_4 = 1;
|
|
610
|
+
#if CYTHON_UNPACK_METHODS
|
|
611
|
+
if (likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_6))) {
|
|
612
|
+
__pyx_t_2 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_6);
|
|
613
|
+
assert(__pyx_t_2);
|
|
614
|
+
PyObject* __pyx__function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_6);
|
|
615
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2);
|
|
616
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx__function);
|
|
617
|
+
<span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_6, __pyx__function);
|
|
618
|
+
__pyx_t_4 = 0;
|
|
619
|
+
}
|
|
620
|
+
#endif
|
|
621
|
+
{
|
|
622
|
+
PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
|
|
623
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_FastCall</span>(__pyx_t_6, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
|
|
624
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
625
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
|
626
|
+
if (unlikely(!__pyx_t_3)) <span class='error_goto'>__PYX_ERR(0, 30, __pyx_L3_error)</span>
|
|
627
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
628
|
+
}
|
|
629
|
+
__pyx_t_6 = __pyx_t_3;
|
|
630
|
+
__pyx_t_3 = 0;
|
|
631
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
632
|
+
/*try:*/ {
|
|
633
|
+
{
|
|
634
|
+
/*try:*/ {
|
|
635
|
+
__pyx_v_f = __pyx_t_6;
|
|
636
|
+
__pyx_t_6 = 0;
|
|
637
|
+
/* … */
|
|
638
|
+
}
|
|
639
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); __pyx_t_7 = 0;
|
|
640
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8); __pyx_t_8 = 0;
|
|
641
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_9); __pyx_t_9 = 0;
|
|
642
|
+
goto __pyx_L12_try_end;
|
|
643
|
+
__pyx_L7_error:;
|
|
644
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
645
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
646
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
647
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
|
648
|
+
/*except:*/ {
|
|
649
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("hspf.hbn_cy.map_hbn_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
650
|
+
if (<span class='pyx_c_api'>__Pyx_GetException</span>(&__pyx_t_6, &__pyx_t_1, &__pyx_t_3) < 0) <span class='error_goto'>__PYX_ERR(0, 30, __pyx_L9_except_error)</span>
|
|
651
|
+
<span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_6);
|
|
652
|
+
<span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_1);
|
|
653
|
+
<span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_3);
|
|
654
|
+
__pyx_t_2 = <span class='py_c_api'>PyTuple_Pack</span>(3, __pyx_t_6, __pyx_t_1, __pyx_t_3);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L9_except_error)</span>
|
|
655
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
656
|
+
__pyx_t_10 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_5, __pyx_t_2, NULL);
|
|
657
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0;
|
|
658
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
659
|
+
if (unlikely(!__pyx_t_10)) <span class='error_goto'>__PYX_ERR(0, 30, __pyx_L9_except_error)</span>
|
|
660
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_10);
|
|
661
|
+
__pyx_t_11 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_10);
|
|
662
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_10); __pyx_t_10 = 0;
|
|
663
|
+
if (__pyx_t_11 < 0) <span class='error_goto'>__PYX_ERR(0, 30, __pyx_L9_except_error)</span>
|
|
664
|
+
__pyx_t_12 = (!__pyx_t_11);
|
|
665
|
+
if (unlikely(__pyx_t_12)) {
|
|
666
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_6);
|
|
667
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1);
|
|
668
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_3);
|
|
669
|
+
<span class='pyx_c_api'>__Pyx_ErrRestoreWithState</span>(__pyx_t_6, __pyx_t_1, __pyx_t_3);
|
|
670
|
+
__pyx_t_6 = 0; __pyx_t_1 = 0; __pyx_t_3 = 0;
|
|
671
|
+
<span class='error_goto'>__PYX_ERR(0, 30, __pyx_L9_except_error)</span>
|
|
672
|
+
}
|
|
673
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
|
674
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
675
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
676
|
+
goto __pyx_L8_exception_handled;
|
|
677
|
+
}
|
|
678
|
+
__pyx_L9_except_error:;
|
|
679
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_7);
|
|
680
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_8);
|
|
681
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_9);
|
|
682
|
+
<span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_7, __pyx_t_8, __pyx_t_9);
|
|
683
|
+
goto __pyx_L1_error;
|
|
684
|
+
__pyx_L8_exception_handled:;
|
|
685
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_7);
|
|
686
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_8);
|
|
687
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_9);
|
|
688
|
+
<span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_7, __pyx_t_8, __pyx_t_9);
|
|
689
|
+
__pyx_L12_try_end:;
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
/*finally:*/ {
|
|
693
|
+
/*normal exit:*/{
|
|
694
|
+
if (__pyx_t_5) {
|
|
695
|
+
__pyx_t_9 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[0], NULL);
|
|
696
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0;
|
|
697
|
+
if (unlikely(!__pyx_t_9)) <span class='error_goto'>__PYX_ERR(0, 30, __pyx_L1_error)</span>
|
|
698
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_9);
|
|
699
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_9); __pyx_t_9 = 0;
|
|
700
|
+
}
|
|
701
|
+
goto __pyx_L6;
|
|
702
|
+
}
|
|
703
|
+
__pyx_L6:;
|
|
704
|
+
}
|
|
705
|
+
goto __pyx_L16;
|
|
706
|
+
__pyx_L3_error:;
|
|
707
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0;
|
|
708
|
+
goto __pyx_L1_error;
|
|
709
|
+
__pyx_L16:;
|
|
710
|
+
}
|
|
711
|
+
/* … */
|
|
712
|
+
__pyx_mstate_global->__pyx_tuple[0] = <span class='py_c_api'>PyTuple_Pack</span>(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) <span class='error_goto'>__PYX_ERR(0, 30, __pyx_L1_error)</span>
|
|
713
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_mstate_global->__pyx_tuple[0]);
|
|
714
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_mstate_global->__pyx_tuple[0]);
|
|
715
|
+
</pre><pre class="cython line score-11" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">031</span>: <span class="n">data_bytes</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">read</span><span class="p">()</span></pre>
|
|
716
|
+
<pre class='cython code score-11 '> __pyx_t_1 = __pyx_v_f;
|
|
717
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1);
|
|
718
|
+
__pyx_t_4 = 0;
|
|
719
|
+
{
|
|
720
|
+
PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
|
|
721
|
+
__pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_FastCallMethod</span>(__pyx_mstate_global->__pyx_n_u_read, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
|
|
722
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
723
|
+
if (unlikely(!__pyx_t_6)) <span class='error_goto'>__PYX_ERR(0, 31, __pyx_L7_error)</span>
|
|
724
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
|
|
725
|
+
}
|
|
726
|
+
if (!(likely(<span class='py_c_api'>PyBytes_CheckExact</span>(__pyx_t_6))||((__pyx_t_6) == Py_None) || <span class='pyx_c_api'>__Pyx_RaiseUnexpectedTypeError</span>("bytes", __pyx_t_6))) <span class='error_goto'>__PYX_ERR(0, 31, __pyx_L7_error)</span>
|
|
727
|
+
__pyx_v_data_bytes = ((PyObject*)__pyx_t_6);
|
|
728
|
+
__pyx_t_6 = 0;
|
|
729
|
+
</pre><pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">032</span>: <span class="k">if</span> <span class="ow">not</span> <span class="n">data_bytes</span><span class="p">:</span></pre>
|
|
730
|
+
<pre class='cython code score-4 '> if (unlikely(!__pyx_v_data_bytes)) { <span class='pyx_c_api'>__Pyx_RaiseUnboundLocalError</span>("data_bytes"); <span class='error_goto'>__PYX_ERR(0, 32, __pyx_L1_error)</span> }
|
|
731
|
+
__pyx_t_12 = (__pyx_v_data_bytes != Py_None)&&(<span class='pyx_c_api'>__Pyx_PyBytes_GET_SIZE</span>(__pyx_v_data_bytes) != 0);
|
|
732
|
+
if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_12 < 0))) <span class='error_goto'>__PYX_ERR(0, 32, __pyx_L1_error)</span>
|
|
733
|
+
__pyx_t_11 = (!__pyx_t_12);
|
|
734
|
+
if (unlikely(__pyx_t_11)) {
|
|
735
|
+
/* … */
|
|
736
|
+
}
|
|
737
|
+
</pre><pre class="cython line score-14" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">033</span>: <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="n">f</span><span class="s">"File is empty: {file_path}"</span><span class="p">)</span></pre>
|
|
738
|
+
<pre class='cython code score-14 '> __pyx_t_1 = NULL;
|
|
739
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_builtin_ValueError);
|
|
740
|
+
__pyx_t_6 = __pyx_builtin_ValueError;
|
|
741
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyUnicode_Unicode</span>(__pyx_v_file_path);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error)</span>
|
|
742
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
743
|
+
__pyx_t_13 = <span class='pyx_c_api'>__Pyx_PyUnicode_Concat</span>(__pyx_mstate_global->__pyx_kp_u_File_is_empty, __pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 33, __pyx_L1_error)</span>
|
|
744
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_13);
|
|
745
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
746
|
+
__pyx_t_4 = 1;
|
|
747
|
+
{
|
|
748
|
+
PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_13};
|
|
749
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_FastCall</span>(__pyx_t_6, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
|
|
750
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
751
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_13); __pyx_t_13 = 0;
|
|
752
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
|
753
|
+
if (unlikely(!__pyx_t_3)) <span class='error_goto'>__PYX_ERR(0, 33, __pyx_L1_error)</span>
|
|
754
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
755
|
+
}
|
|
756
|
+
<span class='pyx_c_api'>__Pyx_Raise</span>(__pyx_t_3, 0, 0, 0);
|
|
757
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
758
|
+
<span class='error_goto'>__PYX_ERR(0, 33, __pyx_L1_error)</span>
|
|
759
|
+
</pre><pre class="cython line score-0"> <span class="">034</span>: </pre>
|
|
760
|
+
<pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">035</span>: <span class="n">PyBytes_AsStringAndSize</span><span class="p">(</span><span class="n">data_bytes</span><span class="p">,</span> <span class="o"><</span><span class="n">char</span> <span class="o">**>&</span><span class="n">cbuf</span><span class="p">,</span> <span class="o">&</span><span class="n">buf_len</span><span class="p">)</span></pre>
|
|
761
|
+
<pre class='cython code score-7 '> if (unlikely(!__pyx_v_data_bytes)) { <span class='pyx_c_api'>__Pyx_RaiseUnboundLocalError</span>("data_bytes"); <span class='error_goto'>__PYX_ERR(0, 35, __pyx_L1_error)</span> }
|
|
762
|
+
__pyx_t_14 = <span class='py_c_api'>PyBytes_AsStringAndSize</span>(__pyx_v_data_bytes, ((char **)(&__pyx_v_cbuf)), (&__pyx_v_buf_len));<span class='error_goto'> if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 35, __pyx_L1_error)</span>
|
|
763
|
+
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">036</span>: <span class="k">if</span> <span class="n">cbuf</span><span class="p">[</span><span class="mf">0</span><span class="p">]</span> <span class="o">!=</span> <span class="mf">0</span><span class="n">xFD</span><span class="p">:</span></pre>
|
|
764
|
+
<pre class='cython code score-0 '> __pyx_t_11 = ((__pyx_v_cbuf[0]) != 0xFD);
|
|
765
|
+
if (unlikely(__pyx_t_11)) {
|
|
766
|
+
/* … */
|
|
767
|
+
}
|
|
768
|
+
</pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">037</span>: <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s">"BAD HBN FILE - must start with magic number 0xFD"</span><span class="p">)</span></pre>
|
|
769
|
+
<pre class='cython code score-8 '> __pyx_t_6 = NULL;
|
|
770
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_builtin_ValueError);
|
|
771
|
+
__pyx_t_13 = __pyx_builtin_ValueError;
|
|
772
|
+
__pyx_t_4 = 1;
|
|
773
|
+
{
|
|
774
|
+
PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_BAD_HBN_FILE_must_start_with_mag};
|
|
775
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_FastCall</span>(__pyx_t_13, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
|
|
776
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
|
777
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_13); __pyx_t_13 = 0;
|
|
778
|
+
if (unlikely(!__pyx_t_3)) <span class='error_goto'>__PYX_ERR(0, 37, __pyx_L1_error)</span>
|
|
779
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
780
|
+
}
|
|
781
|
+
<span class='pyx_c_api'>__Pyx_Raise</span>(__pyx_t_3, 0, 0, 0);
|
|
782
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
783
|
+
<span class='error_goto'>__PYX_ERR(0, 37, __pyx_L1_error)</span>
|
|
784
|
+
</pre><pre class="cython line score-0"> <span class="">038</span>: </pre>
|
|
785
|
+
<pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">039</span>: <span class="k">while</span> <span class="n">index</span> <span class="o"><</span> <span class="n">buf_len</span><span class="p">:</span></pre>
|
|
786
|
+
<pre class='cython code score-0 '> while (1) {
|
|
787
|
+
__pyx_t_11 = (__pyx_v_index < __pyx_v_buf_len);
|
|
788
|
+
if (!__pyx_t_11) break;
|
|
789
|
+
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">040</span>: <span class="k">if</span> <span class="n">index</span> <span class="o">+</span> <span class="mf">28</span> <span class="o">></span> <span class="n">buf_len</span><span class="p">:</span> <span class="k">break</span></pre>
|
|
790
|
+
<pre class='cython code score-0 '> __pyx_t_11 = ((__pyx_v_index + 28) > __pyx_v_buf_len);
|
|
791
|
+
if (__pyx_t_11) {
|
|
792
|
+
goto __pyx_L20_break;
|
|
793
|
+
}
|
|
794
|
+
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">041</span>: <span class="n">rc1</span> <span class="o">=</span> <span class="n">cbuf</span><span class="p">[</span><span class="n">index</span><span class="p">];</span> <span class="n">rc2</span> <span class="o">=</span> <span class="n">cbuf</span><span class="p">[</span><span class="n">index</span><span class="o">+</span><span class="mf">1</span><span class="p">];</span> <span class="n">rc3</span> <span class="o">=</span> <span class="n">cbuf</span><span class="p">[</span><span class="n">index</span><span class="o">+</span><span class="mf">2</span><span class="p">];</span> <span class="n">rc</span> <span class="o">=</span> <span class="n">cbuf</span><span class="p">[</span><span class="n">index</span><span class="o">+</span><span class="mf">3</span><span class="p">]</span></pre>
|
|
795
|
+
<pre class='cython code score-0 '> __pyx_v_rc1 = (__pyx_v_cbuf[__pyx_v_index]);
|
|
796
|
+
__pyx_v_rc2 = (__pyx_v_cbuf[(__pyx_v_index + 1)]);
|
|
797
|
+
__pyx_v_rc3 = (__pyx_v_cbuf[(__pyx_v_index + 2)]);
|
|
798
|
+
__pyx_v_rc = (__pyx_v_cbuf[(__pyx_v_index + 3)]);
|
|
799
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">042</span>: <span class="n">rectype</span> <span class="o">=</span> <span class="n">_read_uint32_le</span><span class="p">(</span><span class="n">cbuf</span><span class="p">,</span> <span class="n">index</span> <span class="o">+</span> <span class="mf">4</span><span class="p">)</span></pre>
|
|
800
|
+
<pre class='cython code score-5 '> __pyx_t_15 = __pyx_f_4hspf_6hbn_cy__read_uint32_le(__pyx_v_cbuf, (__pyx_v_index + 4)); if (unlikely(__pyx_t_15 == ((unsigned int)-1) && <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 42, __pyx_L1_error)</span>
|
|
801
|
+
__pyx_v_rectype = __pyx_t_15;
|
|
802
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">043</span>: <span class="n">idval</span> <span class="o">=</span> <span class="n">_read_uint32_le</span><span class="p">(</span><span class="n">cbuf</span><span class="p">,</span> <span class="n">index</span> <span class="o">+</span> <span class="mf">16</span><span class="p">)</span></pre>
|
|
803
|
+
<pre class='cython code score-5 '> __pyx_t_15 = __pyx_f_4hspf_6hbn_cy__read_uint32_le(__pyx_v_cbuf, (__pyx_v_index + 16)); if (unlikely(__pyx_t_15 == ((unsigned int)-1) && <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 43, __pyx_L1_error)</span>
|
|
804
|
+
__pyx_v_idval = __pyx_t_15;
|
|
805
|
+
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">044</span>: <span class="n">reclen</span> <span class="o">=</span> <span class="p">(</span><span class="o"><</span><span class="nb">unsigned</span> <span class="nb">int</span><span class="o">></span><span class="p">(</span><span class="n">rc</span><span class="p">)</span> <span class="o">*</span> <span class="mf">4194304</span><span class="p">)</span> <span class="o">+</span> <span class="p">(</span><span class="o"><</span><span class="nb">unsigned</span> <span class="nb">int</span><span class="o">></span><span class="p">(</span><span class="n">rc3</span><span class="p">)</span> <span class="o">*</span> <span class="mf">16384</span><span class="p">)</span> <span class="o">+</span> <span class="p">(</span><span class="o"><</span><span class="nb">unsigned</span> <span class="nb">int</span><span class="o">></span><span class="p">(</span><span class="n">rc2</span><span class="p">)</span> <span class="o">*</span> <span class="mf">64</span><span class="p">)</span> <span class="o">+</span> <span class="p">(</span><span class="o"><</span><span class="nb">unsigned</span> <span class="nb">int</span><span class="o">></span><span class="p">(</span><span class="n">rc1</span><span class="p">)</span> <span class="o">>></span> <span class="mf">2</span><span class="p">)</span> <span class="o">-</span> <span class="mf">24</span></pre>
|
|
806
|
+
<pre class='cython code score-0 '> __pyx_v_reclen = (((((((unsigned int)__pyx_v_rc) * 0x400000) + (((unsigned int)__pyx_v_rc3) * 0x4000)) + (((unsigned int)__pyx_v_rc2) * 64)) + (((unsigned int)__pyx_v_rc1) >> 2)) - 24);
|
|
807
|
+
</pre><pre class="cython line score-0"> <span class="">045</span>: </pre>
|
|
808
|
+
<pre class="cython line score-13" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">046</span>: <span class="n">operation</span> <span class="o">=</span> <span class="n">data_bytes</span><span class="p">[</span><span class="n">index</span><span class="o">+</span><span class="mf">8</span><span class="p">:</span><span class="n">index</span><span class="o">+</span><span class="mf">16</span><span class="p">]</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s">'ascii'</span><span class="p">,</span> <span class="s">'ignore'</span><span class="p">)</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span></pre>
|
|
809
|
+
<pre class='cython code score-13 '> if (unlikely(!__pyx_v_data_bytes)) { <span class='pyx_c_api'>__Pyx_RaiseUnboundLocalError</span>("data_bytes"); <span class='error_goto'>__PYX_ERR(0, 46, __pyx_L1_error)</span> }
|
|
810
|
+
if (unlikely(__pyx_v_data_bytes == Py_None)) {
|
|
811
|
+
<span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
812
|
+
<span class='error_goto'>__PYX_ERR(0, 46, __pyx_L1_error)</span>
|
|
813
|
+
}
|
|
814
|
+
__pyx_t_6 = __Pyx_decode_bytes(__pyx_v_data_bytes, (__pyx_v_index + 8), (__pyx_v_index + 16), NULL, ((char const *)"ignore"), PyUnicode_DecodeASCII);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 46, __pyx_L1_error)</span>
|
|
815
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
|
|
816
|
+
__pyx_t_13 = __pyx_t_6;
|
|
817
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_13);
|
|
818
|
+
__pyx_t_4 = 0;
|
|
819
|
+
{
|
|
820
|
+
PyObject *__pyx_callargs[2] = {__pyx_t_13, NULL};
|
|
821
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_FastCallMethod</span>(__pyx_mstate_global->__pyx_n_u_strip, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
|
|
822
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_13); __pyx_t_13 = 0;
|
|
823
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
|
824
|
+
if (unlikely(!__pyx_t_3)) <span class='error_goto'>__PYX_ERR(0, 46, __pyx_L1_error)</span>
|
|
825
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
826
|
+
}
|
|
827
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_operation, ((PyObject*)__pyx_t_3));
|
|
828
|
+
__pyx_t_3 = 0;
|
|
829
|
+
</pre><pre class="cython line score-13" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">047</span>: <span class="n">activity</span> <span class="o">=</span> <span class="n">data_bytes</span><span class="p">[</span><span class="n">index</span><span class="o">+</span><span class="mf">20</span><span class="p">:</span><span class="n">index</span><span class="o">+</span><span class="mf">28</span><span class="p">]</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s">'ascii'</span><span class="p">,</span> <span class="s">'ignore'</span><span class="p">)</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span></pre>
|
|
830
|
+
<pre class='cython code score-13 '> if (unlikely(!__pyx_v_data_bytes)) { <span class='pyx_c_api'>__Pyx_RaiseUnboundLocalError</span>("data_bytes"); <span class='error_goto'>__PYX_ERR(0, 47, __pyx_L1_error)</span> }
|
|
831
|
+
if (unlikely(__pyx_v_data_bytes == Py_None)) {
|
|
832
|
+
<span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
833
|
+
<span class='error_goto'>__PYX_ERR(0, 47, __pyx_L1_error)</span>
|
|
834
|
+
}
|
|
835
|
+
__pyx_t_13 = __Pyx_decode_bytes(__pyx_v_data_bytes, (__pyx_v_index + 20), (__pyx_v_index + 28), NULL, ((char const *)"ignore"), PyUnicode_DecodeASCII);<span class='error_goto'> if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 47, __pyx_L1_error)</span>
|
|
836
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_13);
|
|
837
|
+
__pyx_t_6 = __pyx_t_13;
|
|
838
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_6);
|
|
839
|
+
__pyx_t_4 = 0;
|
|
840
|
+
{
|
|
841
|
+
PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
|
|
842
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_FastCallMethod</span>(__pyx_mstate_global->__pyx_n_u_strip, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
|
|
843
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
|
844
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_13); __pyx_t_13 = 0;
|
|
845
|
+
if (unlikely(!__pyx_t_3)) <span class='error_goto'>__PYX_ERR(0, 47, __pyx_L1_error)</span>
|
|
846
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
847
|
+
}
|
|
848
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_activity, ((PyObject*)__pyx_t_3));
|
|
849
|
+
__pyx_t_3 = 0;
|
|
850
|
+
</pre><pre class="cython line score-0"> <span class="">048</span>: </pre>
|
|
851
|
+
<pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">049</span>: <span class="k">if</span> <span class="n">rectype</span> <span class="o">==</span> <span class="mf">1</span><span class="p">:</span> <span class="c"># data record</span></pre>
|
|
852
|
+
<pre class='cython code score-0 '> switch (__pyx_v_rectype) {
|
|
853
|
+
case 1:
|
|
854
|
+
/* … */
|
|
855
|
+
break;
|
|
856
|
+
case 0:
|
|
857
|
+
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">050</span>: <span class="k">if</span> <span class="n">index</span> <span class="o">+</span> <span class="mf">36</span> <span class="o">></span> <span class="n">buf_len</span><span class="p">:</span> <span class="k">break</span></pre>
|
|
858
|
+
<pre class='cython code score-0 '> __pyx_t_11 = ((__pyx_v_index + 36) > __pyx_v_buf_len);
|
|
859
|
+
if (__pyx_t_11) {
|
|
860
|
+
goto __pyx_L20_break;
|
|
861
|
+
}
|
|
862
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">051</span>: <span class="n">tcode</span> <span class="o">=</span> <span class="n">_read_uint32_le</span><span class="p">(</span><span class="n">cbuf</span><span class="p">,</span> <span class="n">index</span> <span class="o">+</span> <span class="mf">32</span><span class="p">)</span></pre>
|
|
863
|
+
<pre class='cython code score-5 '> __pyx_t_15 = __pyx_f_4hspf_6hbn_cy__read_uint32_le(__pyx_v_cbuf, (__pyx_v_index + 32)); if (unlikely(__pyx_t_15 == ((unsigned int)-1) && <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 51, __pyx_L1_error)</span>
|
|
864
|
+
__pyx_v_tcode = __pyx_t_15;
|
|
865
|
+
</pre><pre class="cython line score-26" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">052</span>: <span class="n">key</span> <span class="o">=</span> <span class="p">(</span><span class="n">operation</span><span class="p">,</span> <span class="n">idval</span><span class="p">,</span> <span class="n">activity</span><span class="p">,</span> <span class="nb">int</span><span class="p">(</span><span class="n">tcode</span><span class="p">))</span></pre>
|
|
866
|
+
<pre class='cython code score-26 '> __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyLong_From_unsigned_int</span>(__pyx_v_idval);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 52, __pyx_L1_error)</span>
|
|
867
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
868
|
+
__pyx_t_6 = NULL;
|
|
869
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>((PyObject *)(&PyLong_Type));
|
|
870
|
+
__pyx_t_1 = ((PyObject *)(&PyLong_Type));
|
|
871
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyLong_From_unsigned_int</span>(__pyx_v_tcode);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error)</span>
|
|
872
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
873
|
+
__pyx_t_4 = 1;
|
|
874
|
+
{
|
|
875
|
+
PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_2};
|
|
876
|
+
__pyx_t_13 = <span class='pyx_c_api'>__Pyx_PyObject_FastCall</span>(__pyx_t_1, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
|
|
877
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
|
878
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
879
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
880
|
+
if (unlikely(!__pyx_t_13)) <span class='error_goto'>__PYX_ERR(0, 52, __pyx_L1_error)</span>
|
|
881
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_13);
|
|
882
|
+
}
|
|
883
|
+
__pyx_t_1 = <span class='py_c_api'>PyTuple_New</span>(4);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error)</span>
|
|
884
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
885
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_operation);
|
|
886
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_operation);
|
|
887
|
+
if (<span class='pyx_c_api'>__Pyx_PyTuple_SET_ITEM</span>(__pyx_t_1, 0, __pyx_v_operation) != (0)) <span class='error_goto'>__PYX_ERR(0, 52, __pyx_L1_error)</span>;
|
|
888
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_3);
|
|
889
|
+
if (<span class='pyx_c_api'>__Pyx_PyTuple_SET_ITEM</span>(__pyx_t_1, 1, __pyx_t_3) != (0)) <span class='error_goto'>__PYX_ERR(0, 52, __pyx_L1_error)</span>;
|
|
890
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_activity);
|
|
891
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_activity);
|
|
892
|
+
if (<span class='pyx_c_api'>__Pyx_PyTuple_SET_ITEM</span>(__pyx_t_1, 2, __pyx_v_activity) != (0)) <span class='error_goto'>__PYX_ERR(0, 52, __pyx_L1_error)</span>;
|
|
893
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_13);
|
|
894
|
+
if (<span class='pyx_c_api'>__Pyx_PyTuple_SET_ITEM</span>(__pyx_t_1, 3, __pyx_t_13) != (0)) <span class='error_goto'>__PYX_ERR(0, 52, __pyx_L1_error)</span>;
|
|
895
|
+
__pyx_t_3 = 0;
|
|
896
|
+
__pyx_t_13 = 0;
|
|
897
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_key, ((PyObject*)__pyx_t_1));
|
|
898
|
+
__pyx_t_1 = 0;
|
|
899
|
+
</pre><pre class="cython line score-13" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">053</span>: <span class="k">if</span> <span class="n">key</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">mapd</span><span class="p">:</span> <span class="n">mapd</span><span class="p">[</span><span class="n">key</span><span class="p">]</span> <span class="o">=</span> <span class="p">[]</span></pre>
|
|
900
|
+
<pre class='cython code score-13 '> __pyx_t_11 = (<span class='pyx_c_api'>__Pyx_PyDict_ContainsTF</span>(__pyx_v_key, __pyx_v_mapd, Py_NE)); if (unlikely((__pyx_t_11 < 0))) <span class='error_goto'>__PYX_ERR(0, 53, __pyx_L1_error)</span>
|
|
901
|
+
if (__pyx_t_11) {
|
|
902
|
+
__pyx_t_1 = <span class='py_c_api'>PyList_New</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error)</span>
|
|
903
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
904
|
+
if (unlikely((<span class='py_c_api'>PyDict_SetItem</span>(__pyx_v_mapd, __pyx_v_key, __pyx_t_1) < 0))) <span class='error_goto'>__PYX_ERR(0, 53, __pyx_L1_error)</span>
|
|
905
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
906
|
+
}
|
|
907
|
+
</pre><pre class="cython line score-22" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">054</span>: <span class="n">mapd</span><span class="p">[</span><span class="n">key</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">((</span><span class="n">index</span><span class="p">,</span> <span class="n">reclen</span><span class="p">))</span></pre>
|
|
908
|
+
<pre class='cython code score-22 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyDict_GetItem</span>(__pyx_v_mapd, __pyx_v_key);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 54, __pyx_L1_error)</span>
|
|
909
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
910
|
+
__pyx_t_13 = <span class='py_c_api'>PyLong_FromSsize_t</span>(__pyx_v_index);<span class='error_goto'> if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 54, __pyx_L1_error)</span>
|
|
911
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_13);
|
|
912
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyLong_From_unsigned_int</span>(__pyx_v_reclen);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 54, __pyx_L1_error)</span>
|
|
913
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
914
|
+
__pyx_t_2 = <span class='py_c_api'>PyTuple_New</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 54, __pyx_L1_error)</span>
|
|
915
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
916
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_13);
|
|
917
|
+
if (<span class='pyx_c_api'>__Pyx_PyTuple_SET_ITEM</span>(__pyx_t_2, 0, __pyx_t_13) != (0)) <span class='error_goto'>__PYX_ERR(0, 54, __pyx_L1_error)</span>;
|
|
918
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_3);
|
|
919
|
+
if (<span class='pyx_c_api'>__Pyx_PyTuple_SET_ITEM</span>(__pyx_t_2, 1, __pyx_t_3) != (0)) <span class='error_goto'>__PYX_ERR(0, 54, __pyx_L1_error)</span>;
|
|
920
|
+
__pyx_t_13 = 0;
|
|
921
|
+
__pyx_t_3 = 0;
|
|
922
|
+
__pyx_t_16 = <span class='pyx_c_api'>__Pyx_PyObject_Append</span>(__pyx_t_1, __pyx_t_2);<span class='error_goto'> if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 54, __pyx_L1_error)</span>
|
|
923
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
924
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
925
|
+
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">055</span>: <span class="k">elif</span> <span class="n">rectype</span> <span class="o">==</span> <span class="mf">0</span><span class="p">:</span> <span class="c"># data names record</span></pre>
|
|
926
|
+
<pre class='cython code score-0 '> break;
|
|
927
|
+
default: break;
|
|
928
|
+
}
|
|
929
|
+
</pre><pre class="cython line score-16" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">056</span>: <span class="n">key</span> <span class="o">=</span> <span class="p">(</span><span class="n">operation</span><span class="p">,</span> <span class="n">idval</span><span class="p">,</span> <span class="n">activity</span><span class="p">)</span></pre>
|
|
930
|
+
<pre class='cython code score-16 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyLong_From_unsigned_int</span>(__pyx_v_idval);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L1_error)</span>
|
|
931
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
932
|
+
__pyx_t_1 = <span class='py_c_api'>PyTuple_New</span>(3);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L1_error)</span>
|
|
933
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
934
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_operation);
|
|
935
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_operation);
|
|
936
|
+
if (<span class='pyx_c_api'>__Pyx_PyTuple_SET_ITEM</span>(__pyx_t_1, 0, __pyx_v_operation) != (0)) <span class='error_goto'>__PYX_ERR(0, 56, __pyx_L1_error)</span>;
|
|
937
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_2);
|
|
938
|
+
if (<span class='pyx_c_api'>__Pyx_PyTuple_SET_ITEM</span>(__pyx_t_1, 1, __pyx_t_2) != (0)) <span class='error_goto'>__PYX_ERR(0, 56, __pyx_L1_error)</span>;
|
|
939
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_activity);
|
|
940
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_activity);
|
|
941
|
+
if (<span class='pyx_c_api'>__Pyx_PyTuple_SET_ITEM</span>(__pyx_t_1, 2, __pyx_v_activity) != (0)) <span class='error_goto'>__PYX_ERR(0, 56, __pyx_L1_error)</span>;
|
|
942
|
+
__pyx_t_2 = 0;
|
|
943
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_key, ((PyObject*)__pyx_t_1));
|
|
944
|
+
__pyx_t_1 = 0;
|
|
945
|
+
</pre><pre class="cython line score-13" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">057</span>: <span class="k">if</span> <span class="n">key</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">mapn</span><span class="p">:</span> <span class="n">mapn</span><span class="p">[</span><span class="n">key</span><span class="p">]</span> <span class="o">=</span> <span class="p">[]</span></pre>
|
|
946
|
+
<pre class='cython code score-13 '> __pyx_t_11 = (<span class='pyx_c_api'>__Pyx_PyDict_ContainsTF</span>(__pyx_v_key, __pyx_v_mapn, Py_NE)); if (unlikely((__pyx_t_11 < 0))) <span class='error_goto'>__PYX_ERR(0, 57, __pyx_L1_error)</span>
|
|
947
|
+
if (__pyx_t_11) {
|
|
948
|
+
__pyx_t_1 = <span class='py_c_api'>PyList_New</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error)</span>
|
|
949
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
950
|
+
if (unlikely((<span class='py_c_api'>PyDict_SetItem</span>(__pyx_v_mapn, __pyx_v_key, __pyx_t_1) < 0))) <span class='error_goto'>__PYX_ERR(0, 57, __pyx_L1_error)</span>
|
|
951
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
952
|
+
}
|
|
953
|
+
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">058</span>: <span class="n">i</span> <span class="o">=</span> <span class="n">index</span> <span class="o">+</span> <span class="mf">28</span></pre>
|
|
954
|
+
<pre class='cython code score-0 '> __pyx_v_i = (__pyx_v_index + 28);
|
|
955
|
+
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">059</span>: <span class="n">slen</span> <span class="o">=</span> <span class="mf">0</span></pre>
|
|
956
|
+
<pre class='cython code score-0 '> __pyx_v_slen = 0;
|
|
957
|
+
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">060</span>: <span class="k">while</span> <span class="n">slen</span> <span class="o"><</span> <span class="n">reclen</span><span class="p">:</span></pre>
|
|
958
|
+
<pre class='cython code score-0 '> while (1) {
|
|
959
|
+
__pyx_t_11 = (__pyx_v_slen < __pyx_v_reclen);
|
|
960
|
+
if (!__pyx_t_11) break;
|
|
961
|
+
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">061</span>: <span class="k">if</span> <span class="n">i</span> <span class="o">+</span> <span class="n">slen</span> <span class="o">+</span> <span class="mf">4</span> <span class="o">></span> <span class="n">buf_len</span><span class="p">:</span> <span class="k">break</span></pre>
|
|
962
|
+
<pre class='cython code score-0 '> __pyx_t_11 = (((__pyx_v_i + __pyx_v_slen) + 4) > __pyx_v_buf_len);
|
|
963
|
+
if (__pyx_t_11) {
|
|
964
|
+
goto __pyx_L26_break;
|
|
965
|
+
}
|
|
966
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">062</span>: <span class="n">ln</span> <span class="o">=</span> <span class="n">_read_uint32_le</span><span class="p">(</span><span class="n">cbuf</span><span class="p">,</span> <span class="n">i</span> <span class="o">+</span> <span class="n">slen</span><span class="p">)</span></pre>
|
|
967
|
+
<pre class='cython code score-5 '> __pyx_t_15 = __pyx_f_4hspf_6hbn_cy__read_uint32_le(__pyx_v_cbuf, (__pyx_v_i + __pyx_v_slen)); if (unlikely(__pyx_t_15 == ((unsigned int)-1) && <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 62, __pyx_L1_error)</span>
|
|
968
|
+
__pyx_v_ln = __pyx_t_15;
|
|
969
|
+
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">063</span>: <span class="k">if</span> <span class="n">i</span> <span class="o">+</span> <span class="n">slen</span> <span class="o">+</span> <span class="mf">4</span> <span class="o">+</span> <span class="n">ln</span> <span class="o">></span> <span class="n">buf_len</span><span class="p">:</span> <span class="k">break</span></pre>
|
|
970
|
+
<pre class='cython code score-0 '> __pyx_t_11 = ((((__pyx_v_i + __pyx_v_slen) + 4) + __pyx_v_ln) > __pyx_v_buf_len);
|
|
971
|
+
if (__pyx_t_11) {
|
|
972
|
+
goto __pyx_L26_break;
|
|
973
|
+
}
|
|
974
|
+
</pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">064</span>: <span class="n">name</span> <span class="o">=</span> <span class="n">data_bytes</span><span class="p">[</span><span class="n">i</span> <span class="o">+</span> <span class="n">slen</span> <span class="o">+</span> <span class="mf">4</span> <span class="p">:</span> <span class="n">i</span> <span class="o">+</span> <span class="n">slen</span> <span class="o">+</span> <span class="mf">4</span> <span class="o">+</span> <span class="n">ln</span><span class="p">]</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s">'ascii'</span><span class="p">,</span> <span class="s">'ignore'</span><span class="p">)</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s">'-'</span><span class="p">,</span> <span class="s">''</span><span class="p">)</span></pre>
|
|
975
|
+
<pre class='cython code score-19 '> if (unlikely(!__pyx_v_data_bytes)) { <span class='pyx_c_api'>__Pyx_RaiseUnboundLocalError</span>("data_bytes"); <span class='error_goto'>__PYX_ERR(0, 64, __pyx_L1_error)</span> }
|
|
976
|
+
if (unlikely(__pyx_v_data_bytes == Py_None)) {
|
|
977
|
+
<span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
978
|
+
<span class='error_goto'>__PYX_ERR(0, 64, __pyx_L1_error)</span>
|
|
979
|
+
}
|
|
980
|
+
__pyx_t_3 = __Pyx_decode_bytes(__pyx_v_data_bytes, ((__pyx_v_i + __pyx_v_slen) + 4), (((__pyx_v_i + __pyx_v_slen) + 4) + __pyx_v_ln), NULL, ((char const *)"ignore"), PyUnicode_DecodeASCII);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 64, __pyx_L1_error)</span>
|
|
981
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
982
|
+
__pyx_t_2 = __pyx_t_3;
|
|
983
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2);
|
|
984
|
+
__pyx_t_4 = 0;
|
|
985
|
+
{
|
|
986
|
+
PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
|
|
987
|
+
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_FastCallMethod</span>(__pyx_mstate_global->__pyx_n_u_strip, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
|
|
988
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
989
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
990
|
+
if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 64, __pyx_L1_error)</span>
|
|
991
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
992
|
+
}
|
|
993
|
+
__pyx_t_3 = <span class='py_c_api'>PyUnicode_Replace</span>(((PyObject*)__pyx_t_1), __pyx_mstate_global->__pyx_kp_u_, __pyx_mstate_global->__pyx_kp_u__2, -1L);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 64, __pyx_L1_error)</span>
|
|
994
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
995
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
996
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_name, ((PyObject*)__pyx_t_3));
|
|
997
|
+
__pyx_t_3 = 0;
|
|
998
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">065</span>: <span class="n">mapn</span><span class="p">[</span><span class="n">key</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">name</span><span class="p">)</span></pre>
|
|
999
|
+
<pre class='cython code score-5 '> __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyDict_GetItem</span>(__pyx_v_mapn, __pyx_v_key);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 65, __pyx_L1_error)</span>
|
|
1000
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
1001
|
+
__pyx_t_16 = <span class='pyx_c_api'>__Pyx_PyObject_Append</span>(__pyx_t_3, __pyx_v_name);<span class='error_goto'> if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 65, __pyx_L1_error)</span>
|
|
1002
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
1003
|
+
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">066</span>: <span class="n">slen</span> <span class="o">+=</span> <span class="mf">4</span> <span class="o">+</span> <span class="n">ln</span></pre>
|
|
1004
|
+
<pre class='cython code score-0 '> __pyx_v_slen = (__pyx_v_slen + (4 + __pyx_v_ln));
|
|
1005
|
+
}
|
|
1006
|
+
__pyx_L26_break:;
|
|
1007
|
+
</pre><pre class="cython line score-0"> <span class="">067</span>: </pre>
|
|
1008
|
+
<pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">068</span>: <span class="k">if</span> <span class="n">reclen</span> <span class="o"><</span> <span class="mf">36</span><span class="p">:</span> <span class="n">index</span> <span class="o">+=</span> <span class="n">reclen</span> <span class="o">+</span> <span class="mf">29</span></pre>
|
|
1009
|
+
<pre class='cython code score-0 '> __pyx_t_11 = (__pyx_v_reclen < 36);
|
|
1010
|
+
if (__pyx_t_11) {
|
|
1011
|
+
__pyx_v_index = (__pyx_v_index + (__pyx_v_reclen + 29));
|
|
1012
|
+
goto __pyx_L29;
|
|
1013
|
+
}
|
|
1014
|
+
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">069</span>: <span class="k">else</span><span class="p">:</span> <span class="n">index</span> <span class="o">+=</span> <span class="n">reclen</span> <span class="o">+</span> <span class="mf">30</span></pre>
|
|
1015
|
+
<pre class='cython code score-0 '> /*else*/ {
|
|
1016
|
+
__pyx_v_index = (__pyx_v_index + (__pyx_v_reclen + 30));
|
|
1017
|
+
}
|
|
1018
|
+
__pyx_L29:;
|
|
1019
|
+
}
|
|
1020
|
+
__pyx_L20_break:;
|
|
1021
|
+
</pre><pre class="cython line score-0"> <span class="">070</span>: </pre>
|
|
1022
|
+
<pre class="cython line score-17" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">071</span>: <span class="k">return</span> <span class="n">mapn</span><span class="p">,</span> <span class="n">mapd</span><span class="p">,</span> <span class="n">data_bytes</span></pre>
|
|
1023
|
+
<pre class='cython code score-17 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
1024
|
+
if (unlikely(!__pyx_v_data_bytes)) { <span class='pyx_c_api'>__Pyx_RaiseUnboundLocalError</span>("data_bytes"); <span class='error_goto'>__PYX_ERR(0, 71, __pyx_L1_error)</span> }
|
|
1025
|
+
__pyx_t_3 = <span class='py_c_api'>PyTuple_New</span>(3);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 71, __pyx_L1_error)</span>
|
|
1026
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
1027
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_mapn);
|
|
1028
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_mapn);
|
|
1029
|
+
if (<span class='pyx_c_api'>__Pyx_PyTuple_SET_ITEM</span>(__pyx_t_3, 0, __pyx_v_mapn) != (0)) <span class='error_goto'>__PYX_ERR(0, 71, __pyx_L1_error)</span>;
|
|
1030
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_mapd);
|
|
1031
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_mapd);
|
|
1032
|
+
if (<span class='pyx_c_api'>__Pyx_PyTuple_SET_ITEM</span>(__pyx_t_3, 1, __pyx_v_mapd) != (0)) <span class='error_goto'>__PYX_ERR(0, 71, __pyx_L1_error)</span>;
|
|
1033
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_data_bytes);
|
|
1034
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_data_bytes);
|
|
1035
|
+
if (<span class='pyx_c_api'>__Pyx_PyTuple_SET_ITEM</span>(__pyx_t_3, 2, __pyx_v_data_bytes) != (0)) <span class='error_goto'>__PYX_ERR(0, 71, __pyx_L1_error)</span>;
|
|
1036
|
+
__pyx_r = __pyx_t_3;
|
|
1037
|
+
__pyx_t_3 = 0;
|
|
1038
|
+
goto __pyx_L0;
|
|
1039
|
+
</pre><pre class="cython line score-0"> <span class="">072</span>: </pre>
|
|
1040
|
+
<pre class="cython line score-50" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">073</span>: <span class="nd">@cython</span><span class="o">.</span><span class="n">boundscheck</span><span class="p">(</span><span class="bp">False</span><span class="p">)</span></pre>
|
|
1041
|
+
<pre class='cython code score-50 '>/* Python wrapper */
|
|
1042
|
+
static PyObject *__pyx_pw_4hspf_6hbn_cy_3read_data_entries(PyObject *__pyx_self,
|
|
1043
|
+
#if CYTHON_METH_FASTCALL
|
|
1044
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
1045
|
+
#else
|
|
1046
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
1047
|
+
#endif
|
|
1048
|
+
); /*proto*/
|
|
1049
|
+
<span class='py_macro_api'>PyDoc_STRVAR</span>(__pyx_doc_4hspf_6hbn_cy_2read_data_entries, "\n Reads data entries from the file's bytes. Returns (times, rows_array).\n ");
|
|
1050
|
+
static PyMethodDef __pyx_mdef_4hspf_6hbn_cy_3read_data_entries = {"read_data_entries", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4hspf_6hbn_cy_3read_data_entries, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4hspf_6hbn_cy_2read_data_entries};
|
|
1051
|
+
static PyObject *__pyx_pw_4hspf_6hbn_cy_3read_data_entries(PyObject *__pyx_self,
|
|
1052
|
+
#if CYTHON_METH_FASTCALL
|
|
1053
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
1054
|
+
#else
|
|
1055
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
1056
|
+
#endif
|
|
1057
|
+
) {
|
|
1058
|
+
PyObject *__pyx_v_data_bytes = 0;
|
|
1059
|
+
PyObject *__pyx_v_entries = 0;
|
|
1060
|
+
int __pyx_v_nvals;
|
|
1061
|
+
#if !CYTHON_METH_FASTCALL
|
|
1062
|
+
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
|
|
1063
|
+
#endif
|
|
1064
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
1065
|
+
PyObject *__pyx_r = 0;
|
|
1066
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
1067
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("read_data_entries (wrapper)", 0);
|
|
1068
|
+
#if !CYTHON_METH_FASTCALL
|
|
1069
|
+
#if CYTHON_ASSUME_SAFE_SIZE
|
|
1070
|
+
__pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);
|
|
1071
|
+
#else
|
|
1072
|
+
__pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
|
|
1073
|
+
#endif
|
|
1074
|
+
#endif
|
|
1075
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs);
|
|
1076
|
+
{
|
|
1077
|
+
PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_data_bytes,&__pyx_mstate_global->__pyx_n_u_entries,&__pyx_mstate_global->__pyx_n_u_nvals,0};
|
|
1078
|
+
PyObject* values[3] = {0,0,0};
|
|
1079
|
+
const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds) : 0;
|
|
1080
|
+
if (unlikely(__pyx_kwds_len) < 0) <span class='error_goto'>__PYX_ERR(0, 73, __pyx_L3_error)</span>
|
|
1081
|
+
if (__pyx_kwds_len > 0) {
|
|
1082
|
+
switch (__pyx_nargs) {
|
|
1083
|
+
case 3:
|
|
1084
|
+
values[2] = <span class='pyx_c_api'>__Pyx_ArgRef_FASTCALL</span>(__pyx_args, 2);
|
|
1085
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) <span class='error_goto'>__PYX_ERR(0, 73, __pyx_L3_error)</span>
|
|
1086
|
+
CYTHON_FALLTHROUGH;
|
|
1087
|
+
case 2:
|
|
1088
|
+
values[1] = <span class='pyx_c_api'>__Pyx_ArgRef_FASTCALL</span>(__pyx_args, 1);
|
|
1089
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) <span class='error_goto'>__PYX_ERR(0, 73, __pyx_L3_error)</span>
|
|
1090
|
+
CYTHON_FALLTHROUGH;
|
|
1091
|
+
case 1:
|
|
1092
|
+
values[0] = <span class='pyx_c_api'>__Pyx_ArgRef_FASTCALL</span>(__pyx_args, 0);
|
|
1093
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) <span class='error_goto'>__PYX_ERR(0, 73, __pyx_L3_error)</span>
|
|
1094
|
+
CYTHON_FALLTHROUGH;
|
|
1095
|
+
case 0: break;
|
|
1096
|
+
default: goto __pyx_L5_argtuple_error;
|
|
1097
|
+
}
|
|
1098
|
+
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
1099
|
+
if (<span class='pyx_c_api'>__Pyx_ParseKeywords</span>(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "read_data_entries", 0) < 0) <span class='error_goto'>__PYX_ERR(0, 73, __pyx_L3_error)</span>
|
|
1100
|
+
for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
|
|
1101
|
+
if (unlikely(!values[i])) { <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("read_data_entries", 1, 3, 3, i); <span class='error_goto'>__PYX_ERR(0, 73, __pyx_L3_error)</span> }
|
|
1102
|
+
}
|
|
1103
|
+
} else if (unlikely(__pyx_nargs != 3)) {
|
|
1104
|
+
goto __pyx_L5_argtuple_error;
|
|
1105
|
+
} else {
|
|
1106
|
+
values[0] = <span class='pyx_c_api'>__Pyx_ArgRef_FASTCALL</span>(__pyx_args, 0);
|
|
1107
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) <span class='error_goto'>__PYX_ERR(0, 73, __pyx_L3_error)</span>
|
|
1108
|
+
values[1] = <span class='pyx_c_api'>__Pyx_ArgRef_FASTCALL</span>(__pyx_args, 1);
|
|
1109
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) <span class='error_goto'>__PYX_ERR(0, 73, __pyx_L3_error)</span>
|
|
1110
|
+
values[2] = <span class='pyx_c_api'>__Pyx_ArgRef_FASTCALL</span>(__pyx_args, 2);
|
|
1111
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) <span class='error_goto'>__PYX_ERR(0, 73, __pyx_L3_error)</span>
|
|
1112
|
+
}
|
|
1113
|
+
__pyx_v_data_bytes = ((PyObject*)values[0]);
|
|
1114
|
+
__pyx_v_entries = ((PyObject*)values[1]);
|
|
1115
|
+
__pyx_v_nvals = <span class='pyx_c_api'>__Pyx_PyLong_As_int</span>(values[2]); if (unlikely((__pyx_v_nvals == (int)-1) && <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 75, __pyx_L3_error)</span>
|
|
1116
|
+
}
|
|
1117
|
+
goto __pyx_L6_skip;
|
|
1118
|
+
__pyx_L5_argtuple_error:;
|
|
1119
|
+
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("read_data_entries", 1, 3, 3, __pyx_nargs); <span class='error_goto'>__PYX_ERR(0, 73, __pyx_L3_error)</span>
|
|
1120
|
+
__pyx_L6_skip:;
|
|
1121
|
+
goto __pyx_L4_argument_unpacking_done;
|
|
1122
|
+
__pyx_L3_error:;
|
|
1123
|
+
for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
1124
|
+
Py_XDECREF(values[__pyx_temp]);
|
|
1125
|
+
}
|
|
1126
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("hspf.hbn_cy.read_data_entries", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
1127
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
1128
|
+
return NULL;
|
|
1129
|
+
__pyx_L4_argument_unpacking_done:;
|
|
1130
|
+
if (unlikely(!<span class='pyx_c_api'>__Pyx_ArgTypeTest</span>(((PyObject *)__pyx_v_data_bytes), (&PyBytes_Type), 1, "data_bytes", 1))) <span class='error_goto'>__PYX_ERR(0, 75, __pyx_L1_error)</span>
|
|
1131
|
+
if (unlikely(!<span class='pyx_c_api'>__Pyx_ArgTypeTest</span>(((PyObject *)__pyx_v_entries), (&PyList_Type), 1, "entries", 1))) <span class='error_goto'>__PYX_ERR(0, 75, __pyx_L1_error)</span>
|
|
1132
|
+
__pyx_r = __pyx_pf_4hspf_6hbn_cy_2read_data_entries(__pyx_self, __pyx_v_data_bytes, __pyx_v_entries, __pyx_v_nvals);
|
|
1133
|
+
int __pyx_lineno = 0;
|
|
1134
|
+
const char *__pyx_filename = NULL;
|
|
1135
|
+
int __pyx_clineno = 0;
|
|
1136
|
+
|
|
1137
|
+
/* function exit code */
|
|
1138
|
+
goto __pyx_L0;
|
|
1139
|
+
__pyx_L1_error:;
|
|
1140
|
+
__pyx_r = NULL;
|
|
1141
|
+
for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
1142
|
+
Py_XDECREF(values[__pyx_temp]);
|
|
1143
|
+
}
|
|
1144
|
+
goto __pyx_L7_cleaned_up;
|
|
1145
|
+
__pyx_L0:;
|
|
1146
|
+
for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
1147
|
+
Py_XDECREF(values[__pyx_temp]);
|
|
1148
|
+
}
|
|
1149
|
+
__pyx_L7_cleaned_up:;
|
|
1150
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
1151
|
+
return __pyx_r;
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
static PyObject *__pyx_pf_4hspf_6hbn_cy_2read_data_entries(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data_bytes, PyObject *__pyx_v_entries, int __pyx_v_nvals) {
|
|
1155
|
+
unsigned char const *__pyx_v_cbuf;
|
|
1156
|
+
Py_ssize_t __pyx_v_buf_len;
|
|
1157
|
+
Py_ssize_t __pyx_v_num_entries;
|
|
1158
|
+
Py_ssize_t __pyx_v_k;
|
|
1159
|
+
Py_ssize_t __pyx_v_idx;
|
|
1160
|
+
unsigned int __pyx_v_yr;
|
|
1161
|
+
unsigned int __pyx_v_mo;
|
|
1162
|
+
unsigned int __pyx_v_dy;
|
|
1163
|
+
unsigned int __pyx_v_hr;
|
|
1164
|
+
unsigned int __pyx_v_mn;
|
|
1165
|
+
PyArrayObject *__pyx_v_rows2d = 0;
|
|
1166
|
+
PyObject *__pyx_v_times = 0;
|
|
1167
|
+
__Pyx_LocalBuf_ND __pyx_pybuffernd_rows2d;
|
|
1168
|
+
__Pyx_Buffer __pyx_pybuffer_rows2d;
|
|
1169
|
+
PyObject *__pyx_r = NULL;
|
|
1170
|
+
__pyx_pybuffer_rows2d.pybuffer.buf = NULL;
|
|
1171
|
+
__pyx_pybuffer_rows2d.refcount = 0;
|
|
1172
|
+
__pyx_pybuffernd_rows2d.data = NULL;
|
|
1173
|
+
__pyx_pybuffernd_rows2d.rcbuffer = &__pyx_pybuffer_rows2d;
|
|
1174
|
+
/* … */
|
|
1175
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_4hspf_6hbn_cy_3read_data_entries, 0, __pyx_mstate_global->__pyx_n_u_read_data_entries, NULL, __pyx_mstate_global->__pyx_n_u_hspf_hbn_cy, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1]));<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 73, __pyx_L1_error)</span>
|
|
1176
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
1177
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_read_data_entries, __pyx_t_3) < 0) <span class='error_goto'>__PYX_ERR(0, 73, __pyx_L1_error)</span>
|
|
1178
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
1179
|
+
</pre><pre class="cython line score-0"> <span class="">074</span>: <span class="nd">@cython</span><span class="o">.</span><span class="n">wraparound</span><span class="p">(</span><span class="bp">False</span><span class="p">)</span></pre>
|
|
1180
|
+
<pre class="cython line score-0"> <span class="">075</span>: <span class="k">def</span><span class="w"> </span><span class="nf">read_data_entries</span><span class="p">(</span><span class="nb">bytes</span> <span class="n">data_bytes</span><span class="p">,</span> <span class="nb">list</span> <span class="n">entries</span><span class="p">,</span> <span class="nb">int</span> <span class="n">nvals</span><span class="p">):</span></pre>
|
|
1181
|
+
<pre class="cython line score-0"> <span class="">076</span>: <span class="w"> </span><span class="sd">"""</span></pre>
|
|
1182
|
+
<pre class="cython line score-0"> <span class="">077</span>: <span class="sd"> Reads data entries from the file's bytes. Returns (times, rows_array).</span></pre>
|
|
1183
|
+
<pre class="cython line score-0"> <span class="">078</span>: <span class="sd"> """</span></pre>
|
|
1184
|
+
<pre class="cython line score-0"> <span class="">079</span>: <span class="k">cdef</span><span class="p">:</span></pre>
|
|
1185
|
+
<pre class="cython line score-0"> <span class="">080</span>: <span class="n">const</span> <span class="nb">unsigned</span> <span class="n">char</span><span class="o">*</span> <span class="n">cbuf</span></pre>
|
|
1186
|
+
<pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">081</span>: <span class="nb">Py_ssize_t</span> <span class="n">buf_len</span><span class="p">,</span> <span class="n">num_entries</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">entries</span><span class="p">),</span> <span class="n">k</span><span class="p">,</span> <span class="n">idx</span></pre>
|
|
1187
|
+
<pre class='cython code score-7 '> if (unlikely(__pyx_v_entries == Py_None)) {
|
|
1188
|
+
<span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
1189
|
+
<span class='error_goto'>__PYX_ERR(0, 81, __pyx_L1_error)</span>
|
|
1190
|
+
}
|
|
1191
|
+
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyList_GET_SIZE</span>(__pyx_v_entries);<span class='error_goto'> if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 81, __pyx_L1_error)</span>
|
|
1192
|
+
__pyx_v_num_entries = __pyx_t_1;
|
|
1193
|
+
</pre><pre class="cython line score-0"> <span class="">082</span>: <span class="nb">unsigned</span> <span class="nb">int</span> <span class="n">yr</span><span class="p">,</span> <span class="n">mo</span><span class="p">,</span> <span class="n">dy</span><span class="p">,</span> <span class="n">hr</span><span class="p">,</span> <span class="n">mn</span></pre>
|
|
1194
|
+
<pre class="cython line score-52" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">083</span>: <span class="n">cnp</span><span class="o">.</span><span class="n">ndarray</span><span class="p">[</span><span class="n">cnp</span><span class="o">.</span><span class="n">float32_t</span><span class="p">,</span> <span class="n">ndim</span><span class="o">=</span><span class="mf">2</span><span class="p">]</span> <span class="n">rows2d</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">empty</span><span class="p">((</span><span class="n">num_entries</span><span class="p">,</span> <span class="n">nvals</span><span class="p">),</span> <span class="n">dtype</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">float32</span><span class="p">)</span></pre>
|
|
1195
|
+
<pre class='cython code score-52 '> __pyx_t_3 = NULL;
|
|
1196
|
+
<span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_np);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 83, __pyx_L1_error)</span>
|
|
1197
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);
|
|
1198
|
+
__pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_empty);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 83, __pyx_L1_error)</span>
|
|
1199
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);
|
|
1200
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
|
|
1201
|
+
__pyx_t_4 = <span class='py_c_api'>PyLong_FromSsize_t</span>(__pyx_v_num_entries);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 83, __pyx_L1_error)</span>
|
|
1202
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);
|
|
1203
|
+
__pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyLong_From_int</span>(__pyx_v_nvals);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 83, __pyx_L1_error)</span>
|
|
1204
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
|
|
1205
|
+
__pyx_t_7 = <span class='py_c_api'>PyTuple_New</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 83, __pyx_L1_error)</span>
|
|
1206
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7);
|
|
1207
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_4);
|
|
1208
|
+
if (<span class='pyx_c_api'>__Pyx_PyTuple_SET_ITEM</span>(__pyx_t_7, 0, __pyx_t_4) != (0)) <span class='error_goto'>__PYX_ERR(0, 83, __pyx_L1_error)</span>;
|
|
1209
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_6);
|
|
1210
|
+
if (<span class='pyx_c_api'>__Pyx_PyTuple_SET_ITEM</span>(__pyx_t_7, 1, __pyx_t_6) != (0)) <span class='error_goto'>__PYX_ERR(0, 83, __pyx_L1_error)</span>;
|
|
1211
|
+
__pyx_t_4 = 0;
|
|
1212
|
+
__pyx_t_6 = 0;
|
|
1213
|
+
<span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_np);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 83, __pyx_L1_error)</span>
|
|
1214
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
|
|
1215
|
+
__pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_float32);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 83, __pyx_L1_error)</span>
|
|
1216
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);
|
|
1217
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
|
1218
|
+
__pyx_t_8 = 1;
|
|
1219
|
+
#if CYTHON_UNPACK_METHODS
|
|
1220
|
+
if (unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_5))) {
|
|
1221
|
+
__pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_5);
|
|
1222
|
+
assert(__pyx_t_3);
|
|
1223
|
+
PyObject* __pyx__function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_5);
|
|
1224
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3);
|
|
1225
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx__function);
|
|
1226
|
+
<span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_5, __pyx__function);
|
|
1227
|
+
__pyx_t_8 = 0;
|
|
1228
|
+
}
|
|
1229
|
+
#endif
|
|
1230
|
+
{
|
|
1231
|
+
PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_t_7};
|
|
1232
|
+
__pyx_t_6 = <span class='pyx_c_api'>__Pyx_MakeVectorcallBuilderKwds</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 83, __pyx_L1_error)</span>
|
|
1233
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
|
|
1234
|
+
if (<span class='pyx_c_api'>__Pyx_VectorcallBuilder_AddArg</span>(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_t_4, __pyx_t_6, __pyx_callargs+2, 0) < 0) <span class='error_goto'>__PYX_ERR(0, 83, __pyx_L1_error)</span>
|
|
1235
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_Object_Vectorcall_CallFromBuilder</span>(__pyx_t_5, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
|
|
1236
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
1237
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0;
|
|
1238
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
|
|
1239
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
|
1240
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0;
|
|
1241
|
+
if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 83, __pyx_L1_error)</span>
|
|
1242
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
1243
|
+
}
|
|
1244
|
+
if (!(likely(((__pyx_t_2) == Py_None) || likely(<span class='pyx_c_api'>__Pyx_TypeTest</span>(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) <span class='error_goto'>__PYX_ERR(0, 83, __pyx_L1_error)</span>
|
|
1245
|
+
{
|
|
1246
|
+
__Pyx_BufFmt_StackElem __pyx_stack[1];
|
|
1247
|
+
if (unlikely(<span class='pyx_c_api'>__Pyx_GetBufferAndValidate</span>(&__pyx_pybuffernd_rows2d.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
|
|
1248
|
+
__pyx_v_rows2d = ((PyArrayObject *)Py_None); <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); __pyx_pybuffernd_rows2d.rcbuffer->pybuffer.buf = NULL;
|
|
1249
|
+
<span class='error_goto'>__PYX_ERR(0, 83, __pyx_L1_error)</span>
|
|
1250
|
+
} else {__pyx_pybuffernd_rows2d.diminfo[0].strides = __pyx_pybuffernd_rows2d.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rows2d.diminfo[0].shape = __pyx_pybuffernd_rows2d.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_rows2d.diminfo[1].strides = __pyx_pybuffernd_rows2d.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_rows2d.diminfo[1].shape = __pyx_pybuffernd_rows2d.rcbuffer->pybuffer.shape[1];
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
__pyx_v_rows2d = ((PyArrayObject *)__pyx_t_2);
|
|
1254
|
+
__pyx_t_2 = 0;
|
|
1255
|
+
</pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">084</span>: <span class="nb">list</span> <span class="n">times</span> <span class="o">=</span> <span class="p">[</span><span class="bp">None</span><span class="p">]</span> <span class="o">*</span> <span class="n">num_entries</span></pre>
|
|
1256
|
+
<pre class='cython code score-8 '> __pyx_t_2 = <span class='py_c_api'>PyList_New</span>(1 * ((__pyx_v_num_entries<0) ? 0:__pyx_v_num_entries));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error)</span>
|
|
1257
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
1258
|
+
{ Py_ssize_t __pyx_temp;
|
|
1259
|
+
for (__pyx_temp=0; __pyx_temp < __pyx_v_num_entries; __pyx_temp++) {
|
|
1260
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None);
|
|
1261
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(Py_None);
|
|
1262
|
+
if (<span class='pyx_c_api'>__Pyx_PyList_SET_ITEM</span>(__pyx_t_2, __pyx_temp, Py_None) != (0)) <span class='error_goto'>__PYX_ERR(0, 84, __pyx_L1_error)</span>;
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
__pyx_v_times = ((PyObject*)__pyx_t_2);
|
|
1266
|
+
__pyx_t_2 = 0;
|
|
1267
|
+
</pre><pre class="cython line score-0"> <span class="">085</span>: </pre>
|
|
1268
|
+
<pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">086</span>: <span class="n">PyBytes_AsStringAndSize</span><span class="p">(</span><span class="n">data_bytes</span><span class="p">,</span> <span class="o"><</span><span class="n">char</span> <span class="o">**>&</span><span class="n">cbuf</span><span class="p">,</span> <span class="o">&</span><span class="n">buf_len</span><span class="p">)</span></pre>
|
|
1269
|
+
<pre class='cython code score-5 '> __pyx_t_9 = <span class='py_c_api'>PyBytes_AsStringAndSize</span>(__pyx_v_data_bytes, ((char **)(&__pyx_v_cbuf)), (&__pyx_v_buf_len));<span class='error_goto'> if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 86, __pyx_L1_error)</span>
|
|
1270
|
+
</pre><pre class="cython line score-0"> <span class="">087</span>: </pre>
|
|
1271
|
+
<pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">088</span>: <span class="k">for</span> <span class="n">k</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">num_entries</span><span class="p">):</span></pre>
|
|
1272
|
+
<pre class='cython code score-0 '> __pyx_t_1 = __pyx_v_num_entries;
|
|
1273
|
+
__pyx_t_10 = __pyx_t_1;
|
|
1274
|
+
for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
|
|
1275
|
+
__pyx_v_k = __pyx_t_11;
|
|
1276
|
+
</pre><pre class="cython line score-17" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">089</span>: <span class="n">idx</span> <span class="o">=</span> <span class="n">entries</span><span class="p">[</span><span class="n">k</span><span class="p">][</span><span class="mf">0</span><span class="p">]</span> <span class="c"># Get just the index from the (index, reclen) tuple</span></pre>
|
|
1277
|
+
<pre class='cython code score-17 '> if (unlikely(__pyx_v_entries == Py_None)) {
|
|
1278
|
+
<span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
1279
|
+
<span class='error_goto'>__PYX_ERR(0, 89, __pyx_L1_error)</span>
|
|
1280
|
+
}
|
|
1281
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_GetItemInt</span>(<span class='pyx_c_api'>__Pyx_PyList_GET_ITEM</span>(__pyx_v_entries, __pyx_v_k), 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error)</span>
|
|
1282
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
1283
|
+
__pyx_t_12 = <span class='pyx_c_api'>__Pyx_PyIndex_AsSsize_t</span>(__pyx_t_2); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 89, __pyx_L1_error)</span>
|
|
1284
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
1285
|
+
__pyx_v_idx = __pyx_t_12;
|
|
1286
|
+
</pre><pre class="cython line score-0"> <span class="">090</span>: </pre>
|
|
1287
|
+
<pre class="cython line score-0"> <span class="">091</span>: <span class="c"># Boundary check for safety</span></pre>
|
|
1288
|
+
<pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">092</span>: <span class="k">if</span> <span class="n">idx</span> <span class="o">+</span> <span class="mf">56</span> <span class="o">+</span> <span class="p">(</span><span class="n">nvals</span> <span class="o">*</span> <span class="mf">4</span><span class="p">)</span> <span class="o">></span> <span class="n">buf_len</span><span class="p">:</span> <span class="k">continue</span></pre>
|
|
1289
|
+
<pre class='cython code score-0 '> __pyx_t_13 = (((__pyx_v_idx + 56) + (__pyx_v_nvals * 4)) > __pyx_v_buf_len);
|
|
1290
|
+
if (__pyx_t_13) {
|
|
1291
|
+
goto __pyx_L3_continue;
|
|
1292
|
+
}
|
|
1293
|
+
</pre><pre class="cython line score-0"> <span class="">093</span>: </pre>
|
|
1294
|
+
<pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">094</span>: <span class="n">yr</span> <span class="o">=</span> <span class="n">_read_uint32_le</span><span class="p">(</span><span class="n">cbuf</span><span class="p">,</span> <span class="n">idx</span> <span class="o">+</span> <span class="mf">36</span><span class="p">)</span></pre>
|
|
1295
|
+
<pre class='cython code score-5 '> __pyx_t_14 = __pyx_f_4hspf_6hbn_cy__read_uint32_le(__pyx_v_cbuf, (__pyx_v_idx + 36)); if (unlikely(__pyx_t_14 == ((unsigned int)-1) && <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 94, __pyx_L1_error)</span>
|
|
1296
|
+
__pyx_v_yr = __pyx_t_14;
|
|
1297
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">095</span>: <span class="n">mo</span> <span class="o">=</span> <span class="n">_read_uint32_le</span><span class="p">(</span><span class="n">cbuf</span><span class="p">,</span> <span class="n">idx</span> <span class="o">+</span> <span class="mf">40</span><span class="p">)</span></pre>
|
|
1298
|
+
<pre class='cython code score-5 '> __pyx_t_14 = __pyx_f_4hspf_6hbn_cy__read_uint32_le(__pyx_v_cbuf, (__pyx_v_idx + 40)); if (unlikely(__pyx_t_14 == ((unsigned int)-1) && <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 95, __pyx_L1_error)</span>
|
|
1299
|
+
__pyx_v_mo = __pyx_t_14;
|
|
1300
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">096</span>: <span class="n">dy</span> <span class="o">=</span> <span class="n">_read_uint32_le</span><span class="p">(</span><span class="n">cbuf</span><span class="p">,</span> <span class="n">idx</span> <span class="o">+</span> <span class="mf">44</span><span class="p">)</span></pre>
|
|
1301
|
+
<pre class='cython code score-5 '> __pyx_t_14 = __pyx_f_4hspf_6hbn_cy__read_uint32_le(__pyx_v_cbuf, (__pyx_v_idx + 44)); if (unlikely(__pyx_t_14 == ((unsigned int)-1) && <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 96, __pyx_L1_error)</span>
|
|
1302
|
+
__pyx_v_dy = __pyx_t_14;
|
|
1303
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">097</span>: <span class="n">hr</span> <span class="o">=</span> <span class="n">_read_uint32_le</span><span class="p">(</span><span class="n">cbuf</span><span class="p">,</span> <span class="n">idx</span> <span class="o">+</span> <span class="mf">48</span><span class="p">)</span></pre>
|
|
1304
|
+
<pre class='cython code score-5 '> __pyx_t_14 = __pyx_f_4hspf_6hbn_cy__read_uint32_le(__pyx_v_cbuf, (__pyx_v_idx + 48)); if (unlikely(__pyx_t_14 == ((unsigned int)-1) && <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 97, __pyx_L1_error)</span>
|
|
1305
|
+
__pyx_v_hr = __pyx_t_14;
|
|
1306
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">098</span>: <span class="n">mn</span> <span class="o">=</span> <span class="n">_read_uint32_le</span><span class="p">(</span><span class="n">cbuf</span><span class="p">,</span> <span class="n">idx</span> <span class="o">+</span> <span class="mf">52</span><span class="p">)</span></pre>
|
|
1307
|
+
<pre class='cython code score-5 '> __pyx_t_14 = __pyx_f_4hspf_6hbn_cy__read_uint32_le(__pyx_v_cbuf, (__pyx_v_idx + 52)); if (unlikely(__pyx_t_14 == ((unsigned int)-1) && <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 98, __pyx_L1_error)</span>
|
|
1308
|
+
__pyx_v_mn = __pyx_t_14;
|
|
1309
|
+
</pre><pre class="cython line score-0"> <span class="">099</span>: </pre>
|
|
1310
|
+
<pre class="cython line score-18" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">100</span>: <span class="k">try</span><span class="p">:</span></pre>
|
|
1311
|
+
<pre class='cython code score-18 '> {
|
|
1312
|
+
/*try:*/ {
|
|
1313
|
+
/* … */
|
|
1314
|
+
}
|
|
1315
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_15); __pyx_t_15 = 0;
|
|
1316
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_16); __pyx_t_16 = 0;
|
|
1317
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_17); __pyx_t_17 = 0;
|
|
1318
|
+
goto __pyx_L13_try_end;
|
|
1319
|
+
__pyx_L6_error:;
|
|
1320
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_18); __pyx_t_18 = 0;
|
|
1321
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_19); __pyx_t_19 = 0;
|
|
1322
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
1323
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_20); __pyx_t_20 = 0;
|
|
1324
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_21); __pyx_t_21 = 0;
|
|
1325
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_22); __pyx_t_22 = 0;
|
|
1326
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
1327
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
|
|
1328
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0;
|
|
1329
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
|
1330
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); __pyx_t_7 = 0;
|
|
1331
|
+
/* … */
|
|
1332
|
+
__pyx_L8_except_error:;
|
|
1333
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_15);
|
|
1334
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_16);
|
|
1335
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_17);
|
|
1336
|
+
<span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_15, __pyx_t_16, __pyx_t_17);
|
|
1337
|
+
goto __pyx_L1_error;
|
|
1338
|
+
__pyx_L7_exception_handled:;
|
|
1339
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_15);
|
|
1340
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_16);
|
|
1341
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_17);
|
|
1342
|
+
<span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_15, __pyx_t_16, __pyx_t_17);
|
|
1343
|
+
__pyx_L13_try_end:;
|
|
1344
|
+
}
|
|
1345
|
+
</pre><pre class="cython line score-67" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">101</span>: <span class="n">times</span><span class="p">[</span><span class="n">k</span><span class="p">]</span> <span class="o">=</span> <span class="n">datetime</span><span class="p">(</span><span class="nb">int</span><span class="p">(</span><span class="n">yr</span><span class="p">),</span> <span class="nb">int</span><span class="p">(</span><span class="n">mo</span><span class="p">),</span> <span class="nb">int</span><span class="p">(</span><span class="n">dy</span><span class="p">),</span> <span class="nb">int</span><span class="p">(</span><span class="n">hr</span><span class="p">)</span> <span class="o">-</span> <span class="mf">1</span><span class="p">,</span> <span class="nb">int</span><span class="p">(</span><span class="n">mn</span><span class="p">))</span></pre>
|
|
1346
|
+
<pre class='cython code score-67 '> __pyx_t_5 = NULL;
|
|
1347
|
+
<span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_datetime);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 101, __pyx_L6_error)</span>
|
|
1348
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
|
|
1349
|
+
__pyx_t_7 = NULL;
|
|
1350
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>((PyObject *)(&PyLong_Type));
|
|
1351
|
+
__pyx_t_3 = ((PyObject *)(&PyLong_Type));
|
|
1352
|
+
__pyx_t_18 = <span class='pyx_c_api'>__Pyx_PyLong_From_unsigned_int</span>(__pyx_v_yr);<span class='error_goto'> if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 101, __pyx_L6_error)</span>
|
|
1353
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_18);
|
|
1354
|
+
__pyx_t_8 = 1;
|
|
1355
|
+
{
|
|
1356
|
+
PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_18};
|
|
1357
|
+
__pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_FastCall</span>(__pyx_t_3, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
|
|
1358
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); __pyx_t_7 = 0;
|
|
1359
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_18); __pyx_t_18 = 0;
|
|
1360
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
1361
|
+
if (unlikely(!__pyx_t_4)) <span class='error_goto'>__PYX_ERR(0, 101, __pyx_L6_error)</span>
|
|
1362
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);
|
|
1363
|
+
}
|
|
1364
|
+
__pyx_t_18 = NULL;
|
|
1365
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>((PyObject *)(&PyLong_Type));
|
|
1366
|
+
__pyx_t_7 = ((PyObject *)(&PyLong_Type));
|
|
1367
|
+
__pyx_t_19 = <span class='pyx_c_api'>__Pyx_PyLong_From_unsigned_int</span>(__pyx_v_mo);<span class='error_goto'> if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 101, __pyx_L6_error)</span>
|
|
1368
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_19);
|
|
1369
|
+
__pyx_t_8 = 1;
|
|
1370
|
+
{
|
|
1371
|
+
PyObject *__pyx_callargs[2] = {__pyx_t_18, __pyx_t_19};
|
|
1372
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_FastCall</span>(__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
|
|
1373
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_18); __pyx_t_18 = 0;
|
|
1374
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_19); __pyx_t_19 = 0;
|
|
1375
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0;
|
|
1376
|
+
if (unlikely(!__pyx_t_3)) <span class='error_goto'>__PYX_ERR(0, 101, __pyx_L6_error)</span>
|
|
1377
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
1378
|
+
}
|
|
1379
|
+
__pyx_t_19 = NULL;
|
|
1380
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>((PyObject *)(&PyLong_Type));
|
|
1381
|
+
__pyx_t_18 = ((PyObject *)(&PyLong_Type));
|
|
1382
|
+
__pyx_t_20 = <span class='pyx_c_api'>__Pyx_PyLong_From_unsigned_int</span>(__pyx_v_dy);<span class='error_goto'> if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 101, __pyx_L6_error)</span>
|
|
1383
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_20);
|
|
1384
|
+
__pyx_t_8 = 1;
|
|
1385
|
+
{
|
|
1386
|
+
PyObject *__pyx_callargs[2] = {__pyx_t_19, __pyx_t_20};
|
|
1387
|
+
__pyx_t_7 = <span class='pyx_c_api'>__Pyx_PyObject_FastCall</span>(__pyx_t_18, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
|
|
1388
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_19); __pyx_t_19 = 0;
|
|
1389
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_20); __pyx_t_20 = 0;
|
|
1390
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_18); __pyx_t_18 = 0;
|
|
1391
|
+
if (unlikely(!__pyx_t_7)) <span class='error_goto'>__PYX_ERR(0, 101, __pyx_L6_error)</span>
|
|
1392
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7);
|
|
1393
|
+
}
|
|
1394
|
+
__pyx_t_20 = NULL;
|
|
1395
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>((PyObject *)(&PyLong_Type));
|
|
1396
|
+
__pyx_t_19 = ((PyObject *)(&PyLong_Type));
|
|
1397
|
+
__pyx_t_21 = <span class='pyx_c_api'>__Pyx_PyLong_From_unsigned_int</span>(__pyx_v_hr);<span class='error_goto'> if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 101, __pyx_L6_error)</span>
|
|
1398
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_21);
|
|
1399
|
+
__pyx_t_8 = 1;
|
|
1400
|
+
{
|
|
1401
|
+
PyObject *__pyx_callargs[2] = {__pyx_t_20, __pyx_t_21};
|
|
1402
|
+
__pyx_t_18 = <span class='pyx_c_api'>__Pyx_PyObject_FastCall</span>(__pyx_t_19, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
|
|
1403
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_20); __pyx_t_20 = 0;
|
|
1404
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_21); __pyx_t_21 = 0;
|
|
1405
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_19); __pyx_t_19 = 0;
|
|
1406
|
+
if (unlikely(!__pyx_t_18)) <span class='error_goto'>__PYX_ERR(0, 101, __pyx_L6_error)</span>
|
|
1407
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_18);
|
|
1408
|
+
}
|
|
1409
|
+
__pyx_t_19 = <span class='pyx_c_api'>__Pyx_PyLong_SubtractObjC</span>(__pyx_t_18, __pyx_mstate_global->__pyx_int_1, 1, 0, 0);<span class='error_goto'> if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 101, __pyx_L6_error)</span>
|
|
1410
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_19);
|
|
1411
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_18); __pyx_t_18 = 0;
|
|
1412
|
+
__pyx_t_21 = NULL;
|
|
1413
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>((PyObject *)(&PyLong_Type));
|
|
1414
|
+
__pyx_t_20 = ((PyObject *)(&PyLong_Type));
|
|
1415
|
+
__pyx_t_22 = <span class='pyx_c_api'>__Pyx_PyLong_From_unsigned_int</span>(__pyx_v_mn);<span class='error_goto'> if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 101, __pyx_L6_error)</span>
|
|
1416
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_22);
|
|
1417
|
+
__pyx_t_8 = 1;
|
|
1418
|
+
{
|
|
1419
|
+
PyObject *__pyx_callargs[2] = {__pyx_t_21, __pyx_t_22};
|
|
1420
|
+
__pyx_t_18 = <span class='pyx_c_api'>__Pyx_PyObject_FastCall</span>(__pyx_t_20, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
|
|
1421
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_21); __pyx_t_21 = 0;
|
|
1422
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_22); __pyx_t_22 = 0;
|
|
1423
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_20); __pyx_t_20 = 0;
|
|
1424
|
+
if (unlikely(!__pyx_t_18)) <span class='error_goto'>__PYX_ERR(0, 101, __pyx_L6_error)</span>
|
|
1425
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_18);
|
|
1426
|
+
}
|
|
1427
|
+
__pyx_t_8 = 1;
|
|
1428
|
+
#if CYTHON_UNPACK_METHODS
|
|
1429
|
+
if (unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_6))) {
|
|
1430
|
+
__pyx_t_5 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_6);
|
|
1431
|
+
assert(__pyx_t_5);
|
|
1432
|
+
PyObject* __pyx__function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_6);
|
|
1433
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_5);
|
|
1434
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx__function);
|
|
1435
|
+
<span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_6, __pyx__function);
|
|
1436
|
+
__pyx_t_8 = 0;
|
|
1437
|
+
}
|
|
1438
|
+
#endif
|
|
1439
|
+
{
|
|
1440
|
+
PyObject *__pyx_callargs[6] = {__pyx_t_5, __pyx_t_4, __pyx_t_3, __pyx_t_7, __pyx_t_19, __pyx_t_18};
|
|
1441
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_FastCall</span>(__pyx_t_6, __pyx_callargs+__pyx_t_8, (6-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
|
|
1442
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0;
|
|
1443
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
|
|
1444
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
1445
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0;
|
|
1446
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_19); __pyx_t_19 = 0;
|
|
1447
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_18); __pyx_t_18 = 0;
|
|
1448
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
|
1449
|
+
if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 101, __pyx_L6_error)</span>
|
|
1450
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
1451
|
+
}
|
|
1452
|
+
if (unlikely((<span class='pyx_c_api'>__Pyx_SetItemInt</span>(__pyx_v_times, __pyx_v_k, __pyx_t_2, Py_ssize_t, 1, PyLong_FromSsize_t, 1, 0, 0, 1) < 0))) <span class='error_goto'>__PYX_ERR(0, 101, __pyx_L6_error)</span>
|
|
1453
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
1454
|
+
</pre><pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">102</span>: <span class="k">except</span> <span class="ne">ValueError</span><span class="p">:</span></pre>
|
|
1455
|
+
<pre class='cython code score-6 '> __pyx_t_9 = <span class='pyx_c_api'>__Pyx_PyErr_ExceptionMatches</span>(__pyx_builtin_ValueError);
|
|
1456
|
+
if (__pyx_t_9) {
|
|
1457
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("hspf.hbn_cy.read_data_entries", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
1458
|
+
if (<span class='pyx_c_api'>__Pyx_GetException</span>(&__pyx_t_2, &__pyx_t_6, &__pyx_t_18) < 0) <span class='error_goto'>__PYX_ERR(0, 102, __pyx_L8_except_error)</span>
|
|
1459
|
+
<span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_2);
|
|
1460
|
+
<span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_6);
|
|
1461
|
+
<span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_18);
|
|
1462
|
+
</pre><pre class="cython line score-11" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">103</span>: <span class="n">times</span><span class="p">[</span><span class="n">k</span><span class="p">]</span> <span class="o">=</span> <span class="n">datetime</span><span class="p">(</span><span class="mf">1900</span><span class="p">,</span> <span class="mf">1</span><span class="p">,</span> <span class="mf">1</span><span class="p">)</span> <span class="c"># Fallback for bad date data</span></pre>
|
|
1463
|
+
<pre class='cython code score-11 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_19, __pyx_mstate_global->__pyx_n_u_datetime);<span class='error_goto'> if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 103, __pyx_L8_except_error)</span>
|
|
1464
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_19);
|
|
1465
|
+
__pyx_t_7 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_19, __pyx_mstate_global->__pyx_tuple[1], NULL);<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 103, __pyx_L8_except_error)</span>
|
|
1466
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7);
|
|
1467
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_19); __pyx_t_19 = 0;
|
|
1468
|
+
if (unlikely((<span class='pyx_c_api'>__Pyx_SetItemInt</span>(__pyx_v_times, __pyx_v_k, __pyx_t_7, Py_ssize_t, 1, PyLong_FromSsize_t, 1, 0, 0, 1) < 0))) <span class='error_goto'>__PYX_ERR(0, 103, __pyx_L8_except_error)</span>
|
|
1469
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0;
|
|
1470
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
1471
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
|
1472
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_18); __pyx_t_18 = 0;
|
|
1473
|
+
goto __pyx_L7_exception_handled;
|
|
1474
|
+
}
|
|
1475
|
+
goto __pyx_L8_except_error;
|
|
1476
|
+
</pre><pre class="cython line score-0"> <span class="">104</span>: </pre>
|
|
1477
|
+
<pre class="cython line score-46" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">105</span>: <span class="n">rows2d</span><span class="p">[</span><span class="n">k</span><span class="p">]</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">frombuffer</span><span class="p">(</span><span class="n">data_bytes</span><span class="p">,</span> <span class="n">dtype</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">float32</span><span class="p">,</span> <span class="n">count</span><span class="o">=</span><span class="n">nvals</span><span class="p">,</span> <span class="n">offset</span><span class="o">=</span><span class="n">idx</span> <span class="o">+</span> <span class="mf">56</span><span class="p">)</span></pre>
|
|
1478
|
+
<pre class='cython code score-46 '> __pyx_t_6 = NULL;
|
|
1479
|
+
<span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_np);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 105, __pyx_L1_error)</span>
|
|
1480
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
1481
|
+
__pyx_t_7 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_frombuffer);<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 105, __pyx_L1_error)</span>
|
|
1482
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7);
|
|
1483
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
1484
|
+
<span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_np);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 105, __pyx_L1_error)</span>
|
|
1485
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
1486
|
+
__pyx_t_19 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_float32);<span class='error_goto'> if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 105, __pyx_L1_error)</span>
|
|
1487
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_19);
|
|
1488
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
1489
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyLong_From_int</span>(__pyx_v_nvals);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 105, __pyx_L1_error)</span>
|
|
1490
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
1491
|
+
__pyx_t_3 = <span class='py_c_api'>PyLong_FromSsize_t</span>((__pyx_v_idx + 56));<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 105, __pyx_L1_error)</span>
|
|
1492
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
1493
|
+
__pyx_t_8 = 1;
|
|
1494
|
+
#if CYTHON_UNPACK_METHODS
|
|
1495
|
+
if (unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_7))) {
|
|
1496
|
+
__pyx_t_6 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_7);
|
|
1497
|
+
assert(__pyx_t_6);
|
|
1498
|
+
PyObject* __pyx__function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_7);
|
|
1499
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_6);
|
|
1500
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx__function);
|
|
1501
|
+
<span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_7, __pyx__function);
|
|
1502
|
+
__pyx_t_8 = 0;
|
|
1503
|
+
}
|
|
1504
|
+
#endif
|
|
1505
|
+
{
|
|
1506
|
+
PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_6, __pyx_v_data_bytes};
|
|
1507
|
+
__pyx_t_4 = <span class='pyx_c_api'>__Pyx_MakeVectorcallBuilderKwds</span>(3);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 105, __pyx_L1_error)</span>
|
|
1508
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);
|
|
1509
|
+
if (<span class='pyx_c_api'>__Pyx_VectorcallBuilder_AddArg</span>(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_t_19, __pyx_t_4, __pyx_callargs+2, 0) < 0) <span class='error_goto'>__PYX_ERR(0, 105, __pyx_L1_error)</span>
|
|
1510
|
+
if (<span class='pyx_c_api'>__Pyx_VectorcallBuilder_AddArg</span>(__pyx_mstate_global->__pyx_n_u_count, __pyx_t_2, __pyx_t_4, __pyx_callargs+2, 1) < 0) <span class='error_goto'>__PYX_ERR(0, 105, __pyx_L1_error)</span>
|
|
1511
|
+
if (<span class='pyx_c_api'>__Pyx_VectorcallBuilder_AddArg</span>(__pyx_mstate_global->__pyx_n_u_offset, __pyx_t_3, __pyx_t_4, __pyx_callargs+2, 2) < 0) <span class='error_goto'>__PYX_ERR(0, 105, __pyx_L1_error)</span>
|
|
1512
|
+
__pyx_t_18 = <span class='pyx_c_api'>__Pyx_Object_Vectorcall_CallFromBuilder</span>(__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
|
|
1513
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
|
1514
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_19); __pyx_t_19 = 0;
|
|
1515
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
1516
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
1517
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
|
|
1518
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0;
|
|
1519
|
+
if (unlikely(!__pyx_t_18)) <span class='error_goto'>__PYX_ERR(0, 105, __pyx_L1_error)</span>
|
|
1520
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_18);
|
|
1521
|
+
}
|
|
1522
|
+
if (unlikely((<span class='pyx_c_api'>__Pyx_SetItemInt</span>(((PyObject *)__pyx_v_rows2d), __pyx_v_k, __pyx_t_18, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1) < 0))) <span class='error_goto'>__PYX_ERR(0, 105, __pyx_L1_error)</span>
|
|
1523
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_18); __pyx_t_18 = 0;
|
|
1524
|
+
__pyx_L3_continue:;
|
|
1525
|
+
}
|
|
1526
|
+
</pre><pre class="cython line score-0"> <span class="">106</span>: </pre>
|
|
1527
|
+
<pre class="cython line score-12" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">107</span>: <span class="k">return</span> <span class="n">times</span><span class="p">,</span> <span class="n">rows2d</span></pre>
|
|
1528
|
+
<pre class='cython code score-12 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
1529
|
+
__pyx_t_18 = <span class='py_c_api'>PyTuple_New</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 107, __pyx_L1_error)</span>
|
|
1530
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_18);
|
|
1531
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_times);
|
|
1532
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_times);
|
|
1533
|
+
if (<span class='pyx_c_api'>__Pyx_PyTuple_SET_ITEM</span>(__pyx_t_18, 0, __pyx_v_times) != (0)) <span class='error_goto'>__PYX_ERR(0, 107, __pyx_L1_error)</span>;
|
|
1534
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>((PyObject *)__pyx_v_rows2d);
|
|
1535
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>((PyObject *)__pyx_v_rows2d);
|
|
1536
|
+
if (<span class='pyx_c_api'>__Pyx_PyTuple_SET_ITEM</span>(__pyx_t_18, 1, ((PyObject *)__pyx_v_rows2d)) != (0)) <span class='error_goto'>__PYX_ERR(0, 107, __pyx_L1_error)</span>;
|
|
1537
|
+
__pyx_r = __pyx_t_18;
|
|
1538
|
+
__pyx_t_18 = 0;
|
|
1539
|
+
goto __pyx_L0;
|
|
1540
|
+
</pre></div></body></html>
|