Skip to content

Potential bug in _reindex #13

@Eikor

Description

@Eikor

Dear researchers,

Thanks for your amazing work!

I noticed a small potential bug in spectrum_datasets.py. I believe This line of code should be

for lin_idx in range(self._file_offsets[-1]):
    grp_idx += lin_idx >= self._file_offsets[grp_idx + 1]
    row_idx = lin_idx - self._file_offsets[grp_idx]
    self._locs[lin_idx] = (grp_idx-1, row_idx)

, the current version can cause an index error (len(dataset._locs) < len(dataset)) when reusing a preprocessed index file.

Thank you for your attention!

Best,
Junde

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions