scipy icon indicating copy to clipboard operation
scipy copied to clipboard

Fix return data type of ascent

Open boeleman opened this issue 3 years ago • 1 comments

The ascent function returns a data type int64. However, the minimum and maximum values of the image array are 0 and 255, respectively. The data type should be uint8.

Reference issue

What does this implement/fix?

Additional information

boeleman avatar Feb 15 '22 22:02 boeleman

We might want to delay this PR because of #15608/#15607 which just came out. And here we can make sure that we set the types properly.

This is a good suggestion, not because merging this would somehow interfere with those PRs, but because technically this PR is a backwards compatibility break (e.g., img += 10 may now overflow). So not changing misc.ascent but making a new datasets.ascent use uint8 would be better.

rgommers avatar Feb 18 '22 01:02 rgommers

Friendly reminder @boeleman

tupui avatar Dec 09 '22 12:12 tupui

Thanks for the reminder. I just changed the datasets.ascent method.

boeleman avatar Dec 14 '22 19:12 boeleman

closing as superseded by #17606

j-bowhay avatar Dec 14 '22 21:12 j-bowhay