Re: [Numpy-discussion] floating point char - bug?

2008-08-31 Thread Christian K.
Charles R Harris schrieb: > > > On Sun, Aug 31, 2008 at 1:14 PM, Christian K. <[EMAIL PROTECTED] > > wrote: > > Hi, > > I just came across somethin I never noticed before. I cannot say whether > this is due to an update of numpy but it is possible - I am r

Re: [Numpy-discussion] floating point char - bug?

2008-08-31 Thread Charles R Harris
On Sun, Aug 31, 2008 at 1:14 PM, Christian K. <[EMAIL PROTECTED]> wrote: > Hi, > > I just came across somethin I never noticed before. I cannot say whether > this is due to an update of numpy but it is possible - I am running > 1.1.1 on __german__ windows. Here is the observation: > > a = N.linspa

[Numpy-discussion] floating point char - bug?

2008-08-31 Thread Christian K.
Hi, I just came across somethin I never noticed before. I cannot say whether this is due to an update of numpy but it is possible - I am running 1.1.1 on __german__ windows. Here is the observation: a = N.linspace(0,1,5) a array([ 0. , 0.25, 0.5 , 0.75, 1. ]) a.astype(float) array([ 0. ,

Re: [Numpy-discussion] sort documentation

2008-08-31 Thread Stéfan van der Walt
2008/8/31 Alan G Isaac <[EMAIL PROTECTED]>: > Thanks. So if I wish to determine the current > state of documentation, is the right place to go: > http://sd-2116.dedibox.fr/pydocweb/doc/ ? Jarrod, Could we set up a reverse proxy on doc.scipy.org to serve these pages (until we move the app over to

[Numpy-discussion] Updated Numpy reference guide

2008-08-31 Thread Pauli Virtanen
Hi all, I finished the first iteration of incorporating material from Travis Oliphant's "Guide to Numpy" to the Sphinxy reference guide we were constructing in the Doc marathon. Result is here: (the PDF is a bit ugly, though, some content is almost randomly scattered there) http://ww

Re: [Numpy-discussion] sort documentation

2008-08-31 Thread Robert Kern
On Sun, Aug 31, 2008 at 09:33, dmitrey <[EMAIL PROTECTED]> wrote: > As for me I can't understand the general rule: when numpy funcs return > copy and when reference? It's driven by use cases and limitations of the particular functions. > For example why x.fill() returns None (do inplace modificat

Re: [Numpy-discussion] sort documentation

2008-08-31 Thread Alan G Isaac
Thanks. So if I wish to determine the current state of documentation, is the right place to go: http://sd-2116.dedibox.fr/pydocweb/doc/ ? Alan ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy

Re: [Numpy-discussion] sort documentation

2008-08-31 Thread Pauli Virtanen
Sun, 31 Aug 2008 10:27:59 -0700, Robert Kern wrote: > On Sun, Aug 31, 2008 at 09:26, Alan G Isaac <[EMAIL PROTECTED]> wrote: >> I find this confusing: >> >> numpy.sort(a, axis=-1, kind='quicksort', order=None) >> >> Return copy of 'a' sorted along the given axis. >> >> Perform an inpla

Re: [Numpy-discussion] sort documentation

2008-08-31 Thread Robert Kern
On Sun, Aug 31, 2008 at 09:26, Alan G Isaac <[EMAIL PROTECTED]> wrote: > I find this confusing: > > numpy.sort(a, axis=-1, kind='quicksort', order=None) > > Return copy of 'a' sorted along the given axis. > > Perform an inplace sort along the given axis using the algorithm > specifi

Re: [Numpy-discussion] return value of array methods

2008-08-31 Thread Alan G Isaac
dmitrey wrote: > As for me I can't understand the general rule: when numpy funcs return > copy and when reference? > > For example why x.fill() returns None (do inplace modification) while > x.ravel(), x.flatten() returns copy? Why the latters don't do inplace > modification, as should be expec

Re: [Numpy-discussion] sort documentation

2008-08-31 Thread dmitrey
As for me I can't understand the general rule: when numpy funcs return copy and when reference? For example why x.fill() returns None (do inplace modification) while x.ravel(), x.flatten() returns copy? Why the latters don't do inplace modification, as should be expected? D. Alan G Isaac wrot

[Numpy-discussion] sort documentation

2008-08-31 Thread Alan G Isaac
I find this confusing: numpy.sort(a, axis=-1, kind='quicksort', order=None) Return copy of 'a' sorted along the given axis. Perform an inplace sort along the given axis using the algorithm specified by the kind keyword. I suppose the last bit is supposed to refer to the ``so

Re: [Numpy-discussion] Advice on converting iterator into array efficiently

2008-08-31 Thread Francesc Alted
A Saturday 30 August 2008, Alan Jackson escrigué: > I tested all three offered solutions : > > t = table[:] # convert to structured array > collections = np.unique(t['collection']) > for collection in collections: > cond = t['collection'] == collection > energy_this_collection = t['energy']