Dec. 21, 2011
10:06 p.m.
On Wed, Dec 21, 2011 at 11:16 AM, Tony Yu <tsyu80@gmail.com> wrote:
I've definitely been bit by example 1 many times.
I think we should check that float images are between 0 and 1 in ``util.dtype._convert`` (and either warn or raise an error), but we shouldn't have to worry about it elsewhere. That doesn't really solve the issue, so...
This check is cheap enough that we should just add it (it may save more time than it costs in the end). The rest of the examples are fairly unusual, and since there's no way to automatically detect those situations, we'll just expect the users to correctly scale their data before using it (I am not opposed to adding utility functions for that purpose, though). Stéfan