Skip to content

Backport: use fused types in denoise, warp (#3486)#3880

Merged
jni merged 2 commits intoscikit-image:v0.14.xfrom
hmaarrfk:backport-fused
May 12, 2019
Merged

Backport: use fused types in denoise, warp (#3486)#3880
jni merged 2 commits intoscikit-image:v0.14.xfrom
hmaarrfk:backport-fused

Conversation

@hmaarrfk
Copy link
Copy Markdown
Member

@hmaarrfk hmaarrfk commented May 1, 2019

  • MNT: Add a fused numeric type to make fused_types more constent.

  • MNT: make the interpolation use fused types for any->any type interpolation of images.

  • MNT: Move even more numpy function calls from Cython to Python.

  • MNT: More explicit type specifying

  • BUG: Use fused floats in denoise

Pull all denoise array allocation out into python
Function used in python should be def not cdef
Have the correct number of arguments

  • MNT: Add additional type check for denoise, more docs

  • PEP8 fixes

  • Remove redundant array u and view cu

  • Mutate output array in Cython and trim in Python

  • Replace height and width with existing rows and cols

  • Change iteration order to match array order

  • Move range_lut and color_lut properly from Cy to Py

  • Ravel range LUT which is expected to be 1D

  • Update comment in denoise bilateral tests

  • Fix relative import in interpolation.pyx

  • BENCH: Benchmark for warping with many types

  • Rename warp benchmark file

  • Update pointer syntax

Co-Authored-By: Mark Harfouche mark.harfouche@gmail.com

Description

Checklist

For reviewers

  • Check that the PR title is short, concise, and will make sense 1 year
    later.
  • Check that new functions are imported in corresponding __init__.py.
  • Check that new features, API changes, and deprecations are mentioned in
    doc/release/release_dev.rst.
  • Consider backporting the PR with @meeseeksdev backport to v0.14.x

* MNT: Add a fused numeric type to make fused_types more constent.

* MNT: make the interpolation use fused types for any->any type interpolation of images.

* MNT: Move even more numpy function calls from Cython to Python.

* MNT: More explicit type specifying

* BUG: Use fused floats in denoise

Pull all denoise array allocation out into python
Function used in python should be def not cdef
Have the correct number of arguments

* MNT: Add additional type check for denoise, more docs

* PEP8 fixes

* Remove redundant array u and view cu

* Mutate output array in Cython and trim in Python

* Replace height and width with existing rows and cols

* Change iteration order to match array order

* Move range_lut and color_lut properly from Cy to Py

* Ravel range LUT which is expected to be 1D

* Update comment in denoise bilateral tests

* Fix relative import in interpolation.pyx

* BENCH: Benchmark for warping with many types

* Rename warp benchmark file

* Update pointer syntax

Co-Authored-By: Mark Harfouche <mark.harfouche@gmail.com>
@pep8speaks
Copy link
Copy Markdown

pep8speaks commented May 1, 2019

Hello @hmaarrfk! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 19:68: E226 missing whitespace around arithmetic operator

Comment last updated at 2019-05-01 03:21:34 UTC

@hmaarrfk
Copy link
Copy Markdown
Member Author

hmaarrfk commented May 1, 2019

Attempt to get #3787 passed.

@jni
Copy link
Copy Markdown
Member

jni commented May 1, 2019

@hmaarrfk this looks like it's going to be a nightmare to backport. My idea is to instead use img_as_float64 where we don't support float32 in Cython and be done with it. What do you think?

@hmaarrfk
Copy link
Copy Markdown
Member Author

hmaarrfk commented May 1, 2019

the backport is actually working. I just pushed through an other necessary backport to make this one workout. Lets get this through and move on.

@hmaarrfk hmaarrfk requested a review from jni May 1, 2019 20:04
@hmaarrfk hmaarrfk added this to the 0.14.3 milestone May 6, 2019
@hmaarrfk
Copy link
Copy Markdown
Member Author

@jni this is the last PR in the 0.14.3 series. All seems to be passing now. If you still wanted this to be backported, then I think we should get this going !!!

@jni jni merged commit e9651ee into scikit-image:v0.14.x May 12, 2019
@hmaarrfk hmaarrfk deleted the backport-fused branch May 12, 2019 02:39
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.

3 participants