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 NumPy future warning on get structure mask #106

Merged
merged 1 commit into from
Nov 21, 2021

Conversation

seankmartin
Copy link
Contributor

Thanks so much for the package, it is great!
One small thing I noticed on the latest version:

In core.py line 349, the boolean-valued array was wrapped inside another array.
I may have missed a reason for this, but the extra array brackets [] shouldn't be needed.
This line throws a future warning on the latest version of NumPy.
The new code also matches the code on line 348 for checking descendants.

The boolean-valued array was wrapped in another array previously
@adamltyson
Copy link
Member

Thanks @seankmartin!

@vigji, @FedeClaudi was there any reason for this syntax originally?

@vigji
Copy link
Member

vigji commented Nov 18, 2021

Thanks for the PR! I can't see a good reason for keeping the previous structure, happy to merge it if @FedeClaudi agrees

@adamltyson
Copy link
Member

@FedeClaudi happy to merge?

@FedeClaudi
Copy link
Contributor

Yep, good to merge.
If there was a reason, I'm sure it wasn't a great one!

@adamltyson
Copy link
Member

Great, thanks @seankmartin! Merging.

@adamltyson adamltyson merged commit e6bf830 into brainglobe:master Nov 21, 2021
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.

None yet

4 participants