Add _FilterArgs NamedTuple to ImageFilter - #9968
Conversation
akx
left a comment
There was a problem hiding this comment.
I like the idea. Minor comments - things I had to look up to understand the flow, so maybe someone else would have to, too :)
|
|
||
| class _FilterArgs(NamedTuple): | ||
| size: tuple[int, int] | ||
| scale: float |
There was a problem hiding this comment.
I'd personally like to call this divisor, because that's what it practically is (and in fact, that's the "argument name" in _filter() in _imaging.c).
There was a problem hiding this comment.
Kernel calls it scale.
Lines 72 to 78 in 5eee920
I would rather be consistent with the existing Python API.
| pass | ||
|
|
||
|
|
||
| class _FilterArgs(NamedTuple): |
There was a problem hiding this comment.
I'd kind of want to note that these are unpacked directly to ImagingCore.filter().
There was a problem hiding this comment.
Ok, I've added a comment.
Merging this PR will not alter performance
Comparing Footnotes
|
See if you think this makes the code clearer.