Respect standard notations for images in functions arguments#2617
Respect standard notations for images in functions arguments#2617jni merged 1 commit intoscikit-image:masterfrom
Conversation
|
Hello @sciunto! Thanks for updating the PR.
Comment last updated on April 19, 2017 at 05:38 Hours UTC |
Codecov Report
@@ Coverage Diff @@
## master #2617 +/- ##
=======================================
Coverage 85.28% 85.28%
=======================================
Files 331 331
Lines 26350 26350
=======================================
Hits 22473 22473
Misses 3877 3877
Continue to review full report at Codecov.
|
|
Note: I changed the API of a private function for chan vese (_cv_init_level_set), images were passed but only the shape was used. Now, I pass the shape. The rest is supposed to be only a bunch of substitutions. |
|
@soupault congrat's, you arrived at the end :) |
|
|
||
|
|
||
| def plot_img_and_hist(img, axes, bins=256): | ||
| def plot_img_and_hist(image, axes, bins=256): |
There was a problem hiding this comment.
@sciunto how about deprecating this in favour of plot_image_and_histogram? =) It's easy with our deprecated decorator!
There was a problem hiding this comment.
Oh I just saw that this is an example! LOL well then it's even easier! =)
There was a problem hiding this comment.
I prefer to do one thing at a time. There are plenty of things to change and doing that step by step make it easier to review and reduces the likelihood for errors.
skimage/segmentation/_chan_vese.py
Outdated
|
|
||
|
|
||
| def _cv_init_level_set(init_level_set, img): | ||
| def _cv_init_level_set(init_level_set, img_shape): |
There was a problem hiding this comment.
I feel like this rename should be image_shape or just shape
skimage/transform/seam_carving.py
Outdated
| if image.ndim == 2: | ||
| image = image[..., np.newaxis] | ||
| if img.ndim == 2: | ||
| img = img[..., np.newaxis] |
skimage/transform/seam_carving.py
Outdated
| utils.assert_nD(img, (2, 3)) | ||
| image = util.img_as_float(img, force_copy) | ||
| utils.assert_nD(image, (2, 3)) | ||
| img = util.img_as_float(image, force_copy) |
There was a problem hiding this comment.
@sciunto do you want to use this PR to deprecate img_as_* in favour of image_as_*? Your call if you want to leave for later PR. But you should definitely revert this img back to image. Dunno what happened there. =)
There was a problem hiding this comment.
@soupault Ah! I forgot about that one! Thanks for the reminder!
There was a problem hiding this comment.
That still leaves changing the assigned name to image, though. =)
|
@jni It's done! (I was tricked by the force_copy, that's why I changed the variable name). |
Description
ready for reviews
See #2616 and #2538