Am 03.03.2013 03:42, schrieb Allin Cottrell:
On Sat, 2 Mar 2013, Allin Cottrell wrote:
> Presumably another solution would be to bypass savetxt and just
do a
> low-level write-out of the values in the matrix. I'll experiment.
This seems to work fine too (with Python 2.7 at any rate), and is in
CVS. Let me know if there are backward/forward compatibility issues
with the solution I chose!
On my Linux systems I also have 2.7 per default, so for testing on Py3 I
have to wait for the next Win snapshot. BTW, it would be nice to be able
to specify the Python interpreter in gretl's settings, similar to the
way R and Octave paths can be specified. (Why not the same for Ox,
actually?) That way, I could point gretl to the parallel Py3
installation that I have on Linux.
Apart from that I don't see any compatibility issues anymore offhand,
but two more small comments:
First, numpy.ndarray.tofile() may do the trick easier, see
http://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.tofile.....
However, the only advantage I see over your low-level solution is three
LOCs less, so maybe just leave it as is.
Finally, the empty 'return' statement at the end is really redundant.
Thanks,
sven