Re: [Numpy-discussion] Default value in documentation

2007-10-02 Thread Charles R Harris
Hi Pierre, On 10/2/07, Pierre GM <[EMAIL PROTECTED]> wrote: > > On Tuesday 02 October 2007 15:36:03 Alan G Isaac wrote: > > On Tue, 2 Oct 2007, Pierre GM apparently wrote: > > > is there any kind of standard to describe the attributes > > > of a class, a la :IVariables: in epydoc ? > > > > I thoug

Re: [Numpy-discussion] Default value in documentation

2007-10-02 Thread Pierre GM
On Tuesday 02 October 2007 15:36:03 Alan G Isaac wrote: > On Tue, 2 Oct 2007, Pierre GM apparently wrote: > > is there any kind of standard to describe the attributes > > of a class, a la :IVariables: in epydoc ? > > I thought it was ... :IVariables: > i.e., I thought the standard was reST as hand

Re: [Numpy-discussion] Default value in documentation

2007-10-02 Thread Charles R Harris
On 10/2/07, Alan G Isaac <[EMAIL PROTECTED]> wrote: > > On Tue, 2 Oct 2007, Pierre GM apparently wrote: > > > is there any kind of standard to describe the attributes > > of a class, a la :IVariables: in epydoc ? > > I thought it was ... :IVariables: > i.e., I thought the standard was reST as hand

Re: [Numpy-discussion] Default value in documentation

2007-10-02 Thread Alan G Isaac
On Tue, 2 Oct 2007, Pierre GM apparently wrote: > is there any kind of standard to describe the attributes > of a class, a la :IVariables: in epydoc ? I thought it was ... :IVariables: i.e., I thought the standard was reST as handled by epydoc. http://projects.scipy.org/scipy/numpy/wiki/Coding

Re: [Numpy-discussion] numpy.distutils.cpuinfo bugs?

2007-10-02 Thread David M. Cooke
On Mon, Oct 01, 2007 at 09:40:26PM -0400, Alan G Isaac wrote: > Two problems noted:: > > >>> from numpy.distutils import cpuinfo > 0 > >>> cpu = cpuinfo.cpuinfo() > >>> print "Has SSE2? %s"%cpu._has_sse2() > Has SSE2? False > >>> > > 1. The printed '0' traces to an undesir

Re: [Numpy-discussion] Default value in documentation

2007-10-02 Thread Stefan van der Walt
On Tue, Oct 02, 2007 at 12:25:58PM -0600, Charles R Harris wrote: > So label it optional and describe the default in prose in the parameter > description if necessary. While this is less descriptive for meaningful > defaults > (axis=-1), the case you show above is precisely suited t

Re: [Numpy-discussion] Default value in documentation

2007-10-02 Thread Charles R Harris
On 10/2/07, Robert Kern <[EMAIL PROTECTED]> wrote: > > Pierre GM wrote: > > All, > > I'm starting to update the documentation of maskedarray to the latest > > standard. > > How should I represent the default value of an optional parameter ? > > I was thinking something like > > > > def function(a,

Re: [Numpy-discussion] Default value in documentation

2007-10-02 Thread Pierre GM
On Tuesday 02 October 2007 13:40:28 Robert Kern wrote: > I prefer this: > > value : {float}, optional > Some value. If not provided, a default based on the dtype of a is > used. >... >And for the meaningful defaults, the function > signature is more than adequate to provide the necessa

Re: [Numpy-discussion] Default value in documentation

2007-10-02 Thread Robert Kern
Pierre GM wrote: > All, > I'm starting to update the documentation of maskedarray to the latest > standard. > How should I represent the default value of an optional parameter ? > I was thinking something like > > def function(a, value=None) > """Does something > *Parameters*: > a : {ndar

Re: [Numpy-discussion] adopting Python Style Guide for classes

2007-10-02 Thread Francesc Altet
A Tuesday 02 October 2007, Timothy Hochberg escrigué: > One approach would be CapWords the superclasses of these that are > subclassable, but leave the leaf types alone. For example, looking at > float32 and its bases : > >- numpy.generic -> numpy.Generic >- numpy.number -> numpy.Number >

[Numpy-discussion] Default value in documentation

2007-10-02 Thread Pierre GM
All, I'm starting to update the documentation of maskedarray to the latest standard. How should I represent the default value of an optional parameter ? I was thinking something like def function(a, value=None) """Does something *Parameters*: a : {ndarray} Input array. value :

Re: [Numpy-discussion] adopting Python Style Guide for classes

2007-10-02 Thread Francesc Altet
A Tuesday 02 October 2007, Robert Kern escrigué: > Matthew Brett wrote: > > On 10/2/07, Christopher Barker <[EMAIL PROTECTED]> wrote: > >> What is a "class" in this case -- with new-style classes, there is > >> no distinction between types and classes, so I guess they are all > >> classes, which me

Re: [Numpy-discussion] adopting Python Style Guide for classes

2007-10-02 Thread Timothy Hochberg
On 10/2/07, Christopher Barker <[EMAIL PROTECTED]> wrote: > > Jarrod Millman wrote: > > I am hoping that most of you agree with the general principle of > > bringing NumPy and SciPy into compliance with the standard naming > > conventions. > > +1 > > > 3. When we release NumPy 1.1, we will convert

Re: [Numpy-discussion] adopting Python Style Guide for classes

2007-10-02 Thread Robert Kern
Matthew Brett wrote: > On 10/2/07, Christopher Barker <[EMAIL PROTECTED]> wrote: >> What is a "class" in this case -- with new-style classes, there is no >> distinction between types and classes, so I guess they are all classes, >> which means lots of things like: >> >> numpy.float32 >> >> etc. et

Re: [Numpy-discussion] adopting Python Style Guide for classes

2007-10-02 Thread Matthew Brett
On 10/2/07, Christopher Barker <[EMAIL PROTECTED]> wrote: > Jarrod Millman wrote: > > I am hoping that most of you agree with the general principle of > > bringing NumPy and SciPy into compliance with the standard naming > > conventions. Excellent plan - and I think it will make the code considera

Re: [Numpy-discussion] adopting Python Style Guide for classes

2007-10-02 Thread Christopher Barker
Jarrod Millman wrote: > I am hoping that most of you agree with the general principle of > bringing NumPy and SciPy into compliance with the standard naming > conventions. +1 > 3. When we release NumPy 1.1, we will convert all (or almost all) > class names to CapWords. What's the backwards-c

Re: [Numpy-discussion] numpy.distutils.cpuinfo bugs?

2007-10-02 Thread Alan G Isaac
Here is the processor information using the Intel utility. Cheers, Alan Isaac Intel(R) Processor Identification Utility Version: 3.7.20070907 Time Stamp: 2007/10/02 14:21:29 Number of processors in system: 1 Current processor: #1 Cores per processor: 1 Disabled cores per processor: 0 Processor N

Re: [Numpy-discussion] numpy.distutils.cpuinfo bugs?

2007-10-02 Thread Alan G Isaac
On Tue, 02 Oct 2007, Pearu Peterson apparently wrote: >> 1. The printed '0' traces to an undesirable print statement. >> (I've reported this before.) > Travis seemed to fix this about two weeks ago. Sorry for the noise. >> 2. The 'False" report is on a Pentium M. Should that not be >> True?

Re: [Numpy-discussion] Run length encoding of an ndarray

2007-10-02 Thread Stefan van der Walt
On Tue, Oct 02, 2007 at 01:36:02PM +0100, Michael Hoffman wrote: > I am trying to do a type of run-length encoding of a 2D array by axis. I > have an array of values arranged along two axes, state and position. > These are many (180, 3) uint8 arrays. > > I would like to have a list of tuples

Re: [Numpy-discussion] Run length encoding of an ndarray

2007-10-02 Thread Michael Hoffman
Michael Hoffman wrote: > I am trying to do a type of run-length encoding of a 2D array by axis. I > have an array of values arranged along two axes, state and position. > These are many (180, 3) uint8 arrays. > > I would like to have a list of tuples like > > (state, start_pos, end_pos, val

[Numpy-discussion] Run length encoding of an ndarray

2007-10-02 Thread Michael Hoffman
I am trying to do a type of run-length encoding of a 2D array by axis. I have an array of values arranged along two axes, state and position. These are many (180, 3) uint8 arrays. I would like to have a list of tuples like (state, start_pos, end_pos, values) only separating out a set of va

Re: [Numpy-discussion] Naming a slice index?

2007-10-02 Thread Michael Hoffman
Eagle Jones wrote: > New to python and numpy; hopefully I'm missing something obvious. I'd > like to be able to slice an array with a name. For example: > > _T = 6:10 > _R = 10:15 from numpy import index_exp _T = index_exp[6:10] _R = index_exp[10:15] > A = identity(20) > foo = A[_T, _R] __

Re: [Numpy-discussion] adopting Python Style Guide for classes

2007-10-02 Thread Pearu Peterson
Pearu Peterson wrote: .. > After fixing the class names in tests then how many classes use > camelcase style in numpy/distutils? How many of them are implementation .. ^^^ Btw, I meant numpy/scipy here. Pearu ___ Numpy-dis

Re: [Numpy-discussion] adopting Python Style Guide for classes

2007-10-02 Thread David M. Cooke
On Tue, Oct 02, 2007 at 09:12:43AM +0200, Pearu Peterson wrote: > > > Jarrod Millman wrote: > > Hello, > > > .. > > Please let me know if you have any major objections to adopting the > > Python class naming convention. > > I don't object. Me either. > > 2. Any one adding a new class to NumP

Re: [Numpy-discussion] adopting Python Style Guide for classes

2007-10-02 Thread Pearu Peterson
Jarrod Millman wrote: > Hello, > .. > Please let me know if you have any major objections to adopting the > Python class naming convention. I don't object. > Once we have agreed to using CapWords for classes, we will need to > decide what to do about our existing class names. Obviously, it is

Re: [Numpy-discussion] numpy.distutils.cpuinfo bugs?

2007-10-02 Thread David Cournapeau
Pearu Peterson wrote: > > Alan G Isaac wrote: > >> 2. The 'False" report is on a Pentium M. Should that not be >> True? http://en.wikipedia.org/wiki/Pentium_M> >> Or am I misusing the test? > > What OS are you using? If Linux, then can you send the content > of /proc/cpuinfo? On Windows, you can

Re: [Numpy-discussion] numpy.distutils.cpuinfo bugs?

2007-10-02 Thread Pearu Peterson
Alan G Isaac wrote: > Two problems noted:: > > >>> from numpy.distutils import cpuinfo > 0 > >>> cpu = cpuinfo.cpuinfo() > >>> print "Has SSE2? %s"%cpu._has_sse2() > Has SSE2? False > >>> > > 1. The printed '0' traces to an undesirable print statement. > (I've reported t