[Neuroimaging] Nibabel API change - always read as float

Christopher J Markiewicz effigies at bu.edu
Mon Jul 6 18:07:23 CEST 2015


On 07/06/2015 11:55 AM, Gael Varoquaux wrote:
> I think that this is a very bad idea. First because it's "magic":
> changing things behind the back of the user. People will be surprised
> and it will lead to bugs in their code.  Second because it is a loss of
> semantics. Something like a mask or a label image is stored as integers
> for a good reason.
> 
> The right solution to the problem is to teach people to use float data
> when relevant, but not to force this decision in them.
> 
> Gaël

I agree with Gaël's reasoning here.

I'm okay with adding a to_float parameter to get_data, but would prefer
to leave its default value as False, even in nibabel 3+.

-- 
Christopher J Markiewicz
Ph.D. Candidate, Quantitative Neuroscience Laboratory
Boston University

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/neuroimaging/attachments/20150706/4f4493a0/attachment.sig>


More information about the Neuroimaging mailing list