Re: [Numpy-discussion] immutable arrays

2006-09-21 Thread Martin Wiechert
Thanks Travis. Do I understand correctly that the only way to be really safe is to make a copy and not to export a reference to it? Because anybody having a reference to the owner of the data can override the flag? Cheers, Martin On Wednesday 20 September 2006 20:18, Travis Oliphant wrote:

[Numpy-discussion] 1.0rc1 doesn't seem to work on AMD64

2006-09-21 Thread Peter Bienstman
Hi, I just installed rc1 on an AMD64 machine. but I get this error message when trying to import it: Python 2.4.3 (#1, Sep 21 2006, 13:06:42) [GCC 4.1.1 (Gentoo 4.1.1)] on linux2 Type help, copyright, credits or license for more information. import numpy Traceback (most recent call last):

[Numpy-discussion] Question about recarray

2006-09-21 Thread Lionel Roubeyrie
Hi all, Is it possible to put masked values into recarrays, I need a array with heterogenous types of datas (datetime objects in the first col, all others are float) but with missing values in some records. For the moment, I don't find any solution for that. I have tried with arrays of

Re: [Numpy-discussion] 1.0rc1 doesn't seem to work on AMD64

2006-09-21 Thread Charles R Harris
On 9/21/06, Peter Bienstman [EMAIL PROTECTED] wrote: Hi,I just installed rc1 on an AMD64 machine. but I get this error message whentrying to import it:Python 2.4.3 (#1, Sep 21 2006, 13:06:42)[GCC 4.1.1 (Gentoo 4.1.1)] on linux2Type help, copyright, credits or license for more information. import

Re: [Numpy-discussion] Tests and code documentation

2006-09-21 Thread Travis Oliphant
Charles R Harris wrote: Travis, A few questions. 1) I can't find any systematic code testing units, although there seem to be tests for regressions and such. Is there a place we should be putting such tests? All tests are placed under the tests directory of the corresponding sub-package.

Re: [Numpy-discussion] Tests and code documentation

2006-09-21 Thread Louis Cordier
Are able to use doxygen for Python code ? I thought it only worked for C (and alike) ? There is an ugly-hack :) http://i31www.ira.uka.de/~baas/pydoxy/ But I wouldn't recommend using it, rather stick with Epydoc. -- Louis Cordier [EMAIL PROTECTED] cell: +27721472305 Point45 Entertainment

Re: [Numpy-discussion] Question about recarray

2006-09-21 Thread Travis Oliphant
Lionel Roubeyrie wrote: Hi all, Is it possible to put masked values into recarrays, I need a array with heterogenous types of datas (datetime objects in the first col, all others are float) but with missing values in some records. For the moment, I don't find any solution for that. Either

Re: [Numpy-discussion] arr.dtype.kind is 'i' for dtype=unit !?

2006-09-21 Thread Matthew Brett
Hi, It's in the array interface specification: http://numpy.scipy.org/array_interface.shtml I was interested in the 't' (bitfield) type - is there an example of usage somewhere? In [13]: dtype('t8') ---

Re: [Numpy-discussion] arr.dtype.kind is 'i' for dtype=unit !?

2006-09-21 Thread Travis Oliphant
Matthew Brett wrote: Hi, It's in the array interface specification: http://numpy.scipy.org/array_interface.shtml I was interested in the 't' (bitfield) type - is there an example of usage somewhere? No, It's not implemented in NumPy. It's just part of the array interface

Re: [Numpy-discussion] Question about recarray

2006-09-21 Thread Travis Oliphant
Lionel Roubeyrie wrote: find any solution for that. I have tried with arrays of dtype=object, but I have problem when I want to compute min, max, ... with an error like: TypeError: function not supported for these types, and can't coerce safely to supported types. I just added support

Re: [Numpy-discussion] Tests and code documentation

2006-09-21 Thread Charles R Harris
Hi, On 9/21/06, Robert Kern [EMAIL PROTECTED] wrote: Steve Lianoglou wrote: So .. I guess I'm wondering why we want to break from the standard?We don't as far as Python code goes. The code that Chuck added Doxygen-stylecomments to was C code. I presume he was simply answering Sebastian's question

Re: [Numpy-discussion] please change mean to use dtype=float

2006-09-21 Thread David M. Cooke
On Thu, 21 Sep 2006 11:34:42 -0700 Tim Hochberg [EMAIL PROTECTED] wrote: Tim Hochberg wrote: Robert Kern wrote: David M. Cooke wrote: On Wed, Sep 20, 2006 at 03:01:18AM -0500, Robert Kern wrote: Let me offer a third path: the algorithms used for .mean()

Re: [Numpy-discussion] please change mean to use dtype=float

2006-09-21 Thread Travis Oliphant
David M. Cooke wrote: Conclusions: - If you're going to calculate everything in single precision, use Kahan summation. Using it in double-precision also helps. - If you can use a double-precision accumulator, it's much better than any of the techniques in single-precision only. - for

Re: [Numpy-discussion] immutable arrays

2006-09-21 Thread Martin Wiechert
On Thursday 21 September 2006 18:24, Travis Oliphant wrote: Martin Wiechert wrote: Thanks Travis. Do I understand correctly that the only way to be really safe is to make a copy and not to export a reference to it? Because anybody having a reference to the owner of the data can override

Re: [Numpy-discussion] please change mean to use dtype=float

2006-09-21 Thread Tim Hochberg
David M. Cooke wrote: On Thu, 21 Sep 2006 11:34:42 -0700 Tim Hochberg [EMAIL PROTECTED] wrote: Tim Hochberg wrote: Robert Kern wrote: David M. Cooke wrote: On Wed, Sep 20, 2006 at 03:01:18AM -0500, Robert Kern wrote: Let

[Numpy-discussion] numpy 1.0rc1 bdist_rpm fails

2006-09-21 Thread Christian Kristukat
Hi, on linux I get an error when trying to build a rpm package from numpy 1.0rc1: building extension numpy.core.umath sources adding 'build/src.linux-i686-2.4/numpy/core/config.h' to sources. executing numpy/core/code_generators/generate_ufunc_api.py adding

Re: [Numpy-discussion] please change mean to use dtype=float

2006-09-21 Thread Sebastian Haase
On Thursday 21 September 2006 15:28, Tim Hochberg wrote: David M. Cooke wrote: On Thu, 21 Sep 2006 11:34:42 -0700 Tim Hochberg [EMAIL PROTECTED] wrote: Tim Hochberg wrote: Robert Kern wrote: David M. Cooke wrote: On Wed, Sep 20, 2006 at 03:01:18AM -0500, Robert Kern wrote: Let me

Re: [Numpy-discussion] change of default dtype

2006-09-21 Thread David Grant
On 9/20/06, Bill Baxter [EMAIL PROTECTED] wrote: Hey Andrew, point taken, but I think it would be better if someone whoactually knows the full extent of the change made the edit.I knowzeros and ones changed.Did anything else?Anyway, I'm surprised the release notes page is publicly editable. I'm

[Numpy-discussion] matrixmultiply moved (release notes?)

2006-09-21 Thread Bill Baxter
Apparently numpy.matrixmultiply got moved into numpy.oldnumeric.matrixmultiply at some point (or rather ceased to be imported into the numpy namespace). Is there any list of all such methods that got banished? This would be nice to have in the release notes. --bb

[Numpy-discussion] take behaviour has changed

2006-09-21 Thread Christian Kristukat
Hi, from 1.0b1 to 1.0rc1 the default behaviour of take seems to have changed when omitting the axis argument: In [13]: a = reshape(arange(12),(3,4)) In [14]: take(a,[2,3]) Out[14]: array([2, 3]) In [15]: take(a,[2,3],1) Out[15]: array([[ 2, 3], [ 6, 7], [10, 11]]) Is this

[Numpy-discussion] general version of repmat?

2006-09-21 Thread Bill Baxter
Is there some way to get the equivalent of repmat() for ndim == 1 and ndim 2. For ndim == 1, repmat always returns a 2-d array, instead of remaining 1-d. For ndim 2, repmat just doesn't work. Maybe we could add a 'reparray', with the signature: reparray(A, repeats, axis=None) where repeats is

Re: [Numpy-discussion] take behaviour has changed

2006-09-21 Thread Christian Kristukat
Bill Baxter wbaxter at gmail.com writes: Yep, check the release notes: http://www.scipy.org/ReleaseNotes/NumPy_1.0 search for 'take' on that page to find out what others have changed as well. --bb Ok. Does axis=None then mean, that take(a, ind) operates on the flattened array? This it at

[Numpy-discussion] Putmask/take ?

2006-09-21 Thread PGM
Folks, I'm running into the following problem with putmask on take. import numpy x = N.arange(12.) m = [1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1] i = N.nonzero(m)[0] w = N.array([-1, -2, -3, -4.]) x.putmask(w,m) x.take(i) N.allclose(x.take(i),w) False I'm wondering ifit is intentional, or

Re: [Numpy-discussion] 1.0rc1 doesn't seem to work on AMD64

2006-09-21 Thread Peter Bienstman
Cleaning out and rebuilding did the trick! Thanks, Peter On Thursday 21 September 2006 18:33, [EMAIL PROTECTED] wrote: Subject: Re: [Numpy-discussion] 1.0rc1 doesn't seem to work on AMD64 snip I don't see this running the latest from svn on AMD64 here. Not sayin' there might not be a