[Numpy-discussion] #882: PyArray_ConvertToCommon and 0 sized sequences

2008-08-28 Thread David Cournapeau
Hi, The error in #882 looks pretty straightforward: from numpy import numarray a = numarray.array(1) a.choose([]) core dumps because a.choose calls PyArray_ConvertCommonType with a 0-sized array, which is not handled correctly. Should the 0-sized case be handled in this function, or in PyArr

Re: [Numpy-discussion] Where does _assert_func come from.

2008-08-28 Thread Fernando Perez
On Thu, Aug 28, 2008 at 7:07 PM, Charles R Harris <[EMAIL PROTECTED]> wrote: > Thanks. It's always nice to learn something new. Well, take my comments with a grain of salt. Gael always chastises me for not having drunk enough of the computer science abstraction kool-aid, so my take on these thin

Re: [Numpy-discussion] Where does _assert_func come from.

2008-08-28 Thread Charles R Harris
On Thu, Aug 28, 2008 at 7:54 PM, Fernando Perez <[EMAIL PROTECTED]>wrote: > On Thu, Aug 28, 2008 at 6:39 PM, Charles R Harris > <[EMAIL PROTECTED]> wrote: > > > Turns out it's defined in a derived class, which I suppose makes it a > mix-in > > class. Looks kinda like the python version of pure vir

Re: [Numpy-discussion] Where does _assert_func come from.

2008-08-28 Thread Fernando Perez
On Thu, Aug 28, 2008 at 6:39 PM, Charles R Harris <[EMAIL PROTECTED]> wrote: > Turns out it's defined in a derived class, which I suppose makes it a mix-in > class. Looks kinda like the python version of pure virtual functions in C++ > base classes. It's a bit surprising to see a python pattern th

Re: [Numpy-discussion] Where does _assert_func come from.

2008-08-28 Thread Charles R Harris
On Thu, Aug 28, 2008 at 6:48 PM, Fernando Perez <[EMAIL PROTECTED]>wrote: > On Thu, Aug 28, 2008 at 5:26 PM, Charles R Harris > <[EMAIL PROTECTED]> wrote: > > Where does _assert_func come from in this fragment from a test class? > > > > class _GenericTest(object): > > def _test_equal(self, a,

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

2008-08-28 Thread Andrew Straw
Alan Jackson wrote: > Looking for advice on a good way to handle this problem. > > I'm dealing with large tables (Gigabyte large). I would like to > efficiently subset values from one column based on the values in > another column, and get arrays out of the operation. For example, > say I have 2 c

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

2008-08-28 Thread Alan Jackson
Looking for advice on a good way to handle this problem. I'm dealing with large tables (Gigabyte large). I would like to efficiently subset values from one column based on the values in another column, and get arrays out of the operation. For example, say I have 2 columns, "energy" and "collectio

Re: [Numpy-discussion] Where does _assert_func come from.

2008-08-28 Thread Fernando Perez
On Thu, Aug 28, 2008 at 5:26 PM, Charles R Harris <[EMAIL PROTECTED]> wrote: > Where does _assert_func come from in this fragment from a test class? > > class _GenericTest(object): > def _test_equal(self, a, b): > self._assert_func(a, b) > > I hope it isn't monkey patched in. It could

[Numpy-discussion] Where does _assert_func come from.

2008-08-28 Thread Charles R Harris
Where does _assert_func come from in this fragment from a test class? class _GenericTest(object): def _test_equal(self, a, b): self._assert_func(a, b) I hope it isn't monkey patched in. Chuck ___ Numpy-discussion mailing list Numpy-discussi

Re: [Numpy-discussion] numpy and py2exe

2008-08-28 Thread Christopher Barker
Charles R Harris wrote: > This needs to be fixed in trunk, please open a ticket. There have been > several other fixes for -OO recently and I don't think we are done with > them yet. already there: http://scipy.org/scipy/numpy/ticket/893 and: http://scipy.org/scipy/numpy/ticket/894 -Chris

Re: [Numpy-discussion] numpy and py2exe

2008-08-28 Thread Charles R Harris
On Thu, Aug 28, 2008 at 11:50 AM, Charles R Harris < [EMAIL PROTECTED]> wrote: > > > On Thu, Aug 28, 2008 at 11:36 AM, Christopher Barker < > [EMAIL PROTECTED]> wrote: > >> Hi all, >> >> An issue just came up with numpy and py2exe on the wxPython list. A >> solution has been found, but I thought I

Re: [Numpy-discussion] ImportError: No module named my_module

2008-08-28 Thread Nils Wagner
On Thu, 28 Aug 2008 12:58:05 -0500 "Robert Kern" <[EMAIL PROTECTED]> wrote: > On Thu, Aug 28, 2008 at 12:55, Matthew Brett ><[EMAIL PROTECTED]> wrote: >> Hi, >> >>> find . -name example.py >>> >>> in my svn/numpy directory yields >>> >>> ./doc/example.py >>> ./doc/newdtype_example/example.py >>

[Numpy-discussion] numpy and py2exe

2008-08-28 Thread Christopher Barker
Hi all, An issue just came up with numpy and py2exe on the wxPython list. A solution has been found, but I thought I'd post here, so that it could be on the numpy developers' radar when considering the structure of numpy for the future: > I'm compile a wxPython script using GUI2Exe, and am get

Re: [Numpy-discussion] ImportError: No module named my_module

2008-08-28 Thread Robert Kern
On Thu, Aug 28, 2008 at 12:55, Matthew Brett <[EMAIL PROTECTED]> wrote: > Hi, > >> find . -name example.py >> >> in my svn/numpy directory yields >> >> ./doc/example.py >> ./doc/newdtype_example/example.py > > Ah - how strange - I just tried deleting my doc directory and checking > it out again, an

Re: [Numpy-discussion] ImportError: No module named my_module

2008-08-28 Thread Matthew Brett
Hi, > find . -name example.py > > in my svn/numpy directory yields > > ./doc/example.py > ./doc/newdtype_example/example.py Ah - how strange - I just tried deleting my doc directory and checking it out again, and don't have those files or directory... Matthew

Re: [Numpy-discussion] numpy and py2exe

2008-08-28 Thread Charles R Harris
On Thu, Aug 28, 2008 at 11:36 AM, Christopher Barker <[EMAIL PROTECTED]>wrote: > Hi all, > > An issue just came up with numpy and py2exe on the wxPython list. A > solution has been found, but I thought I'd post here, so that it could > be on the numpy developers' radar when considering the structu

Re: [Numpy-discussion] ImportError: No module named my_module

2008-08-28 Thread Nils Wagner
On Thu, 28 Aug 2008 10:21:16 -0700 "Matthew Brett" <[EMAIL PROTECTED]> wrote: > Hi Nils, > > I don't have an example.py in a checkout from a few >seconds ago - it > is possible it could be a stray file? > > Best, > > Matthew > Running find . -name example.py in my svn/numpy directory yie

Re: [Numpy-discussion] ImportError: No module named my_module

2008-08-28 Thread Matthew Brett
Hi Nils, I don't have an example.py in a checkout from a few seconds ago - it is possible it could be a stray file? Best, Matthew On Thu, Aug 28, 2008 at 3:29 AM, Nils Wagner <[EMAIL PROTECTED]> wrote: > == > ERROR: Failure: Im

Re: [Numpy-discussion] rc1 update

2008-08-28 Thread Stéfan van der Walt
2008/8/28 Andrew Straw <[EMAIL PROTECTED]>: > Jarrod Millman wrote: >> On Thu, Aug 28, 2008 at 7:48 AM, Travis E. Oliphant >> <[EMAIL PROTECTED]> wrote: >> >>> +1 on what Andrew said. >>> >> >> I don't really care that much, but I do think API is better than >> FEATURE. I would think that there ma

Re: [Numpy-discussion] rc1 update

2008-08-28 Thread Andrew Straw
Jarrod Millman wrote: > On Thu, Aug 28, 2008 at 7:48 AM, Travis E. Oliphant > <[EMAIL PROTECTED]> wrote: > >> +1 on what Andrew said. >> > > I don't really care that much, but I do think API is better than > FEATURE. I would think that there may be times when we change the API > but not th

Re: [Numpy-discussion] rc1 update

2008-08-28 Thread Travis E. Oliphant
Andrew Straw wrote: > Joining the party late, here, so I don't know how much has already been > said... Particularly in favor of renaming NPY_VERSION. What's the benefit? > > I'm -1 on removing the name NPY_VERSION. It would cause unnecessary > breakage. > > I'm -0 on defining an additional NPY_ABI

Re: [Numpy-discussion] rc1 update

2008-08-28 Thread Jarrod Millman
On Thu, Aug 28, 2008 at 7:48 AM, Travis E. Oliphant <[EMAIL PROTECTED]> wrote: > +1 on what Andrew said. I don't really care that much, but I do think API is better than FEATURE. I would think that there may be times when we change the API but not the features (e.g., renaming something). I won't

[Numpy-discussion] ImportError: No module named my_module

2008-08-28 Thread Nils Wagner
== ERROR: Failure: ImportError (No module named my_module) -- Traceback (most recent call last): File "/data/home/nwagner/local/lib/python2.5/site-packages/nos

Re: [Numpy-discussion] Array subclassing - question for Travis

2008-08-28 Thread Stéfan van der Walt
2008/8/28 Matthew Brett <[EMAIL PROTECTED]>: > np.multiply.outer, always returns an ndarray type, regardless of the > subtypes it is passed. Sorry, I don't know what I was thinking. You are right! Cheers Stéfan ___ Numpy-discussion mailing list Numpy-d

Re: [Numpy-discussion] numpy trunk build broken on 32-bit ubuntu

2008-08-28 Thread David Cournapeau
On Wed, Aug 27, 2008 at 9:44 AM, Pierre GM <[EMAIL PROTECTED]> wrote: > On Tuesday 26 August 2008 20:41:44 Charles R Harris wrote: > >> I've been thinking of reverting the changes rather than waiting for David >> to get back. > > As mentioned in a previous email, that fails on x86_64 AMD as well, s