dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #01345
Re: PythonFile: read_array()
On Fri, Oct 28, 2005 at 12:00:04PM +0200, Johan Jansson wrote:
> Hi!
>
> read_array() is in src/pydolfin/dolfin/read_array.py (the PyDOLFIN
> module consists of both a shared library and Python code, to allow for
> extra utility functions for example). It's a reimplementation of
> scipy.io.read_array() which for some reason is terribly slow (a factor
> 20 slower than a naive implementation, they know about this). So the
> real solution is to rewrite scipy.io.read_array() and make it
> fast. This is just a temporary fix so I don't have to wait 5 minutes
> for something that should take 15 seconds when trying out PyDOLFIN.
ok.
> I guess an even better solution would be to find an XML-format which
> can handle incremental storage of matrices, but I couldn't find such a
> format.
>
> The Python format is only dependent on PyDOLFIN through read_array(),
> but it's interface-compatible with scipy.io.read_array() (the same
> goes for the data format), so all that's needed is just to read the
> files with scipy to remove the PyDOLFIN dependency.
>
> The coding style looks good.
Very good. If no one else objects, I'll put this in a section in the manual.
> In this case though, the function name
> comes from scipy, so then it should probably remain the same for
> compatibility.
Yes, that sounds correct.
/Anders
References