From wuchacha at hotmail.com Tue Apr 1 09:08:37 2003 From: wuchacha at hotmail.com (WooCC) Date: Tue, 1 Apr 2003 22:08:37 +0800 Subject: [SciPy-user] Re: Welcome to the "SciPy-user" mailing list (Digest mode) References: <20030401122000.7390.97132.Mailman@scipy.org> Message-ID: Thank you.. ----- Original Message ----- From: To: Sent: Tuesday, April 01, 2003 8:20 PM Subject: Welcome to the "SciPy-user" mailing list (Digest mode) > Welcome to the SciPy-user at scipy.net mailing list! For more information > about SciPy visit http://www.scipy.org > > To post to this list, send your email to: > > scipy-user at scipy.net > > General information about the mailing list is at: > > http://www.scipy.net/mailman/listinfo/scipy-user > > If you ever want to unsubscribe or change your options (eg, switch to > or from digest mode, change your password, etc.), visit your > subscription page at: > > http://www.scipy.net/mailman/options/scipy-user/wuchacha%40hotmail.com > > > You can also make such adjustments via email by sending a message to: > > SciPy-user-request at scipy.net > > with the word `help' in the subject or body (don't include the > quotes), and you will get back a message with instructions. > > You must know your password to change your options (including changing > the password, itself) or to unsubscribe. It is: > > diskcopy > > If you forget your password, don't worry, you will receive a monthly > reminder telling you what all your scipy.net mailing list passwords > are, and how to unsubscribe or change your options. There is also a > button on your options page that will email your current password to > you. > > You may also have your password mailed to you automatically off of the > Web page noted above. > From nwagner at mecha.uni-stuttgart.de Wed Apr 2 03:42:54 2003 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Wed, 02 Apr 2003 10:42:54 +0200 Subject: [SciPy-user] Problems with io.read_array Message-ID: <3E8AA28E.B56E82A9@mecha.uni-stuttgart.de> Hi all, I tried to read an array from a file using io.read_array However, it failed. Traceback (most recent call last): File "io.py", line 5, in ? A = io.read_array(file,separator=' ',columns=None, lines=None,atype='d',linesep='\n') File "/usr/local/lib/python2.1/site-packages/scipy/io/array_import.py", line 369, in read_array outarr[k][row] = vals[k] ValueError: matrices are not aligned for copy Any idea ? Nils -------------- next part -------------- from scipy import * file = open("g.inp") A = io.read_array(file,separator=' ',columns=None, lines=None,atype='d',linesep='\n') print A -------------- next part -------------- 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.1000000E+01 -0.1414214E+01 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.1000000E+01 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.1000000E+01 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.1000000E+01 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.1000000E+01 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 -0.2497651E+00 -0.2966694E+01 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 -0.2268488E+01 -0.4630943E+02 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.4798354E-02 0.9522101E-03 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.1549872E-02 -0.4440094E-04 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.1724105E+02 -0.5147220E+03 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 -0.8956943E+03 0.1211063E+05 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.1298172E+00 -0.6517176E-03 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.1064174E-01 -0.9587627E-03 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.9123437E+02 -0.1118229E+04 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.1404254E+03 -0.3037291E+04 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.7106408E+00 -0.5014183E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.6493566E-01 -0.4621316E-01 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 -0.4522135E+03 0.5179610E+04 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 -0.7902172E+03 0.8951402E+04 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.1000000E+01 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.1000000E+01 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.1000000E+01 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.1000000E+01 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.1000000E+01 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.1000000E+01 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.1000000E+01 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.1000000E+01 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.1000000E+01 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.1000000E+01 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.1000000E+01 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.1000000E+01 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.1000000E+01 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.1000000E+01 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 From pearu at cens.ioc.ee Wed Apr 2 09:18:59 2003 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Wed, 2 Apr 2003 17:18:59 +0300 (EEST) Subject: [SciPy-user] Problems with io.read_array In-Reply-To: <3E8AA28E.B56E82A9@mecha.uni-stuttgart.de> Message-ID: On Wed, 2 Apr 2003, Nils Wagner wrote: > Hi all, > > I tried to read an array from a file using io.read_array > > However, it failed. > > Traceback (most recent call last): > File "io.py", line 5, in ? > A = io.read_array(file,separator=' ',columns=None, > lines=None,atype='d',linesep='\n') > File > "/usr/local/lib/python2.1/site-packages/scipy/io/array_import.py", line > 369, in read_array > outarr[k][row] = vals[k] > ValueError: matrices are not aligned for copy > > Any idea ? Though I think your data file looks reasonably formatted that io.read_array(..) should be able to read it, it turns out that this data file does not satisfy the assumptions made in the algorithm of io.read_array(..) function: 1) `separator` should be ' ' (two spaces) 2) negative entries in data file are separated by ' ' (one space), which contradicts with the previous point. I am not sure whether it is io.read_array(..) bug or a bug of this data file. I would assume that io.read_array(..) should be able to read such a data file even with the contradiction above. On the other hand, if this is against io.read_array data formatting specification (Travis O., do we have one except the io.read_array source?) then you should fix the data file (e.g. by replacing double spaces with single space). Pearu From baecker at physik.tu-dresden.de Wed Apr 2 12:56:50 2003 From: baecker at physik.tu-dresden.de (Arnd Baecker) Date: Wed, 2 Apr 2003 19:56:50 +0200 (CEST) Subject: [SciPy-user] Problems with io.read_array In-Reply-To: References: Message-ID: On Wed, 2 Apr 2003, Pearu Peterson wrote: [...] > Though I think your data file looks reasonably formatted that > io.read_array(..) should be able to read it, it turns out that > this data file does not satisfy the assumptions made in the algorithm > of io.read_array(..) function: > 1) `separator` should be ' ' (two spaces) > 2) negative entries in data file are separated by ' ' (one space), > which contradicts with the previous point. > > I am not sure whether it is io.read_array(..) bug or a bug of this data > file. I would assume that io.read_array(..) should be able to read > such a data file even with the contradiction above. On the other hand, if > this is against io.read_array data formatting specification (Travis O., do > we have one except the io.read_array source?) then you should fix the data > file (e.g. by replacing double spaces with single space). Personally I would object this latter behaviour, i.e., I think that any number of spaces (>=1) should separate fields in this example. This allows for nicely formatted positive/negative or decimally aligned data. Also one does not have to worry about one space too much in print/write statements etc. As example for other programs which don't bother about spaces: - gnuplot - TableIO module (which I find better than scipy.io in some respects) Off-topic: would not reading/writing arrays be something which should be in Numeric ? Arnd From pearu at cens.ioc.ee Wed Apr 2 13:47:46 2003 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Wed, 2 Apr 2003 21:47:46 +0300 (EEST) Subject: [SciPy-user] Problems with io.read_array In-Reply-To: Message-ID: On Wed, 2 Apr 2003, Arnd Baecker wrote: > On Wed, 2 Apr 2003, Pearu Peterson wrote: > > such a data file even with the contradiction above. On the other hand, if > > this is against io.read_array data formatting specification (Travis O., do > > we have one except the io.read_array source?) then you should fix the data > > file (e.g. by replacing double spaces with single space). > > Personally I would object this latter behaviour, i.e., > I think that any number of spaces (>=1) should separate fields > in this example. This allows for nicely formatted positive/negative > or decimally aligned data. I completely agree with you. I was just wondering if such an enhancement would not break existing io.read_array usages. Basically, io.read_array uses for line in file.readlines(): array_row = array(map(float, line.split(separator))) ... type of algorithm to read files. Note that `line.split(separator)` part makes improving io.read_array by allowing any number of spaces more difficult, if not impossible without a major rewrite. So, io.read_array is apperantly very strict what comes to processing data files, its implementation makes this strictness look almost like a feature, not that I personally would look for such a feature when reading array data from text files;) Pearu From fperez at colorado.edu Wed Apr 2 13:55:18 2003 From: fperez at colorado.edu (Fernando Perez) Date: Wed, 02 Apr 2003 11:55:18 -0700 Subject: [SciPy-user] Problems with io.read_array In-Reply-To: References: Message-ID: <3E8B3216.1090800@colorado.edu> Pearu Peterson wrote: > On Wed, 2 Apr 2003, Arnd Baecker wrote: > >>Personally I would object this latter behaviour, i.e., >>I think that any number of spaces (>=1) should separate fields >>in this example. This allows for nicely formatted positive/negative >>or decimally aligned data. [snip] > > So, io.read_array is apperantly very strict what comes to processing data > files, its implementation makes this strictness look almost like a > feature, not that I personally would look for such a feature when reading > array data from text files;) Well, add my vote to this. I'd go as far as arguing that this much 'strictness' should almost be considered a bug, in the sense that it makes the module not terribly useful in real life. If I have to worry about whether my ascii data files have one or two spaces between columns, I'll just write my own IO code. And I'm willing to bet a lot of others will too. To me, once there's whitespace between numbers in a line, they are different columns. Period. Most sensible programs out there cope with this loose convention just fine, and scipy should definitely offer a comparable tool as part of its base package. Just my two cents. Cheers, f. From pearu at cens.ioc.ee Wed Apr 2 14:17:46 2003 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Wed, 2 Apr 2003 22:17:46 +0300 (EEST) Subject: [SciPy-user] Problems with io.read_array In-Reply-To: <3E8AA28E.B56E82A9@mecha.uni-stuttgart.de> Message-ID: On Wed, 2 Apr 2003, Nils Wagner wrote: > I tried to read an array from a file using io.read_array > > However, it failed. > > Traceback (most recent call last): > File "io.py", line 5, in ? > A = io.read_array(file,separator=' ',columns=None, > lines=None,atype='d',linesep='\n') > File > "/usr/local/lib/python2.1/site-packages/scipy/io/array_import.py", line > 369, in read_array > outarr[k][row] = vals[k] > ValueError: matrices are not aligned for copy > > Any idea ? It turns out that you should not specify `separator`. When using separator=None (that is also the default value), an array is read without any problems. I guess this is the case where lots of available options confuse users to use features when they shouldn't ;) Pearu From oliphant.travis at ieee.org Wed Apr 2 17:47:23 2003 From: oliphant.travis at ieee.org (Travis E. Oliphant) Date: Wed, 02 Apr 2003 15:47:23 -0700 Subject: [SciPy-user] Problems with io.read_array References: Message-ID: <3E8B687B.1050006@ieee.org> > > >>I am not sure whether it is io.read_array(..) bug or a bug of this data >>file. I would assume that io.read_array(..) should be able to read >>such a data file even with the contradiction above. On the other hand, if >>this is against io.read_array data formatting specification (Travis O., do >>we have one except the io.read_array source?) then you should fix the data >>file (e.g. by replacing double spaces with single space). >> >Personally I would object this latter behaviour, i.e., >I think that any number of spaces (>=1) should separate fields >in this example. This allows for nicely formatted positive/negative >or decimally aligned data. >Also one does not have to worry about one space too much >in print/write statements etc. > Your objections make far less impact than working code that corrects the problem would. >As example for other programs which don't bother about spaces: > - gnuplot > - TableIO module > (which I find better than scipy.io in some respects) > > I would not mind using TableIO for scipy, but I've never seen someone offer to do that. TableIO seems happy to exist as a separate project. The new CSV module that people are writing for Python should help these parsing issues. This mis-treatment of the whitespace separator seems like a bug, but I don't have time to look into it right now. >Off-topic: would not reading/writing arrays be something which should be in Numeric ? > Perhaps, but then which model for reading and writing are you going to accept? The early Numeric contributors never decided to support this generally. -Travis O. From oliphant.travis at ieee.org Wed Apr 2 18:02:37 2003 From: oliphant.travis at ieee.org (Travis E. Oliphant) Date: Wed, 02 Apr 2003 16:02:37 -0700 Subject: [SciPy-user] Not sure what the problem is References: <3E8AA28E.B56E82A9@mecha.uni-stuttgart.de> Message-ID: <3E8B6C0D.8050902@ieee.org> Nils Wagner wrote: >Hi all, > >I tried to read an array from a file using io.read_array > >However, it failed. > >Traceback (most recent call last): > File "io.py", line 5, in ? > A = io.read_array(file,separator=' ',columns=None, >lines=None,atype='d',linesep='\n') > File >"/usr/local/lib/python2.1/site-packages/scipy/io/array_import.py", line >369, in read_array > outarr[k][row] = vals[k] >ValueError: matrices are not aligned for copy > >Any idea ? > > > With your file and my version of scipy >>> scipy.__version__ '0.2.0_alpha_183.4047' A = scipy.io.read_array('g.inp') works just fine. -Travis O. From oliphant.travis at ieee.org Wed Apr 2 19:09:37 2003 From: oliphant.travis at ieee.org (Travis E. Oliphant) Date: Wed, 02 Apr 2003 17:09:37 -0700 Subject: [SciPy-user] Problems with io.read_array References: Message-ID: <3E8B7BC1.8020104@ieee.org> >>Hi all, >> >>I tried to read an array from a file using io.read_array >> >>However, it failed. >> >>Traceback (most recent call last): >> File "io.py", line 5, in ? >> A = io.read_array(file,separator=' ',columns=None, >>lines=None,atype='d',linesep='\n') >> File >>"/usr/local/lib/python2.1/site-packages/scipy/io/array_import.py", line >>369, in read_array >> outarr[k][row] = vals[k] >>ValueError: matrices are not aligned for copy >> >>Any idea ? >> >> >Though I think your data file looks reasonably formatted that >io.read_array(..) should be able to read it, it turns out that >this data file does not satisfy the assumptions made in the algorithm >of io.read_array(..) function: >1) `separator` should be ' ' (two spaces) >2) negative entries in data file are separated by ' ' (one space), > which contradicts with the previous point. > > This condition is just fine if you use a white-space separator (which is the default one). If Nils had just not passed any argument into separator we would have been fine. Why do you pass in so many arguments Nils? The defaults do a pretty good job most of the time. All the comments I've seen are based on a misunderstanding. The parsing algorithm in io.read_array is not perfect but it is not as dumb as some people seem to indicate either. The default separator is None which means a (specially modified) "whitespace" separator. The specially modified means that complex numbers are actually allowed to have white-space between their real and imaginary parts and still be interpreted correctly (this will be a bug or a feature depending on your point of view). It was added to ensure that io.read_array could read it's own generated file (which uses the Numeric writer which sometimes places spaces between the real and imaginary parts of a complex number). In the example, quoted Nils asked for ' ' to be the white space separator. io.read_array was happy to comply and produce actually twice the number of entries in the output table. (Empty fields corresponding to the two space entries). io.read_array determines how many columns to allocate based on the first line. In this case, the first line had a negative number in the line and so there was no "missing" field there. Then, io.read_array tries to read line two which has one more element in it (because there are no negative numbers on this line). This causes the error, because it tries to fit 65 elements into an array allocated for 64. So, the end-result is that Nils did not tell io.read_array correctly how his data was separated. He should have left the defaults on and used the "white-space" separator (which I did initially with complete success). One question this does bring up, is that there should be better error reporting as this kind of error can show up often. The only bug I see here is bad error reporting. Everything else is working as expected. Many of the follow on comments showed a lack of understanding of io.read_array. The problem with parsing data is that what people really want is for computers to understand what they really want and give it to them without having to specify it. While there is room for improvement, io.read_array alread does quite a good job of doing what it is supposed to do: (read text numbers into memory). Suggestions for improvement are of course always welcome. -Travis Oliphant (which this is the separator, then you have un-even rows So, columns are determined by white space only >I am not sure whether it is io.read_array(..) bug or a bug of this data >file. I would assume that io.read_array(..) should be able to read >such a data file even with the contradiction above. On the other hand, if >this is against io.read_array data formatting specification (Travis O., do >we have one except the io.read_array source?) then you should fix the data >file (e.g. by replacing double spaces with single space). > >Pearu > >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.net >http://www.scipy.net/mailman/listinfo/scipy-user > > From oliphant.travis at ieee.org Wed Apr 2 19:15:12 2003 From: oliphant.travis at ieee.org (Travis E. Oliphant) Date: Wed, 02 Apr 2003 17:15:12 -0700 Subject: [SciPy-user] Problems with io.read_array References: Message-ID: <3E8B7D10.7030300@ieee.org> > > >>Though I think your data file looks reasonably formatted that >>io.read_array(..) should be able to read it, it turns out that >>this data file does not satisfy the assumptions made in the algorithm >>of io.read_array(..) function: >>1) `separator` should be ' ' (two spaces) >>2) negative entries in data file are separated by ' ' (one space), >> which contradicts with the previous point. >> >>I am not sure whether it is io.read_array(..) bug or a bug of this data >>file. I would assume that io.read_array(..) should be able to read >>such a data file even with the contradiction above. On the other hand, if >>this is against io.read_array data formatting specification (Travis O., do >>we have one except the io.read_array source?) then you should fix the data >>file (e.g. by replacing double spaces with single space). >> >> > >Personally I would object this latter behaviour, i.e., >I think that any number of spaces (>=1) should separate fields >in this example. This allows for nicely formatted positive/negative >or decimally aligned data. >Also one does not have to worry about one space too much >in print/write statements etc. > Whitespace is the default separator as it is for string.split which ultimately scipy uses, so this is a worry and an objection without cause. From oliphant.travis at ieee.org Wed Apr 2 19:17:19 2003 From: oliphant.travis at ieee.org (Travis E. Oliphant) Date: Wed, 02 Apr 2003 17:17:19 -0700 Subject: [SciPy-user] Problems with io.read_array References: Message-ID: <3E8B7D8F.4030106@ieee.org> Pearu Peterson wrote: >On > >Though I think your data file looks reasonably formatted that >io.read_array(..) should be able to read it, it turns out that >this data file does not satisfy the assumptions made in the algorithm >of io.read_array(..) function: >1) `separator` should be ' ' (two spaces) >2) negative entries in data file are separated by ' ' (one space), > which contradicts with the previous point. > You are right, that Nils had a contradiction between what he called the separator and what in his mind actually was the separator. He wanted a "white-space" separator which happens to be the default as you've discovered by now. >I am not sure whether it is io.read_array(..) bug or a bug of this data >file. I would assume that io.read_array(..) should be able to read >such a data file even with the contradiction above. On the other hand, if >this is against io.read_array data formatting specification (Travis O., do >we have one except the io.read_array source?) then you should fix the data >file (e.g. by replacing double spaces with single space). > > The "formatting" specification is in the docstring. I should add something about the default separator being "white-space". -Travis O. From oliphant.travis at ieee.org Wed Apr 2 20:59:37 2003 From: oliphant.travis at ieee.org (Travis E. Oliphant) Date: Wed, 02 Apr 2003 18:59:37 -0700 Subject: [SciPy-user] Problems with io.read_array References: <3E8B3216.1090800@colorado.edu> Message-ID: <3E8B9589.3010602@ieee.org> > Well, add my vote to this. I'd go as far as arguing that this much > 'strictness' should almost be considered a bug, in the sense that it > makes the module not terribly useful in real life. If I have to worry > about whether my ascii data files have one or two spaces between > columns, I'll just write my own IO code. And I'm willing to bet a lot > of others will too. To me, once there's whitespace between numbers in > a line, they are different columns. Period. Most sensible programs > out there cope with this loose convention just fine, and scipy should > definitely offer a comparable tool as part of its base package. There is not that much strictness. Again, an example of people arguing over hearsay intead of actual fact. We humans seem to love to do that. White-space is the default separator. Indeed, read_array is particularly good at not being too strict about what defines a number. Even if there are non-alphanumeric numbers in your fields, io.read_array will do it's best to understand it. For example look what happens with this file > cat dumb 3dfj 32 345, a325 33e-4q >>> io.read_array('dumb') array([ 3. , 32. , 345. , 325. , 0.0033]) So, I don't see why you think io.read_array is "strict" One might argue it is too lenient. It seems like everybody likes to complain about perceived problems rather than just report actual bugs. Have you actually tried to use the io.read_array functionality? I've used it and it has been reliable and has quite a few features you won't find in other packages. Everybody's two cents is appreciated, but 1 cent worth of code is more useful in the long run. -Travis O. From fperez at colorado.edu Wed Apr 2 21:20:12 2003 From: fperez at colorado.edu (Fernando Perez) Date: Wed, 02 Apr 2003 19:20:12 -0700 Subject: [SciPy-user] Problems with io.read_array In-Reply-To: <3E8B9589.3010602@ieee.org> References: <3E8B3216.1090800@colorado.edu> <3E8B9589.3010602@ieee.org> Message-ID: <3E8B9A5C.2020103@colorado.edu> Travis E. Oliphant wrote: > There is not that much strictness. Again, an example of people arguing > over hearsay intead of actual fact. We humans seem to love to do that. Ok. Fair enough. My apologies. I misunderstood the discussion and did _not_ in fact double check myself by running a few tests with my own files. But it's reasonable for a forum like this one for people to post their own opinions based on the previous discussion. In most cases (considering folks here are fairly competent by and large) no misunderstandings are generated and one can get various viewpoints on one issue. If we are all held to the standard of 'never trust what others say here unless you double check by writing your own code', I'm sure the discussions will dry up pretty quickly. Nobody has time for that depth of checking on every issue, unfortunately. And the reality is, since others here are in general competent people, it is not a far-fetched assumption to continue the discussion based on what's been said so far. You've made it excruciatingly clear that we all screwed up in two or three separate posts on this issue. We now know. Thank you. > Everybody's two cents is appreciated, but 1 cent worth of code is more > useful in the long run. [in a separate message, same thread]: > Your objections make far less impact than working code that corrects the > problem would Ok, so I guess no more postings of opinions/ideas here. Code only, right? Because non-code based discussion is useless? I know perfectly well the mantra 'code speaks louder than words'. But it is also true that words play a role in code development. Ideas, suggestions, etc. all have their value, which I'm sure you acknowledge. Something about this seems to truly have grated you the wrong way. If anything, it was a harmless misunderstanding which you clarified with your first response. No need to hammer on people with remarks like the above ('we humans...', '1 cent worth of code...', and others in previous posts). At least I've never expected that kind of response from this forum. So again, my deepest apology for committing the unspeakable crime of writing about an issue without first double checking with my own tests. Never again. Cheers, f. From oliphant.travis at ieee.org Wed Apr 2 21:50:06 2003 From: oliphant.travis at ieee.org (Travis E. Oliphant) Date: Wed, 02 Apr 2003 19:50:06 -0700 Subject: [SciPy-user] Problems with io.read_array References: <3E8B3216.1090800@colorado.edu> <3E8B9589.3010602@ieee.org> <3E8B9A5C.2020103@colorado.edu> Message-ID: <3E8BA15E.2090008@ieee.org> > > Ok. Fair enough. My apologies. I misunderstood the discussion and > did _not_ in fact double check myself by running a few tests with my > own files. But it's reasonable for a forum like this one for people > to post their own opinions based on the previous discussion. In most > cases (considering folks here are fairly competent by and large) no > misunderstandings are generated and one can get various viewpoints on > one issue. I'm sorry for giving the wrong impression. Perhaps it has just been a bad day. I don't want to turn away people from giving their opinions. You make very valid points here. I don't mean to turn away comments at all. Of course discussion helps code development and is often the key issue to get things resolved. If nothing else, this discussion prompted me to look again at io.read_array and I found a couple of bugs that had gone undetected. So, thank you for the feedback. I and other developers of SciPy do appreciate the effort people put in to testing code that may have bugs and then giving their feedback. I agree that it takes too much time to check all code references. It even takes time for me, I had forgotten that io.read_array does white-space field-separation by default and had to take the time to verify that. If I had remembered that, I could have saved a lot of typing by just pointing that out and moving on. I'm truly sorry if I caused any friction. > > Something about this seems to truly have grated you the wrong way. If > anything, it was a harmless misunderstanding which you clarified with > your first response. No need to hammer on people with remarks like > the above ('we humans...', '1 cent worth of code...', and others in > previous posts). At least I've never expected that kind of response > from this forum. I'm sorry for those remarks. I'm usually very careful in email because it is difficult to get the right tone across in your words. I don't mean to sound condescending at all and when I re-read the words, I agree that they were poorely chosen. If anything I was just trying to distance myself from the feelings I was feeling and didn't do a good job of it. It probably just grated me wrong because it's code that I wrote and it was being criticized as being worthless (you did make the comment that people would just write their own code instead of use this) without any real specifics. Of course, I know understand that you were just saying that to illustrate your opinion about how a text-reading facility should work and were not attacking. Again, I'm very happy (and others in scipy are as well) to receive criticism and ideas about how to proceed. Please keep them coming and forgive my little sensitivity issue today. -Travis Oliphant From fperez at colorado.edu Thu Apr 3 13:52:45 2003 From: fperez at colorado.edu (Fernando Perez) Date: Thu, 03 Apr 2003 11:52:45 -0700 Subject: [SciPy-user] Problems with io.read_array In-Reply-To: <3E8BA15E.2090008@ieee.org> References: <3E8B3216.1090800@colorado.edu> <3E8B9589.3010602@ieee.org> <3E8B9A5C.2020103@colorado.edu> <3E8BA15E.2090008@ieee.org> Message-ID: <3E8C82FD.3080603@colorado.edu> Travis E. Oliphant wrote: > I'm sorry for giving the wrong impression. Perhaps it has just been a > bad day. I don't want to turn away people from giving their opinions. > You make very valid points here. No problem. We all have bad days, and what's important here is that we all learned a bit about read_array, you found a few bugs, and no hard feelings are left. The atmosphere in this group has always been very friendly, and I feel that to be an important asset we have. > It probably just grated me wrong because it's code that I wrote and it > was being criticized as being worthless (you did make the comment that > people would just write their own code instead of use this) without any > real specifics. Of course, I know understand that you were just saying > that to illustrate your opinion about how a text-reading facility should > work and were not attacking. I sort of suspected it must have been your code, because I can see how I would easily take criticism a bit more personally than it's worth. But don't worry, these things happen to all of us. On the other hand, while it's true that we can't always double check _everything_, I admit that it wouldn't have been that much work for me to write a two line test. My apology on not doing so was actually honest (although I admit there was a fair bit of sarcasm peppered through my post ;) So at the end of the day, we all got something good out of this. Best regards, and let's keep scipy moving forward! Fernando. From andrew.straw at adelaide.edu.au Tue Apr 8 02:00:26 2003 From: andrew.straw at adelaide.edu.au (Andrew Straw) Date: Tue, 8 Apr 2003 15:30:26 +0930 Subject: [SciPy-user] filtering without phase shift Message-ID: <652CBFC5-6987-11D7-B87C-00039311EA24@adelaide.edu.au> I trying to lowpass filter my data without introducing a phase shift. I'm not a signal analysis whiz, but I know enough to be dangerous. So far I've come up with the following, which works except that it has some serious edge-effects. from scipy.signal import lfilter from scipy import flipud def filtfilt(b, a, input_vector): """input_vector has shape (n,1)""" forward = lfilter(b, a, input_vector, axis=0) return flipud(lfilter(b, a, flipud(forward), axis = 0)) Should I attempt to use the signal.lfiltic to minimize edge effects? Or should I maybe use symiirorder1? Is there any code anywhere that I can look at using these functions? I think the matlab function filtfilt that does what I want. Is there a translation of it to scipy anywhere? Cheers! Andrew From ggerber at sun.ac.za Wed Apr 2 08:02:18 2003 From: ggerber at sun.ac.za (George Gerber) Date: Wed, 2 Apr 2003 15:02:18 +0200 Subject: [SciPy-user] Broken pipe for xplt.eps Message-ID: Hello, I am trying to output a plot consisting of two arrays. However I recieve the error below. Could it be that I have insufficient permissions for Ghostscript? Regards, George Gerber george at c301:~$ python Python 2.1.3 (#1, Sep 12 2002, 00:24:18) [GCC 2.95.4 20011002 (Debian prerelease)] on linux2 Type "copyright", "credits" or "license" for more information. >>> from scipy import xplt exceptions.ImportError: /usr/lib/python2.1/site-packages/scipy/linalg/clapack.so: undefined symbol: clapack_sgetri >>> x=[1,2,3] >>> y=[0,1,0] >>> xplt.plot(x,y) >>> xplt.eps('plot1') Error: /invalidaccess in --.setdevice-- Operand stack: --nostringval-- Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- 1 4 %oparray_pop --nostringval-- --nostringval-- --nostringval-- Dictionary stack: --dict:1040/1476(ro)(G)-- --dict:0/20(G)-- --dict:68/200(L)-- --dict:19/30(L)-- Current allocation mode is local Current file position is 8771 GNU Ghostscript 6.53: Unrecoverable error, exit code 1 sed: -e expression #2, char 15: Extra characters after command cat: write error: Broken pipe >>> From baecker at physik.tu-dresden.de Tue Apr 8 11:41:44 2003 From: baecker at physik.tu-dresden.de (Arnd Baecker) Date: Tue, 8 Apr 2003 17:41:44 +0200 (CEST) Subject: [SciPy-user] Broken pipe for xplt.eps In-Reply-To: References: Message-ID: Hi, I think it is the problem which is discussed in a thread this March (Subject: "xplt.eps question/problem? "). If so, there are two options: a) add a noepsi=1 option, i.e.: xplt.eps('plot1',noepsi=1) b) quoting myself from the above thread: "it is just a missing space in front of the "-e" of ps2epsi [...] So anyone seeing this error hopefully can fix this by just adding this space..." Hope this helps. Arnd On Wed, 2 Apr 2003, George Gerber wrote: > Hello, > > I am trying to output a plot consisting of two arrays. However I recieve the > error below. Could it be that I have insufficient permissions for Ghostscript? > > Regards, > George Gerber > > george at c301:~$ python > Python 2.1.3 (#1, Sep 12 2002, 00:24:18) > [GCC 2.95.4 20011002 (Debian prerelease)] on linux2 > Type "copyright", "credits" or "license" for more information. > >>> from scipy import xplt > exceptions.ImportError: > /usr/lib/python2.1/site-packages/scipy/linalg/clapack.so: undefined symbol: > clapack_sgetri > >>> x=[1,2,3] > >>> y=[0,1,0] > >>> xplt.plot(x,y) > >>> xplt.eps('plot1') > Error: /invalidaccess in --.setdevice-- > Operand stack: > --nostringval-- > Execution stack: > %interp_exit .runexec2 --nostringval-- --nostringval-- > --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- > --nostringval-- false 1 %stopped_push 1 3 > %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop .runexec2 > --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push > --nostringval-- --nostringval-- --nostringval-- 1 4 %oparray_pop > --nostringval-- --nostringval-- --nostringval-- > Dictionary stack: > --dict:1040/1476(ro)(G)-- --dict:0/20(G)-- --dict:68/200(L)-- > --dict:19/30(L)-- > Current allocation mode is local > Current file position is 8771 > GNU Ghostscript 6.53: Unrecoverable error, exit code 1 > sed: -e expression #2, char 15: Extra characters after command > cat: write error: Broken pipe > >>> > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From oliphant at ee.byu.edu Tue Apr 8 13:13:37 2003 From: oliphant at ee.byu.edu (Travis E. Oliphant) Date: Tue, 08 Apr 2003 11:13:37 -0600 Subject: [SciPy-user] Broken pipe for xplt.eps References: Message-ID: <3E930341.1050106@ee.byu.edu> George Gerber wrote: >Hello, > >I am trying to output a plot consisting of two arrays. However I recieve the >error below. Could it be that I have insufficient permissions for Ghostscript? > >Regards, >George Gerber > Most likely you have a buggy version of ghostscript. This error seems to crop up in ghostscript from time to time. It's a small fix, but I can't remember what it is. What version of ghostscript are you using? Try using the option to xplt.eps so that ps2epsi is not run after the postscript file is created. -Travis O. > >george at c301:~$ python >Python 2.1.3 (#1, Sep 12 2002, 00:24:18) >[GCC 2.95.4 20011002 (Debian prerelease)] on linux2 >Type "copyright", "credits" or "license" for more information. > > >>>>from scipy import xplt >>>> >>>> >exceptions.ImportError: >/usr/lib/python2.1/site-packages/scipy/linalg/clapack.so: undefined symbol: >clapack_sgetri > > >>>>x=[1,2,3] >>>>y=[0,1,0] >>>>xplt.plot(x,y) >>>>xplt.eps('plot1') >>>> >>>> >Error: /invalidaccess in --.setdevice-- >Operand stack: > --nostringval-- >Execution stack: > %interp_exit .runexec2 --nostringval-- --nostringval-- >--nostringval-- 2 %stopped_push --nostringval-- --nostringval-- >--nostringval-- false 1 %stopped_push 1 3 > %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop .runexec2 >--nostringval-- --nostringval-- --nostringval-- 2 %stopped_push >--nostringval-- --nostringval-- --nostringval-- 1 4 %oparray_pop >--nostringval-- --nostringval-- --nostringval-- >Dictionary stack: > --dict:1040/1476(ro)(G)-- --dict:0/20(G)-- --dict:68/200(L)-- >--dict:19/30(L)-- >Current allocation mode is local >Current file position is 8771 >GNU Ghostscript 6.53: Unrecoverable error, exit code 1 >sed: -e expression #2, char 15: Extra characters after command >cat: write error: Broken pipe > > >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.net >http://www.scipy.net/mailman/listinfo/scipy-user > > From jack at xiph.org Tue Apr 8 13:17:55 2003 From: jack at xiph.org (Jack Moffitt) Date: Tue, 8 Apr 2003 11:17:55 -0600 Subject: [SciPy-user] Broken pipe for xplt.eps In-Reply-To: <3E930341.1050106@ee.byu.edu> References: <3E930341.1050106@ee.byu.edu> Message-ID: <20030408171755.GG13131@i.cantcode.com> > Most likely you have a buggy version of ghostscript. This error seems > to crop up in ghostscript from time to time. It's a small fix, but I > can't remember what it is. What version of ghostscript are you using? His output shows 6.53 which is quite old. The current GNU Ghostscript is 7.06. This looks like a security issue (-dSAFER stuff). If it persists, let me know and I'll help track down the solution. jack. From ggerber at sun.ac.za Wed Apr 2 16:23:32 2003 From: ggerber at sun.ac.za (George Gerber) Date: Wed, 2 Apr 2003 23:23:32 +0200 Subject: [SciPy-user] Broken pipe for xplt.eps In-Reply-To: References: Message-ID: On Tue 08 Apr 03 17:41, you wrote: > Hi, > > I think it is the problem which is discussed in a thread this March > (Subject: "xplt.eps question/problem? "). > > If so, there are two options: > a) add a noepsi=1 option, i.e.: xplt.eps('plot1',noepsi=1) > b) quoting myself from the above thread: > "it is just a missing space in front > of the "-e" of ps2epsi [...] >>> xplt.eps('geezer',nops2epsi=1) or >>>xplt.eps('geezer',nops2epsi=1,pdf=1) Solves my problem. Thanks > > So anyone seeing this error hopefully can fix this by > just adding this space..." > > Hope this helps. > > Arnd > > On Wed, 2 Apr 2003, George Gerber wrote: > > Hello, > > > > I am trying to output a plot consisting of two arrays. However I recieve > > the error below. Could it be that I have insufficient permissions for > > Ghostscript? > > > > Regards, > > George Gerber > > > > george at c301:~$ python > > Python 2.1.3 (#1, Sep 12 2002, 00:24:18) > > [GCC 2.95.4 20011002 (Debian prerelease)] on linux2 > > Type "copyright", "credits" or "license" for more information. > > > > >>> from scipy import xplt > > > > exceptions.ImportError: > > /usr/lib/python2.1/site-packages/scipy/linalg/clapack.so: undefined > > symbol: clapack_sgetri > > > > >>> x=[1,2,3] > > >>> y=[0,1,0] > > >>> xplt.plot(x,y) > > >>> xplt.eps('plot1') > > > > Error: /invalidaccess in --.setdevice-- > > Operand stack: > > --nostringval-- > > Execution stack: > > %interp_exit .runexec2 --nostringval-- --nostringval-- > > --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- > > --nostringval-- false 1 %stopped_push 1 3 > > %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop .runexec2 > > --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push > > --nostringval-- --nostringval-- --nostringval-- 1 4 > > %oparray_pop --nostringval-- --nostringval-- --nostringval-- > > Dictionary stack: > > --dict:1040/1476(ro)(G)-- --dict:0/20(G)-- --dict:68/200(L)-- > > --dict:19/30(L)-- > > Current allocation mode is local > > Current file position is 8771 > > GNU Ghostscript 6.53: Unrecoverable error, exit code 1 > > sed: -e expression #2, char 15: Extra characters after command > > cat: write error: Broken pipe > > > > _______________________________________________ > > SciPy-user mailing list > > SciPy-user at scipy.net > > http://www.scipy.net/mailman/listinfo/scipy-user > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From home at prince.com.sg Tue Apr 8 15:07:10 2003 From: home at prince.com.sg (IFDNetwork) Date: Wed, 09 Apr 2003 03:07:10 +0800 Subject: [SciPy-user] Send your wishes on Easter Message-ID: <20030408195504.6A5AF3EB09@www.scipy.com> An HTML attachment was scrubbed... URL: From ggerber at sun.ac.za Wed Apr 2 17:20:55 2003 From: ggerber at sun.ac.za (George Gerber) Date: Thu, 3 Apr 2003 00:20:55 +0200 Subject: [SciPy-user] Broken pipe for xplt.eps (Other issue) In-Reply-To: References: Message-ID: On Tue 08 Apr 03 17:41, you wrote: Don't want to be a pain in the behind, but: >>>xplt.plot(x,y) >>>xplt.xytitles(xtitle='time',ytitle='pressure') >>>xplt.eps('pic1',nops2epsi=1,pdf=1) provides a pdf picture, where part of the top of the ytitle is cut-off.(?) (The eps output does not do this i.e. it appears correct) > Hi, > > I think it is the problem which is discussed in a thread this March > (Subject: "xplt.eps question/problem? "). > > If so, there are two options: > a) add a noepsi=1 option, i.e.: xplt.eps('plot1',noepsi=1) > b) quoting myself from the above thread: > "it is just a missing space in front > of the "-e" of ps2epsi [...] > > So anyone seeing this error hopefully can fix this by > just adding this space..." > > Hope this helps. > > Arnd > > On Wed, 2 Apr 2003, George Gerber wrote: > > Hello, > > > > I am trying to output a plot consisting of two arrays. However I recieve > > the error below. Could it be that I have insufficient permissions for > > Ghostscript? > > > > Regards, > > George Gerber > > > > george at c301:~$ python > > Python 2.1.3 (#1, Sep 12 2002, 00:24:18) > > [GCC 2.95.4 20011002 (Debian prerelease)] on linux2 > > Type "copyright", "credits" or "license" for more information. > > > > >>> from scipy import xplt > > > > exceptions.ImportError: > > /usr/lib/python2.1/site-packages/scipy/linalg/clapack.so: undefined > > symbol: clapack_sgetri > > > > >>> x=[1,2,3] > > >>> y=[0,1,0] > > >>> xplt.plot(x,y) > > >>> xplt.eps('plot1') > > > > Error: /invalidaccess in --.setdevice-- > > Operand stack: > > --nostringval-- > > Execution stack: > > %interp_exit .runexec2 --nostringval-- --nostringval-- > > --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- > > --nostringval-- false 1 %stopped_push 1 3 > > %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop .runexec2 > > --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push > > --nostringval-- --nostringval-- --nostringval-- 1 4 > > %oparray_pop --nostringval-- --nostringval-- --nostringval-- > > Dictionary stack: > > --dict:1040/1476(ro)(G)-- --dict:0/20(G)-- --dict:68/200(L)-- > > --dict:19/30(L)-- > > Current allocation mode is local > > Current file position is 8771 > > GNU Ghostscript 6.53: Unrecoverable error, exit code 1 > > sed: -e expression #2, char 15: Extra characters after command > > cat: write error: Broken pipe > > > > _______________________________________________ > > SciPy-user mailing list > > SciPy-user at scipy.net > > http://www.scipy.net/mailman/listinfo/scipy-user > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From oliphant at ee.byu.edu Tue Apr 8 18:55:22 2003 From: oliphant at ee.byu.edu (Travis E. Oliphant) Date: Tue, 08 Apr 2003 16:55:22 -0600 Subject: [SciPy-user] Broken pipe for xplt.eps (Other issue) References: Message-ID: <3E93535A.2030309@ee.byu.edu> George Gerber wrote: >On Tue 08 Apr 03 17:41, you wrote: >Don't want to be a pain in the behind, but: > > >>>>xplt.plot(x,y) >>>>xplt.xytitles(xtitle='time',ytitle='pressure') >>>>xplt.eps('pic1',nops2epsi=1,pdf=1) >>>> >>>> >provides a pdf picture, where part of the top of the ytitle is cut-off.(?) >(The eps output does not do this i.e. it appears correct) > This is a ghostscript issue again. All pdf=1 does is call epstopdf on the generated postscript. I've been doing some testing and it looks like there is a real bounding-box issue here. Unfortunately, I am not an expert on these issues and am not sure how to fix the problem. ps2epsi seems to be fixing the bounding box issue in addition to adding the bitmap image to the eps file. You can look for yourself to see what xplt.eps is actually doing by typing (assuming from scipy import *) source(xplt.eps) If anybody has more experience with these issues, I would appreciate feedback. -Travis O. From fperez at colorado.edu Tue Apr 8 19:03:35 2003 From: fperez at colorado.edu (Fernando Perez) Date: Tue, 08 Apr 2003 17:03:35 -0600 Subject: [SciPy-user] Broken pipe for xplt.eps (Other issue) In-Reply-To: <3E93535A.2030309@ee.byu.edu> References: <3E93535A.2030309@ee.byu.edu> Message-ID: <3E935547.5000806@colorado.edu> Travis E. Oliphant wrote: > I've been doing some testing and it looks like there is a real > bounding-box issue here. > > Unfortunately, I am not an expert on these issues and am not sure how to > fix the problem. This is a long shot, as I'm not an expert _at all_ on this stuff myself. But in IPython's gnuplot support, at one point I coded in the following utility function for my own use: def eps_fix_bbox(fname): """Fix the bounding box of an eps file by running ps2eps on it. If its name ends in .eps, the original file is removed. This is particularly useful for plots made by Gnuplot with square aspect ratio: there is a bug in Gnuplot which makes it generate a bounding box which is far wider than the actual plot. This function assumes that ps2eps is installed in your system.""" # note: ps2ps and eps2eps do NOT work, ONLY ps2eps works correctly. The # others make output with bitmapped fonts, which looks horrible. print 'Fixing eps file: <%s>' % fname xsys('ps2eps -f -q -l %s' % fname) if fname.endswith('.eps'): os.rename(fname+'.eps',fname) So maybe using ps2eps may help. See the note in the code: I remember testing all the various *ps2*ps* utilities, and settling on ps2eps as the one that seemed to work best. Please don't ask me why, they all seem to do slightly, subtly different things. I remember being quite annoyed at all that, but eventually ps2eps seemed to fix at least my problems. I hope this is of some help. Best, f. From jack at xiph.org Tue Apr 8 20:07:03 2003 From: jack at xiph.org (Jack Moffitt) Date: Tue, 8 Apr 2003 18:07:03 -0600 Subject: [SciPy-user] Broken pipe for xplt.eps (Other issue) In-Reply-To: <3E935547.5000806@colorado.edu> References: <3E93535A.2030309@ee.byu.edu> <3E935547.5000806@colorado.edu> Message-ID: <20030409000703.GI13131@i.cantcode.com> > >Unfortunately, I am not an expert on these issues and am not sure how to > >fix the problem. > > This is a long shot, as I'm not an expert _at all_ on this stuff myself. > But in IPython's gnuplot support, at one point I coded in the following > utility function for my own use: I'm employed by Artifex Software, which makes Ghostscript. I'll dig in a bit and see what I can find here. jack. From oliphant.travis at ieee.org Tue Apr 8 16:33:38 2003 From: oliphant.travis at ieee.org (Travis Oliphant) Date: Tue, 08 Apr 2003 20:33:38 +0000 Subject: [SciPy-user] Broken pipe for xplt.eps (Other issue) References: <3E93535A.2030309@ee.byu.edu> <3E935547.5000806@colorado.edu> Message-ID: <3E933222.1050500@ieee.org> Fernando Perez wrote: > Travis E. Oliphant wrote: > >> I've been doing some testing and it looks like there is a real >> bounding-box issue here. >> >> Unfortunately, I am not an expert on these issues and am not sure how >> to fix the problem. > > > This is a long shot, as I'm not an expert _at all_ on this stuff > myself. But in IPython's gnuplot support, at one point I coded in the > following utility function for my own use: > Thanks for this information. This sounds like a great start. I'll probably use this. -Travis O. From lanceboyle at myrealbox.com Wed Apr 9 05:27:42 2003 From: lanceboyle at myrealbox.com (Lance Boyle) Date: Wed, 9 Apr 2003 02:27:42 -0700 Subject: [SciPy-user] filtering without phase shift In-Reply-To: <652CBFC5-6987-11D7-B87C-00039311EA24@adelaide.edu.au> Message-ID: <83C147D9-6A6D-11D7-97DE-003065F93FF0@myrealbox.com> It looks like symiiorder1 does what you did with your filtfilt, but limited to a first-order filter applied twice, once forward and once backward. You still have two coefficients to supply. I can't find info on signal.lfiltic (Python/SciPy newbie). You don't mention what coefficients you are using on the coefficient vectors a and b. This can make a difference in the nature of edge effects. If you can "fade in" your data, that is, multiply it by a ramp starting from zero or another small number and increasing to 1 after a few samples, the edge effect will be reduced. Also, a quarter-cycle of a raised cosine works nicely. Of course, this would mean messing with your data. You can discard the part of your data that is uglified by edge effects. I guess that's obvious and that you don't have any data to waste. You might try "making up" some data to put at the beginning and end of your actual data. I haven't tried this but if the edge effect ("ringing") is pretty much shorter than your data length, you could try mirror-imaging your data once to the left and once to the right of your original data, so that then you have a data record that is three times the length of the original data. Then the first third of the extended data and the last third are backwards versions of the middle third. This is so that there are no edges at the beginning and end of the middle third. Filter as you describe (forward-then-backward) and keep only the middle third, corresponding to the location of your original data. Depending on the relative lengths of the edge effect and your data, a full padding might be unnecessary and only a partial padding might work, just as long as the edge effects are outside your actual data. Which brings up a third possibility, but I mention this only in principle. I see that lfilter has an option to set the initial conditions of the filter, zi. In principle, you could come up with a set of initial conditions that would reduce the edge effects. As it is, unless you specify otherwise, the filter is starting from the zero-state and then it is getting hit with the sudden onset of your data. Finding a suitable set of initial conditions is hard. The best way would be to pad your data and then record the filter state at the beginning of the actual data, then start over with the new initial conditions and at the edge of your actual data, but that is the same as the previous paragraph. I'm bored so if you have more questions let me know. Jerry On Monday, Apr 7, 2003, at 23:00 America/Phoenix, Andrew Straw wrote: > > I trying to lowpass filter my data without introducing a phase shift. > I'm not a signal analysis whiz, but I know enough to be dangerous. So > far I've come up with the following, which works except that it has > some serious edge-effects. > > from scipy.signal import lfilter > from scipy import flipud > > def filtfilt(b, a, input_vector): > """input_vector has shape (n,1)""" > forward = lfilter(b, a, input_vector, axis=0) > return flipud(lfilter(b, a, flipud(forward), axis = 0)) > > Should I attempt to use the signal.lfiltic to minimize edge effects? > Or should I maybe use symiirorder1? Is there any code anywhere that I > can look at using these functions? > > I think the matlab function filtfilt that does what I want. Is there > a translation of it to scipy anywhere? > > Cheers! > Andrew From pearu at cens.ioc.ee Wed Apr 9 11:01:31 2003 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Wed, 9 Apr 2003 18:01:31 +0300 (EEST) Subject: [SciPy-user] Broken pipe for xplt.eps (Other issue) In-Reply-To: <3E935547.5000806@colorado.edu> Message-ID: On Tue, 8 Apr 2003, Fernando Perez wrote: > So maybe using ps2eps may help. The problem with *ps2*ps* utilities is that they may considerably increase (by factors 5 or even more) the sizes of postscript files on certain plots (e.g. on Matlab generated meshes if face lines are not disabled). Eps-files bounding boxes can be fixed using gs bbox device feature. For example, gs -q -dNOPAUSE -sDEVICE=bbox -dBATCH -sOutputFile=- file.ps will calculate and output correct BoundingBox and HiResBoundingBox to standard output. And then you can either use sed or may be python tools to replace %%BoundingBox: ... line in file.ps with the correct BoundingBox values. Pearu From DJaeggi at imim.es Sun Apr 13 04:51:10 2003 From: DJaeggi at imim.es (Jaeggi, Daniel M.) Date: Sun, 13 Apr 2003 10:51:10 +0200 Subject: [SciPy-user] installation problems - "No module named setup_scipy_distutils" Message-ID: <20030413105110.44ee06cf.djaeggi@imim.es> Hi I'm trying to install SciPy and keep getting the following error: Traceback (most recent call last): File "./setup.py", line 116, in ? setup_package() File "./setup.py", line 95, in setup_package config_list += map(get_separate_package_config,separate_packages) File "./setup.py", line 79, in get_separate_package_config return get_package_config(name,'') File "./setup.py", line 71, in get_package_config mod = __import__('setup_'+os.path.basename(name)) ImportError: No module named setup_scipy_distutils A scipy_distutils.setup_scipy_distutils.py exists in /usr/lib/python/site-packages/ (this came from installing f2py I believe - when I add this explicitly to my path, this particular error goes away but I then get: ImportError: No module named setup_scipy_test I can't find this module anywhere on my system! Any idea what is going on and how to fix this? My version is SciPy-0.2.0_alpha_196.4120 and I'm installing on a linux system. Thanks Daniel From pearu at cens.ioc.ee Mon Apr 14 08:35:28 2003 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Mon, 14 Apr 2003 15:35:28 +0300 (EEST) Subject: [SciPy-user] installation problems - "No module named setup_scipy_distutils" In-Reply-To: <20030413105110.44ee06cf.djaeggi@imim.es> Message-ID: On Sun, 13 Apr 2003, Jaeggi, Daniel M. wrote: > I can't find this module anywhere on my system! Any idea what is going > on and how to fix this? > > My version is SciPy-0.2.0_alpha_196.4120 and I'm installing on a linux system. As a fix, use CVS version of scipy: mkdir cvs cd cvs cvs -d :pserver:anonymous at scipy.org:/home/cvsroot login # Press enter when password is asked cvs -d :pserver:anonymous at scipy.org:/home/cvsroot co scipy cd scipy python setup.py install Pearu From DJaeggi at imim.es Sun Apr 13 06:23:56 2003 From: DJaeggi at imim.es (Jaeggi, Daniel M.) Date: Sun, 13 Apr 2003 12:23:56 +0200 Subject: [SciPy-user] installation problems - "No module named setup_scipy_distutils" In-Reply-To: References: <20030413105110.44ee06cf.djaeggi@imim.es> Message-ID: <20030413122356.5eb34885.djaeggi@imim.es> Thanks - solved it. Dan On Mon, 14 Apr 2003 15:35:28 +0300 (EEST) Pearu Peterson wrote: > > On Sun, 13 Apr 2003, Jaeggi, Daniel M. wrote: > > > > > I can't find this module anywhere on my system! Any idea what is going > > on and how to fix this? > > > > My version is SciPy-0.2.0_alpha_196.4120 and I'm installing on a linux system. > > As a fix, use CVS version of scipy: > > mkdir cvs > cd cvs > cvs -d :pserver:anonymous at scipy.org:/home/cvsroot login > # Press enter when password is asked > cvs -d :pserver:anonymous at scipy.org:/home/cvsroot co scipy > cd scipy > python setup.py install > > Pearu > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From josephsisolo at mail.com Tue Apr 15 06:06:14 2003 From: josephsisolo at mail.com (Joseph Sisolo.) Date: Tue, 15 Apr 2003 12:06:14 +0200 Subject: [SciPy-user] TRANSACTION OF MUTUAL BENEFITS. Message-ID: <20030415105648.6E0933EB0D@www.scipy.com> TEL: 0027-732-672-197 I AM JOSEPH SISOLO, A FREEBORN INDIGENE OF CAPE TOWN SOUTH AFRICA AND AN ADMINISTATIVE EMPLOYEE OF THE SOUTH AFRICAN DEPARTMENT OF MINING AND NATURAL RESOURCES HERE IN SOUTH AFRICA AND AS PART OF OUR RETAINER-SHIP / MANAGEMENT ADVANCEMENT PROGRAMME CURRENTLY PARTICIPATING IN A SEMINAR. I AM WRITING THIS LETTER TO SOLICIT YOUR CO-OPERATION IN ORDER TO REDEEM AN INVESTMENT INTEREST CURRENTLY BEING HELD UNDER TRUST WITH THE SOUTH AFRICAN DEPARTMENT OF MINING AND NATURAL RESOURCES. THE SAID INVESTMENT NOW VALUED AT US$9,750,000.00 MILLION WAS ORIGINALLY PURCHASED BY MR. ABRAM P. GLESSNER AND LEASED TO FREE STATE INVESTMENT CORPORATION IN 1990. SINCE THE MATURITY OF THIS CONTRACT IN SEPTEMBER 1995, SEVERAL ATTEMPTS HAVE BEEN MADE WITH OUT SUCCESS TO CONTACT MR. ABRAM P. GLESSNER OR ANY OF HIS CLOSE RELATIVES IN WHOSE FAVOR THE INVESTMENT CASH VALUE CAN BE PAID. MY PARTNER WHO IS THE ACCOUNTS DIRECTOR AT THE DEPARTMENT OF MINING AND TWO OF OUR COLLEAGUES HAVE INITIATED THE PROCESS OF FILLING A CLAIM FOR THIS MONEY, WITH THE HOPE OF HAVING THE FUNDS TRANSFERRED ABROAD. WE REQUEST THAT YOU LET MY PARTNERS FILE A CLAIM FOR THIS MONEY FROM THE SOUTH AFRICAN DEPARTMENT OF MINING AND NATURAL RESOURCES INDICATING THAT YOU WERE APPOINTED BY MR. ABRAM GLESSNER TO BE THE BENEFICIARY OF THIS OUTSTANDING FUND. WHEN THE CLAIM IS APPROVED, YOU AS THE BENEFICIARY WOULD BE PAID THE SUM OF US$9,750,000,00 NINE MILLION SEVEN HUNDRED AND FIFTY (UNITED STATES DOLLARS). SINCE THE MONEY WILL BE PAID DIRECTLY TO ANY BANK OF YOUR CHOICE, YOU HAVE A LIABILITY TO ENSURE THAT MY PARTNERS AND I RECEIVE 70% OF THE TOTAL SUM WHILE YOU KEEP 20% FOR YOUR ASSISTANCE AND CO-OPERATION. THE REMAINING 10% HAVE BEEN AGREED TO BE KEPT ASIDE TO DEFRAY ALL EXPENSES THAT MIGHT BE INCURRED BY BOTH PARTIES IN THE COURSE OF CONCLUDING THIS TRANSACTION. PLEASE WE URGE YOU TO KEEP THIS MATTER VERY PRIVATE BECAUSE WE ARE STILL IN ACTIVE PUBLIC SERVICE IN SOUTH AFRICA. A LARGE PORTION OF OUR PART OF THE FUNDS IS GOING INTO THE BUILDING FUND FOR THE NEW MULTI NATIONAL HOSPITAL IN CAPETOWN. I WANT TO ASSURE YOU THAT MY PARTNERS ARE IN A POSITION TO MAKE THE PAYMENT OF THIS CLAIM POSSIBLE PROVIDED YOU CAN GIVE US VERY STRONG GUARANTEE THAT OUR SHARE WILL BE WELL SECURED AND THAT YOU WILL NOT TAKE ADVANTAGE OF OUR POSITION SINCE THE MONEY WILL BE TRANSFERRED DIRECTLY TO A BANK ACCOUNT THAT YOU NOMINATE. BE ASSURED THAT THERE IS ABSOLUTELY NOTHING TO WORRY ABOUT IN VIEW OF THIS CLAIM. IT IS PERFECTLY SAFE WITH NO RISK INVOLVED AND IT IS NOT SUBJECT TO ANY ENQUIRY SINCE MY PARTNERS WILL BE HANDLING THE CLAIM DIRECTLY IN SOUTH AFRICA ON YOUR BEHALF. I DO HOPE MY PROPOSAL IS ACCEPTABLE TO YOU. IF NOT PLEASE ENDEAVOR TO MAKE THIS KNOWN TO US AS THIS WOULD HELP US SCOUT FOR ANOTHER PARTNER IN THIS OUR MUTUAL QUEST. PLEASE ACKNOWLEDGE THE RECEIPT OF THIS LETTER, SO THAT I CAN PROVIDE YOU WITH MORE CLARIFICATION ABOUT THE CLAIM AND HOW WE INTEND TO MAKE THIS TRANSACTION BENEFICIAL TO EVERYONE PLEASE REACH ME AT THE TELEPHONE NUMBER AND EMAIL ABOVE. I PRAY THE GODS SHOWER ON YOU THE WISDOM TO SEE THIS PROJECT IN THE LIGHT OF OUR MUTUAL BENEFIT AND AFFORD US THE GOOD OF YOUR ASSISTANCE. I AWAIT YOUR SWIFT CALL AND RESPONSE. YOUR?S TRULY, JOSEPH SISOLO. From SEAFIELD2004 at NETSCAPE.NET Tue Apr 15 06:58:49 2003 From: SEAFIELD2004 at NETSCAPE.NET (Sea Field Ventures) Date: Tue, 15 Apr 2003 12:58:49 +0200 Subject: [SciPy-user] LOTTERY WINNING INFORMATION Message-ID: <20030415114925.8C1C63EB0E@www.scipy.com> SEA FIELD VENTURES (ACCREDITED LICENSED AGENT TO GLOBAL LOTTERY INTERNATIONAL) Ref. Number : 2367/678-0122 Batch Number : 837435611223-GLI/03 Sir/Madam We are pleased to inform you of the result of the Lottery Winners International programs held on the 1st January, 2003. Your e-mail address attached to ticket number 27511465896-6410 with Serial Number 4204-777 Draw lucky numbers 7-21-23-54-67-88 which consequently Won in the 1st category, you have therefore been approved to share among the fifty people for a lump sum pay out of ?2,000,000.00 (Two Million Pound Sterling (?GBP?). CONGRATULATIONS!!! Due to mix up of some numbers and names, we ask that you keep your winning information confidential until your claims has been processed and your money Remitted to you. This is part of our security protocol to avoid double claiming and unwarranted abuse of this program by some participants. All participants were selected through a computer ballot system drawn from over 20,000 company and 30,000,000 individual email addresses and names from all over the world. This promotional program takes place every three years. This lottery was promoted and sponsored by Bill Gates, President of the World Largest software, the Microsoft. We hope with part of your winning you will take part in our next subsequent stake that will be held in October 2003 of US$20 Million international lottery. To file for your claim, please contact our FIDUCIAL Agent in the Netherlands MR. TONY MYERS of SEA FIELD VENTURES on 0031-630681971 for your wining/Processment and Claim: Please be aware that your Paying Bank will Effect Payment Swiftly upon Satisfactory Report and Verifications provided by our processing Agency (SEA FIELD VENTURES). Remember, all winning must be CLAIMED not later than 25th of May, 2003. After this date all unclaimed funds will be included in the next stake. Please note in order to avoid unnecessary delays and complications please remember to quote your reference number and batch numbers in all correspondence. Furthermore, should there be any change of address do inform our Agent as soon as possible. Congratulations once more from our members of staff and thank you for being part of our promotional program. Note: Anybody under the age of 18 is AUTHOMATICALY DISQUALIFIED. Yours Sincerely , Mrs. Evelyn Van Borsch. From mboma at rediffmail.com Thu Apr 17 07:41:18 2003 From: mboma at rediffmail.com (Jack Mboma.) Date: Thu, 17 Apr 2003 13:41:18 +0200 Subject: [SciPy-user] IN ANTICIPATION OF YOUR ASSISTANCE. Message-ID: <20030417123249.56A283EB09@www.scipy.com> Mboma Jack, 0031-630-681-971 mboma at rediffmail.com. Sir, HIGHLY CONFIDENTIAL You may be surprised to receive this message from me since you don't know me in person but for the purpose Of introduction, I am Mr. Jack Mboma, the son of late Mr. Jamie Mboma, who was murdered in a land dispute in ZIMBABWE. My late father was among the few black Zimbabwean rich farmers murdered in cold blood by the agent of the ruling government of President ROBERT MUGABE for his alleged support and Sympathy for Zimbabwean opposition party. Before the death of my father, he took me to South Africa to deposit the sum of fifteen million two Hundred thousand US Dollars ($15.2m) with a security and finance company, as if he knew the looming danger In Zimbabwe. The money was deposited as gem or precious stone to avoid much demurrage from the Security firm. This money was earmarked for the purchase of new machinery and chemicals for our farms and the establishment of new farms in Lesotho and Swaziland. This land problem arose when President R. MUGABE introduced a new land act which wholly affects the White rich farmers and some few blacks vehemently condemned the 'MODUS OPERANDI' adopted by the Government. This resulted to rampant killing and mob actions. I and my family who are currently staying in Holland as refugees' asylum seekers and we have moved the money through a contact at a security company here in Holland with a branch in South Africa. I am faced with the dilemma of collecting this money from the security company by ourselves because we are refugees and also, we do not want the money to be traced to us. We need you to come up as the beneficiary and next of kin to this money so that you can help us receive the money from the security company for us all. If you agree, we shall use some document and paper work (Deed of Assignment) to put you as the next of kin and beneficiary. I must let you know that this business is 100% risk Free, timely and the nature of your business does not necessarily matter. So if you are willing to assist us, I and my family have agreed to give you 25% of the Total money, while 70% will be for I and my family which we shall also invest in your Country with your advice and the remaining 5% will be mapped out for any incidental expenses which we may incur during the transaction. Therefore, if you are willing and interested to render the needed assistance, endeavour to reply through this my Email address.Remember that this is highly confidential and the Success of this business depends on how secret it is kept. Please where you are not interested; do not discuss this matter with any body. I shall bring you into a more detailed picture of this transaction when you reply me. Best Regards, Jack Mboma. From davidlinke at tiscali.de Sat Apr 19 07:37:05 2003 From: davidlinke at tiscali.de (David Linke) Date: Sat, 19 Apr 2003 13:37:05 +0200 Subject: [SciPy-user] Problems with scipy.integrate.ode Message-ID: <3EA134E1.8090502@tiscali.de> Hi! I am having problems with the set_f_params() method in ode.py. An example showing the use of set_f_params() to supply additional arguments (two or more) to f would be very heplful. I tried a while to get it going but without success. I observed strange behaviour when using a modified function test1 in ode.py to receive additional arguments: def test1(): #def f(t,y): def f(t,y,b): print type(b), b a = Numeric.sin(6*t) return y*y-a+y ode_runner = ode(f) ode_runner.set_integrator('vode') ode_runner.set_initial_value([0.1,0.11,.1]*10) par_b = 0.1, ode_runner.set_f_params(par_b) while ode_runner.successful() and ode_runner.t < 20: y1 = ode_runner.integrate(ode_runner.t+2) print ode_runner.t,y1[:3] Is this the right way to use set_f_params? When I run this example the arguments are passed to f only in the first two calls, as shown here: Python 2.2.2 (#37, Oct 14 2002, 17:02:34) [MSC 32 bit (Intel)] on win32 >>> Integrators available: vode Found integrator vode (0.10000000000000001,) ! 1st call ... 2.0 [-0.1446766 -0.10226142 -0.1446766 ] (0.10000000000000001,) ! 2nd call ... 4.0 [-0.6351882 -0.5874518 -0.6351882] (,) ! 3rd call ... 6.0 [-0.93274299 -0.92029838 -0.93274299] (,) 8.0 [-1.06178405 -1.05979417 -1.06178405] ... Thank you for any help. David From paddy3118 at netscape.net Sat Apr 19 08:27:37 2003 From: paddy3118 at netscape.net (Donald 'Paddy' McCarthy) Date: Sat, 19 Apr 2003 13:27:37 +0100 Subject: [SciPy-user] Traits: Problem with my first example. Message-ID: <3EA140B9.2070706@netscape.net> Hi, I have just found out about traits and tried out the following example: ############ from traits import * class Person ( HasTraits ): __traits__ = { 'name': '', 'age': 9, 'weight': 0.0 } bill = Person() #bill.configure_traits( filename = None, edit = 1, traits = None ) bill.configure_traits( filename = 'xx.save', edit = 1 ) bill.edit_traits() ############# When run (Windows XP, wxwindows), the gui pops up as expected, but when I save my changes the program exits with the following error: C:\Documents and Settings\Paddy\My Documents>python -V Python 2.2.2 C:\Documents and Settings\Paddy\My Documents>python traitScript1.py 09:22:58: Debug: c:\projects\wx\src\msw\app.cpp(439): 'UnregisterClass(canvas)' failed with error 0x00000584 (class still has open windows.). Can you tell me what I am doing wrong? Also, the file of trait values generated is not editable text, is their a reason for this? Thanks., Paddy. From pearu at cens.ioc.ee Sat Apr 19 08:35:19 2003 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Sat, 19 Apr 2003 15:35:19 +0300 (EEST) Subject: [SciPy-user] Problems with scipy.integrate.ode In-Reply-To: <3EA134E1.8090502@tiscali.de> Message-ID: On Sat, 19 Apr 2003, David Linke wrote: > I am having problems with the set_f_params() method in ode.py. > > An example showing the use of set_f_params() to supply additional > arguments (two or more) to f would be very heplful. > > I tried a while to get it going but without success. I observed strange > behaviour when using a modified function test1 in ode.py to receive > additional arguments: > > def test1(): > #def f(t,y): > def f(t,y,b): > print type(b), b > a = Numeric.sin(6*t) > return y*y-a+y > ode_runner = ode(f) > ode_runner.set_integrator('vode') > ode_runner.set_initial_value([0.1,0.11,.1]*10) ^^^ - ?!? Note that ^^^ will return a list of 30 numbers. > par_b = 0.1, > ode_runner.set_f_params(par_b) > while ode_runner.successful() and ode_runner.t < 20: > y1 = ode_runner.integrate(ode_runner.t+2) > print ode_runner.t,y1[:3] > > Is this the right way to use set_f_params? Yes. > When I run this example the > arguments are passed to f only in the first two calls, as shown here: > > Python 2.2.2 (#37, Oct 14 2002, 17:02:34) [MSC 32 bit (Intel)] on win32 > >>> Integrators available: vode > Found integrator vode > (0.10000000000000001,) ! 1st call > ... > 2.0 [-0.1446766 -0.10226142 -0.1446766 ] > (0.10000000000000001,) ! 2nd call > ... > 4.0 [-0.6351882 -0.5874518 -0.6351882] > (,) ! 3rd call > ... > 6.0 [-0.93274299 -0.92029838 -0.93274299] > (,) I am also getting this in debian box. It looks like a ref-counting bug in f2py callback hooks. I'll look for it. Until then and also in general, you can pass additional parameters to callback functions using optional arguments or global variables (this works if there are no recursive calls to ode runner). For example, par_b = [0.1] def f(t,y,b = par_b): print `b` a = Numeric.sin(6*t) return y*y-a+y ode_runner = ode(f) ode_runner.set_integrator('vode') ode_runner.set_initial_value([0.1,0.11,.1]) while ode_runner.successful() and ode_runner.t < 10: y1 = ode_runner.integrate(ode_runner.t+2) print ode_runner.t,y1[:3] I have used Python list for par_b because this will allow changing `f` parameters during integration. HTH, Pearu From pearu at cens.ioc.ee Sat Apr 19 13:36:44 2003 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Sat, 19 Apr 2003 20:36:44 +0300 (EEST) Subject: [SciPy-user] Problems with scipy.integrate.ode In-Reply-To: Message-ID: On Sat, 19 Apr 2003, Pearu Peterson wrote: > > When I run this example the > > arguments are passed to f only in the first two calls, as shown here: > > > > Python 2.2.2 (#37, Oct 14 2002, 17:02:34) [MSC 32 bit (Intel)] on win32 > > >>> Integrators available: vode > > Found integrator vode > > (0.10000000000000001,) ! 1st call > > ... > > 2.0 [-0.1446766 -0.10226142 -0.1446766 ] > > (0.10000000000000001,) ! 2nd call > > ... > > 4.0 [-0.6351882 -0.5874518 -0.6351882] > > (,) ! 3rd call > > ... > > 6.0 [-0.93274299 -0.92029838 -0.93274299] > > (,) > > I am also getting this in debian box. It looks like a ref-counting bug in > f2py callback hooks. I'll look for it. This bug is fixed in f2py CVS repository. Pearu From davidlinke at tiscali.de Sat Apr 19 14:55:26 2003 From: davidlinke at tiscali.de (David Linke) Date: Sat, 19 Apr 2003 20:55:26 +0200 Subject: [SciPy-user] Problems with scipy.integrate.ode References: Message-ID: <3EA19B9E.6030906@tiscali.de> Dear Pearu, thanks you for your help. Pearu Peterson wrote: > On Sat, 19 Apr 2003, David Linke wrote: > > >>I am having problems with the set_f_params() method in ode.py. >> >>An example showing the use of set_f_params() to supply additional >>arguments (two or more) to f would be very heplful. >> >>I tried a while to get it going but without success. I observed strange >>behaviour when using a modified function test1 in ode.py to receive >>additional arguments: >> >>def test1(): >> #def f(t,y): >> def f(t,y,b): >> print type(b), b >> a = Numeric.sin(6*t) >> return y*y-a+y >> ode_runner = ode(f) >> ode_runner.set_integrator('vode') >> ode_runner.set_initial_value([0.1,0.11,.1]*10) > > ^^^ - ?!? > Note that ^^^ will return a list of 30 numbers. This is original code from ode.py. I wondered why it is written in that way but did not change it. I just read your 2nd mail: >> > When I run this example the >> > arguments are passed to f only in the first two calls, as shown here: >> > >> > Python 2.2.2 (#37, Oct 14 2002, 17:02:34) [MSC 32 bit (Intel)] on win32 >> > >>> Integrators available: vode >> > Found integrator vode >> > (0.10000000000000001,) ! 1st call >> > ... >> > 2.0 [-0.1446766 -0.10226142 -0.1446766 ] >> >> I am also getting this in debian box. It looks like a ref-counting bug in >> f2py callback hooks. I'll look for it. > > This bug is fixed in f2py CVS repository. > > Pearu Thank you. Will scipy-binaries for win32 be automatically updated? David From patrick at worldtradeaa.com Mon Apr 21 11:19:53 2003 From: patrick at worldtradeaa.com (Patrick T) Date: Mon, 21 Apr 2003 22:19:53 +0700 Subject: [SciPy-user] We'd like to promote your business Message-ID: <200304211527.h3LFRXH16693@smtp.asiaaccess.net.th> Dear Sir/Madam Find new and right prospects easily. Showcase your products and services to the world 7/24 Advertise your promotion directly to the right targets. Expand your markets internationally. Easy, Simple and Effective Qualified Trade Leads + Meet and contact the right prospects as you want. + Post trade leads to advertise, promote your products + Find fresh leads every day over 85 affiliated websites more detail... Online Marketing + Have your own web site with your own domain name. + Post a catalog, including high-quality images, of your products or service + Get a huge number of Trade Leads request. more detail... World Importer Directory + Find out the potential importers from around the world. + Promote your products to the right target. + Expand your market to other region-America, Asia, Europe, Middle East, etc. more detail... Statistic WorldTradeAA.com 2,345,269 trade offers 229,728 members 23,718 showrooms Qualified Leads 382,561 sellers 259,334 buyers 46,030 opportunities We can also be your consultant of what and how to use Internet Marketing Strategies to boost your business up, because we are WorldTradeAA.com For more information, please contact us. cs at worldtradeaa.com Visit http://www.WorldTradeAA.com The right business solution for you. Note : You got this message because you are registered with B2B website. You are subscribed as emial. You can discontinue receiving the QLE emails by sending to REM0VE at WORLDTRADEAA.COM with the REM0VE -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhunter at ace.bsd.uchicago.edu Mon Apr 21 14:55:09 2003 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Mon, 21 Apr 2003 13:55:09 -0500 Subject: [SciPy-user] scipy.optimize.leastsq col_deriv strangeness w/ data fit Message-ID: I am using leastsq to do a best fit to a simple exponential function. In my test script, I find that if I use col_deriv=0, I get a different answer than I get if I do a col_deriv=1 with the err func returning the transposed jacobian. When I compare the true parameters with the best fit parameters, the correct answer is with col_deriv=1 but not with col_deriv=0. Am I misusing this parameter or is something amiss? In the data fitting problem, x is the independent variable with parameters parsTrue. I create the data values by assuming they are data = func(pars) + noise Here is the test script that works, to fit the data to where func(pars) is a*exp(alpha*x) + k To get the best fit params, I minimize over pars data - func(pars) ------------------------------------------------------------ from scipy import exp, arange, zeros, Float, ones from RandomArray import normal from scipy.optimize import leastsq parsTrue = 2.0, -.76, 0.1 # a, alpha, k x = arange(0, 4, 0.001) def func(pars): a, alpha, k = pars return a*exp(alpha*x) + k def errfunc(pars): return data - func(pars) #return the error def deriv_errfunc(pars): 'The Jacobian of the errfunc is -Jacobian of the func' a, alpha, k = pars J = zeros( (3,len(x)), Float) # init the Jacobian only once #deriv with respect to a J[0,:] = -exp(alpha*x) #deriv with respect to alpha J[1,:] = -x*a*exp(alpha*x) #deriv with respect to k J[2,:] = -ones((len(x),), Float) # this is indep of k return J # some pseudo data; add some noise data = func(parsTrue) + normal(0.0, 0.1, x.shape) guess = 1.0, -.4, 0.0 # the intial guess of the params best, info, ier, mesg = leastsq(errfunc, guess, full_output=1, Dfun=deriv_errfunc, col_deriv=1, ) print 'true', parsTrue print 'best', best ------------------------------------------------------------ This returns best fit params true (2.0, -0.76000000000000001, 0.10000000000000001) best [ 2.00487303 -0.74859602 0.09035577] However, If I replace the deriv_errfunc with row derivs, manually transposing the jacobian at creation time def deriv_errfunc(pars): 'The Jacobian of the errfunc is -Jacobian of the func' a, alpha, k = pars J = zeros( (len(x),3), Float) # init the Jacobian only once # deriv with respect to a J[:,0] = -exp(alpha*x) # deriv with respect to alpha J[:,1] = -x*a*exp(alpha*x) # deriv with respect to k J[:,2] = -ones((len(x),), Float) return J and best, info, ier, mesg = leastsq(errfunc, guess, full_output=1, Dfun=deriv_errfunc, col_deriv=0, ) The fit is poor, eg, true (2.0, -0.76000000000000001, 0.10000000000000001) best [ 1.13708025 -0.40303463 0.1669024 ] With col_deriv=0 sometimes the solution is found and sometimes not depending on the run, but it is consistently around the values reported above (ie, wrong). With col_deriv=1, though, the solution is always found and is correct. Suggestions? John Hunter From esqwill_4 at zwallet.com Tue Apr 22 20:17:56 2003 From: esqwill_4 at zwallet.com (WILLIAMS OGUNYINKA.) Date: Tue, 22 Apr 2003 17:17:56 -0700 (PDT) Subject: [SciPy-user] PLEASE CONFIRM URGENTLY. Message-ID: <200304230017.h3N0Hthp058497@addr16.addr.com> DATE 22nd APRIL 2003 WILLIAMS OGUNYINKA ESQ LAGOS, THE FEDERAL REPUBLIC OF NIGERIA. HELLO DEAR, I AM BARRISTER WILLIAMS OGUNYINKA, A SOLICITOR AT LAW.I AM THE PERSONAL ATTORNEY TO MR.BUFFET EDMOND, A NATIONAL OF THE UNITED KINGDOM, WHO USED TO WORK WITH SHELL PETROLEUM DEVELOPMENT COMPANY IN THE REPUBLIC OF GABON.ON THE 21st OF APRIL 2000,MY CLIENT, HIS WIFE AND THEIR ONLY DAUGHTER WERE INVOLVED IN A CAR ACCIDENT ALONG SAGBAMA EXPRESS ROAD.ALL OCCUPANTS OF THE VEHICLE UNFORTUNATELY LOST THERE LIVES. SINCE THEN I HAVE MADE SEVERAL ENQUIRIES TO THE PEOPLE I KNOW HERE TO LOCATE ANY OF MY CLIENTS EXTENDED RELATIVES, THIS HAS ALSO PROVED UNSUCCESSFUL. AFTER THESE SEVERAL UNSUCCESSFUL ATTEMPTS,I DECIDED TO TRACK HIS NAME OVER THE INTERNET,TO LOCATE ANY MEMBER OF HIS FAMILY HENCE I CONTACTED YOU TO ASSIST IN RECOVERING THE FUND VALUED AT US$14.9 MILLION LEFT BEHIND BY MY CLIENT BEFORE IT GETS CONFISCATED OR DECLARED UNSERVICEABLE BY THE SECURITY FINANCE FIRM WHERE THIS HUGE AMOUNT WERE DEPOSITED. THE SAID FINANCIAL INSTITUTION HAS ISSUED ME A NOTICE TO PROVIDE THE NEXT OF KIN OR HAVE THE ACCOUNT CONFISCATED WITHIN THE NEXT SIXTY ONE OFFICIAL WORKING DAYS.SINCE I HAVE BEEN UNSUCCESSFUL IN LOCATING THE RELATIVES FOR FOR OVER 2 YEARS NOW I THEREFORE SEEK YOUR CONCENT TO PRESENT YOU AS THE NEXT OF KIN TO THE DECEASED, SO THAT THE PROCEEDS OF THIS ACCOUNT CAN BE PAID TO YOU. ON RECEIPT OF YOUR POSITIVE RESPONSE, WE SHALL THEN DISCUSS THE SHARING RATIO AND MODALITIES FOR TRANSFER.I HAVE ALL NECESSARY INFORMATION AND LEGAL DOCUMENTS NEEDED TO BACK YOU UP FOR CLAIMS ALL I REQUIRE FROM YOU IS YOUR HONEST COOPERATION TO ENABLE US SEE THIS TRANSACTION THROUGH. I GUARANTEE THAT THIS WILL BE EXECUTED UNDER LEGITIMATE ARRANGEMENT THAT WILL PROTECT YOU FROM ANY BREACH OF LAW. PLEASE NOTE THAT I AM PRESENTLY IN LAGOS THE FEDERAL REPUBLIC OF NIGERIA IN PURSUANCE OF THIS SUBJECT MATTER SINCE THE FINANCIAL INSTITUTION IS BASED HERE. BEST REGARDS WILLIAMS OGUNYINKA ESQ From esqwill_4 at zwallet.com Tue Apr 22 20:48:43 2003 From: esqwill_4 at zwallet.com (WILLIAMS OGUNYINKA.) Date: Tue, 22 Apr 2003 17:48:43 -0700 (PDT) Subject: [SciPy-user] PLEASE CONFIRM URGENTLY. Message-ID: <200304230048.h3N0mh7a088168@addr16.addr.com> DATE 22nd APRIL 2003 WILLIAMS OGUNYINKA ESQ LAGOS, THE FEDERAL REPUBLIC OF NIGERIA. HELLO DEAR, I AM BARRISTER WILLIAMS OGUNYINKA, A SOLICITOR AT LAW.I AM THE PERSONAL ATTORNEY TO MR.BUFFET EDMOND, A NATIONAL OF THE UNITED KINGDOM, WHO USED TO WORK WITH SHELL PETROLEUM DEVELOPMENT COMPANY IN THE REPUBLIC OF GABON.ON THE 21st OF APRIL 2000,MY CLIENT, HIS WIFE AND THEIR ONLY DAUGHTER WERE INVOLVED IN A CAR ACCIDENT ALONG SAGBAMA EXPRESS ROAD.ALL OCCUPANTS OF THE VEHICLE UNFORTUNATELY LOST THERE LIVES. SINCE THEN I HAVE MADE SEVERAL ENQUIRIES TO THE PEOPLE I KNOW HERE TO LOCATE ANY OF MY CLIENTS EXTENDED RELATIVES, THIS HAS ALSO PROVED UNSUCCESSFUL. AFTER THESE SEVERAL UNSUCCESSFUL ATTEMPTS,I DECIDED TO TRACK HIS NAME OVER THE INTERNET,TO LOCATE ANY MEMBER OF HIS FAMILY HENCE I CONTACTED YOU TO ASSIST IN RECOVERING THE FUND VALUED AT US$14.9 MILLION LEFT BEHIND BY MY CLIENT BEFORE IT GETS CONFISCATED OR DECLARED UNSERVICEABLE BY THE SECURITY FINANCE FIRM WHERE THIS HUGE AMOUNT WERE DEPOSITED. THE SAID FINANCIAL INSTITUTION HAS ISSUED ME A NOTICE TO PROVIDE THE NEXT OF KIN OR HAVE THE ACCOUNT CONFISCATED WITHIN THE NEXT SIXTY ONE OFFICIAL WORKING DAYS.SINCE I HAVE BEEN UNSUCCESSFUL IN LOCATING THE RELATIVES FOR FOR OVER 2 YEARS NOW I THEREFORE SEEK YOUR CONCENT TO PRESENT YOU AS THE NEXT OF KIN TO THE DECEASED, SO THAT THE PROCEEDS OF THIS ACCOUNT CAN BE PAID TO YOU. ON RECEIPT OF YOUR POSITIVE RESPONSE, WE SHALL THEN DISCUSS THE SHARING RATIO AND MODALITIES FOR TRANSFER.I HAVE ALL NECESSARY INFORMATION AND LEGAL DOCUMENTS NEEDED TO BACK YOU UP FOR CLAIMS ALL I REQUIRE FROM YOU IS YOUR HONEST COOPERATION TO ENABLE US SEE THIS TRANSACTION THROUGH. I GUARANTEE THAT THIS WILL BE EXECUTED UNDER LEGITIMATE ARRANGEMENT THAT WILL PROTECT YOU FROM ANY BREACH OF LAW. PLEASE NOTE THAT I AM PRESENTLY IN LAGOS THE FEDERAL REPUBLIC OF NIGERIA IN PURSUANCE OF THIS SUBJECT MATTER SINCE THE FINANCIAL INSTITUTION IS BASED HERE. BEST REGARDS WILLIAMS OGUNYINKA ESQ From home at prince.com.sg Sun Apr 27 07:36:30 2003 From: home at prince.com.sg (Prince's Flower Shop Pte Ltd) Date: Sun, 27 Apr 2003 19:36:30 +0800 Subject: [SciPy-user] Remember Mother's Day 11th May 2003 Message-ID: <20030427123124.ECD773EB09@www.scipy.com> An HTML attachment was scrubbed... URL: From oubizzhnetn at ili.com.br Wed Apr 30 05:02:07 2003 From: oubizzhnetn at ili.com.br (Elmer) Date: Wed, 30 Apr 2003 06:02:07 -0300 Subject: [SciPy-user] Autônomo com Internet Message-ID: <20030430095815.433B03EB09@www.scipy.com> Empresa procura aut?nomos para trabalho utilizando a Internet, em tempo parcial ou integral e com altos ganhos. Visite: www.hipernegocio.com Elmer NGTCorp - D?vidas pelo email ngtcorp at ibest.com.br Para ser removido de futuros correios, por favor, envie email para ngtcad at ibest.com.br, com o assunto REMOVER. Obrigado. From oliphant at ee.byu.edu Wed Apr 30 12:16:16 2003 From: oliphant at ee.byu.edu (Travis E. Oliphant) Date: Wed, 30 Apr 2003 10:16:16 -0600 Subject: [SciPy-user] Re: SciP References: <3EAFF2ED.3040402@sandia.gov> Message-ID: <3EAFF6D0.5060507@ee.byu.edu> Todd A Pitts wrote: > Travis, > > I got my new linux box and am now installing SciPy. I get the > following error... > > Also, in your installation notes you might add that the > setup_scipy_distutils module comes from f2py. The latest version > installs but fails to add > scipy_distutils.pth to the site-packages directory. A new user > installing SciPy will have to first find and fix this problem before > he can get SciPy running. It is true that distutils is also used by f2py, but I did not think that f2py was the intended source of any needed module of SciPy. I'm not sure how they worked that out. I have checked out SciPy from scratch several times and did not run into this problem. > > -Todd > > tapitts at sadl18818:SciPy-0.2.0_alpha_196.4120$ /usr/local/bin/python2.2 > setup.py build > Traceback (most recent call last): > File "setup.py", line 111, in ? > setup_package() > File "setup.py", line 90, in setup_package > config_list += map(get_separate_package_config,separate_packages) > File "setup.py", line 74, in get_separate_package_config > return get_package_config(name,'') > File "setup.py", line 67, in get_package_config > mod = __import__('setup_'+os.path.basename(name)) > ImportError: No module named setup_scipy_test I suspect that this is due to a packaging error. I always check out the latest CVS tree and cannot vouch for the source-file packages. I'm not sure why, but they always manage to leave out several files. It looks like you may be missing the entire scipy_core directory. I just built a source distribution on my machine and it seemed to include the setup_scipy_test.py file so I'm not sure what's wrong with your source tree. I'll send you what I have in a separate mail. I'm cross-posting this to the scipy-user list to see if anyone else has had similar troubles. -Travis > > A look for modules beginning with setup* gives > > tapitts at sadl18818:src$ find . -name "setup*" > ./python/setup.py > ./python/Tools/idle/setup.py > ./Numeric/setup.cfg > ./Numeric/setup.py > ./Numeric/Packages/FFT/setup.py > ./Numeric/Packages/MA/setup.py > ./Numeric/Packages/Properties/setup.py > ./Numeric/Packages/RNG/setup.py > ./Numeric/Packages/kinds/setup.py > ./gist/setup.py > ./Imaging/setup.py > ./PyOpenGL-2.0.0.44/setup > ./PyOpenGL-2.0.0.44/setup.py > ./ScientificPython/setup.cfg > ./ScientificPython/setup.py > ./SciPy-0.2.0_alpha_196.4120/Lib/gui_thread/setup_gui_thread.py > ./SciPy-0.2.0_alpha_196.4120/Lib/gui_thread/setup_gui_thread.pyc > ./SciPy-0.2.0_alpha_196.4120/Lib/weave/setup_weave.py > ./SciPy-0.2.0_alpha_196.4120/Lib/weave/setup_weave.pyc > ./SciPy-0.2.0_alpha_196.4120/Lib_chaco/chaco/setup_chaco.py > ./SciPy-0.2.0_alpha_196.4120/Lib_chaco/kiva/setup_kiva.py > ./SciPy-0.2.0_alpha_196.4120/Lib_chaco/traits/setup_traits.py > ./SciPy-0.2.0_alpha_196.4120/setup.py > ./F2PY-2.32.225-1419/docs/usersguide/setup_example.py > ./F2PY-2.32.225-1419/other/scipy_distutils/setup_scipy_distutils.py > ./F2PY-2.32.225-1419/other/scipy_distutils/setup.py > ./F2PY-2.32.225-1419/setup.py > ./F2PY-2.32.225-1419/build/lib/scipy_distutils/setup_scipy_distutils.py > ./F2PY-2.32.225-1419/build/lib/scipy_distutils/setup.py > > > I seem to be missing a file. Any hints you might provide? > > -Todd > > From DJaeggi at imim.es Wed Apr 30 12:30:44 2003 From: DJaeggi at imim.es (Jaeggi, Daniel M.) Date: Wed, 30 Apr 2003 18:30:44 +0200 Subject: [SciPy-user] Re: SciP References: <3EAFF2ED.3040402@sandia.gov> <3EAFF6D0.5060507@ee.byu.edu> Message-ID: <3EAFFA34.9000605@imim.es> Yes, I got exactly this a couple of weeks ago. Installing the CVS version sorted it out. Dan Travis E. Oliphant wrote: > > > Todd A Pitts wrote: > >> Travis, >> >> I got my new linux box and am now installing SciPy. I get the >> following error... >> >> Also, in your installation notes you might add that the >> setup_scipy_distutils module comes from f2py. The latest version >> installs but fails to add >> scipy_distutils.pth to the site-packages directory. A new user >> installing SciPy will have to first find and fix this problem before >> he can get SciPy running. > > > > It is true that distutils is also used by f2py, but I did not think > that f2py was the intended source of any needed module of SciPy. I'm > not sure how they worked that out. I have checked out SciPy from > scratch several times and did not run into this problem. > >> >> -Todd >> >> tapitts at sadl18818:SciPy-0.2.0_alpha_196.4120$ >> /usr/local/bin/python2.2 setup.py build >> Traceback (most recent call last): >> File "setup.py", line 111, in ? >> setup_package() >> File "setup.py", line 90, in setup_package >> config_list += map(get_separate_package_config,separate_packages) >> File "setup.py", line 74, in get_separate_package_config >> return get_package_config(name,'') >> File "setup.py", line 67, in get_package_config >> mod = __import__('setup_'+os.path.basename(name)) >> ImportError: No module named setup_scipy_test > > > I suspect that this is due to a packaging error. I always check out > the latest CVS tree and cannot vouch for the source-file packages. > I'm not sure why, but they always manage to leave out several files. > It looks like you may be missing the entire scipy_core directory. > I just built a source distribution on my machine and it seemed to > include the setup_scipy_test.py file so I'm not sure what's wrong with > your source tree. > > I'll send you what I have in a separate mail. > > I'm cross-posting this to the scipy-user list to see if anyone else > has had similar troubles. > > -Travis > > > >> >> A look for modules beginning with setup* gives >> >> tapitts at sadl18818:src$ find . -name "setup*" >> ./python/setup.py >> ./python/Tools/idle/setup.py >> ./Numeric/setup.cfg >> ./Numeric/setup.py >> ./Numeric/Packages/FFT/setup.py >> ./Numeric/Packages/MA/setup.py >> ./Numeric/Packages/Properties/setup.py >> ./Numeric/Packages/RNG/setup.py >> ./Numeric/Packages/kinds/setup.py >> ./gist/setup.py >> ./Imaging/setup.py >> ./PyOpenGL-2.0.0.44/setup >> ./PyOpenGL-2.0.0.44/setup.py >> ./ScientificPython/setup.cfg >> ./ScientificPython/setup.py >> ./SciPy-0.2.0_alpha_196.4120/Lib/gui_thread/setup_gui_thread.py >> ./SciPy-0.2.0_alpha_196.4120/Lib/gui_thread/setup_gui_thread.pyc >> ./SciPy-0.2.0_alpha_196.4120/Lib/weave/setup_weave.py >> ./SciPy-0.2.0_alpha_196.4120/Lib/weave/setup_weave.pyc >> ./SciPy-0.2.0_alpha_196.4120/Lib_chaco/chaco/setup_chaco.py >> ./SciPy-0.2.0_alpha_196.4120/Lib_chaco/kiva/setup_kiva.py >> ./SciPy-0.2.0_alpha_196.4120/Lib_chaco/traits/setup_traits.py >> ./SciPy-0.2.0_alpha_196.4120/setup.py >> ./F2PY-2.32.225-1419/docs/usersguide/setup_example.py >> ./F2PY-2.32.225-1419/other/scipy_distutils/setup_scipy_distutils.py >> ./F2PY-2.32.225-1419/other/scipy_distutils/setup.py >> ./F2PY-2.32.225-1419/setup.py >> ./F2PY-2.32.225-1419/build/lib/scipy_distutils/setup_scipy_distutils.py >> ./F2PY-2.32.225-1419/build/lib/scipy_distutils/setup.py >> >> >> I seem to be missing a file. Any hints you might provide? >> >> -Todd >> >> > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user