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
Improve multi-Otsu error message and maintenance of threshold.py #6375
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rfezzani
added
🔧 type: Maintenance
Refactoring and maintenance of internals
🩹 type: Bug fix
Fixes unexpected or incorrect behavior
labels
May 6, 2022
alexdesiqueira
approved these changes
May 6, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @rfezzani! Just left a note on the number of bins (returning nbins
), but please feel free to ignore it.
Co-authored-by: Alexandre de Siqueira <alex.desiqueira@igdore.org>
alexdesiqueira
changed the title
Improve multi_otsu error messgae and maintance of threshold.py
Improve multi-Otsu error message and maintenance of threshold.py
May 9, 2022
Thank you @rfezzani and @alexdesiqueira! |
🎉 Thank you @lagru and @alexdesiqueira for your reviews 😉 |
alexdesiqueira
pushed a commit
to alexdesiqueira/scikit-image
that referenced
this pull request
May 24, 2022
…kit-image#6375) * Avoid a copy when converting histogram to float32 * Replace ravel calls by reshape(-1) * Avoid copy if not necessary when calling astype * Avoid temporary arrays creation * Improve threshold_multiotsu error message * Use single precision instead of double precision * Update skimage/filters/thresholding.py Co-authored-by: Alexandre de Siqueira <alex.desiqueira@igdore.org> * Fix pep8 Co-authored-by: Riadh <r.fezzani@vitadx.com> Co-authored-by: Alexandre de Siqueira <alex.desiqueira@igdore.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
🩹 type: Bug fix
Fixes unexpected or incorrect behavior
🔧 type: Maintenance
Refactoring and maintenance of internals
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes #6324 and implements some code maintenance:
ravel
->reshape(-1)
,copy=False
in astypefloat
->float32
)np.flatnonzero(arr)
instead ofnp.where(arr >0)[0]
Checklist
./doc/examples
(new features only)./benchmarks
, if your changes aren't covered by anexisting benchmark
For reviewers
later.
__init__.py
.doc/release/release_dev.rst
.example, to backport to v0.19.x after merging, add the following in a PR
comment:
@meeseeksdev backport to v0.19.x
run-benchmark
label. To rerun, the labelcan be removed and then added again. The benchmark output can be checked in
the "Actions" tab.