[Numpy-discussion] numpy.savez does /not/ compress!?

Anne Archibald aarchiba@physics.mcgill...
Tue Jun 8 05:53:51 CDT 2010


On 8 June 2010 06:11, Pauli Virtanen <pav@iki.fi> wrote:
> ti, 2010-06-08 kello 12:03 +0200, Hans Meine kirjoitti:
>> On Tuesday 08 June 2010 11:40:59 Scott Sinclair wrote:
>> > The savez docstring should probably be clarified to provide this
>> > information.
>>
>> I would prefer to actually offer compression to the user.  Unfortunately,
>> adding another argument to this function will never be 100% secure, since
>> currently, all kwargs will be saved into the zip, so it could count as
>> behaviour change.
>
> Yep, that's the only question to be resolved. I suppose "compression" is
> not so usual as a variable name, so it probably wouldn't break anyone's
> code.

This sounds like trouble, not just now but for any future additions to
the interface. Perhaps it would be better to provide a function with a
different, more extensible interface? (For example, one that accepts
an explicit dictionary?)

I'm also a little dubious about making compression the default.
np.savez provides a feature - storing multiple arrays - that is not
otherwise available. I suspect many users care more about speed than
size.

Anne

> --
> Pauli Virtanen
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>


More information about the NumPy-Discussion mailing list