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
Support array-likes consistently in geometric transforms #6270
Support array-likes consistently in geometric transforms #6270
Conversation
…rray-like inputs As-is some transform types support array-like inputs, but most did not resolves scikit-imagegh-4383
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 @grlee77 😉
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.
Requesting only a small change in one of the tests!
@@ -245,11 +246,21 @@ def test_fundamental_matrix_residuals(): | |||
assert_almost_equal(tform.residuals(src, dst)**2, [0, 0.5, 2]) | |||
|
|||
|
|||
def test_fundamental_matrix_forward(): | |||
@pytest.mark.parametrize('array_like_input', [False, True]) |
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.
A bit confusing for me at first read, because an array is a fortiori array-like... 🙃
But I admit that not_array_but_array_like_input
would be too long!
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.
Co-authored-by: Marianne Corvellec <marianne.corvellec@ens-lyon.org>
Thank you @grlee77! |
Description
closes #4383
As-is some transform types support array-like inputs (e.g. the
translation
argument toAffineTransform
), but most did not. This PR attempts to make all__call__
,inverse
,__init__
andestimate
calls support array-like inputs. A number of test cases were parametrized to test with list-of-list inputs formatrix
,params
andsrc
/dst
coordinates.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.