File tree 3 files changed +12
-4
lines changed
3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ NX: Correlation
16
16
-1
17
17
-1
18
18
2400
19
- 13 7 + 1 0
19
+ 13 7 - 1 0
20
20
Fem1
21
21
22
22
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Original file line number Diff line number Diff line change @@ -186,7 +186,16 @@ def refresh(self):
186
186
ind = data .find (b' -1' , ind + 1 )
187
187
if ind == - 1 :
188
188
break
189
- block_ind .append (ind )
189
+ if ind + 6 == data_len :
190
+ block_ind .append (ind )
191
+ # Check if the block is valid and ends with LF or CR
192
+ elif ind + 6 < data_len and data [ind + 6 ] in [10 , 13 ]:
193
+ block_ind .append (ind )
194
+ # Check the line continues with blanks up to character 80
195
+ elif ind + 80 < data_len and data [ind + 6 :ind + 80 ] == \
196
+ b' ' :
197
+ block_ind .append (ind )
198
+
190
199
block_ind = np .asarray (block_ind , dtype = 'int64' )
191
200
192
201
# Constructs block indices of start and end values; each pair
Original file line number Diff line number Diff line change @@ -288,8 +288,7 @@ def test_write_read_func_type_0():
288
288
289
289
290
290
if __name__ == '__main__' :
291
- test_read_write_read_given_data ()
292
- test_write_read_func_type_0 ()
291
+ test_fix_58b ()
293
292
294
293
if __name__ == '__mains__' :
295
294
np .testing .run_module_suite ()
You can’t perform that action at this time.
0 commit comments