Re: [Numpy-discussion] Closing some tickets.

2008-05-21 Thread Matthieu Brucher
Hi, Is there an official support for MSVC 2005 ? Last time I tried to compile Python with it, it couldn't build extension. If MSVC 2005 is not officially supported, at least by Python itself, I'm not sure Numpy can. Matthieu 2008/5/22 Charles R Harris <[EMAIL PROTECTED]>: > All, > > Can we clos

Re: [Numpy-discussion] Fix to #789 maybe not right.

2008-05-21 Thread Travis E. Oliphant
Charles R Harris wrote: > > I agree with all that, which is why I'm not advocating a change. But > it does raise the bar for working with the C code and I think the > current case is an example of that. > Yes it does. I also agree that reference counting is the hardest part of coding with the

Re: [Numpy-discussion] Fix to #789 maybe not right.

2008-05-21 Thread Charles R Harris
On Wed, May 21, 2008 at 10:55 PM, Travis E. Oliphant <[EMAIL PROTECTED]> wrote: > Charles R Harris wrote: > > > > > > On Wed, May 21, 2008 at 9:32 PM, Travis E. Oliphant > > <[EMAIL PROTECTED] > wrote: > > > > Charles R Harris wrote: > > > Really, all the incremen

Re: [Numpy-discussion] Fix to #789 maybe not right.

2008-05-21 Thread Travis E. Oliphant
Charles R Harris wrote: > > > On Wed, May 21, 2008 at 9:32 PM, Travis E. Oliphant > <[EMAIL PROTECTED] > wrote: > > Charles R Harris wrote: > > Really, all the increments and decrements should be inside > > PyArray_FromArray, but calls to this function are sca

Re: [Numpy-discussion] Closing some tickets.

2008-05-21 Thread Robert Kern
On Wed, May 21, 2008 at 11:42 PM, Charles R Harris <[EMAIL PROTECTED]> wrote: > All, > > Can we close ticket #117 and add Pearu's comment to the FAQ? > http://projects.scipy.org/scipy/numpy/ticket/117 Yes. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless eni

[Numpy-discussion] Closing some tickets.

2008-05-21 Thread Charles R Harris
All, Can we close ticket #117 and add Pearu's comment to the FAQ? http://projects.scipy.org/scipy/numpy/ticket/117 Can someone with MSVC 2005 check if we can close ticket #164? http://projects.scipy.org/scipy/numpy/ticket/164 Chuck ___ Numpy-discussio

Re: [Numpy-discussion] Fix to #789 maybe not right.

2008-05-21 Thread Charles R Harris
On Wed, May 21, 2008 at 8:56 PM, David Cournapeau < [EMAIL PROTECTED]> wrote: > Charles R Harris wrote: > > David, > > > > I'm not sure that fix is completely correct. The out keyword is funny > > and I'm not what the specs are supposed to be, but generally the > > output is cast rather than an er

Re: [Numpy-discussion] Fix to #789 maybe not right.

2008-05-21 Thread David Cournapeau
David Cournapeau wrote: > > Thanks for the clarification. I fixed the code accordingly, > Ok, you beat me :) cheers, David ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Fix to #789 maybe not right.

2008-05-21 Thread David Cournapeau
Travis E. Oliphant wrote: > No, that's not right. The reference is stolen if it fails as well. > This is true of all descriptor data-types. Perhaps it is weird, but it > was a lot easier to retro-fit Numeric PyArray_Descr as a Python object > that way. > Thanks for the clarification. I

Re: [Numpy-discussion] Fix to #789 maybe not right.

2008-05-21 Thread Charles R Harris
On Wed, May 21, 2008 at 9:32 PM, Travis E. Oliphant <[EMAIL PROTECTED]> wrote: > Charles R Harris wrote: > > Really, all the increments and decrements should be inside > > PyArray_FromArray, but calls to this function are scattered all over. > I don't understand what you mean by this statement.

Re: [Numpy-discussion] Fix to #789 maybe not right.

2008-05-21 Thread Travis E. Oliphant
Charles R Harris wrote: > Really, all the increments and decrements should be inside > PyArray_FromArray, but calls to this function are scattered all over. I don't understand what you mean by this statement.All functions that return an object and take a PyArray_Descr object steal a reference

Re: [Numpy-discussion] Fix to #789 maybe not right.

2008-05-21 Thread Charles R Harris
On Wed, May 21, 2008 at 9:03 PM, David Cournapeau < [EMAIL PROTECTED]> wrote: > Charles R Harris wrote: > > > > > > And I'm not sure self->desc needs its reference count decremented, > > PyArray_FromArray is one of those vicious, nasty functions with side > > effects and might decrement the count

Re: [Numpy-discussion] Fix to #789 maybe not right.

2008-05-21 Thread Travis E. Oliphant
David Cournapeau wrote: > Charles R Harris wrote: > >> And I'm not sure self->desc needs its reference count decremented, >> PyArray_FromArray is one of those vicious, nasty functions with side >> effects and might decrement the count itself. >> > > might ? What do you mean by might decre

Re: [Numpy-discussion] Fix to #789 maybe not right.

2008-05-21 Thread David Cournapeau
Charles R Harris wrote: > > > And I'm not sure self->desc needs its reference count decremented, > PyArray_FromArray is one of those vicious, nasty functions with side > effects and might decrement the count itself. might ? What do you mean by might decrement ? If the call to PyAarray_FromArray

Re: [Numpy-discussion] Fix to #789 maybe not right.

2008-05-21 Thread David Cournapeau
Charles R Harris wrote: > David, > > I'm not sure that fix is completely correct. The out keyword is funny > and I'm not what the specs are supposed to be, but generally the > output is cast rather than an error raised. I think the out argument is one of this thing which is rather a mess right

Re: [Numpy-discussion] Fix to #789 maybe not right.

2008-05-21 Thread Charles R Harris
On Wed, May 21, 2008 at 8:48 PM, Charles R Harris <[EMAIL PROTECTED]> wrote: > David, > > I'm not sure that fix is completely correct. The out keyword is funny and > I'm not what the specs are supposed to be, but generally the output is cast > rather than an error raised. We need an official spec

[Numpy-discussion] Fix to #789 maybe not right.

2008-05-21 Thread Charles R Harris
David, I'm not sure that fix is completely correct. The out keyword is funny and I'm not what the specs are supposed to be, but generally the output is cast rather than an error raised. We need an official spec here because the documentation of this feature is essentially random. Note that the sha

Re: [Numpy-discussion] 1.1.0rc1 RuntimeErrors

2008-05-21 Thread Robert Kern
On Wed, May 21, 2008 at 7:23 PM, Pierre GM <[EMAIL PROTECTED]> wrote: > >> Should we disable the warning for the tests? It's a bit unnerving and >> likely to generate mail calling attention to it. > > I don't have a problem with that. Is there some kind of trapping mechanism we > can use ? You can

Re: [Numpy-discussion] 1.1.0rc1 RuntimeErrors

2008-05-21 Thread Pierre GM
> Should we disable the warning for the tests? It's a bit unnerving and > likely to generate mail calling attention to it. I don't have a problem with that. Is there some kind of trapping mechanism we can use ? A la "fail_unless_raise" ? ___ Numpy-disc

Re: [Numpy-discussion] 1.1.0rc1 RuntimeErrors

2008-05-21 Thread Jarrod Millman
On Wed, May 21, 2008 at 5:12 PM, Charles R Harris <[EMAIL PROTECTED]> wrote: > Should we disable the warning for the tests? It's a bit unnerving and likely > to generate mail calling attention to it. +1 I tend to agree that it is disconcerting to have warnings pop up in the tests. -- Jarrod Millm

Re: [Numpy-discussion] 1.1.0rc1 RuntimeErrors

2008-05-21 Thread Robert Kern
On Wed, May 21, 2008 at 7:12 PM, Charles R Harris <[EMAIL PROTECTED]> wrote: > Should we disable the warning for the tests? It's a bit unnerving and likely > to generate mail calling attention to it. Yes. Known warnings should be explicitly silenced in tests. -- Robert Kern "I have come to beli

Re: [Numpy-discussion] 1.1.0rc1 RuntimeErrors

2008-05-21 Thread Charles R Harris
On Wed, May 21, 2008 at 5:56 PM, Pierre GM <[EMAIL PROTECTED]> wrote: > On Wednesday 21 May 2008 17:57:30 Charles R Harris wrote: > > On Wed, May 21, 2008 at 3:10 PM, Charles R Harris > > <[EMAIL PROTECTED]> > > > > wrote: > > > On Wed, May 21, 2008 at 2:39 PM, Charles R Harris < > > > > > > [EMAI

Re: [Numpy-discussion] 1.1.0rc1 RuntimeErrors

2008-05-21 Thread Pierre GM
On Wednesday 21 May 2008 17:57:30 Charles R Harris wrote: > On Wed, May 21, 2008 at 3:10 PM, Charles R Harris > <[EMAIL PROTECTED]> > > wrote: > > On Wed, May 21, 2008 at 2:39 PM, Charles R Harris < > > > > [EMAIL PROTECTED]> wrote: > >> On Wed, May 21, 2008 at 10:07 AM, Alan McIntyre > >> <[EMAIL

Re: [Numpy-discussion] 1.1.0rc1 OSX Installer - please test

2008-05-21 Thread Thomas Hrabe
iBook G4 osX 10.5.2 hope this helps! Numpy is installed in /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy Numpy version 1.1.0rc1 Python version 2.5.2 (r252:60911, Feb 22 2008, 07:57:53) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] Found 18/18 tests for nu

Re: [Numpy-discussion] PY_ARRAY_UNIQUE_SYMBOL

2008-05-21 Thread Bill Spotz
On May 21, 2008, at 5:15 PM, Robert Kern wrote: > On Wed, May 21, 2008 at 3:34 PM, Bill Spotz <[EMAIL PROTECTED]> > wrote: >> I am running into a problem with a numpy-compatible extension module >> that I develop, and I believe it has to do with >> PY_ARRAY_UNIQUE_SYMBOL. >> >> I set PY_ARRAY_

Re: [Numpy-discussion] matrices and __radd__

2008-05-21 Thread Keith Goodman
On Wed, May 21, 2008 at 4:07 PM, Robert Kern <[EMAIL PROTECTED]> wrote: > On Wed, May 21, 2008 at 5:28 PM, Keith Goodman <[EMAIL PROTECTED]> wrote: >> I have a class that stores some of its data in a matrix. I can't >> figure out how to do right adds with a matrix. Here's a toy example: >> >> class

Re: [Numpy-discussion] PY_ARRAY_UNIQUE_SYMBOL

2008-05-21 Thread Robert Kern
On Wed, May 21, 2008 at 3:34 PM, Bill Spotz <[EMAIL PROTECTED]> wrote: > I am running into a problem with a numpy-compatible extension module > that I develop, and I believe it has to do with PY_ARRAY_UNIQUE_SYMBOL. > > I set PY_ARRAY_UNIQUE_SYMBOL to "PyTrilinos". Why? My understanding is also li

Re: [Numpy-discussion] matrices and __radd__

2008-05-21 Thread Robert Kern
On Wed, May 21, 2008 at 5:28 PM, Keith Goodman <[EMAIL PROTECTED]> wrote: > I have a class that stores some of its data in a matrix. I can't > figure out how to do right adds with a matrix. Here's a toy example: > > class Myclass(object): > >def __init__(self, x, a): >self.x = x # nump

Re: [Numpy-discussion] Shouldn't test(all=1) be the default?

2008-05-21 Thread Robert Kern
On Wed, May 21, 2008 at 5:49 PM, Charles R Harris <[EMAIL PROTECTED]> wrote: > Several problems would have been caught early on if test(all=1) had been the > default. Is there a reason it is not so? This dates back a long ways. Presumably, important tests were to be associated with module names, a

[Numpy-discussion] One remaining problem in tests of masked arrays.

2008-05-21 Thread Charles R Harris
The recent fixes have removed almost all the problems that were exposed by running test(all=True). There remains just this warning: /usr/lib/python2.5/site-packages/numpy/ma/core.py:1357: UserWarning: MaskedArray.__setitem__ on fields: The mask is NOT affected! warnings.warn("MaskedArray.__setit

[Numpy-discussion] Shouldn't test(all=1) be the default?

2008-05-21 Thread Charles R Harris
Several problems would have been caught early on if test(all=1) had been the default. Is there a reason it is not so? Chuck ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] matrices and __radd__

2008-05-21 Thread Keith Goodman
I have a class that stores some of its data in a matrix. I can't figure out how to do right adds with a matrix. Here's a toy example: class Myclass(object): def __init__(self, x, a): self.x = x # numpy matrix self.a = a # some attribute, say, an integer def __add__(self

Re: [Numpy-discussion] 1.1.0rc1 RuntimeErrors

2008-05-21 Thread Charles R Harris
On Wed, May 21, 2008 at 3:10 PM, Charles R Harris <[EMAIL PROTECTED]> wrote: > > > On Wed, May 21, 2008 at 2:39 PM, Charles R Harris < > [EMAIL PROTECTED]> wrote: > >> >> >> On Wed, May 21, 2008 at 10:07 AM, Alan McIntyre <[EMAIL PROTECTED]> >> wrote: >> >>> On Wed, May 21, 2008 at 11:56 AM, Pierr

Re: [Numpy-discussion] Outputting arrays.

2008-05-21 Thread Matt Knox
> 1. Is there a module or other code to write arrays to databases (they want access databases)? There are three python odbc modules (mxODBC, ceODBC, pyodbc), all of which should allow you to connect to access databases. I've played around with all three and my personal favourite is ceODBC (which i

Re: [Numpy-discussion] NumPy Documentation Marathon progress

2008-05-21 Thread Travis E. Oliphant
Stéfan van der Walt wrote: > Hi all, > > I'd like to thank everyone who has responded so positively to the > NumPy Documentation Marathon. We now have more than 10 contributors > enlisted, including (in order of signing up): > > - Pauli Virtanen > - Emmanuelle Gouillart > - Joe Harrington > - Joha

Re: [Numpy-discussion] 1.1.0rc1 RuntimeErrors

2008-05-21 Thread Charles R Harris
On Wed, May 21, 2008 at 2:39 PM, Charles R Harris <[EMAIL PROTECTED]> wrote: > > > On Wed, May 21, 2008 at 10:07 AM, Alan McIntyre <[EMAIL PROTECTED]> > wrote: > >> On Wed, May 21, 2008 at 11:56 AM, Pierre GM <[EMAIL PROTECTED]> wrote: >> > On Wednesday 21 May 2008 11:39:32 Alan McIntyre wrote: >>

Re: [Numpy-discussion] 1.1.0rc1 RuntimeErrors

2008-05-21 Thread Charles R Harris
On Wed, May 21, 2008 at 10:07 AM, Alan McIntyre <[EMAIL PROTECTED]> wrote: > On Wed, May 21, 2008 at 11:56 AM, Pierre GM <[EMAIL PROTECTED]> wrote: > > On Wednesday 21 May 2008 11:39:32 Alan McIntyre wrote: > >> There's some commentary and a patch on NumPy ticket 793 on this issue: > >> > >> http:

[Numpy-discussion] PY_ARRAY_UNIQUE_SYMBOL

2008-05-21 Thread Bill Spotz
I am running into a problem with a numpy-compatible extension module that I develop, and I believe it has to do with PY_ARRAY_UNIQUE_SYMBOL. I set PY_ARRAY_UNIQUE_SYMBOL to "PyTrilinos". On my machine (Mac OS X), the module loads and works properly. Another user, however (on Ubuntu), gets

Re: [Numpy-discussion] Ticket #798: `piecewise` exposes raw memory

2008-05-21 Thread Ondrej Certik
On Wed, May 21, 2008 at 11:53 AM, Ondrej Certik <[EMAIL PROTECTED]> wrote: > On Wed, May 21, 2008 at 11:30 AM, Stéfan van der Walt <[EMAIL PROTECTED]> > wrote: >> Referring to >> http://scipy.org/scipy/numpy/ticket/798 >> >> `piecewise` uses `empty` to allocate output memory. If the conditions >>

Re: [Numpy-discussion] Outputting arrays.

2008-05-21 Thread Alan G Isaac
On Wed, 21 May 2008, Alexandra Geddes apparently wrote: > 2. How can i write 2D arrays to textfiles with labels on the rows and > columns? http://code.google.com/p/econpy/source/browse/trunk/utilities/text.py hth, Alan Isaac ___ Numpy-discussion ma

Re: [Numpy-discussion] 1.1.0rc1 OSX Installer - please test

2008-05-21 Thread Christopher Burns
You're right, I'll put out a new rc. Sorry, I didn't see the other emails this morning and assumed the only errors were the endian issues in the test code. Apparently these are still an issue though, so I'll look into that. Chris On Wed, May 21, 2008 at 12:21 PM, Christopher Barker <[EMAIL PRO

Re: [Numpy-discussion] ANN: NumPy/SciPy Documentation Marathon 2008

2008-05-21 Thread Stéfan van der Walt
Hi LB 2008/5/21 LB <[EMAIL PROTECTED]>: > This is really a great news, and it seems very promising according to > the first pages of the Wiki that I've seen. > > It's perhaps not the right place to say this, but I was wondering what > you would thinking about adding labels or category to the descr

[Numpy-discussion] NumPy Documentation Marathon progress

2008-05-21 Thread Stéfan van der Walt
Hi all, I'd like to thank everyone who has responded so positively to the NumPy Documentation Marathon. We now have more than 10 contributors enlisted, including (in order of signing up): - Pauli Virtanen - Emmanuelle Gouillart - Joe Harrington - Johann Cohen-Tanugi - Alan Jackson - Tim Cera - A

Re: [Numpy-discussion] ANN: NumPy/SciPy Documentation Marathon 2008

2008-05-21 Thread Anne Archibald
2008/5/21 LB <[EMAIL PROTECTED]>: > This is really a great news, and it seems very promising according to > the first pages of the Wiki that I've seen. > > It's perhaps not the right place to say this, but I was wondering what > you would thinking about adding labels or category to the descriptions

Re: [Numpy-discussion] scipy dependency in numpy?

2008-05-21 Thread Jarrod Millman
On Wed, May 21, 2008 at 12:03 PM, Charles R Harris <[EMAIL PROTECTED]> wrote: > And why this in ma/tests/test_core.py > > set_local_path() > from test_old_ma import * > restore_path() > > and test_core then proceeds to shadow all the test classes in test_old_ma. > That's just silly. Let's just lea

Re: [Numpy-discussion] Outputting arrays.

2008-05-21 Thread Timothy Hochberg
On Wed, May 21, 2008 at 12:32 AM, Alexandra Geddes <[EMAIL PROTECTED]> wrote: > Hi. > > 1. Is there a module or other code to write arrays to databases (they want > access databases)? If you have $$, I think you can use mxODBC. Otherwise, I believe that you have to use COM as Chris suggested. >

Re: [Numpy-discussion] ANN: NumPy/SciPy Documentation Marathon 2008

2008-05-21 Thread LB
This is really a great news, and it seems very promising according to the first pages of the Wiki that I've seen. It's perhaps not the right place to say this, but I was wondering what you would thinking about adding labels or category to the descriptions of each function ? I think It would really

Re: [Numpy-discussion] scipy dependency in numpy?

2008-05-21 Thread Robert Kern
On Wed, May 21, 2008 at 1:38 PM, Charles R Harris <[EMAIL PROTECTED]> wrote: > OK, I had to delete numpy from the site-packages and reinstall. Can we make > the install do this? Otherwise we will end up with bogus error reports. That's not really feasible in distutils, no. -- Robert Kern "I hav

Re: [Numpy-discussion] Outputting arrays.

2008-05-21 Thread Christopher Barker
Alexandra Geddes wrote: > 1. Is there a module or other code to write arrays to databases (they want > access databases)? I don't think there is any way to write an access database file from Python except using com on Windows. > 2. How can i write 2D arrays to textfiles with labels on the rows

Re: [Numpy-discussion] 1.1.0rc1 OSX Installer - please test

2008-05-21 Thread Christopher Barker
Christopher Burns wrote: > Nope. I figured that would be included in the 1.1.1 release. It seems a few bugs have been found and fixed. It would be nice to put out another release candidate with those fixes at some point. Anyway: OS-X 10.4.11 Dual g5 PPC: FAILED (failures=3, errors=12) I thin

Re: [Numpy-discussion] 1.1.0rc1 OSX Installer - please test

2008-05-21 Thread Christopher Burns
On Wed, May 21, 2008 at 10:44 AM, Christopher Barker <[EMAIL PROTECTED]> wrote: > Has there been a new build since the endian bug in the tests was fixed? > > -Chris Nope. I figured that would be included in the 1.1.1 release. -- Christopher Burns Computational Infrastructure for Research Labs

Re: [Numpy-discussion] scipy dependency in numpy?

2008-05-21 Thread Charles R Harris
On Wed, May 21, 2008 at 12:37 PM, Pierre GM <[EMAIL PROTECTED]> wrote: > On Wednesday 21 May 2008 14:28:34 Charles R Harris wrote: > > On Wed, May 21, 2008 at 11:51 AM, Robert Kern <[EMAIL PROTECTED]> > wrote: > > > On Wed, May 21, 2008 at 12:49 PM, Charles R Harris > > > > > > <[EMAIL PROTECTED]>

Re: [Numpy-discussion] first recarray steps

2008-05-21 Thread Anne Archibald
2008/5/21 Vincent Schut <[EMAIL PROTECTED]>: > Christopher Barker wrote: >> >> Also, if you image data is rgb, usually, that's a (width, height, 3) >> array: rgbrgbrgbrgb... in memory. If you have a (3, width, height) >> array, then that's rrr... Some image libs >> may g

Re: [Numpy-discussion] scipy dependency in numpy?

2008-05-21 Thread Pierre GM
On Wednesday 21 May 2008 14:28:34 Charles R Harris wrote: > On Wed, May 21, 2008 at 11:51 AM, Robert Kern <[EMAIL PROTECTED]> wrote: > > On Wed, May 21, 2008 at 12:49 PM, Charles R Harris > > > > <[EMAIL PROTECTED]> wrote: > > > Failed importing > > > /usr/lib/python2.5/site-packages/numpy/ma/tests

Re: [Numpy-discussion] scipy dependency in numpy?

2008-05-21 Thread Charles R Harris
On Wed, May 21, 2008 at 12:28 PM, Charles R Harris < [EMAIL PROTECTED]> wrote: > > > On Wed, May 21, 2008 at 11:51 AM, Robert Kern <[EMAIL PROTECTED]> > wrote: > >> On Wed, May 21, 2008 at 12:49 PM, Charles R Harris >> <[EMAIL PROTECTED]> wrote: >> > Failed importing >> > /usr/lib/python2.5/site-p

Re: [Numpy-discussion] scipy dependency in numpy?

2008-05-21 Thread Jarrod Millman
On Wed, May 21, 2008 at 11:28 AM, Charles R Harris <[EMAIL PROTECTED]> wrote: > Not in 1.1.0.dev5211, which is the latest. It isn't in the trunk. Maybe you have the old file still installed. Please try removing the installed files and reinstall. Thanks, -- Jarrod Millman Computational Infrastr

Re: [Numpy-discussion] scipy dependency in numpy?

2008-05-21 Thread Charles R Harris
On Wed, May 21, 2008 at 11:51 AM, Robert Kern <[EMAIL PROTECTED]> wrote: > On Wed, May 21, 2008 at 12:49 PM, Charles R Harris > <[EMAIL PROTECTED]> wrote: > > Failed importing > > /usr/lib/python2.5/site-packages/numpy/ma/tests/test_morestats.py: No > module > > named scipy.stats.distributions. >

Re: [Numpy-discussion] Quick Question about Optimization

2008-05-21 Thread Christopher Barker
James Snyder wrote: > b = np.zeros((1,30)) # allocates new memory and disconnects the view This is really about how python works, not how numpy works: np.zeros() -- creates a new array with all zeros in it -- that's the whole point. b = Something -- binds the name "b" to the Something object. N

Re: [Numpy-discussion] scipy dependency in numpy?

2008-05-21 Thread Robert Kern
On Wed, May 21, 2008 at 12:49 PM, Charles R Harris <[EMAIL PROTECTED]> wrote: > Failed importing > /usr/lib/python2.5/site-packages/numpy/ma/tests/test_morestats.py: No module > named scipy.stats.distributions. This has been removed in SVN. -- Robert Kern "I have come to believe that the whole

[Numpy-discussion] scipy dependency in numpy?

2008-05-21 Thread Charles R Harris
Failed importing /usr/lib/python2.5/site-packages/numpy/ma/tests/test_morestats.py: No module named scipy.stats.distributions. Chuck ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] 1.1.0rc1 OSX Installer - please test

2008-05-21 Thread Christopher Barker
Jarrod Millman wrote: >> please test it from: >> >> https://cirl.berkeley.edu/numpy/numpy-1.1.0rc1-py2.5-macosx10.5.dmg > Please test the Mac binaries. I can't tag the release until I know > that our binary installers work on a wide variety of Mac machines. Has there been a new build since the en

Re: [Numpy-discussion] ANN: NumPy/SciPy Documentation Marathon 2008

2008-05-21 Thread Robert Kern
On Wed, May 21, 2008 at 3:26 AM, Rob Hetland <[EMAIL PROTECTED]> wrote: > > On May 21, 2008, at 9:40 AM, Robert Kern wrote: > >> But please, let's not rehash discussions which have already happened >> (like this one). > > I didn't mean to suggest rehashing the documentation format. I agree > that

Re: [Numpy-discussion] ANN: NumPy/SciPy Documentation Marathon 2008

2008-05-21 Thread Bruce Southey
Stéfan van der Walt wrote: > Hi Bruce > > 2008/5/21 Bruce Southey <[EMAIL PROTECTED]>: > >> I would like to throw out the following idea with no obligations: >> IF people have the time and energy while writing the documentation, can >> they also test that the function is doing what it is expecte

Re: [Numpy-discussion] 1.1.0rc1 RuntimeErrors

2008-05-21 Thread Alan McIntyre
On Wed, May 21, 2008 at 11:56 AM, Pierre GM <[EMAIL PROTECTED]> wrote: > On Wednesday 21 May 2008 11:39:32 Alan McIntyre wrote: >> There's some commentary and a patch on NumPy ticket 793 on this issue: >> >> http://scipy.org/scipy/numpy/ticket/793 > > OK, thanks a lot ! That's a C problem, then...

Re: [Numpy-discussion] 1.1.0rc1 RuntimeErrors

2008-05-21 Thread Pierre GM
On Wednesday 21 May 2008 11:39:32 Alan McIntyre wrote: > There's some commentary and a patch on NumPy ticket 793 on this issue: > > http://scipy.org/scipy/numpy/ticket/793 OK, thanks a lot ! That's a C problem, then... ___ Numpy-discussion mailing list N

Re: [Numpy-discussion] 1.1.0rc1 RuntimeErrors

2008-05-21 Thread Alan McIntyre
On Wed, May 21, 2008 at 11:35 AM, Charles R Harris <[EMAIL PROTECTED]> wrote: > On Wed, May 21, 2008 at 9:28 AM, Pierre GM <[EMAIL PROTECTED]> wrote: >> The problem looks quite recent, and not related to numpy.ma itself: what >> changed recently in the .tolist() method of ndarrays ? Why do we get t

Re: [Numpy-discussion] 1.1.0rc1 RuntimeErrors

2008-05-21 Thread Charles R Harris
On Wed, May 21, 2008 at 9:28 AM, Pierre GM <[EMAIL PROTECTED]> wrote: > All, > Most of the errors that are reported in 1.1.0rc1 are related to the > .tolist() > method in numpy.ma, such as : > > ERROR: Tests fields retrieval > --

[Numpy-discussion] 1.1.0rc1 RuntimeErrors

2008-05-21 Thread Pierre GM
All, Most of the errors that are reported in 1.1.0rc1 are related to the .tolist() method in numpy.ma, such as : ERROR: Tests fields retrieval -- Traceback (most recent call last):    File "C:\Apps\Py

Re: [Numpy-discussion] URGENT: Re: 1.1.0rc1, Win32 Installer: please test it

2008-05-21 Thread Paul Moore
Jarrod Millman wrote: > Please test the Windows binaries. So far I have only seen two > testers. I can't tag the release until I know that our binary > installers work on a wide variety of Windows machines. For what it's worth, I got this: System information for \\GANDALF: Uptime:

Re: [Numpy-discussion] URGENT: Re: 1.1.0rc1, Mac Installer: please test it

2008-05-21 Thread George Nurser
2008/5/21 Pierre GM <[EMAIL PROTECTED]>: > Mmh, wait a minute: > * There shouldn't be any mstats.py nor morestats.py in numpy.ma any longer: I > moved the packages to scipy.stats along their respective unittests. Right. I hadn't deleted the previous /Library/Frameworks/Python.framework/Versions/2.

[Numpy-discussion] [Fwd: Re: [NumPy] #770: numpy.core.tests.test_multiarray.TestView failures on big-endian machines]

2008-05-21 Thread Christopher Hanley
Just forwarding this to the main list since the Trac mailer still seems to be broken. Chris -- Christopher Hanley Systems Software Engineer Space Telescope Science Institute 3700 San Martin Drive Baltimore MD, 21218 (410) 338-4338 --- Begin Message --- #770: numpy.core.tests.test_multiarray.Tes

Re: [Numpy-discussion] distance_matrix: how to speed up?

2008-05-21 Thread Emanuele Olivetti
Rob Hetland wrote: > I think you want something like this: > > x1 = x1 * weights[np.newaxis,:] > x2 = x2 * weights[np.newaxis,:] > > x1 = x1[np.newaxis, :, :] > x2 = x2[:, np.newaxis, :] > distance = np.sqrt( ((x1 - x2)**2).sum(axis=-1) ) > > x1 and x2 are arrays with size of (npoints, ndimensions)

Re: [Numpy-discussion] ANN: NumPy/SciPy Documentation Marathon 2008

2008-05-21 Thread Stéfan van der Walt
Hi Bruce 2008/5/21 Bruce Southey <[EMAIL PROTECTED]>: > I would like to throw out the following idea with no obligations: > IF people have the time and energy while writing the documentation, can > they also test that the function is doing what it is expected? > Also related to this is developing

Re: [Numpy-discussion] URGENT: Re: 1.1.0rc1, Mac Installer: please test it

2008-05-21 Thread Pierre GM
Mmh, wait a minute: * There shouldn't be any mstats.py nor morestats.py in numpy.ma any longer: I moved the packages to scipy.stats along their respective unittests. * The corresponding tests work fine on my machine... * The RuntimeError that shows up w/ mrecords is a recent problem, not related

Re: [Numpy-discussion] URGENT: Re: 1.1.0rc1, Mac Installer: please test it

2008-05-21 Thread George Nurser
Hmm. I also get some problems with test(all=True) 2 failures (though they look spurious to me) + 18 errors. Intel MBP, 10.5.2, macPython 2.5.2, apple gcc 4.0.1 George Nurser. >>> numpy.test(all=True) Numpy is installed in /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packag

Re: [Numpy-discussion] ANN: NumPy/SciPy Documentation Marathon 2008

2008-05-21 Thread Bruce Southey
Hi, I would like to throw out the following idea with no obligations: IF people have the time and energy while writing the documentation, can they also test that the function is doing what it is expected? Also related to this is developing appropriate tests if these are not covered or at least pr

Re: [Numpy-discussion] distance_matrix: how to speed up?

2008-05-21 Thread Emanuele Olivetti
Matthieu Brucher wrote: > Hi, > > Bill Baxter proposed a version of this problem some months ago on this > ML. I use it regularly and it is fast enough for me. > Excellent. Exactly what I was looking for. Thanks, Emanuele ___ Numpy-discussion mailing

Re: [Numpy-discussion] URGENT: Re: 1.1.0rc1, Mac Installer: please test it

2008-05-21 Thread Tommy Grav
Doing the same on a the Mac installer also returns 3 failures and 12 errors with all=True. Installer works fine though :) [skathi:~] tgrav% python ActivePython 2.5.1.1 (ActiveState Software Inc.) based on Python 2.5.1 (r251:54863, May 1 2007, 17:40:00) [GCC 4.0.1 (Apple Computer, Inc. build 525

Re: [Numpy-discussion] distance_matrix: how to speed up?

2008-05-21 Thread Rob Hetland
I think you want something like this: x1 = x1 * weights[np.newaxis,:] x2 = x2 * weights[np.newaxis,:] x1 = x1[np.newaxis, :, :] x2 = x2[:, np.newaxis, :] distance = np.sqrt( ((x1 - x2)**2).sum(axis=-1) ) x1 and x2 are arrays with size of (npoints, ndimensions), and npoints can be different fo

Re: [Numpy-discussion] distance_matrix: how to speed up?

2008-05-21 Thread Matthieu Brucher
Hi, Bill Baxter proposed a version of this problem some months ago on this ML. I use it regularly and it is fast enough for me. Matthieu 2008/5/21 Emanuele Olivetti <[EMAIL PROTECTED]>: > Dear all, > > I need to speed up this function (a little example follows): > -- > import numpy as N > d

[Numpy-discussion] distance_matrix: how to speed up?

2008-05-21 Thread Emanuele Olivetti
Dear all, I need to speed up this function (a little example follows): -- import numpy as N def distance_matrix(data1,data2,weights): rows = data1.shape[0] columns = data2.shape[0] dm = N.zeros((rows,columns)) for i in range(rows): for j in range(columns): d

Re: [Numpy-discussion] 1.1.0rc1, Win32 Installer: please test it (test errors)

2008-05-21 Thread Matt Knox
> installed fine and all tests ran successfully on my machine. I spoke too soon. I didn't know about the "all" parameter in numpy.test and just ran if with the default before. When I specify all=True, I get 12 errors. Most of which seem to be related to a problem with calling the "tolist" method.

Re: [Numpy-discussion] URGENT: Re: 1.1.0rc1, Win32 Installer: please test it

2008-05-21 Thread Alan G Isaac
On Tue, 20 May 2008, joep apparently wrote: > missed with option all=True: Yes, I also see this with numpy.test(all=True). (Same old machine (no SSE2) running Win 2000.) Alan == ERROR: Test creation by view ---

Re: [Numpy-discussion] Ticket #798: `piecewise` exposes raw memory

2008-05-21 Thread Ondrej Certik
On Wed, May 21, 2008 at 11:30 AM, Stéfan van der Walt <[EMAIL PROTECTED]> wrote: > Referring to > http://scipy.org/scipy/numpy/ticket/798 > > `piecewise` uses `empty` to allocate output memory. If the conditions > do not sufficiently cover the output, then raw memory is returned, > e.g., > > {{{ >

[Numpy-discussion] Ticket #798: `piecewise` exposes raw memory

2008-05-21 Thread Stéfan van der Walt
Referring to http://scipy.org/scipy/numpy/ticket/798 `piecewise` uses `empty` to allocate output memory. If the conditions do not sufficiently cover the output, then raw memory is returned, e.g., {{{ import numpy as np np.piecewise([0,1,2],[True,False,False],[1]) }}} A patch which addresses the

Re: [Numpy-discussion] 1.1.0rc1 OSX Installer - please test

2008-05-21 Thread George Nurser
2008/5/21 Jarrod Millman <[EMAIL PROTECTED]>: > On Mon, May 19, 2008 at 12:39 PM, Christopher Burns <[EMAIL PROTECTED]> wrote: >> I've built a Mac binary for the 1.1 release candidate. Mac users, >> please test it from: >> >> https://cirl.berkeley.edu/numpy/numpy-1.1.0rc1-py2.5-macosx10.5.dmg >> >

Re: [Numpy-discussion] ANN: NumPy/SciPy Documentation Marathon 2008

2008-05-21 Thread Rob Hetland
On May 21, 2008, at 9:40 AM, Robert Kern wrote: > But please, let's not rehash discussions which have already happened > (like this one). I didn't mean to suggest rehashing the documentation format. I agree that this has been discussed enough. Rather, sometimes it's not clear to me how to ap

Re: [Numpy-discussion] ANN: NumPy/SciPy Documentation Marathon 2008

2008-05-21 Thread Stéfan van der Walt
Hi Rob 2008/5/21 Rob Hetland <[EMAIL PROTECTED]>: > See Also > > function : One line description from function's docstring > Longer description here over potentially many lines. Lorem ipsum > dolor sit amet, > consectetur adipisicing elit, sed do eiusmod tempor incididunt ut > lab

Re: [Numpy-discussion] ANN: NumPy/SciPy Documentation Marathon 2008

2008-05-21 Thread Robert Kern
On Wed, May 21, 2008 at 2:27 AM, Rob Hetland <[EMAIL PROTECTED]> wrote: > > Should we add a general discussion section to the Wiki? Discussion should happen here on the mailing list instead of the wiki. But please, let's not rehash discussions which have already happened (like this one). They simp

Re: [Numpy-discussion] first recarray steps

2008-05-21 Thread Vincent Schut
Robert Kern wrote: > On Wed, May 21, 2008 at 2:03 AM, Vincent Schut <[EMAIL PROTECTED]> wrote: >> Robert Kern wrote: >>> On Wed, May 21, 2008 at 1:48 AM, Vincent Schut <[EMAIL PROTECTED]> wrote: Christopher Barker wrote: > Also, if you image data is rgb, usually, that's a (width, height, 3

[Numpy-discussion] Outputting arrays.

2008-05-21 Thread Alexandra Geddes
Hi. 1. Is there a module or other code to write arrays to databases (they want access databases)? 2. How can i write 2D arrays to textfiles with labels on the rows and columns? thanks! alex. ___ Numpy-discussion mailing list Numpy-discussion

Re: [Numpy-discussion] ANN: NumPy/SciPy Documentation Marathon 2008

2008-05-21 Thread Rob Hetland
Should we add a general discussion section to the Wiki? I would just do this, but it seems like a fundamental enough addition that I though I would suggest it first. The rational is that there are some stylistic questions that are not covered in the example. For instance, I think that t

Re: [Numpy-discussion] first recarray steps

2008-05-21 Thread Robert Kern
On Wed, May 21, 2008 at 2:03 AM, Vincent Schut <[EMAIL PROTECTED]> wrote: > Robert Kern wrote: >> On Wed, May 21, 2008 at 1:48 AM, Vincent Schut <[EMAIL PROTECTED]> wrote: >>> Christopher Barker wrote: >> Also, if you image data is rgb, usually, that's a (width, height, 3) array: rgbrgbrg

Re: [Numpy-discussion] first recarray steps

2008-05-21 Thread Vincent Schut
Robert Kern wrote: > On Wed, May 21, 2008 at 1:48 AM, Vincent Schut <[EMAIL PROTECTED]> wrote: >> Christopher Barker wrote: > >>> Also, if you image data is rgb, usually, that's a (width, height, 3) >>> array: rgbrgbrgbrgb... in memory. If you have a (3, width, height) >>> array, then that's r