Hullo
I'm trying to use the permutation part of gsl through pygsl in a brute force 
attack on my
seven year old's maths homework (you don't want to know). I'm iterating over 
Permutation (14) :
approx 87 billion cases, which will take about 10 days.

In practice, I cannot get this calculation to complete in one run and need to 
save and recover
the permutation state. Fine, use 
pygsl.permutation.gslwrap.gsl_permutation_fwrite (FILE *, permutation)
and the corresponding read function.

I cannot find what the relevant type is for that first parameter. SWIG examples 
have standard python
file type, and show how this works. When I try this approach with this function:


...
x = pygsl.permutation.Permutation (5)
f = open ("abc", "w")
pygsl.permutation.gslwrap.gsl_permutation_fwrite (f, x)

...

it bombs out on the last line:
    p.gslwrap.gsl_permutation_fwrite (f, x)
TypeError: argument number 1: a 'FILE *' is expected, 'file(<open file 'abcd', 
mode 'w' at 0xb7eba380>)' is received

I'm sure that I've missed something obvious, but would appreciate any pointers.

cheers

Tim

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
pygsl-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pygsl-discuss

Reply via email to