Closed
Conversation
This error only comes up in development versions of numpy, which refuses to cast the input to the correct type for inplace operations.
The extra dtype tests are not exhaustive, but, instead, were added to test specific code paths in `_convert`.
stefanv
added a commit
that referenced
this pull request
Feb 5, 2012
BUG: Clean up dtype conversion - Fix casting error in numpy dev. - Assert that float images are in [0, 1], and fix tests to comply. - Add tests for full coverage. - Rename _convert to convert since it is used by other modules, such as match_template, to convert to "non-standard" types such as float32.
emmanuelle
added a commit
to emmanuelle/scikit-image
that referenced
this pull request
May 29, 2016
These corrections have also been submitted as a patch to the original sphinx-gallery project (scikit-image#121)
emmanuelle
added a commit
to emmanuelle/scikit-image
that referenced
this pull request
Jun 6, 2016
Removed a clumsy workaround (about paths) Fixed links to image files to fix sphinx warning. Removed non-ascii character Another non ascii character And another non-ascii character... (to be squashed later on) Corrected some typos in the docstrings of sphinx-gallery files These corrections have also been submitted as a patch to the original sphinx-gallery project (scikit-image#121) Corrected the appearance of two examples of the gallery Tweaked CSS for larger images Added sphinx-gallery's license and a README.txt about the origin of this directory. Edited gabor_from_astronaut example for nicer popup PEP 8 + minor fixes Removed commented lines of code
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Multiple changes to
skimage.util.dtype.convert. Note: this PR does not implement the proposed clipping change for conversion from int to uint.Summary:
_converttoconvertsince this function will be used internally to convert to types not supported byimg_as_float,img_as_byte, etc. For example,match_templateis implemented in Cython with float32 values for speed. I did not really makeconvertpublic (i.e. I did not add it to__all__), but I'm inclined to do so (although the name might be a bit ambiguous for a public method).