Re: [Numpy-discussion] something wrong with docs?

2009-09-22 Thread David Goldsmith
On Tue, Sep 22, 2009 at 9:29 PM, Fernando Perez wrote: > On Tue, Sep 22, 2009 at 7:31 PM, David Goldsmith> is there a "standard" for > these ala the docstring standard, or some other > > extant way to promulgate and "strengthen" your "suggestion" (after proper > > community vetting, of course); >

Re: [Numpy-discussion] The problem with arrays

2009-09-22 Thread yogesh karpate
Dear Fabrice Finally your suggestions worked :).Thanks a lot... soon the code I'm working will be available as a part of Free Software Foundation. Regards Yogesh On Tue, Sep 22, 2009 at 11:23 PM, Fabrice Silva wrote: > Le mardi 22 septembre 2009 à 23:00 +0530, yogesh karp

Re: [Numpy-discussion] something wrong with docs?

2009-09-22 Thread Fernando Perez
On Tue, Sep 22, 2009 at 7:31 PM, David Goldsmith wrote: > Later in this thread, Fernando, you make a good case - scalability - for > this, which, as someone who's been using only >>>, raises a number of > questions in my mind: 0) this isn't applicable to docstrings, only to > numpy-docs (i.e., the

Re: [Numpy-discussion] [SciPy-dev] Deprecate chararray [was Plea for help]

2009-09-22 Thread David Goldsmith
On Tue, Sep 22, 2009 at 4:02 PM, Ralf Gommers wrote: > > On Tue, Sep 22, 2009 at 1:58 PM, Michael Droettboom wrote: > > Trac has these bugs. Any others? >> >> http://projects.scipy.org/numpy/ticket/1199 >> http://projects.scipy.org/numpy/ticket/1200 >> http://projects.scipy.org/numpy/ticket/856 >

Re: [Numpy-discussion] is ndarray.base the closest base or the ultimate base?

2009-09-22 Thread David Goldsmith
On Tue, Sep 22, 2009 at 3:14 PM, Citi, Luca wrote: > My vote (if I am entitled to) goes to "change the code". > Whether or not the addressee of .base is an array, it should be "the object > that has to be kept alive such that the data does not get deallocated" > rather "one object which will keep

Re: [Numpy-discussion] something wrong with docs?

2009-09-22 Thread David Goldsmith
On Mon, Sep 21, 2009 at 6:49 PM, Fernando Perez wrote: > On Mon, Sep 21, 2009 at 11:32 AM, Pauli Virtanen wrote: > > The `sphinx.ext.doctest` extension is not enabled, so the testcode:: > > etc. directives are not available. I'm not sure if it should be enabled > > -- it would be cleaner to just

Re: [Numpy-discussion] Fancy indexing for

2009-09-22 Thread Daran Rife
Hi Robert, This solution works beautifully! Thanks for sending it along. I need to learn and understand more about fancy indexing for multi-dimensional arrays, especially your clever trick of np.newaxis for broadcasting. Daran -- > Hello list, > > This didn't seem to get through last time roun

Re: [Numpy-discussion] [SciPy-dev] Deprecate chararray [was Plea for help]

2009-09-22 Thread Ralf Gommers
On Tue, Sep 22, 2009 at 1:58 PM, Michael Droettboom wrote: > Sorry to resurrect a long-dead thread, but I've been continuing Chris > Hanley's investigation of chararray at Space Telescope Science Institute > (and the broader astronomical community) for a while and have some > findings to report b

Re: [Numpy-discussion] is ndarray.base the closest base or the ultimate base?

2009-09-22 Thread Citi, Luca
My vote (if I am entitled to) goes to "change the code". Whether or not the addressee of .base is an array, it should be "the object that has to be kept alive such that the data does not get deallocated" rather "one object which will keep alive another object, which will keep alive another objec

Re: [Numpy-discussion] [SciPy-dev] Deprecate chararray [was Plea for help]

2009-09-22 Thread David Goldsmith
Michael: First, thank you very much for your detailed and thorough analysis and recap of the situation - it sounds to me like chararray is now in good hands! :-) On Tue, Sep 22, 2009 at 10:58 AM, Michael Droettboom wrote: > Sorry to resurrect a long-dead thread, but I've been continuing Chris >

Re: [Numpy-discussion] is ndarray.base the closest base or the ultimate base?

2009-09-22 Thread David Goldsmith
So, what's the "bottom-line" of this thread: does the doc need to be changed, or the code? DG 2009/9/21 Hans Meine > Hi! > > On Monday 21 September 2009 12:31:27 Citi, Luca wrote: > > I think you do not need to do the chain up walk on view creation. > > If the assumption is that base is the ul

Re: [Numpy-discussion] merging docs from wiki

2009-09-22 Thread David Goldsmith
On Sun, Sep 20, 2009 at 12:49 PM, Ralf Gommers wrote: > Hi, > > I'm done reviewing all the improved docstrings for NumPy, they can be > merged now from the doc editor Patch page. Maybe I'll get around to doing > the SciPy ones as well this week, but I can't promise that. > Thank you very much, Ra

Re: [Numpy-discussion] numpy macosx10.5 binaries: compatible with 10.4?

2009-09-22 Thread Christopher Barker
Russell E. Owen wrote: > All the official numpy 1.3.0 Mac binaries are labelled "macosx10.5". > Does anyone know if these are backwards compatible with MacOS X 10.4 I'm pretty sure they are. > 10.3.9? not so sure, but worth a try. I've posted bug reports about the naming scheme, but haven't st

Re: [Numpy-discussion] polynomial ring dtype

2009-09-22 Thread Sebastian Walter
sorry if this a duplicate, it seems that my last mail got lost... is there something to take care about when sending a mail to the numpy mailing list? On Tue, Sep 22, 2009 at 9:42 AM, Sebastian Walter wrote: > This is somewhat similar to the question about fixed-point arithmetic > earlier on this

Re: [Numpy-discussion] numpy and cython in pure python mode

2009-09-22 Thread Robert Kern
On Tue, Sep 22, 2009 at 01:33, Sebastian Haase wrote: > Hi, > I'm not subscribed to the cython list - hoping enough people would > care to justify my post here: > > I know that cython's numpy is still getting better and better over > time, but is it already today possible to have numpy support whe

Re: [Numpy-discussion] Fancy indexing for

2009-09-22 Thread Robert Kern
On Tue, Sep 22, 2009 at 12:16, Daran Rife wrote: > Hello list, > > This didn't seem to get through last time round, and my > first version was poorly written. > > I have a rather pedestrian question about fancy indexing > for multi-dimensional arrays. > > Suppose I have two 3-D arrays, one named "

[Numpy-discussion] numpy macosx10.5 binaries: compatible with 10.4?

2009-09-22 Thread Russell E. Owen
All the official numpy 1.3.0 Mac binaries are labelled "macosx10.5". Does anyone know if these are backwards compatible with MacOS X 10.4 or 10.3.9? -- Russell ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/

Re: [Numpy-discussion] something wrong with docs?

2009-09-22 Thread Fernando Perez
On Tue, Sep 22, 2009 at 12:02 AM, Pauli Virtanen wrote: > I think sphinx.ext.doctest is able to also test the ordinary >>> marked- > up examples, so there'd be no large need for new directives. > Well, >>> examples intermix input and output, and are thus very annoying to paste back into new code

Re: [Numpy-discussion] [SciPy-dev] Deprecate chararray [was Plea for help]

2009-09-22 Thread Michael Droettboom
Sorry to resurrect a long-dead thread, but I've been continuing Chris Hanley's investigation of chararray at Space Telescope Science Institute (and the broader astronomical community) for a while and have some findings to report back. What I've taken from this thread is that chararray is in nee

Re: [Numpy-discussion] The problem with arrays

2009-09-22 Thread Fabrice Silva
Le mardi 22 septembre 2009 à 23:00 +0530, yogesh karpate a écrit : > This is the main thing . When I try to store it in array like > R_time=array([R_t[0][i]]). It just stores the final value in that > array when loop ends.I cant get out of this For loop.I really have > this small problem. I really

Re: [Numpy-discussion] The problem with arrays

2009-09-22 Thread yogesh karpate
On Tue, Sep 22, 2009 at 7:01 PM, Fabrice Silva wrote: > Le mardi 22 septembre 2009 à 17:42 +0530, yogesh karpate a écrit : > > I just tried your idea but the result is same. it didnt help . > > > > 2009/9/22 Nadav Horesh > > A quick answer with going into the details of your code: > > > >

[Numpy-discussion] Fancy indexing for

2009-09-22 Thread Daran Rife
Hello list, This didn't seem to get through last time round, and my first version was poorly written. I have a rather pedestrian question about fancy indexing for multi-dimensional arrays. Suppose I have two 3-D arrays, one named "A" and the other "B", where both arrays have identical dimensions

Re: [Numpy-discussion] Best way to insert C code in numpy code

2009-09-22 Thread Xavier Gnata
René Dudfield wrote: > On Mon, Sep 21, 2009 at 8:12 PM, David Warde-Farley > wrote: > >> On 21-Sep-09, at 2:55 PM, Xavier Gnata wrote: >> >> >>> Should I read that to learn you cython and numpy interact? >>> Or is there another best documentation (with examples...)? >>> >> You shou

[Numpy-discussion] Parallelizable Performance Python Example

2009-09-22 Thread James Snyder
Hi - I've recently been trying to adjust the performance python example (http://www.scipy.org/PerformancePython ) so that it could be compared under a parallelized version. I've adjusted the Gauss-Seidel 4 point method to a red-black checkerboarded (http://www.cs.colorado.edu/~mcbryan/3656.

Re: [Numpy-discussion] Best way to insert C code in numpy code

2009-09-22 Thread René Dudfield
On Tue, Sep 22, 2009 at 3:45 PM, Sturla Molden wrote: > Xavier Gnata skrev: >> I have a large 2D numpy array as input and a 1D array as output. >> In between, I would like to use C code. >> C is requirement because it has to be fast and because the algorithm >> cannot be written in a numpy oriente

Re: [Numpy-discussion] Best way to insert C code in numpy code

2009-09-22 Thread Sturla Molden
Xavier Gnata skrev: > I have a large 2D numpy array as input and a 1D array as output. > In between, I would like to use C code. > C is requirement because it has to be fast and because the algorithm > cannot be written in a numpy oriented way :( (no way...really). > There are certain algorithm

Re: [Numpy-discussion] Numpy question: Best hardware for Numpy?

2009-09-22 Thread Bruce Southey
On 09/22/2009 02:52 AM, Romain Brette wrote: > David Warde-Farley a écrit : > >> On 21-Sep-09, at 10:53 AM, David Cournapeau wrote: >> >> >>> Concerning the hardware, I have just bought a core i7 (the cheapest >>> model is ~ 200$ now, with 4 cores and 8 Mb of shared cache), and the >>> th

Re: [Numpy-discussion] Best way to insert C code in numpy code

2009-09-22 Thread Sturla Molden
René Dudfield skrev: > Another way is to make your C function then load it with ctypes Also one should beware that ctypes is a stable part of the Python standard library. Cython is still unstable and in rapid development. Pyrex is more stabile than Cython, but interfacing with ndarrays is harder

Re: [Numpy-discussion] Best way to insert C code in numpy code

2009-09-22 Thread Sturla Molden
René Dudfield skrev: > Another way is to make your C function then load it with ctypes(or > wrap it with something else) and pass it pointers with > array.ctype.data. numpy.ctypeslib.ndpointer is preferred when using ndarrays with ctypes. > You can find the shape of the array in python, and > p

Re: [Numpy-discussion] The problem with arrays

2009-09-22 Thread Fabrice Silva
Le mardi 22 septembre 2009 à 17:42 +0530, yogesh karpate a écrit : > I just tried your idea but the result is same. it didnt help . > > 2009/9/22 Nadav Horesh > A quick answer with going into the details of your code: > > try > plt.plot(R_time,R_amp,'go',hold=1)

Re: [Numpy-discussion] I want to help with a numpy python 3.1.x port

2009-09-22 Thread René Dudfield
On Sun, Sep 20, 2009 at 7:15 PM, Robert Kern wrote: > On Sun, Sep 20, 2009 at 13:13, René Dudfield wrote: >> Hi again, >> >> I noticed numpy includes a copy of distutils.  I guess because it's >> been modified in some way? > > numpy.distutils is a set of extensions to distutils; it is not a copy

Re: [Numpy-discussion] Deserialization uncouples shared arrays

2009-09-22 Thread Hans Meine
On Tuesday 22 September 2009 13:14:55 Hrvoje Niksic wrote: > Hans Meine wrote: > > On Tuesday 22 September 2009 11:01:37 Hrvoje Niksic wrote: > >> Is it intended for deserialization to uncouple arrays that share a > >> common base? > > > > I think it's not really intended, but it's a limitation by

Re: [Numpy-discussion] The problem with arrays

2009-09-22 Thread yogesh karpate
I just tried your idea but the result is same. it didnt help . 2009/9/22 Nadav Horesh > A quick answer with going into the details of your code: > > try > plt.plot(R_time,R_amp,'go',hold=1) > (one line before the last) > > Nadav > > -הודעה מקורית- > מאת: numpy-discussion-boun...@scipy.

Re: [Numpy-discussion] The problem with arrays

2009-09-22 Thread Nadav Horesh
A quick answer with going into the details of your code: try plt.plot(R_time,R_amp,'go',hold=1) (one line before the last) Nadav -הודעה מקורית- מאת: numpy-discussion-boun...@scipy.org בשם yogesh karpate נשלח: ג 22-ספטמבר-09 14:11 אל: numpy-discussion@scipy.org נושא: [Numpy-discussion

Re: [Numpy-discussion] Deserialization uncouples shared arrays

2009-09-22 Thread Hrvoje Niksic
Hans Meine wrote: > On Tuesday 22 September 2009 11:01:37 Hrvoje Niksic wrote: >> Is it intended for deserialization to uncouple arrays that share a >> common base? > > I think it's not really intended, but it's a limitation by design. I wonder why a "base" attribute is even restored, then? If t

[Numpy-discussion] The problem with arrays

2009-09-22 Thread yogesh karpate
Please kindly go through following code snippet for i in range(a1): data_temp=(bpf[left[0][i]:right[0][i]])# left is an array and right is also an array maxloc=data_temp.argmax() #taking indices of max. value of data segment maxval=data_temp[maxloc] minloc=da

Re: [Numpy-discussion] Deserialization uncouples shared arrays

2009-09-22 Thread Hans Meine
On Tuesday 22 September 2009 11:01:37 Hrvoje Niksic wrote: > Is it intended for deserialization to uncouple arrays that share a > common base? I think it's not really intended, but it's a limitation by design. AFAIK, it's related to Luca Citi's recent "ultimate base" thread - you simply cannot en

Re: [Numpy-discussion] Best way to insert C code in numpy code

2009-09-22 Thread René Dudfield
On Mon, Sep 21, 2009 at 8:12 PM, David Warde-Farley wrote: > On 21-Sep-09, at 2:55 PM, Xavier Gnata wrote: > >> Should I read that to learn you cython and numpy interact? >> Or is there another best documentation (with examples...)? > > You should have a look at the Bresenham algorithm thread you

Re: [Numpy-discussion] Best way to insert C code in numpy code

2009-09-22 Thread Chris Colbert
I give my vote to cython as well. I have a program which uses cython for a portion simply because it was easier using a simple C for-loop to do what i wanted rather than beating numpy into submission. It was an order of magnitude faster as well. Cheers, Chris On Mon, Sep 21, 2009 at 9:12 PM, Dav

[Numpy-discussion] Deserialization uncouples shared arrays

2009-09-22 Thread Hrvoje Niksic
Is it intended for deserialization to uncouple arrays that share a common base? For example: >>> import numpy, cPickle as p >>> a = numpy.array([1, 2, 3]) # base array >>> b = a[:] # view one >>> b array([1, 2, 3]) >>> c = a[::-1] # view two >>> c arr

Re: [Numpy-discussion] Numpy question: Best hardware for Numpy?

2009-09-22 Thread Romain Brette
David Warde-Farley a écrit : > On 21-Sep-09, at 10:53 AM, David Cournapeau wrote: > >> Concerning the hardware, I have just bought a core i7 (the cheapest >> model is ~ 200$ now, with 4 cores and 8 Mb of shared cache), and the >> thing flies for floating point computation. My last computer was a >

[Numpy-discussion] polynomial ring dtype

2009-09-22 Thread Sebastian Walter
This is somewhat similar to the question about fixed-point arithmetic earlier on this mailing list. I need to do computations on arrays whose elements are truncated polynomials. At the momement, I have implemented the univariate truncated polynomials as objects of a class UTPS. The class basicall

Re: [Numpy-discussion] numpy and cython in pure python mode

2009-09-22 Thread Sturla Molden
Sebastian Haase skrev: > I know that cython's numpy is still getting better and better over > time, but is it already today possible to have numpy support when > using Cython in "pure python" mode? > I'm not sure. There is this odd memoryview syntax: import cython view = cython.int[:,:](my2darr

Re: [Numpy-discussion] something wrong with docs?

2009-09-22 Thread Pauli Virtanen
Mon, 21 Sep 2009 18:49:47 -0700, Fernando Perez wrote: > On Mon, Sep 21, 2009 at 11:32 AM, Pauli Virtanen wrote: >> The `sphinx.ext.doctest` extension is not enabled, so the testcode:: >> etc. directives are not available. I'm not sure if it should be enabled >> -- it would be cleaner to just rep