Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix LISI warning error #302

Merged
merged 1 commit into from
Apr 29, 2022
Merged

Fix LISI warning error #302

merged 1 commit into from
Apr 29, 2022

Conversation

mumichae
Copy link
Collaborator

The warning message if LISI encounters a case with too few neighbours throws an error.

for i in enumerate(chunk_ids):
for i, chunk_id in enumerate(chunk_ids):
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed notation for better readability

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, good idea!

print(i[1] + " has not enough neighbors.")
simpson[i[0]] = 1 # np.nan #set nan for testing
print(f'Chunk {chunk_id} does not have enough neighbors. Skipping...')
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bugfix here. F-strings used to avoid type mismatch

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, better style!

Copy link
Contributor

@mbuttner mbuttner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks all good to me. Is this tested?

for i in enumerate(chunk_ids):
for i, chunk_id in enumerate(chunk_ids):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, good idea!

print(i[1] + " has not enough neighbors.")
simpson[i[0]] = 1 # np.nan #set nan for testing
print(f'Chunk {chunk_id} does not have enough neighbors. Skipping...')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, better style!

@mumichae
Copy link
Collaborator Author

Thanks for the quick review!

@mumichae mumichae merged commit 397ef74 into main Apr 29, 2022
@mumichae mumichae deleted the lisi_warning_bug branch May 2, 2022 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants