[Numpy-discussion] numpy scalars and savez -- bug?

Robert Kern robert.kern at gmail.com
Fri Apr 19 13:21:14 EDT 2013


On Fri, Apr 19, 2013 at 8:45 PM, Chris Barker - NOAA Federal
<chris.barker at noaa.gov> wrote:
> Robert,
>
> As I think you wrote the code, you may have a quick answer:
>
> Given that numpy scalars do exist, and have their uses -- I found this
> wiki page to remind me:
>
> http://projects.scipy.org/numpy/wiki/ZeroRankArray
>
> It would be nice if the .npy format could support them. Would that be
> a major change? I'm trying to decide if this bugs me enough to work on
> that.

I think that is significant scope creep for the .npy format, and I
would like to avoid it. A case might be made for letting np.savez()
simply pickle non-arrays that it is given. I have a vague recollection
that that was discussed when savez() was designed and rejected as a
moral hazard, but I could be wrong. The .npy and .npz formats are
intentionally limited by design. As soon as you feel constrained by
those limitations, you should start using more full-fledged and
standard file formats.

--
Robert Kern



More information about the NumPy-Discussion mailing list