home > developer > numpyIO.txt

Saturday, January 3rd, 2009

Introducing numpyIO.py

I implemented numpyIO.py because I often use scipy.io.numpyio.fread() and scipy.io.numpyio.fwrite(), but I don’t want to depend on scipy. It uses numpy’s tofile/fromfile functions instead.

Why might you want this instead of SciPy’s numpyio? Well, I can think of a few reasons:

  • it imports faster because it only depends on numpy, not scipy
  • easier to package with py2exe or py2app
  • it is slightly faster
  • it lets you avoid rewriting legacy code that makes extensive use of scipy’s deprecated fread/fwrite

Grab the numpyIO project from bitbucket or clone the repo with:

hg clone http://bitbucket.org/lannybroo/numpyio

/developer   〆   permalink