[Neuroimaging] Nibabel API change - always read as float

Michael Waskom mwaskom at stanford.edu
Mon Jul 6 18:23:54 CEST 2015


It's not really clear to me why this would introduce "magic" behavior. It's
behavior that has a clear relationship with the parameter of a function.
Maybe you don't think the choice for the default is optimal, but it doesn't
feel very productive to dismiss it as "magic".

On Mon, Jul 6, 2015 at 9:07 AM, Christopher J Markiewicz <effigies at bu.edu>
wrote:

> 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
>
>
> _______________________________________________
> Neuroimaging mailing list
> Neuroimaging at python.org
> https://mail.python.org/mailman/listinfo/neuroimaging
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/neuroimaging/attachments/20150706/e04c4f8d/attachment.html>


More information about the Neuroimaging mailing list