[Numpy-discussion] Line of best fit!

2008-12-08 Thread James
Hi, I am trying to plot a line of best fit for some data i have, is there a simple way of doing it? Cheers ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Line of best fit!

2008-12-08 Thread Scott Sinclair
2008/12/8 James [EMAIL PROTECTED]: I am trying to plot a line of best fit for some data i have, is there a simple way of doing it? Hi James, Take a look at: http://www.scipy.org/Cookbook/FittingData http://www.scipy.org/Cookbook/LinearRegression and the section on least square fitting

Re: [Numpy-discussion] ANN: numpy.i - added managed deallocation to ARGOUTVIEW_ARRAY1 (ARGOUTVIEWM_ARRAY1)

2008-12-08 Thread Egor Zindy
Hello list, just a quick follow-up on the managed deallocation. This is what I've done this week-end: In numpy.i, I have redefined the import_array() function to also take care of the managed memory initialisation (the _MyDeallocType.tp_new = PyType_GenericNew; statement). This means that in

Re: [Numpy-discussion] Python2.4 support

2008-12-08 Thread Adam Mercer
On Sun, Dec 7, 2008 at 23:42, David Cournapeau [EMAIL PROTECTED] wrote: I am strongly against dropping 2.4 support anytime soon. I haven't seen a strong rationale for using = 2.5 features in numpy, supporting 2.4 is not so hard, and 2.4 is still the default python version on many OS (mac os X

Re: [Numpy-discussion] Python2.4 support

2008-12-08 Thread Matthieu Brucher
While my feelings aren't as strong as David's, they are pretty much identical. As a point of reference, Red Hat Enterprise Linux 6 won't come out until at least the first quarter of 2010. Until then we should make a serious effort to support Python 2.4, which ships with RHEL 5. It looks

[Numpy-discussion] Singular Matrix problem with Matplitlib in Numpy (Windows - AMD64)

2008-12-08 Thread George Goussard
Hello. I have been battling with the following error for the past week. The output from the terminal is: Traceback (most recent call last): File C:\development\Python\2_5_2\Lib\site-packages\matplotlib\backends\backend_qt4agg.py, line 86, in paintEvent FigureCanvasAgg.draw(self) File

[Numpy-discussion] how to create a matrix based on a vector?

2008-12-08 Thread frank wang
Hi, I want to create a matrix based on a vector. It is difficult to describe the issue for me in english. Here is an example. Suppose I have an array([3, 6, 8, 12]), I want to create a range based on each element. In this exampe, let us say want to create 4 number with step 2, so I will

Re: [Numpy-discussion] how to create a matrix based on a vector?

2008-12-08 Thread Robert Kern
On Mon, Dec 8, 2008 at 11:27, frank wang [EMAIL PROTECTED] wrote: Hi, I want to create a matrix based on a vector. It is difficult to describe the issue for me in english. Here is an example. Suppose I have an array([3, 6, 8, 12]), I want to create a range based on each element. In this

Re: [Numpy-discussion] Singular Matrix problem with Matplitlib in Numpy (Windows - AMD64)

2008-12-08 Thread David Cournapeau
On Tue, Dec 9, 2008 at 12:50 AM, George Goussard [EMAIL PROTECTED] wrote: Hello. I have been battling with the following error for the past week. The output from the terminal is: What does numpy.test() says ? Did you use an external blas/lapack when you built numpy for AMD64 David

Re: [Numpy-discussion] checksum on numpy float array

2008-12-08 Thread Francesc Alted
A Sunday 07 December 2008, Brennan Williams escrigué: OK so maybe I should (1) not add some sort of checksum type functionality to my read/write methods these read/write methods simply read/write numpy arrays to a binary file which contains one or more numpy arrays (and nothing

Re: [Numpy-discussion] how to create a matrix based on a vector?

2008-12-08 Thread frank wang
I got a lof of help from the experts in this forum. I resitsted to send a thank you reply for fearing spaming the forum. This time I really want to let the people know that I am really appreciate the great help I got. Please let me know if a simple thank you message is not appropriate in

Re: [Numpy-discussion] how to create a matrix based on a vector?

2008-12-08 Thread Robert Kern
On Mon, Dec 8, 2008 at 12:40, frank wang [EMAIL PROTECTED] wrote: I got a lof of help from the experts in this forum. I resitsted to send a thank you reply for fearing spaming the forum. This time I really want to let the people know that I am really appreciate the great help I got. Please

[Numpy-discussion] What to use to read and write numpy arrays to a file?

2008-12-08 Thread Lou Pecora
In looking for simple ways to read and write data (in a text readable format) to and from a file and later restoring the actual data when reading back in, I've found that numpy arrays don't seem to play well with repr and eval. E.g. to write some data (mixed types) to a file I can do this (fp

Re: [Numpy-discussion] What to use to read and write numpy arrays to a file?

2008-12-08 Thread Matthieu Brucher
Hi, The repr - eval pair does not work with numpy. You can simply do a tofile() from file(). Matthieu 2008/12/8 Lou Pecora [EMAIL PROTECTED]: In looking for simple ways to read and write data (in a text readable format) to and from a file and later restoring the actual data when reading back

Re: [Numpy-discussion] What to use to read and write numpy arrays to a file?

2008-12-08 Thread Robert Kern
On Mon, Dec 8, 2008 at 14:54, Lou Pecora [EMAIL PROTECTED] wrote: In looking for simple ways to read and write data (in a text readable format) to and from a file and later restoring the actual data when reading back in, I've found that numpy arrays don't seem to play well with repr and eval.

Re: [Numpy-discussion] What to use to read and write numpy arrays to a file?

2008-12-08 Thread Lou Pecora
--- On Mon, 12/8/08, Matthieu Brucher [EMAIL PROTECTED] wrote: From: Matthieu Brucher [EMAIL PROTECTED] Subject: Re: [Numpy-discussion] What to use to read and write numpy arrays to a file? To: Discussion of Numerical Python numpy-discussion@scipy.org Date: Monday, December 8, 2008, 3:56 PM

Re: [Numpy-discussion] What to use to read and write numpy arrays to a file?

2008-12-08 Thread Lou Pecora
--- On Mon, 12/8/08, Robert Kern [EMAIL PROTECTED] wrote: From: Robert Kern [EMAIL PROTECTED] Subject: Re: [Numpy-discussion] What to use to read and write numpy arrays to a file? The most bulletproof way would be to use numpy.save() and numpy.load(), but this is a binary format, not a

Re: [Numpy-discussion] What to use to read and write numpy arrays to a file?

2008-12-08 Thread Robert Kern
On Mon, Dec 8, 2008 at 15:26, Lou Pecora [EMAIL PROTECTED] wrote: --- On Mon, 12/8/08, Robert Kern [EMAIL PROTECTED] wrote: From: Robert Kern [EMAIL PROTECTED] Subject: Re: [Numpy-discussion] What to use to read and write numpy arrays to a file? The most bulletproof way would be to use

Re: [Numpy-discussion] Line of best fit!

2008-12-08 Thread Angus McMorland
Hi James, 2008/12/8 James [EMAIL PROTECTED]: I have a very simple plot, and the lines join point to point, however i would like to add a line of best fit now onto the chart, i am really new to python etc, and didnt really understand those links! Can anyone help me :) It sounds like the

Re: [Numpy-discussion] Python2.4 support

2008-12-08 Thread Steven H. Rogers
Matthieu Brucher wrote: At least several months, if not years. RedHat supports each version 7 years, for instance (I don't ask for that long). Currently, I'm still using a RHEL 4, although it is planned to migrate to RHEL 5 next year. So we should still support 2.4 for at least 18 months, in

[Numpy-discussion] how do I delete unused matrix to save the memory?

2008-12-08 Thread frank wang
Hi, I have a program with some variables consume a lot of memory. The first time I run it, it is fine. The second time I run it, I will get MemoryError. If I close the ipython and reopen it again, then I can run the program once. I am looking for a command to delete the intermediate variable

Re: [Numpy-discussion] how do I delete unused matrix to save the memory?

2008-12-08 Thread Travis Vaught
Try: del(myvariable) Travis On Dec 8, 2008, at 7:15 PM, frank wang [EMAIL PROTECTED] wrote: Hi, I have a program with some variables consume a lot of memory. The first time I run it, it is fine. The second time I run it, I will get MemoryError. If I close the ipython and reopen it

[Numpy-discussion] when will osx linker option -bundle be reflected in distutils

2008-12-08 Thread Garry Willgoose
I was just wondering what plans there were to reflect the different linker options (i.e. -bundle instead of -shared) that are required on OSX in the fcompiler files within distutils. While its a minor thing it always catches the users of my software when they either install fresh or update

Re: [Numpy-discussion] when will osx linker option -bundle be reflected in distutils

2008-12-08 Thread Robert Kern
On Mon, Dec 8, 2008 at 18:02, Garry Willgoose [EMAIL PROTECTED] wrote: I was just wondering what plans there were to reflect the different linker options (i.e. -bundle instead of -shared) that are required on OSX in the fcompiler files within distutils. While its a minor thing it always

Re: [Numpy-discussion] Line of best fit!

2008-12-08 Thread Scott Sinclair
2008/12/9 Angus McMorland [EMAIL PROTECTED]: Hi James, 2008/12/8 James [EMAIL PROTECTED]: I have a very simple plot, and the lines join point to point, however i would like to add a line of best fit now onto the chart, i am really new to python etc, and didnt really understand those links!

Re: [Numpy-discussion] genloadtxt : last call

2008-12-08 Thread Ryan May
Pierre GM wrote: All, Here's the latest version of genloadtxt, with some recent corrections. With just a couple of tweaking, we end up with some decent speed: it's still slower than np.loadtxt, but only 15% so according to the test at the end of the package. And so, now what ? Should I