File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed
Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ NX: Correlation
1616 -1
1717 -1
1818 2400
19- 13 7 + 1 0
19+ 13 7 - 1 0
2020Fem1
2121
2222 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):
186186 ind = data .find (b' -1' , ind + 1 )
187187 if ind == - 1 :
188188 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+
190199 block_ind = np .asarray (block_ind , dtype = 'int64' )
191200
192201 # 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():
288288
289289
290290if __name__ == '__main__' :
291- test_read_write_read_given_data ()
292- test_write_read_func_type_0 ()
291+ test_fix_58b ()
293292
294293if __name__ == '__mains__' :
295294 np .testing .run_module_suite ()
You can’t perform that action at this time.
0 commit comments