[SciPy-user] npfile deprecated?
Wed Oct 15 17:49:43 CDT 2008
On Wed, Oct 15, 2008 at 17:37, Steve Schmerler <firstname.lastname@example.org> wrote:
> On Oct 15 14:07 -0500, Robert Kern wrote:
>> On Wed, Oct 15, 2008 at 10:12, Steve Schmerler <email@example.com> wrote:
>> > However, I found that in
>> > the current svn HEAD, the scipy.io.npfile docstring says that it is
>> > deprecated and I should use ndarray.tofile() and numpy.fromfile()
>> > instead. But with the latter, I can't control byteorder, row- or
>> > column-major order etc. That's a bit puzzling.
>> > I admitt that I haven't followed the development of the new numpy file
>> > format very closely (since npfile worked nicely so far). So, is the
>> > .npy/.npz way the current standard to store platform-independent binary
>> > arrays with all metainfo?
> Ah OK, thanks.
> Regarding that docstrings, what about removing the lines
> "You can achieve the same effect as using npfile, using ndarray.tofile
> and numpy.fromfile."
> from the np.deprecate_with_doc() text? The tofile/fromfile route doesn't
> provide the same functionallity. It's confusing, since their docstrings
> even discourage their usage for cross-platform case.
What functionality do you think that npfile provided which
tofile()/fromfile() doesn't? npfile never wrote out header
information. The files were always just the raw platform-specific
binary bytes. It's API is somewhat more convenient (you can specify
the shape in the method call rather than modifying it later), but
that's about it.
"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
-- Umberto Eco
More information about the SciPy-user